File size: 116,949 Bytes
51345ad |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 |
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/compat get default export */
/******/ (() => {
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = (module) => {
/******/ var getter = module && module.__esModule ?
/******/ () => (module['default']) :
/******/ () => (module);
/******/ __webpack_require__.d(getter, { a: getter });
/******/ return getter;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/******/ /* webpack/runtime/make namespace object */
/******/ (() => {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = (exports) => {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
PluginBlockSettingsMenuItem: () => (/* reexport */ PluginBlockSettingsMenuItem),
PluginDocumentSettingPanel: () => (/* reexport */ PluginDocumentSettingPanel),
PluginMoreMenuItem: () => (/* reexport */ PluginMoreMenuItem),
PluginPostPublishPanel: () => (/* reexport */ PluginPostPublishPanel),
PluginPostStatusInfo: () => (/* reexport */ PluginPostStatusInfo),
PluginPrePublishPanel: () => (/* reexport */ PluginPrePublishPanel),
PluginSidebar: () => (/* reexport */ PluginSidebar),
PluginSidebarMoreMenuItem: () => (/* reexport */ PluginSidebarMoreMenuItem),
__experimentalFullscreenModeClose: () => (/* reexport */ fullscreen_mode_close),
__experimentalMainDashboardButton: () => (/* binding */ __experimentalMainDashboardButton),
__experimentalPluginPostExcerpt: () => (/* reexport */ __experimentalPluginPostExcerpt),
initializeEditor: () => (/* binding */ initializeEditor),
reinitializeEditor: () => (/* binding */ reinitializeEditor),
store: () => (/* reexport */ store)
});
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
var actions_namespaceObject = {};
__webpack_require__.r(actions_namespaceObject);
__webpack_require__.d(actions_namespaceObject, {
__experimentalSetPreviewDeviceType: () => (__experimentalSetPreviewDeviceType),
__unstableCreateTemplate: () => (__unstableCreateTemplate),
closeGeneralSidebar: () => (closeGeneralSidebar),
closeModal: () => (closeModal),
closePublishSidebar: () => (closePublishSidebar),
hideBlockTypes: () => (hideBlockTypes),
initializeMetaBoxes: () => (initializeMetaBoxes),
metaBoxUpdatesFailure: () => (metaBoxUpdatesFailure),
metaBoxUpdatesSuccess: () => (metaBoxUpdatesSuccess),
openGeneralSidebar: () => (openGeneralSidebar),
openModal: () => (openModal),
openPublishSidebar: () => (openPublishSidebar),
removeEditorPanel: () => (removeEditorPanel),
requestMetaBoxUpdates: () => (requestMetaBoxUpdates),
setAvailableMetaBoxesPerLocation: () => (setAvailableMetaBoxesPerLocation),
setIsEditingTemplate: () => (setIsEditingTemplate),
setIsInserterOpened: () => (setIsInserterOpened),
setIsListViewOpened: () => (setIsListViewOpened),
showBlockTypes: () => (showBlockTypes),
switchEditorMode: () => (switchEditorMode),
toggleDistractionFree: () => (toggleDistractionFree),
toggleEditorPanelEnabled: () => (toggleEditorPanelEnabled),
toggleEditorPanelOpened: () => (toggleEditorPanelOpened),
toggleFeature: () => (toggleFeature),
togglePinnedPluginItem: () => (togglePinnedPluginItem),
togglePublishSidebar: () => (togglePublishSidebar),
updatePreferredStyleVariations: () => (updatePreferredStyleVariations)
});
// NAMESPACE OBJECT: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
var selectors_namespaceObject = {};
__webpack_require__.r(selectors_namespaceObject);
__webpack_require__.d(selectors_namespaceObject, {
__experimentalGetInsertionPoint: () => (__experimentalGetInsertionPoint),
__experimentalGetPreviewDeviceType: () => (__experimentalGetPreviewDeviceType),
areMetaBoxesInitialized: () => (areMetaBoxesInitialized),
getActiveGeneralSidebarName: () => (getActiveGeneralSidebarName),
getActiveMetaBoxLocations: () => (getActiveMetaBoxLocations),
getAllMetaBoxes: () => (getAllMetaBoxes),
getEditedPostTemplate: () => (getEditedPostTemplate),
getEditorMode: () => (getEditorMode),
getHiddenBlockTypes: () => (getHiddenBlockTypes),
getMetaBoxesPerLocation: () => (getMetaBoxesPerLocation),
getPreference: () => (getPreference),
getPreferences: () => (getPreferences),
hasMetaBoxes: () => (hasMetaBoxes),
isEditingTemplate: () => (isEditingTemplate),
isEditorPanelEnabled: () => (isEditorPanelEnabled),
isEditorPanelOpened: () => (isEditorPanelOpened),
isEditorPanelRemoved: () => (isEditorPanelRemoved),
isEditorSidebarOpened: () => (isEditorSidebarOpened),
isFeatureActive: () => (isFeatureActive),
isInserterOpened: () => (isInserterOpened),
isListViewOpened: () => (isListViewOpened),
isMetaBoxLocationActive: () => (isMetaBoxLocationActive),
isMetaBoxLocationVisible: () => (isMetaBoxLocationVisible),
isModalActive: () => (isModalActive),
isPluginItemPinned: () => (isPluginItemPinned),
isPluginSidebarOpened: () => (isPluginSidebarOpened),
isPublishSidebarOpened: () => (isPublishSidebarOpened),
isSavingMetaBoxes: () => (selectors_isSavingMetaBoxes)
});
;// CONCATENATED MODULE: external ["wp","blocks"]
const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
;// CONCATENATED MODULE: external ["wp","blockLibrary"]
const external_wp_blockLibrary_namespaceObject = window["wp"]["blockLibrary"];
;// CONCATENATED MODULE: external ["wp","deprecated"]
const external_wp_deprecated_namespaceObject = window["wp"]["deprecated"];
var external_wp_deprecated_default = /*#__PURE__*/__webpack_require__.n(external_wp_deprecated_namespaceObject);
;// CONCATENATED MODULE: external ["wp","element"]
const external_wp_element_namespaceObject = window["wp"]["element"];
;// CONCATENATED MODULE: external ["wp","data"]
const external_wp_data_namespaceObject = window["wp"]["data"];
;// CONCATENATED MODULE: external ["wp","preferences"]
const external_wp_preferences_namespaceObject = window["wp"]["preferences"];
;// CONCATENATED MODULE: external ["wp","widgets"]
const external_wp_widgets_namespaceObject = window["wp"]["widgets"];
;// CONCATENATED MODULE: external ["wp","editor"]
const external_wp_editor_namespaceObject = window["wp"]["editor"];
;// CONCATENATED MODULE: external ["wp","components"]
const external_wp_components_namespaceObject = window["wp"]["components"];
;// CONCATENATED MODULE: external ["wp","coreData"]
const external_wp_coreData_namespaceObject = window["wp"]["coreData"];
;// CONCATENATED MODULE: external ["wp","commands"]
const external_wp_commands_namespaceObject = window["wp"]["commands"];
;// CONCATENATED MODULE: ./node_modules/clsx/dist/clsx.mjs
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
;// CONCATENATED MODULE: external ["wp","blockEditor"]
const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
;// CONCATENATED MODULE: external ["wp","plugins"]
const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
;// CONCATENATED MODULE: external ["wp","i18n"]
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
;// CONCATENATED MODULE: external ["wp","notices"]
const external_wp_notices_namespaceObject = window["wp"]["notices"];
;// CONCATENATED MODULE: external ["wp","coreCommands"]
const external_wp_coreCommands_namespaceObject = window["wp"]["coreCommands"];
;// CONCATENATED MODULE: external ["wp","url"]
const external_wp_url_namespaceObject = window["wp"]["url"];
;// CONCATENATED MODULE: external ["wp","htmlEntities"]
const external_wp_htmlEntities_namespaceObject = window["wp"]["htmlEntities"];
;// CONCATENATED MODULE: external ["wp","primitives"]
const external_wp_primitives_namespaceObject = window["wp"]["primitives"];
;// CONCATENATED MODULE: external "ReactJSXRuntime"
const external_ReactJSXRuntime_namespaceObject = window["ReactJSXRuntime"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/wordpress.js
/**
* WordPress dependencies
*/
const wordpress = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "-2 -2 24 24",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M20 10c0-5.51-4.49-10-10-10C4.48 0 0 4.49 0 10c0 5.52 4.48 10 10 10 5.51 0 10-4.48 10-10zM7.78 15.37L4.37 6.22c.55-.02 1.17-.08 1.17-.08.5-.06.44-1.13-.06-1.11 0 0-1.45.11-2.37.11-.18 0-.37 0-.58-.01C4.12 2.69 6.87 1.11 10 1.11c2.33 0 4.45.87 6.05 2.34-.68-.11-1.65.39-1.65 1.58 0 .74.45 1.36.9 2.1.35.61.55 1.36.55 2.46 0 1.49-1.4 5-1.4 5l-3.03-8.37c.54-.02.82-.17.82-.17.5-.05.44-1.25-.06-1.22 0 0-1.44.12-2.38.12-.87 0-2.33-.12-2.33-.12-.5-.03-.56 1.2-.06 1.22l.92.08 1.26 3.41zM17.41 10c.24-.64.74-1.87.43-4.25.7 1.29 1.05 2.71 1.05 4.25 0 3.29-1.73 6.24-4.4 7.78.97-2.59 1.94-5.2 2.92-7.78zM6.1 18.09C3.12 16.65 1.11 13.53 1.11 10c0-1.3.23-2.48.72-3.59C3.25 10.3 4.67 14.2 6.1 18.09zm4.03-6.63l2.58 6.98c-.86.29-1.76.45-2.71.45-.79 0-1.57-.11-2.29-.33.81-2.38 1.62-4.74 2.42-7.1z"
})
});
/* harmony default export */ const library_wordpress = (wordpress);
;// CONCATENATED MODULE: external ["wp","compose"]
const external_wp_compose_namespaceObject = window["wp"]["compose"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/reducer.js
/**
* WordPress dependencies
*/
/**
* Reducer keeping track of the meta boxes isSaving state.
* A "true" value means the meta boxes saving request is in-flight.
*
*
* @param {boolean} state Previous state.
* @param {Object} action Action Object.
*
* @return {Object} Updated state.
*/
function isSavingMetaBoxes(state = false, action) {
switch (action.type) {
case 'REQUEST_META_BOX_UPDATES':
return true;
case 'META_BOX_UPDATES_SUCCESS':
case 'META_BOX_UPDATES_FAILURE':
return false;
default:
return state;
}
}
function mergeMetaboxes(metaboxes = [], newMetaboxes) {
const mergedMetaboxes = [...metaboxes];
for (const metabox of newMetaboxes) {
const existing = mergedMetaboxes.findIndex(box => box.id === metabox.id);
if (existing !== -1) {
mergedMetaboxes[existing] = metabox;
} else {
mergedMetaboxes.push(metabox);
}
}
return mergedMetaboxes;
}
/**
* Reducer keeping track of the meta boxes per location.
*
* @param {boolean} state Previous state.
* @param {Object} action Action Object.
*
* @return {Object} Updated state.
*/
function metaBoxLocations(state = {}, action) {
switch (action.type) {
case 'SET_META_BOXES_PER_LOCATIONS':
{
const newState = {
...state
};
for (const [location, metaboxes] of Object.entries(action.metaBoxesPerLocation)) {
newState[location] = mergeMetaboxes(newState[location], metaboxes);
}
return newState;
}
}
return state;
}
/**
* Reducer tracking whether meta boxes are initialized.
*
* @param {boolean} state
* @param {Object} action
*
* @return {boolean} Updated state.
*/
function metaBoxesInitialized(state = false, action) {
switch (action.type) {
case 'META_BOXES_INITIALIZED':
return true;
}
return state;
}
const metaBoxes = (0,external_wp_data_namespaceObject.combineReducers)({
isSaving: isSavingMetaBoxes,
locations: metaBoxLocations,
initialized: metaBoxesInitialized
});
/* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
metaBoxes
}));
;// CONCATENATED MODULE: external ["wp","apiFetch"]
const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
;// CONCATENATED MODULE: external ["wp","hooks"]
const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/utils/meta-boxes.js
/**
* Function returning the current Meta Boxes DOM Node in the editor
* whether the meta box area is opened or not.
* If the MetaBox Area is visible returns it, and returns the original container instead.
*
* @param {string} location Meta Box location.
*
* @return {string} HTML content.
*/
const getMetaBoxContainer = location => {
const area = document.querySelector(`.edit-post-meta-boxes-area.is-${location} .metabox-location-${location}`);
if (area) {
return area;
}
return document.querySelector('#metaboxes .metabox-location-' + location);
};
;// CONCATENATED MODULE: external ["wp","privateApis"]
const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/lock-unlock.js
/**
* WordPress dependencies
*/
const {
lock,
unlock
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/edit-post');
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/actions.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
interfaceStore
} = unlock(external_wp_editor_namespaceObject.privateApis);
/**
* Returns an action object used in signalling that the user opened an editor sidebar.
*
* @param {?string} name Sidebar name to be opened.
*/
const openGeneralSidebar = name => ({
registry
}) => {
registry.dispatch(interfaceStore).enableComplementaryArea('core', name);
};
/**
* Returns an action object signalling that the user closed the sidebar.
*/
const closeGeneralSidebar = () => ({
registry
}) => registry.dispatch(interfaceStore).disableComplementaryArea('core');
/**
* Returns an action object used in signalling that the user opened a modal.
*
* @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.
*
*
* @param {string} name A string that uniquely identifies the modal.
*
* @return {Object} Action object.
*/
const openModal = name => ({
registry
}) => {
external_wp_deprecated_default()("select( 'core/edit-post' ).openModal( name )", {
since: '6.3',
alternative: "select( 'core/interface').openModal( name )"
});
return registry.dispatch(interfaceStore).openModal(name);
};
/**
* Returns an action object signalling that the user closed a modal.
*
* @deprecated since WP 6.3 use `core/interface` store's action with the same name instead.
*
* @return {Object} Action object.
*/
const closeModal = () => ({
registry
}) => {
external_wp_deprecated_default()("select( 'core/edit-post' ).closeModal()", {
since: '6.3',
alternative: "select( 'core/interface').closeModal()"
});
return registry.dispatch(interfaceStore).closeModal();
};
/**
* Returns an action object used in signalling that the user opened the publish
* sidebar.
* @deprecated
*
* @return {Object} Action object
*/
const openPublishSidebar = () => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).openPublishSidebar", {
since: '6.6',
alternative: "dispatch( 'core/editor').openPublishSidebar"
});
registry.dispatch(external_wp_editor_namespaceObject.store).openPublishSidebar();
};
/**
* Returns an action object used in signalling that the user closed the
* publish sidebar.
* @deprecated
*
* @return {Object} Action object.
*/
const closePublishSidebar = () => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).closePublishSidebar", {
since: '6.6',
alternative: "dispatch( 'core/editor').closePublishSidebar"
});
registry.dispatch(external_wp_editor_namespaceObject.store).closePublishSidebar();
};
/**
* Returns an action object used in signalling that the user toggles the publish sidebar.
* @deprecated
*
* @return {Object} Action object
*/
const togglePublishSidebar = () => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).togglePublishSidebar", {
since: '6.6',
alternative: "dispatch( 'core/editor').togglePublishSidebar"
});
registry.dispatch(external_wp_editor_namespaceObject.store).togglePublishSidebar();
};
/**
* Returns an action object used to enable or disable a panel in the editor.
*
* @deprecated
*
* @param {string} panelName A string that identifies the panel to enable or disable.
*
* @return {Object} Action object.
*/
const toggleEditorPanelEnabled = panelName => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).toggleEditorPanelEnabled", {
since: '6.5',
alternative: "dispatch( 'core/editor').toggleEditorPanelEnabled"
});
registry.dispatch(external_wp_editor_namespaceObject.store).toggleEditorPanelEnabled(panelName);
};
/**
* Opens a closed panel and closes an open panel.
*
* @deprecated
*
* @param {string} panelName A string that identifies the panel to open or close.
*/
const toggleEditorPanelOpened = panelName => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).toggleEditorPanelOpened", {
since: '6.5',
alternative: "dispatch( 'core/editor').toggleEditorPanelOpened"
});
registry.dispatch(external_wp_editor_namespaceObject.store).toggleEditorPanelOpened(panelName);
};
/**
* Returns an action object used to remove a panel from the editor.
*
* @deprecated
*
* @param {string} panelName A string that identifies the panel to remove.
*
* @return {Object} Action object.
*/
const removeEditorPanel = panelName => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).removeEditorPanel", {
since: '6.5',
alternative: "dispatch( 'core/editor').removeEditorPanel"
});
registry.dispatch(external_wp_editor_namespaceObject.store).removeEditorPanel(panelName);
};
/**
* Triggers an action used to toggle a feature flag.
*
* @param {string} feature Feature name.
*/
const toggleFeature = feature => ({
registry
}) => registry.dispatch(external_wp_preferences_namespaceObject.store).toggle('core/edit-post', feature);
/**
* Triggers an action used to switch editor mode.
*
* @deprecated
*
* @param {string} mode The editor mode.
*/
const switchEditorMode = mode => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).switchEditorMode", {
since: '6.6',
alternative: "dispatch( 'core/editor').switchEditorMode"
});
registry.dispatch(external_wp_editor_namespaceObject.store).switchEditorMode(mode);
};
/**
* Triggers an action object used to toggle a plugin name flag.
*
* @param {string} pluginName Plugin name.
*/
const togglePinnedPluginItem = pluginName => ({
registry
}) => {
const isPinned = registry.select(interfaceStore).isItemPinned('core', pluginName);
registry.dispatch(interfaceStore)[isPinned ? 'unpinItem' : 'pinItem']('core', pluginName);
};
/**
* Returns an action object used in signaling that a style should be auto-applied when a block is created.
*
* @deprecated
*/
function updatePreferredStyleVariations() {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).updatePreferredStyleVariations", {
since: '6.6',
hint: 'Preferred Style Variations are not supported anymore.'
});
return {
type: 'NOTHING'
};
}
/**
* Update the provided block types to be visible.
*
* @param {string[]} blockNames Names of block types to show.
*/
const showBlockTypes = blockNames => ({
registry
}) => {
unlock(registry.dispatch(external_wp_editor_namespaceObject.store)).showBlockTypes(blockNames);
};
/**
* Update the provided block types to be hidden.
*
* @param {string[]} blockNames Names of block types to hide.
*/
const hideBlockTypes = blockNames => ({
registry
}) => {
unlock(registry.dispatch(external_wp_editor_namespaceObject.store)).hideBlockTypes(blockNames);
};
/**
* Stores info about which Meta boxes are available in which location.
*
* @param {Object} metaBoxesPerLocation Meta boxes per location.
*/
function setAvailableMetaBoxesPerLocation(metaBoxesPerLocation) {
return {
type: 'SET_META_BOXES_PER_LOCATIONS',
metaBoxesPerLocation
};
}
/**
* Update a metabox.
*/
const requestMetaBoxUpdates = () => async ({
registry,
select,
dispatch
}) => {
dispatch({
type: 'REQUEST_META_BOX_UPDATES'
});
// Saves the wp_editor fields.
if (window.tinyMCE) {
window.tinyMCE.triggerSave();
}
// We gather the base form data.
const baseFormData = new window.FormData(document.querySelector('.metabox-base-form'));
const postId = baseFormData.get('post_ID');
const postType = baseFormData.get('post_type');
// Additional data needed for backward compatibility.
// If we do not provide this data, the post will be overridden with the default values.
// We cannot rely on getCurrentPost because right now on the editor we may be editing a pattern or a template.
// We need to retrieve the post that the base form data is referring to.
const post = registry.select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('postType', postType, postId);
const additionalData = [post.comment_status ? ['comment_status', post.comment_status] : false, post.ping_status ? ['ping_status', post.ping_status] : false, post.sticky ? ['sticky', post.sticky] : false, post.author ? ['post_author', post.author] : false].filter(Boolean);
// We gather all the metaboxes locations.
const activeMetaBoxLocations = select.getActiveMetaBoxLocations();
const formDataToMerge = [baseFormData, ...activeMetaBoxLocations.map(location => new window.FormData(getMetaBoxContainer(location)))];
// Merge all form data objects into a single one.
const formData = formDataToMerge.reduce((memo, currentFormData) => {
for (const [key, value] of currentFormData) {
memo.append(key, value);
}
return memo;
}, new window.FormData());
additionalData.forEach(([key, value]) => formData.append(key, value));
try {
// Save the metaboxes.
await external_wp_apiFetch_default()({
url: window._wpMetaBoxUrl,
method: 'POST',
body: formData,
parse: false
});
dispatch.metaBoxUpdatesSuccess();
} catch {
dispatch.metaBoxUpdatesFailure();
}
};
/**
* Returns an action object used to signal a successful meta box update.
*
* @return {Object} Action object.
*/
function metaBoxUpdatesSuccess() {
return {
type: 'META_BOX_UPDATES_SUCCESS'
};
}
/**
* Returns an action object used to signal a failed meta box update.
*
* @return {Object} Action object.
*/
function metaBoxUpdatesFailure() {
return {
type: 'META_BOX_UPDATES_FAILURE'
};
}
/**
* Action that changes the width of the editing canvas.
*
* @deprecated
*
* @param {string} deviceType
*/
const __experimentalSetPreviewDeviceType = deviceType => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).__experimentalSetPreviewDeviceType", {
since: '6.5',
version: '6.7',
hint: 'registry.dispatch( editorStore ).setDeviceType'
});
registry.dispatch(external_wp_editor_namespaceObject.store).setDeviceType(deviceType);
};
/**
* Returns an action object used to open/close the inserter.
*
* @deprecated
*
* @param {boolean|Object} value Whether the inserter should be opened (true) or closed (false).
*/
const setIsInserterOpened = value => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).setIsInserterOpened", {
since: '6.5',
alternative: "dispatch( 'core/editor').setIsInserterOpened"
});
registry.dispatch(external_wp_editor_namespaceObject.store).setIsInserterOpened(value);
};
/**
* Returns an action object used to open/close the list view.
*
* @deprecated
*
* @param {boolean} isOpen A boolean representing whether the list view should be opened or closed.
*/
const setIsListViewOpened = isOpen => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).setIsListViewOpened", {
since: '6.5',
alternative: "dispatch( 'core/editor').setIsListViewOpened"
});
registry.dispatch(external_wp_editor_namespaceObject.store).setIsListViewOpened(isOpen);
};
/**
* Returns an action object used to switch to template editing.
*
* @deprecated
*/
function setIsEditingTemplate() {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).setIsEditingTemplate", {
since: '6.5',
alternative: "dispatch( 'core/editor').setRenderingMode"
});
return {
type: 'NOTHING'
};
}
/**
* Create a block based template.
*
* @deprecated
*/
function __unstableCreateTemplate() {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).__unstableCreateTemplate", {
since: '6.5'
});
return {
type: 'NOTHING'
};
}
let actions_metaBoxesInitialized = false;
/**
* Initializes WordPress `postboxes` script and the logic for saving meta boxes.
*/
const initializeMetaBoxes = () => ({
registry,
select,
dispatch
}) => {
const isEditorReady = registry.select(external_wp_editor_namespaceObject.store).__unstableIsEditorReady();
if (!isEditorReady) {
return;
}
// Only initialize once.
if (actions_metaBoxesInitialized) {
return;
}
const postType = registry.select(external_wp_editor_namespaceObject.store).getCurrentPostType();
if (window.postboxes.page !== postType) {
window.postboxes.add_postbox_toggles(postType);
}
actions_metaBoxesInitialized = true;
// Save metaboxes on save completion, except for autosaves.
(0,external_wp_hooks_namespaceObject.addFilter)('editor.__unstableSavePost', 'core/edit-post/save-metaboxes', (previous, options) => previous.then(() => {
if (options.isAutosave) {
return;
}
if (!select.hasMetaBoxes()) {
return;
}
return dispatch.requestMetaBoxUpdates();
}));
dispatch({
type: 'META_BOXES_INITIALIZED'
});
};
/**
* Action that toggles Distraction free mode.
* Distraction free mode expects there are no sidebars, as due to the
* z-index values set, you can't close sidebars.
*
* @deprecated
*/
const toggleDistractionFree = () => ({
registry
}) => {
external_wp_deprecated_default()("dispatch( 'core/edit-post' ).toggleDistractionFree", {
since: '6.6',
alternative: "dispatch( 'core/editor').toggleDistractionFree"
});
registry.dispatch(external_wp_editor_namespaceObject.store).toggleDistractionFree();
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/selectors.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
interfaceStore: selectors_interfaceStore
} = unlock(external_wp_editor_namespaceObject.privateApis);
const EMPTY_ARRAY = [];
const EMPTY_OBJECT = {};
/**
* Returns the current editing mode.
*
* @param {Object} state Global application state.
*
* @return {string} Editing mode.
*/
const getEditorMode = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
var _select$get;
return (_select$get = select(external_wp_preferences_namespaceObject.store).get('core', 'editorMode')) !== null && _select$get !== void 0 ? _select$get : 'visual';
});
/**
* Returns true if the editor sidebar is opened.
*
* @param {Object} state Global application state
*
* @return {boolean} Whether the editor sidebar is opened.
*/
const isEditorSidebarOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
const activeGeneralSidebar = select(selectors_interfaceStore).getActiveComplementaryArea('core');
return ['edit-post/document', 'edit-post/block'].includes(activeGeneralSidebar);
});
/**
* Returns true if the plugin sidebar is opened.
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether the plugin sidebar is opened.
*/
const isPluginSidebarOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
const activeGeneralSidebar = select(selectors_interfaceStore).getActiveComplementaryArea('core');
return !!activeGeneralSidebar && !['edit-post/document', 'edit-post/block'].includes(activeGeneralSidebar);
});
/**
* Returns the current active general sidebar name, or null if there is no
* general sidebar active. The active general sidebar is a unique name to
* identify either an editor or plugin sidebar.
*
* Examples:
*
* - `edit-post/document`
* - `my-plugin/insert-image-sidebar`
*
* @param {Object} state Global application state.
*
* @return {?string} Active general sidebar name.
*/
const getActiveGeneralSidebarName = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
return select(selectors_interfaceStore).getActiveComplementaryArea('core');
});
/**
* Converts panels from the new preferences store format to the old format
* that the post editor previously used.
*
* The resultant converted data should look like this:
* {
* panelName: {
* enabled: false,
* opened: true,
* },
* anotherPanelName: {
* opened: true
* },
* }
*
* @param {string[] | undefined} inactivePanels An array of inactive panel names.
* @param {string[] | undefined} openPanels An array of open panel names.
*
* @return {Object} The converted panel data.
*/
function convertPanelsToOldFormat(inactivePanels, openPanels) {
var _ref;
// First reduce the inactive panels.
const panelsWithEnabledState = inactivePanels?.reduce((accumulatedPanels, panelName) => ({
...accumulatedPanels,
[panelName]: {
enabled: false
}
}), {});
// Then reduce the open panels, passing in the result of the previous
// reduction as the initial value so that both open and inactive
// panel state is combined.
const panels = openPanels?.reduce((accumulatedPanels, panelName) => {
const currentPanelState = accumulatedPanels?.[panelName];
return {
...accumulatedPanels,
[panelName]: {
...currentPanelState,
opened: true
}
};
}, panelsWithEnabledState !== null && panelsWithEnabledState !== void 0 ? panelsWithEnabledState : {});
// The panels variable will only be set if openPanels wasn't `undefined`.
// If it isn't set just return `panelsWithEnabledState`, and if that isn't
// set return an empty object.
return (_ref = panels !== null && panels !== void 0 ? panels : panelsWithEnabledState) !== null && _ref !== void 0 ? _ref : EMPTY_OBJECT;
}
/**
* Returns the preferences (these preferences are persisted locally).
*
* @param {Object} state Global application state.
*
* @return {Object} Preferences Object.
*/
const getPreferences = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).getPreferences`, {
since: '6.0',
alternative: `select( 'core/preferences' ).get`
});
const corePreferences = ['editorMode', 'hiddenBlockTypes'].reduce((accumulatedPrefs, preferenceKey) => {
const value = select(external_wp_preferences_namespaceObject.store).get('core', preferenceKey);
return {
...accumulatedPrefs,
[preferenceKey]: value
};
}, {});
// Panels were a preference, but the data structure changed when the state
// was migrated to the preferences store. They need to be converted from
// the new preferences store format to old format to ensure no breaking
// changes for plugins.
const inactivePanels = select(external_wp_preferences_namespaceObject.store).get('core', 'inactivePanels');
const openPanels = select(external_wp_preferences_namespaceObject.store).get('core', 'openPanels');
const panels = convertPanelsToOldFormat(inactivePanels, openPanels);
return {
...corePreferences,
panels
};
});
/**
*
* @param {Object} state Global application state.
* @param {string} preferenceKey Preference Key.
* @param {*} defaultValue Default Value.
*
* @return {*} Preference Value.
*/
function getPreference(state, preferenceKey, defaultValue) {
external_wp_deprecated_default()(`select( 'core/edit-post' ).getPreference`, {
since: '6.0',
alternative: `select( 'core/preferences' ).get`
});
// Avoid using the `getPreferences` registry selector where possible.
const preferences = getPreferences(state);
const value = preferences[preferenceKey];
return value === undefined ? defaultValue : value;
}
/**
* Returns an array of blocks that are hidden.
*
* @return {Array} A list of the hidden block types
*/
const getHiddenBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
var _select$get2;
return (_select$get2 = select(external_wp_preferences_namespaceObject.store).get('core', 'hiddenBlockTypes')) !== null && _select$get2 !== void 0 ? _select$get2 : EMPTY_ARRAY;
});
/**
* Returns true if the publish sidebar is opened.
*
* @deprecated
*
* @param {Object} state Global application state
*
* @return {boolean} Whether the publish sidebar is open.
*/
const isPublishSidebarOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isPublishSidebarOpened`, {
since: '6.6',
alternative: `select( 'core/editor' ).isPublishSidebarOpened`
});
return select(external_wp_editor_namespaceObject.store).isPublishSidebarOpened();
});
/**
* Returns true if the given panel was programmatically removed, or false otherwise.
* All panels are not removed by default.
*
* @deprecated
*
* @param {Object} state Global application state.
* @param {string} panelName A string that identifies the panel.
*
* @return {boolean} Whether or not the panel is removed.
*/
const isEditorPanelRemoved = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, panelName) => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditorPanelRemoved`, {
since: '6.5',
alternative: `select( 'core/editor' ).isEditorPanelRemoved`
});
return select(external_wp_editor_namespaceObject.store).isEditorPanelRemoved(panelName);
});
/**
* Returns true if the given panel is enabled, or false otherwise. Panels are
* enabled by default.
*
* @deprecated
*
* @param {Object} state Global application state.
* @param {string} panelName A string that identifies the panel.
*
* @return {boolean} Whether or not the panel is enabled.
*/
const isEditorPanelEnabled = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, panelName) => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditorPanelEnabled`, {
since: '6.5',
alternative: `select( 'core/editor' ).isEditorPanelEnabled`
});
return select(external_wp_editor_namespaceObject.store).isEditorPanelEnabled(panelName);
});
/**
* Returns true if the given panel is open, or false otherwise. Panels are
* closed by default.
*
* @deprecated
*
* @param {Object} state Global application state.
* @param {string} panelName A string that identifies the panel.
*
* @return {boolean} Whether or not the panel is open.
*/
const isEditorPanelOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, panelName) => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditorPanelOpened`, {
since: '6.5',
alternative: `select( 'core/editor' ).isEditorPanelOpened`
});
return select(external_wp_editor_namespaceObject.store).isEditorPanelOpened(panelName);
});
/**
* Returns true if a modal is active, or false otherwise.
*
* @deprecated since WP 6.3 use `core/interface` store's selector with the same name instead.
*
* @param {Object} state Global application state.
* @param {string} modalName A string that uniquely identifies the modal.
*
* @return {boolean} Whether the modal is active.
*/
const isModalActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, modalName) => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isModalActive`, {
since: '6.3',
alternative: `select( 'core/interface' ).isModalActive`
});
return !!select(selectors_interfaceStore).isModalActive(modalName);
});
/**
* Returns whether the given feature is enabled or not.
*
* @param {Object} state Global application state.
* @param {string} feature Feature slug.
*
* @return {boolean} Is active.
*/
const isFeatureActive = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, feature) => {
return !!select(external_wp_preferences_namespaceObject.store).get('core/edit-post', feature);
});
/**
* Returns true if the plugin item is pinned to the header.
* When the value is not set it defaults to true.
*
* @param {Object} state Global application state.
* @param {string} pluginName Plugin item name.
*
* @return {boolean} Whether the plugin item is pinned.
*/
const isPluginItemPinned = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, pluginName) => {
return select(selectors_interfaceStore).isItemPinned('core', pluginName);
});
/**
* Returns an array of active meta box locations.
*
* @param {Object} state Post editor state.
*
* @return {string[]} Active meta box locations.
*/
const getActiveMetaBoxLocations = (0,external_wp_data_namespaceObject.createSelector)(state => {
return Object.keys(state.metaBoxes.locations).filter(location => isMetaBoxLocationActive(state, location));
}, state => [state.metaBoxes.locations]);
/**
* Returns true if a metabox location is active and visible
*
* @param {Object} state Post editor state.
* @param {string} location Meta box location to test.
*
* @return {boolean} Whether the meta box location is active and visible.
*/
const isMetaBoxLocationVisible = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => (state, location) => {
return isMetaBoxLocationActive(state, location) && getMetaBoxesPerLocation(state, location)?.some(({
id
}) => {
return select(external_wp_editor_namespaceObject.store).isEditorPanelEnabled(state, `meta-box-${id}`);
});
});
/**
* Returns true if there is an active meta box in the given location, or false
* otherwise.
*
* @param {Object} state Post editor state.
* @param {string} location Meta box location to test.
*
* @return {boolean} Whether the meta box location is active.
*/
function isMetaBoxLocationActive(state, location) {
const metaBoxes = getMetaBoxesPerLocation(state, location);
return !!metaBoxes && metaBoxes.length !== 0;
}
/**
* Returns the list of all the available meta boxes for a given location.
*
* @param {Object} state Global application state.
* @param {string} location Meta box location to test.
*
* @return {?Array} List of meta boxes.
*/
function getMetaBoxesPerLocation(state, location) {
return state.metaBoxes.locations[location];
}
/**
* Returns the list of all the available meta boxes.
*
* @param {Object} state Global application state.
*
* @return {Array} List of meta boxes.
*/
const getAllMetaBoxes = (0,external_wp_data_namespaceObject.createSelector)(state => {
return Object.values(state.metaBoxes.locations).flat();
}, state => [state.metaBoxes.locations]);
/**
* Returns true if the post is using Meta Boxes
*
* @param {Object} state Global application state
*
* @return {boolean} Whether there are metaboxes or not.
*/
function hasMetaBoxes(state) {
return getActiveMetaBoxLocations(state).length > 0;
}
/**
* Returns true if the Meta Boxes are being saved.
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether the metaboxes are being saved.
*/
function selectors_isSavingMetaBoxes(state) {
return state.metaBoxes.isSaving;
}
/**
* Returns the current editing canvas device type.
*
* @deprecated
*
* @param {Object} state Global application state.
*
* @return {string} Device type.
*/
const __experimentalGetPreviewDeviceType = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-site' ).__experimentalGetPreviewDeviceType`, {
since: '6.5',
version: '6.7',
alternative: `select( 'core/editor' ).getDeviceType`
});
return select(external_wp_editor_namespaceObject.store).getDeviceType();
});
/**
* Returns true if the inserter is opened.
*
* @deprecated
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether the inserter is opened.
*/
const isInserterOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isInserterOpened`, {
since: '6.5',
alternative: `select( 'core/editor' ).isInserterOpened`
});
return select(external_wp_editor_namespaceObject.store).isInserterOpened();
});
/**
* Get the insertion point for the inserter.
*
* @deprecated
*
* @param {Object} state Global application state.
*
* @return {Object} The root client ID, index to insert at and starting filter value.
*/
const __experimentalGetInsertionPoint = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).__experimentalGetInsertionPoint`, {
since: '6.5',
version: '6.7'
});
return unlock(select(external_wp_editor_namespaceObject.store)).getInsertionPoint();
});
/**
* Returns true if the list view is opened.
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether the list view is opened.
*/
const isListViewOpened = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isListViewOpened`, {
since: '6.5',
alternative: `select( 'core/editor' ).isListViewOpened`
});
return select(external_wp_editor_namespaceObject.store).isListViewOpened();
});
/**
* Returns true if the template editing mode is enabled.
*
* @deprecated
*/
const isEditingTemplate = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
external_wp_deprecated_default()(`select( 'core/edit-post' ).isEditingTemplate`, {
since: '6.5',
alternative: `select( 'core/editor' ).getRenderingMode`
});
return select(external_wp_editor_namespaceObject.store).getCurrentPostType() === 'wp_template';
});
/**
* Returns true if meta boxes are initialized.
*
* @param {Object} state Global application state.
*
* @return {boolean} Whether meta boxes are initialized.
*/
function areMetaBoxesInitialized(state) {
return state.metaBoxes.initialized;
}
/**
* Retrieves the template of the currently edited post.
*
* @return {Object?} Post Template.
*/
const getEditedPostTemplate = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => () => {
const {
id: postId,
type: postType,
slug
} = select(external_wp_editor_namespaceObject.store).getCurrentPost();
const {
getSite,
getEditedEntityRecord,
getEntityRecords
} = select(external_wp_coreData_namespaceObject.store);
const siteSettings = getSite();
// First check if the current page is set as the posts page.
const isPostsPage = +postId === siteSettings?.page_for_posts;
if (isPostsPage) {
const defaultTemplateId = select(external_wp_coreData_namespaceObject.store).getDefaultTemplateId({
slug: 'home'
});
return getEditedEntityRecord('postType', 'wp_template', defaultTemplateId);
}
const currentTemplate = select(external_wp_editor_namespaceObject.store).getEditedPostAttribute('template');
if (currentTemplate) {
const templateWithSameSlug = getEntityRecords('postType', 'wp_template', {
per_page: -1
})?.find(template => template.slug === currentTemplate);
if (!templateWithSameSlug) {
return templateWithSameSlug;
}
return getEditedEntityRecord('postType', 'wp_template', templateWithSameSlug.id);
}
let slugToCheck;
// In `draft` status we might not have a slug available, so we use the `single`
// post type templates slug(ex page, single-post, single-product etc..).
// Pages do not need the `single` prefix in the slug to be prioritized
// through template hierarchy.
if (slug) {
slugToCheck = postType === 'page' ? `${postType}-${slug}` : `single-${postType}-${slug}`;
} else {
slugToCheck = postType === 'page' ? 'page' : `single-${postType}`;
}
const defaultTemplateId = select(external_wp_coreData_namespaceObject.store).getDefaultTemplateId({
slug: slugToCheck
});
return defaultTemplateId ? select(external_wp_coreData_namespaceObject.store).getEditedEntityRecord('postType', 'wp_template', defaultTemplateId) : null;
});
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/constants.js
/**
* The identifier for the data store.
*
* @type {string}
*/
const STORE_NAME = 'core/edit-post';
/**
* CSS selector string for the admin bar view post link anchor tag.
*
* @type {string}
*/
const VIEW_AS_LINK_SELECTOR = '#wp-admin-bar-view a';
/**
* CSS selector string for the admin bar preview post link anchor tag.
*
* @type {string}
*/
const VIEW_AS_PREVIEW_LINK_SELECTOR = '#wp-admin-bar-preview a';
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/store/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
/**
* Store definition for the edit post namespace.
*
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/data/README.md#createReduxStore
*
* @type {Object}
*/
const store = (0,external_wp_data_namespaceObject.createReduxStore)(STORE_NAME, {
reducer: reducer,
actions: actions_namespaceObject,
selectors: selectors_namespaceObject
});
(0,external_wp_data_namespaceObject.register)(store);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/back-button/fullscreen-mode-close.js
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function FullscreenModeClose({
showTooltip,
icon,
href,
initialPost
}) {
var _postType$labels$view;
const {
isActive,
isRequestingSiteIcon,
postType,
siteIconUrl
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getCurrentPostType
} = select(external_wp_editor_namespaceObject.store);
const {
isFeatureActive
} = select(store);
const {
getEntityRecord,
getPostType,
isResolving
} = select(external_wp_coreData_namespaceObject.store);
const siteData = getEntityRecord('root', '__unstableBase', undefined) || {};
const _postType = initialPost?.type || getCurrentPostType();
return {
isActive: isFeatureActive('fullscreenMode'),
isRequestingSiteIcon: isResolving('getEntityRecord', ['root', '__unstableBase', undefined]),
postType: getPostType(_postType),
siteIconUrl: siteData.site_icon_url
};
}, []);
const disableMotion = (0,external_wp_compose_namespaceObject.useReducedMotion)();
if (!isActive || !postType) {
return null;
}
let buttonIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
size: "36px",
icon: library_wordpress
});
const effect = {
expand: {
scale: 1.25,
transition: {
type: 'tween',
duration: '0.3'
}
}
};
if (siteIconUrl) {
buttonIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.img, {
variants: !disableMotion && effect,
alt: (0,external_wp_i18n_namespaceObject.__)('Site Icon'),
className: "edit-post-fullscreen-mode-close_site-icon",
src: siteIconUrl
});
}
if (isRequestingSiteIcon) {
buttonIcon = null;
}
// Override default icon if custom icon is provided via props.
if (icon) {
buttonIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Icon, {
size: "36px",
icon: icon
});
}
const classes = dist_clsx({
'edit-post-fullscreen-mode-close': true,
'has-icon': siteIconUrl
});
const buttonHref = href !== null && href !== void 0 ? href : (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
post_type: postType.slug
});
const buttonLabel = (_postType$labels$view = postType?.labels?.view_items) !== null && _postType$labels$view !== void 0 ? _postType$labels$view : (0,external_wp_i18n_namespaceObject.__)('Back');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
whileHover: "expand",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
className: classes,
href: buttonHref,
label: buttonLabel,
showTooltip: showTooltip,
children: buttonIcon
})
});
}
/* harmony default export */ const fullscreen_mode_close = (FullscreenModeClose);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/back-button/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
BackButton: BackButtonFill
} = unlock(external_wp_editor_namespaceObject.privateApis);
const slideX = {
hidden: {
x: '-100%'
},
distractionFreeInactive: {
x: 0
},
hover: {
x: 0,
transition: {
type: 'tween',
delay: 0.2
}
}
};
function BackButton({
initialPost
}) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BackButtonFill, {
children: ({
length
}) => length <= 1 && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__unstableMotion.div, {
variants: slideX,
transition: {
type: 'tween',
delay: 0.8
},
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(fullscreen_mode_close, {
showTooltip: true,
initialPost: initialPost
})
})
});
}
/* harmony default export */ const back_button = (BackButton);
;// CONCATENATED MODULE: external ["wp","keyboardShortcuts"]
const external_wp_keyboardShortcuts_namespaceObject = window["wp"]["keyboardShortcuts"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/keyboard-shortcuts/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function KeyboardShortcuts() {
const {
toggleFeature
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
const {
registerShortcut
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_keyboardShortcuts_namespaceObject.store);
(0,external_wp_element_namespaceObject.useEffect)(() => {
registerShortcut({
name: 'core/edit-post/toggle-fullscreen',
category: 'global',
description: (0,external_wp_i18n_namespaceObject.__)('Toggle fullscreen mode.'),
keyCombination: {
modifier: 'secondary',
character: 'f'
}
});
}, []);
(0,external_wp_keyboardShortcuts_namespaceObject.useShortcut)('core/edit-post/toggle-fullscreen', () => {
toggleFeature('fullscreenMode');
});
return null;
}
/* harmony default export */ const keyboard_shortcuts = (KeyboardShortcuts);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/init-pattern-modal/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
ReusableBlocksRenameHint
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
function InitPatternModal() {
const {
editPost
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
const [isModalOpen, setIsModalOpen] = (0,external_wp_element_namespaceObject.useState)(false);
const [syncType, setSyncType] = (0,external_wp_element_namespaceObject.useState)(undefined);
const [title, setTitle] = (0,external_wp_element_namespaceObject.useState)('');
const {
postType,
isNewPost
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getEditedPostAttribute,
isCleanNewPost
} = select(external_wp_editor_namespaceObject.store);
return {
postType: getEditedPostAttribute('type'),
isNewPost: isCleanNewPost()
};
}, []);
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (isNewPost && postType === 'wp_block') {
setIsModalOpen(true);
}
// We only want the modal to open when the page is first loaded.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
if (postType !== 'wp_block' || !isNewPost) {
return null;
}
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: isModalOpen && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Modal, {
title: (0,external_wp_i18n_namespaceObject.__)('Create pattern'),
onRequestClose: () => {
setIsModalOpen(false);
},
overlayClassName: "reusable-blocks-menu-items__convert-modal",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
onSubmit: event => {
event.preventDefault();
setIsModalOpen(false);
editPost({
title,
meta: {
wp_pattern_sync_status: syncType
}
});
},
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
spacing: "5",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
label: (0,external_wp_i18n_namespaceObject.__)('Name'),
value: title,
onChange: setTitle,
placeholder: (0,external_wp_i18n_namespaceObject.__)('My pattern'),
className: "patterns-create-modal__name-input",
__nextHasNoMarginBottom: true,
__next40pxDefaultSize: true
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ReusableBlocksRenameHint, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
label: (0,external_wp_i18n_namespaceObject._x)('Synced', 'pattern (singular)'),
help: (0,external_wp_i18n_namespaceObject.__)('Sync this pattern across multiple locations.'),
checked: !syncType,
onChange: () => {
setSyncType(!syncType ? 'unsynced' : undefined);
}
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalHStack, {
justify: "right",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
variant: "primary",
type: "submit",
disabled: !title,
__experimentalIsFocusable: true,
children: (0,external_wp_i18n_namespaceObject.__)('Create')
})
})]
})
})
})
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/browser-url/index.js
/**
* WordPress dependencies
*/
/**
* Returns the Post's Edit URL.
*
* @param {number} postId Post ID.
*
* @return {string} Post edit URL.
*/
function getPostEditURL(postId) {
return (0,external_wp_url_namespaceObject.addQueryArgs)('post.php', {
post: postId,
action: 'edit'
});
}
/**
* Returns the Post's Trashed URL.
*
* @param {number} postId Post ID.
* @param {string} postType Post Type.
*
* @return {string} Post trashed URL.
*/
function getPostTrashedURL(postId, postType) {
return (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
trashed: 1,
post_type: postType,
ids: postId
});
}
class BrowserURL extends external_wp_element_namespaceObject.Component {
constructor() {
super(...arguments);
this.state = {
historyId: null
};
}
componentDidUpdate(prevProps) {
const {
postId,
postStatus,
postType,
isSavingPost,
hasHistory
} = this.props;
const {
historyId
} = this.state;
// Posts are still dirty while saving so wait for saving to finish
// to avoid the unsaved changes warning when trashing posts.
if (postStatus === 'trash' && !isSavingPost) {
this.setTrashURL(postId, postType);
return;
}
if ((postId !== prevProps.postId || postId !== historyId) && postStatus !== 'auto-draft' && postId && !hasHistory) {
this.setBrowserURL(postId);
}
}
/**
* Navigates the browser to the post trashed URL to show a notice about the trashed post.
*
* @param {number} postId Post ID.
* @param {string} postType Post Type.
*/
setTrashURL(postId, postType) {
window.location.href = getPostTrashedURL(postId, postType);
}
/**
* Replaces the browser URL with a post editor link for the given post ID.
*
* Note it is important that, since this function may be called when the
* editor first loads, the result generated `getPostEditURL` matches that
* produced by the server. Otherwise, the URL will change unexpectedly.
*
* @param {number} postId Post ID for which to generate post editor URL.
*/
setBrowserURL(postId) {
window.history.replaceState({
id: postId
}, 'Post ' + postId, getPostEditURL(postId));
this.setState(() => ({
historyId: postId
}));
}
render() {
return null;
}
}
/* harmony default export */ const browser_url = ((0,external_wp_data_namespaceObject.withSelect)(select => {
const {
getCurrentPost,
isSavingPost
} = select(external_wp_editor_namespaceObject.store);
const post = getCurrentPost();
let {
id,
status,
type
} = post;
const isTemplate = ['wp_template', 'wp_template_part'].includes(type);
if (isTemplate) {
id = post.wp_id;
}
return {
postId: id,
postStatus: status,
postType: type,
isSavingPost: isSavingPost()
};
})(BrowserURL));
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-boxes-area/index.js
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
/**
* Render metabox area.
*
* @param {Object} props Component props.
* @param {string} props.location metabox location.
* @return {Component} The component to be rendered.
*/
function MetaBoxesArea({
location
}) {
const container = (0,external_wp_element_namespaceObject.useRef)(null);
const formRef = (0,external_wp_element_namespaceObject.useRef)(null);
(0,external_wp_element_namespaceObject.useEffect)(() => {
formRef.current = document.querySelector('.metabox-location-' + location);
if (formRef.current) {
container.current.appendChild(formRef.current);
}
return () => {
if (formRef.current) {
document.querySelector('#metaboxes').appendChild(formRef.current);
}
};
}, [location]);
const isSaving = (0,external_wp_data_namespaceObject.useSelect)(select => {
return select(store).isSavingMetaBoxes();
}, []);
const classes = dist_clsx('edit-post-meta-boxes-area', `is-${location}`, {
'is-loading': isSaving
});
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: classes,
children: [isSaving && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Spinner, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "edit-post-meta-boxes-area__container",
ref: container
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
className: "edit-post-meta-boxes-area__clear"
})]
});
}
/* harmony default export */ const meta_boxes_area = (MetaBoxesArea);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/meta-box-visibility.js
/**
* WordPress dependencies
*/
class MetaBoxVisibility extends external_wp_element_namespaceObject.Component {
componentDidMount() {
this.updateDOM();
}
componentDidUpdate(prevProps) {
if (this.props.isVisible !== prevProps.isVisible) {
this.updateDOM();
}
}
updateDOM() {
const {
id,
isVisible
} = this.props;
const element = document.getElementById(id);
if (!element) {
return;
}
if (isVisible) {
element.classList.remove('is-hidden');
} else {
element.classList.add('is-hidden');
}
}
render() {
return null;
}
}
/* harmony default export */ const meta_box_visibility = ((0,external_wp_data_namespaceObject.withSelect)((select, {
id
}) => ({
isVisible: select(external_wp_editor_namespaceObject.store).isEditorPanelEnabled(`meta-box-${id}`)
}))(MetaBoxVisibility));
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/meta-boxes/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function MetaBoxes({
location
}) {
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
const {
metaBoxes,
areMetaBoxesInitialized,
isEditorReady
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
__unstableIsEditorReady
} = select(external_wp_editor_namespaceObject.store);
const {
getMetaBoxesPerLocation,
areMetaBoxesInitialized: _areMetaBoxesInitialized
} = select(store);
return {
metaBoxes: getMetaBoxesPerLocation(location),
areMetaBoxesInitialized: _areMetaBoxesInitialized(),
isEditorReady: __unstableIsEditorReady()
};
}, [location]);
const hasMetaBoxes = !!metaBoxes?.length;
// When editor is ready, initialize postboxes (wp core script) and metabox
// saving. This initializes all meta box locations, not just this specific
// one.
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (isEditorReady && hasMetaBoxes && !areMetaBoxesInitialized) {
registry.dispatch(store).initializeMetaBoxes();
}
}, [isEditorReady, hasMetaBoxes, areMetaBoxesInitialized]);
if (!areMetaBoxesInitialized) {
return null;
}
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [(metaBoxes !== null && metaBoxes !== void 0 ? metaBoxes : []).map(({
id
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(meta_box_visibility, {
id: id
}, id)), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(meta_boxes_area, {
location: location
})]
});
}
;// CONCATENATED MODULE: external ["wp","keycodes"]
const external_wp_keycodes_namespaceObject = window["wp"]["keycodes"];
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/more-menu/manage-patterns-menu-item.js
/**
* WordPress dependencies
*/
function ManagePatternsMenuItem() {
const url = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
canUser
} = select(external_wp_coreData_namespaceObject.store);
const defaultUrl = (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
post_type: 'wp_block'
});
const patternsUrl = (0,external_wp_url_namespaceObject.addQueryArgs)('site-editor.php', {
path: '/patterns'
});
// The site editor and templates both check whether the user has
// edit_theme_options capabilities. We can leverage that here and not
// display the manage patterns link if the user can't access it.
return canUser('create', 'templates') ? patternsUrl : defaultUrl;
}, []);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItem, {
role: "menuitem",
href: url,
children: (0,external_wp_i18n_namespaceObject.__)('Manage patterns')
});
}
/* harmony default export */ const manage_patterns_menu_item = (ManagePatternsMenuItem);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/more-menu/welcome-guide-menu-item.js
/**
* WordPress dependencies
*/
function WelcomeGuideMenuItem() {
const isEditingTemplate = (0,external_wp_data_namespaceObject.useSelect)(select => select(external_wp_editor_namespaceObject.store).getCurrentPostType() === 'wp_template', []);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
scope: "core/edit-post",
name: isEditingTemplate ? 'welcomeGuideTemplate' : 'welcomeGuide',
label: (0,external_wp_i18n_namespaceObject.__)('Welcome Guide')
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/enable-custom-fields.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
PreferenceBaseOption
} = unlock(external_wp_preferences_namespaceObject.privateApis);
function submitCustomFieldsForm() {
const customFieldsForm = document.getElementById('toggle-custom-fields-form');
// Ensure the referrer values is up to update with any
customFieldsForm.querySelector('[name="_wp_http_referer"]').setAttribute('value', (0,external_wp_url_namespaceObject.getPathAndQueryString)(window.location.href));
customFieldsForm.submit();
}
function CustomFieldsConfirmation({
willEnable
}) {
const [isReloading, setIsReloading] = (0,external_wp_element_namespaceObject.useState)(false);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
className: "edit-post-preferences-modal__custom-fields-confirmation-message",
children: (0,external_wp_i18n_namespaceObject.__)('A page reload is required for this change. Make sure your content is saved before reloading.')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
className: "edit-post-preferences-modal__custom-fields-confirmation-button",
variant: "secondary",
isBusy: isReloading,
__experimentalIsFocusable: true,
disabled: isReloading,
onClick: () => {
setIsReloading(true);
submitCustomFieldsForm();
},
children: willEnable ? (0,external_wp_i18n_namespaceObject.__)('Show & Reload Page') : (0,external_wp_i18n_namespaceObject.__)('Hide & Reload Page')
})]
});
}
function EnableCustomFieldsOption({
label,
areCustomFieldsEnabled
}) {
const [isChecked, setIsChecked] = (0,external_wp_element_namespaceObject.useState)(areCustomFieldsEnabled);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreferenceBaseOption, {
label: label,
isChecked: isChecked,
onChange: setIsChecked,
children: isChecked !== areCustomFieldsEnabled && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(CustomFieldsConfirmation, {
willEnable: isChecked
})
});
}
/* harmony default export */ const enable_custom_fields = ((0,external_wp_data_namespaceObject.withSelect)(select => ({
areCustomFieldsEnabled: !!select(external_wp_editor_namespaceObject.store).getEditorSettings().enableCustomFields
}))(EnableCustomFieldsOption));
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/enable-panel.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
PreferenceBaseOption: enable_panel_PreferenceBaseOption
} = unlock(external_wp_preferences_namespaceObject.privateApis);
/* harmony default export */ const enable_panel = ((0,external_wp_compose_namespaceObject.compose)((0,external_wp_data_namespaceObject.withSelect)((select, {
panelName
}) => {
const {
isEditorPanelEnabled,
isEditorPanelRemoved
} = select(external_wp_editor_namespaceObject.store);
return {
isRemoved: isEditorPanelRemoved(panelName),
isChecked: isEditorPanelEnabled(panelName)
};
}), (0,external_wp_compose_namespaceObject.ifCondition)(({
isRemoved
}) => !isRemoved), (0,external_wp_data_namespaceObject.withDispatch)((dispatch, {
panelName
}) => ({
onChange: () => dispatch(external_wp_editor_namespaceObject.store).toggleEditorPanelEnabled(panelName)
})))(enable_panel_PreferenceBaseOption));
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/meta-boxes-section.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
PreferencesModalSection
} = unlock(external_wp_preferences_namespaceObject.privateApis);
function MetaBoxesSection({
areCustomFieldsRegistered,
metaBoxes,
...sectionProps
}) {
// The 'Custom Fields' meta box is a special case that we handle separately.
const thirdPartyMetaBoxes = metaBoxes.filter(({
id
}) => id !== 'postcustom');
if (!areCustomFieldsRegistered && thirdPartyMetaBoxes.length === 0) {
return null;
}
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(PreferencesModalSection, {
...sectionProps,
children: [areCustomFieldsRegistered && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(enable_custom_fields, {
label: (0,external_wp_i18n_namespaceObject.__)('Custom fields')
}), thirdPartyMetaBoxes.map(({
id,
title
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(enable_panel, {
label: title,
panelName: `meta-box-${id}`
}, id))]
});
}
/* harmony default export */ const meta_boxes_section = ((0,external_wp_data_namespaceObject.withSelect)(select => {
const {
getEditorSettings
} = select(external_wp_editor_namespaceObject.store);
const {
getAllMetaBoxes
} = select(store);
return {
// This setting should not live in the block editor's store.
areCustomFieldsRegistered: getEditorSettings().enableCustomFields !== undefined,
metaBoxes: getAllMetaBoxes()
};
})(MetaBoxesSection));
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/preferences-modal/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
PreferenceToggleControl
} = unlock(external_wp_preferences_namespaceObject.privateApis);
const {
PreferencesModal
} = unlock(external_wp_editor_namespaceObject.privateApis);
function EditPostPreferencesModal() {
const extraSections = {
general: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(meta_boxes_section, {
title: (0,external_wp_i18n_namespaceObject.__)('Advanced')
}),
appearance: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreferenceToggleControl, {
scope: "core/edit-post",
featureName: "themeStyles",
help: (0,external_wp_i18n_namespaceObject.__)('Make the editor look like your theme.'),
label: (0,external_wp_i18n_namespaceObject.__)('Use theme styles')
})
};
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PreferencesModal, {
extraSections: extraSections
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/more-menu/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
ToolsMoreMenuGroup,
ViewMoreMenuGroup
} = unlock(external_wp_editor_namespaceObject.privateApis);
const MoreMenu = () => {
const isLargeViewport = (0,external_wp_compose_namespaceObject.useViewportMatch)('large');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [isLargeViewport && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ViewMoreMenuGroup, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_preferences_namespaceObject.PreferenceToggleMenuItem, {
scope: "core/edit-post",
name: "fullscreenMode",
label: (0,external_wp_i18n_namespaceObject.__)('Fullscreen mode'),
info: (0,external_wp_i18n_namespaceObject.__)('Show and hide the admin user interface'),
messageActivated: (0,external_wp_i18n_namespaceObject.__)('Fullscreen mode activated'),
messageDeactivated: (0,external_wp_i18n_namespaceObject.__)('Fullscreen mode deactivated'),
shortcut: external_wp_keycodes_namespaceObject.displayShortcut.secondary('f')
})
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ToolsMoreMenuGroup, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(manage_patterns_menu_item, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideMenuItem, {})]
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditPostPreferencesModal, {})]
});
};
/* harmony default export */ const more_menu = (MoreMenu);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/image.js
function WelcomeGuideImage({
nonAnimatedSrc,
animatedSrc
}) {
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("picture", {
className: "edit-post-welcome-guide__image",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("source", {
srcSet: nonAnimatedSrc,
media: "(prefers-reduced-motion: reduce)"
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
src: animatedSrc,
width: "312",
height: "240",
alt: ""
})]
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/default.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function WelcomeGuideDefault() {
const {
toggleFeature
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Guide, {
className: "edit-post-welcome-guide",
contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to the block editor'),
finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get started'),
onFinish: () => toggleFeature('welcomeGuide'),
pages: [{
image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.svg",
animatedSrc: "https://s.w.org/images/block-editor/welcome-canvas.gif"
}),
content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
className: "edit-post-welcome-guide__heading",
children: (0,external_wp_i18n_namespaceObject.__)('Welcome to the block editor')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
className: "edit-post-welcome-guide__text",
children: (0,external_wp_i18n_namespaceObject.__)('In the WordPress editor, each paragraph, image, or video is presented as a distinct “block” of content.')
})]
})
}, {
image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-editor.svg",
animatedSrc: "https://s.w.org/images/block-editor/welcome-editor.gif"
}),
content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
className: "edit-post-welcome-guide__heading",
children: (0,external_wp_i18n_namespaceObject.__)('Make each block your own')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
className: "edit-post-welcome-guide__text",
children: (0,external_wp_i18n_namespaceObject.__)('Each block comes with its own set of controls for changing things like color, width, and alignment. These will show and hide automatically when you have a block selected.')
})]
})
}, {
image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-library.svg",
animatedSrc: "https://s.w.org/images/block-editor/welcome-library.gif"
}),
content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
className: "edit-post-welcome-guide__heading",
children: (0,external_wp_i18n_namespaceObject.__)('Get to know the block library')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
className: "edit-post-welcome-guide__text",
children: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('All of the blocks available to you live in the block library. You’ll find it wherever you see the <InserterIconImage /> icon.'), {
InserterIconImage: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("img", {
alt: (0,external_wp_i18n_namespaceObject.__)('inserter'),
src: "data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='18' height='18' rx='2' fill='%231E1E1E'/%3E%3Cpath d='M9.22727 4V14M4 8.77273H14' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E%0A"
})
})
})]
})
}, {
image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.svg",
animatedSrc: "https://s.w.org/images/block-editor/welcome-documentation.gif"
}),
content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
className: "edit-post-welcome-guide__heading",
children: (0,external_wp_i18n_namespaceObject.__)('Learn how to use the block editor')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("p", {
className: "edit-post-welcome-guide__text",
children: [(0,external_wp_i18n_namespaceObject.__)('New to the block editor? Want to learn more about using it? '), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/wordpress-block-editor/'),
children: (0,external_wp_i18n_namespaceObject.__)("Here's a detailed guide.")
})]
})]
})
}]
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/template.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function WelcomeGuideTemplate() {
const {
toggleFeature
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Guide, {
className: "edit-template-welcome-guide",
contentLabel: (0,external_wp_i18n_namespaceObject.__)('Welcome to the template editor'),
finishButtonText: (0,external_wp_i18n_namespaceObject.__)('Get started'),
onFinish: () => toggleFeature('welcomeGuideTemplate'),
pages: [{
image: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideImage, {
nonAnimatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.svg",
animatedSrc: "https://s.w.org/images/block-editor/welcome-template-editor.gif"
}),
content: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("h1", {
className: "edit-post-welcome-guide__heading",
children: (0,external_wp_i18n_namespaceObject.__)('Welcome to the template editor')
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("p", {
className: "edit-post-welcome-guide__text",
children: (0,external_wp_i18n_namespaceObject.__)('Templates help define the layout of the site. You can customize all aspects of your posts and pages using blocks and patterns in this editor.')
})]
})
}]
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/welcome-guide/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
function WelcomeGuide() {
const {
isActive,
isEditingTemplate
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
isFeatureActive
} = select(store);
const {
getCurrentPostType
} = select(external_wp_editor_namespaceObject.store);
const _isEditingTemplate = getCurrentPostType() === 'wp_template';
const feature = _isEditingTemplate ? 'welcomeGuideTemplate' : 'welcomeGuide';
return {
isActive: isFeatureActive(feature),
isEditingTemplate: _isEditingTemplate
};
}, []);
if (!isActive) {
return null;
}
return isEditingTemplate ? /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideTemplate, {}) : /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuideDefault, {});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/fullscreen.js
/**
* WordPress dependencies
*/
const fullscreen = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
xmlns: "http://www.w3.org/2000/svg",
viewBox: "0 0 24 24",
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
d: "M6 4a2 2 0 0 0-2 2v3h1.5V6a.5.5 0 0 1 .5-.5h3V4H6Zm3 14.5H6a.5.5 0 0 1-.5-.5v-3H4v3a2 2 0 0 0 2 2h3v-1.5Zm6 1.5v-1.5h3a.5.5 0 0 0 .5-.5v-3H20v3a2 2 0 0 1-2 2h-3Zm3-16a2 2 0 0 1 2 2v3h-1.5V6a.5.5 0 0 0-.5-.5h-3V4h3Z"
})
});
/* harmony default export */ const library_fullscreen = (fullscreen);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/commands/use-commands.js
/**
* WordPress dependencies
*/
function useCommands() {
const {
isFullscreen
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
get
} = select(external_wp_preferences_namespaceObject.store);
return {
isFullscreen: get('core/edit-post', 'fullscreenMode')
};
}, []);
const {
toggle
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
const {
createInfoNotice
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
(0,external_wp_commands_namespaceObject.useCommand)({
name: 'core/toggle-fullscreen-mode',
label: isFullscreen ? (0,external_wp_i18n_namespaceObject.__)('Exit fullscreen') : (0,external_wp_i18n_namespaceObject.__)('Enter fullscreen'),
icon: library_fullscreen,
callback: ({
close
}) => {
toggle('core/edit-post', 'fullscreenMode');
close();
createInfoNotice(isFullscreen ? (0,external_wp_i18n_namespaceObject.__)('Fullscreen off.') : (0,external_wp_i18n_namespaceObject.__)('Fullscreen on.'), {
id: 'core/edit-post/toggle-fullscreen-mode/notice',
type: 'snackbar',
actions: [{
label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
onClick: () => {
toggle('core/edit-post', 'fullscreenMode');
}
}]
});
}
});
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/use-padding-appender.js
/**
* WordPress dependencies
*/
function usePaddingAppender() {
const registry = (0,external_wp_data_namespaceObject.useRegistry)();
return (0,external_wp_compose_namespaceObject.useRefEffect)(node => {
function onMouseDown(event) {
if (event.target !== node) {
return;
}
const {
ownerDocument
} = node;
const {
defaultView
} = ownerDocument;
const paddingBottom = defaultView.parseInt(defaultView.getComputedStyle(node).paddingBottom, 10);
if (!paddingBottom) {
return;
}
// Only handle clicks under the last child.
const lastChild = node.lastElementChild;
if (!lastChild) {
return;
}
const lastChildRect = lastChild.getBoundingClientRect();
if (event.clientY < lastChildRect.bottom) {
return;
}
event.preventDefault();
const blockOrder = registry.select(external_wp_blockEditor_namespaceObject.store).getBlockOrder('');
const lastBlockClientId = blockOrder[blockOrder.length - 1];
// Do nothing when only default block appender is present.
if (!lastBlockClientId) {
return;
}
const lastBlock = registry.select(external_wp_blockEditor_namespaceObject.store).getBlock(lastBlockClientId);
const {
selectBlock,
insertDefaultBlock
} = registry.dispatch(external_wp_blockEditor_namespaceObject.store);
if ((0,external_wp_blocks_namespaceObject.isUnmodifiedDefaultBlock)(lastBlock)) {
selectBlock(lastBlockClientId);
} else {
insertDefaultBlock();
}
}
node.addEventListener('mousedown', onMouseDown);
return () => {
node.removeEventListener('mousedown', onMouseDown);
};
}, [registry]);
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/use-should-iframe.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const isGutenbergPlugin = false ? 0 : false;
function useShouldIframe() {
const {
isBlockBasedTheme,
hasV3BlocksOnly,
isEditingTemplate,
hasMetaBoxes
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
getEditorSettings,
getCurrentPostType
} = select(external_wp_editor_namespaceObject.store);
const {
getBlockTypes
} = select(external_wp_blocks_namespaceObject.store);
const editorSettings = getEditorSettings();
return {
isBlockBasedTheme: editorSettings.__unstableIsBlockBasedTheme,
hasV3BlocksOnly: getBlockTypes().every(type => {
return type.apiVersion >= 3;
}),
isEditingTemplate: getCurrentPostType() === 'wp_template',
hasMetaBoxes: select(store).hasMetaBoxes()
};
}, []);
return (hasV3BlocksOnly || isGutenbergPlugin && isBlockBasedTheme) && !hasMetaBoxes || isEditingTemplate;
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/layout/index.js
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
getLayoutStyles
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
const {
useCommands: layout_useCommands
} = unlock(external_wp_coreCommands_namespaceObject.privateApis);
const {
useCommandContext
} = unlock(external_wp_commands_namespaceObject.privateApis);
const {
EditorInterface,
FullscreenMode,
Sidebar
} = unlock(external_wp_editor_namespaceObject.privateApis);
const {
BlockKeyboardShortcuts
} = unlock(external_wp_blockLibrary_namespaceObject.privateApis);
const DESIGN_POST_TYPES = ['wp_template', 'wp_template_part', 'wp_block', 'wp_navigation'];
function useEditorStyles() {
const {
hasThemeStyleSupport,
editorSettings,
isZoomedOutView,
hasMetaBoxes,
renderingMode,
postType
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
__unstableGetEditorMode
} = select(external_wp_blockEditor_namespaceObject.store);
const {
getCurrentPostType,
getRenderingMode
} = select(external_wp_editor_namespaceObject.store);
const _postType = getCurrentPostType();
return {
hasThemeStyleSupport: select(store).isFeatureActive('themeStyles'),
editorSettings: select(external_wp_editor_namespaceObject.store).getEditorSettings(),
isZoomedOutView: __unstableGetEditorMode() === 'zoom-out',
hasMetaBoxes: select(store).hasMetaBoxes(),
renderingMode: getRenderingMode(),
postType: _postType
};
}, []);
// Compute the default styles.
return (0,external_wp_element_namespaceObject.useMemo)(() => {
var _editorSettings$style, _editorSettings$style2, _editorSettings$style3;
const presetStyles = (_editorSettings$style = editorSettings.styles?.filter(style => style.__unstableType && style.__unstableType !== 'theme')) !== null && _editorSettings$style !== void 0 ? _editorSettings$style : [];
const defaultEditorStyles = [...editorSettings.defaultEditorStyles, ...presetStyles];
// Has theme styles if the theme supports them and if some styles were not preset styles (in which case they're theme styles).
const hasThemeStyles = hasThemeStyleSupport && presetStyles.length !== ((_editorSettings$style2 = editorSettings.styles?.length) !== null && _editorSettings$style2 !== void 0 ? _editorSettings$style2 : 0);
// If theme styles are not present or displayed, ensure that
// base layout styles are still present in the editor.
if (!editorSettings.disableLayoutStyles && !hasThemeStyles) {
defaultEditorStyles.push({
css: getLayoutStyles({
style: {},
selector: 'body',
hasBlockGapSupport: false,
hasFallbackGapSupport: true,
fallbackGapValue: '0.5em'
})
});
}
const baseStyles = hasThemeStyles ? (_editorSettings$style3 = editorSettings.styles) !== null && _editorSettings$style3 !== void 0 ? _editorSettings$style3 : [] : defaultEditorStyles;
// Add a constant padding for the typewriter effect. When typing at the
// bottom, there needs to be room to scroll up.
if (!isZoomedOutView && !hasMetaBoxes && renderingMode === 'post-only' && !DESIGN_POST_TYPES.includes(postType)) {
return [...baseStyles, {
// Should override global styles padding, so ensure 0-1-0
// specificity.
css: ':root :where(body){padding-bottom: 40vh}'
}];
}
return baseStyles;
}, [editorSettings.defaultEditorStyles, editorSettings.disableLayoutStyles, editorSettings.styles, hasThemeStyleSupport, postType]);
}
function Layout({
initialPost
}) {
layout_useCommands();
useCommands();
const paddingAppenderRef = usePaddingAppender();
const shouldIframe = useShouldIframe();
const {
createErrorNotice
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
const {
mode,
isFullscreenActive,
hasActiveMetaboxes,
hasBlockSelected,
showIconLabels,
isDistractionFree,
showMetaBoxes,
hasHistory,
isEditingTemplate,
isWelcomeGuideVisible
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
const {
get
} = select(external_wp_preferences_namespaceObject.store);
const {
getEditorSettings
} = select(external_wp_editor_namespaceObject.store);
const {
isFeatureActive
} = select(store);
return {
mode: select(external_wp_editor_namespaceObject.store).getEditorMode(),
isFullscreenActive: select(store).isFeatureActive('fullscreenMode'),
hasActiveMetaboxes: select(store).hasMetaBoxes(),
hasBlockSelected: !!select(external_wp_blockEditor_namespaceObject.store).getBlockSelectionStart(),
showIconLabels: get('core', 'showIconLabels'),
isDistractionFree: get('core', 'distractionFree'),
showMetaBoxes: select(external_wp_editor_namespaceObject.store).getRenderingMode() === 'post-only',
hasHistory: !!getEditorSettings().onNavigateToPreviousEntityRecord,
isEditingTemplate: select(external_wp_editor_namespaceObject.store).getCurrentPostType() === 'wp_template',
isWelcomeGuideVisible: isFeatureActive('welcomeGuide')
};
}, []);
// Set the right context for the command palette
const commandContext = hasBlockSelected ? 'block-selection-edit' : 'entity-edit';
useCommandContext(commandContext);
const styles = useEditorStyles();
// We need to add the show-icon-labels class to the body element so it is applied to modals.
if (showIconLabels) {
document.body.classList.add('show-icon-labels');
} else {
document.body.classList.remove('show-icon-labels');
}
const className = dist_clsx('edit-post-layout', 'is-mode-' + mode, {
'has-metaboxes': hasActiveMetaboxes
});
function onPluginAreaError(name) {
createErrorNotice((0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: plugin name */
(0,external_wp_i18n_namespaceObject.__)('The "%s" plugin has encountered an error and cannot be rendered.'), name));
}
const {
createSuccessNotice
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
const onActionPerformed = (0,external_wp_element_namespaceObject.useCallback)((actionId, items) => {
switch (actionId) {
case 'move-to-trash':
{
document.location.href = (0,external_wp_url_namespaceObject.addQueryArgs)('edit.php', {
trashed: 1,
post_type: items[0].type,
ids: items[0].id
});
}
break;
case 'duplicate-post':
{
const newItem = items[0];
const title = typeof newItem.title === 'string' ? newItem.title : newItem.title?.rendered;
createSuccessNotice((0,external_wp_i18n_namespaceObject.sprintf)(
// translators: %s: Title of the created post e.g: "Post 1".
(0,external_wp_i18n_namespaceObject.__)('"%s" successfully created.'), (0,external_wp_htmlEntities_namespaceObject.decodeEntities)(title)), {
type: 'snackbar',
id: 'duplicate-post-action',
actions: [{
label: (0,external_wp_i18n_namespaceObject.__)('Edit'),
onClick: () => {
const postId = newItem.id;
document.location.href = (0,external_wp_url_namespaceObject.addQueryArgs)('post.php', {
post: postId,
action: 'edit'
});
}
}]
});
}
break;
}
}, [createSuccessNotice]);
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FullscreenMode, {
isActive: isFullscreenActive
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(browser_url, {
hasHistory: hasHistory
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.UnsavedChangesWarning, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.AutosaveMonitor, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.LocalAutosaveMonitor, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(keyboard_shortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.EditorKeyboardShortcutsRegister, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(BlockKeyboardShortcuts, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WelcomeGuide, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(InitPatternModal, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_plugins_namespaceObject.PluginArea, {
onError: onPluginAreaError
}), !isDistractionFree && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(Sidebar, {
onActionPerformed: onActionPerformed,
extraPanels: !isEditingTemplate && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, {
location: "side"
})
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(more_menu, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(back_button, {
initialPost: initialPost
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.EditorSnackbars, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditorInterface, {
className: className,
styles: styles,
forceIsDirty: hasActiveMetaboxes,
contentRef: paddingAppenderRef,
disableIframe: !shouldIframe
// We should auto-focus the canvas (title) on load.
// eslint-disable-next-line jsx-a11y/no-autofocus
,
autoFocus: !isWelcomeGuideVisible,
children: !isDistractionFree && showMetaBoxes && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
className: "edit-post-layout__metaboxes",
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, {
location: "normal"
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MetaBoxes, {
location: "advanced"
})]
})
})]
});
}
/* harmony default export */ const layout = (Layout);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/listener-hooks.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
/**
* This listener hook monitors any change in permalink and updates the view
* post link in the admin bar.
*/
const useUpdatePostLinkListener = () => {
const {
newPermalink
} = (0,external_wp_data_namespaceObject.useSelect)(select => ({
newPermalink: select(external_wp_editor_namespaceObject.store).getCurrentPost().link
}), []);
const nodeToUpdate = (0,external_wp_element_namespaceObject.useRef)();
(0,external_wp_element_namespaceObject.useEffect)(() => {
nodeToUpdate.current = document.querySelector(VIEW_AS_PREVIEW_LINK_SELECTOR) || document.querySelector(VIEW_AS_LINK_SELECTOR);
}, []);
(0,external_wp_element_namespaceObject.useEffect)(() => {
if (!newPermalink || !nodeToUpdate.current) {
return;
}
nodeToUpdate.current.setAttribute('href', newPermalink);
}, [newPermalink]);
};
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/components/editor-initialization/index.js
/**
* Internal dependencies
*/
/**
* Data component used for initializing the editor and re-initializes
* when postId changes or on unmount.
*
* @return {null} This is a data component so does not render any ui.
*/
function EditorInitialization() {
useUpdatePostLinkListener();
return null;
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/hooks/use-navigate-to-entity-record.js
/**
* WordPress dependencies
*/
/**
* A hook that records the 'entity' history in the post editor as a user
* navigates between editing a post and editing the post template or patterns.
*
* Implemented as a stack, so a little similar to the browser history API.
*
* Used to control displaying UI elements like the back button.
*
* @param {number} initialPostId The post id of the post when the editor loaded.
* @param {string} initialPostType The post type of the post when the editor loaded.
* @param {string} defaultRenderingMode The rendering mode to switch to when navigating.
*
* @return {Object} An object containing the `currentPost` variable and
* `onNavigateToEntityRecord` and `onNavigateToPreviousEntityRecord` functions.
*/
function useNavigateToEntityRecord(initialPostId, initialPostType, defaultRenderingMode) {
const [postHistory, dispatch] = (0,external_wp_element_namespaceObject.useReducer)((historyState, {
type,
post,
previousRenderingMode
}) => {
if (type === 'push') {
return [...historyState, {
post,
previousRenderingMode
}];
}
if (type === 'pop') {
// Try to leave one item in the history.
if (historyState.length > 1) {
return historyState.slice(0, -1);
}
}
return historyState;
}, [{
post: {
postId: initialPostId,
postType: initialPostType
}
}]);
const {
post,
previousRenderingMode
} = postHistory[postHistory.length - 1];
const {
getRenderingMode
} = (0,external_wp_data_namespaceObject.useSelect)(external_wp_editor_namespaceObject.store);
const {
setRenderingMode
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_editor_namespaceObject.store);
const onNavigateToEntityRecord = (0,external_wp_element_namespaceObject.useCallback)(params => {
dispatch({
type: 'push',
post: {
postId: params.postId,
postType: params.postType
},
// Save the current rendering mode so we can restore it when navigating back.
previousRenderingMode: getRenderingMode()
});
setRenderingMode(defaultRenderingMode);
}, [getRenderingMode, setRenderingMode, defaultRenderingMode]);
const onNavigateToPreviousEntityRecord = (0,external_wp_element_namespaceObject.useCallback)(() => {
dispatch({
type: 'pop'
});
if (previousRenderingMode) {
setRenderingMode(previousRenderingMode);
}
}, [setRenderingMode, previousRenderingMode]);
return {
currentPost: post,
onNavigateToEntityRecord,
onNavigateToPreviousEntityRecord: postHistory.length > 1 ? onNavigateToPreviousEntityRecord : undefined
};
}
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/editor.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
ExperimentalEditorProvider
} = unlock(external_wp_editor_namespaceObject.privateApis);
function Editor({
postId: initialPostId,
postType: initialPostType,
settings,
initialEdits,
...props
}) {
const {
currentPost,
onNavigateToEntityRecord,
onNavigateToPreviousEntityRecord
} = useNavigateToEntityRecord(initialPostId, initialPostType, 'post-only');
const {
post,
template
} = (0,external_wp_data_namespaceObject.useSelect)(select => {
var _getPostType$viewable;
const {
getEditedPostTemplate
} = select(store);
const {
getEntityRecord,
getPostType,
canUser
} = select(external_wp_coreData_namespaceObject.store);
const {
getEditorSettings
} = select(external_wp_editor_namespaceObject.store);
const postObject = getEntityRecord('postType', currentPost.postType, currentPost.postId);
const supportsTemplateMode = getEditorSettings().supportsTemplateMode;
const isViewable = (_getPostType$viewable = getPostType(currentPost.postType)?.viewable) !== null && _getPostType$viewable !== void 0 ? _getPostType$viewable : false;
const canViewTemplate = canUser('read', 'templates');
return {
template: supportsTemplateMode && isViewable && canViewTemplate && currentPost.postType !== 'wp_template' ? getEditedPostTemplate() : null,
post: postObject
};
}, [currentPost.postType, currentPost.postId]);
const editorSettings = (0,external_wp_element_namespaceObject.useMemo)(() => ({
...settings,
onNavigateToEntityRecord,
onNavigateToPreviousEntityRecord,
defaultRenderingMode: 'post-only'
}), [settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord]);
const initialPost = (0,external_wp_element_namespaceObject.useMemo)(() => {
return {
type: initialPostType,
id: initialPostId
};
}, [initialPostType, initialPostId]);
if (!post) {
return null;
}
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SlotFillProvider, {
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(ExperimentalEditorProvider, {
settings: editorSettings,
post: post,
initialEdits: initialEdits,
useSubRegistry: false,
__unstableTemplate: template,
...props,
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_editor_namespaceObject.ErrorBoundary, {
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_commands_namespaceObject.CommandMenu, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(EditorInitialization, {}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(layout, {
initialPost: initialPost
})]
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PostLockedModal, {})]
})
});
}
/* harmony default export */ const editor = (Editor);
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/deprecated.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
PluginPostExcerpt
} = unlock(external_wp_editor_namespaceObject.privateApis);
const isSiteEditor = (0,external_wp_url_namespaceObject.getPath)(window.location.href)?.includes('site-editor.php');
const deprecateSlot = name => {
external_wp_deprecated_default()(`wp.editPost.${name}`, {
since: '6.6',
alternative: `wp.editor.${name}`
});
};
/* eslint-disable jsdoc/require-param */
/**
* @see PluginBlockSettingsMenuItem in @wordpress/editor package.
*/
function PluginBlockSettingsMenuItem(props) {
if (isSiteEditor) {
return null;
}
deprecateSlot('PluginBlockSettingsMenuItem');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginBlockSettingsMenuItem, {
...props
});
}
/**
* @see PluginDocumentSettingPanel in @wordpress/editor package.
*/
function PluginDocumentSettingPanel(props) {
if (isSiteEditor) {
return null;
}
deprecateSlot('PluginDocumentSettingPanel');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginDocumentSettingPanel, {
...props
});
}
/**
* @see PluginMoreMenuItem in @wordpress/editor package.
*/
function PluginMoreMenuItem(props) {
if (isSiteEditor) {
return null;
}
deprecateSlot('PluginMoreMenuItem');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginMoreMenuItem, {
...props
});
}
/**
* @see PluginPrePublishPanel in @wordpress/editor package.
*/
function PluginPrePublishPanel(props) {
if (isSiteEditor) {
return null;
}
deprecateSlot('PluginPrePublishPanel');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginPrePublishPanel, {
...props
});
}
/**
* @see PluginPostPublishPanel in @wordpress/editor package.
*/
function PluginPostPublishPanel(props) {
if (isSiteEditor) {
return null;
}
deprecateSlot('PluginPostPublishPanel');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginPostPublishPanel, {
...props
});
}
/**
* @see PluginPostStatusInfo in @wordpress/editor package.
*/
function PluginPostStatusInfo(props) {
if (isSiteEditor) {
return null;
}
deprecateSlot('PluginPostStatusInfo');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginPostStatusInfo, {
...props
});
}
/**
* @see PluginSidebar in @wordpress/editor package.
*/
function PluginSidebar(props) {
if (isSiteEditor) {
return null;
}
deprecateSlot('PluginSidebar');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginSidebar, {
...props
});
}
/**
* @see PluginSidebarMoreMenuItem in @wordpress/editor package.
*/
function PluginSidebarMoreMenuItem(props) {
if (isSiteEditor) {
return null;
}
deprecateSlot('PluginSidebarMoreMenuItem');
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_editor_namespaceObject.PluginSidebarMoreMenuItem, {
...props
});
}
/**
* @see PluginPostExcerpt in @wordpress/editor package.
*/
function __experimentalPluginPostExcerpt() {
if (isSiteEditor) {
return null;
}
external_wp_deprecated_default()('wp.editPost.__experimentalPluginPostExcerpt', {
since: '6.6',
hint: 'Core and custom panels can be access programmatically using their panel name.',
link: 'https://developer.wordpress.org/block-editor/reference-guides/slotfills/plugin-document-setting-panel/#accessing-a-panel-programmatically'
});
return PluginPostExcerpt;
}
/* eslint-enable jsdoc/require-param */
;// CONCATENATED MODULE: ./node_modules/@wordpress/edit-post/build-module/index.js
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const {
BackButton: __experimentalMainDashboardButton
} = unlock(external_wp_editor_namespaceObject.privateApis);
/**
* Initializes and returns an instance of Editor.
*
* @param {string} id Unique identifier for editor instance.
* @param {string} postType Post type of the post to edit.
* @param {Object} postId ID of the post to edit.
* @param {?Object} settings Editor settings object.
* @param {Object} initialEdits Programmatic edits to apply initially, to be
* considered as non-user-initiated (bypass for
* unsaved changes prompt).
*/
function initializeEditor(id, postType, postId, settings, initialEdits) {
const isMediumOrBigger = window.matchMedia('(min-width: 782px)').matches;
const target = document.getElementById(id);
const root = (0,external_wp_element_namespaceObject.createRoot)(target);
(0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core/edit-post', {
fullscreenMode: true,
themeStyles: true,
welcomeGuide: true,
welcomeGuideTemplate: true
});
(0,external_wp_data_namespaceObject.dispatch)(external_wp_preferences_namespaceObject.store).setDefaults('core', {
allowRightClickOverrides: true,
editorMode: 'visual',
fixedToolbar: false,
hiddenBlockTypes: [],
inactivePanels: [],
openPanels: ['post-status'],
showBlockBreadcrumbs: true,
showIconLabels: false,
showListViewByDefault: false,
isPublishSidebarEnabled: true
});
(0,external_wp_data_namespaceObject.dispatch)(external_wp_blocks_namespaceObject.store).reapplyBlockTypeFilters();
// Check if the block list view should be open by default.
// If `distractionFree` mode is enabled, the block list view should not be open.
// This behavior is disabled for small viewports.
if (isMediumOrBigger && (0,external_wp_data_namespaceObject.select)(external_wp_preferences_namespaceObject.store).get('core', 'showListViewByDefault') && !(0,external_wp_data_namespaceObject.select)(external_wp_preferences_namespaceObject.store).get('core', 'distractionFree')) {
(0,external_wp_data_namespaceObject.dispatch)(external_wp_editor_namespaceObject.store).setIsListViewOpened(true);
}
(0,external_wp_blockLibrary_namespaceObject.registerCoreBlocks)();
(0,external_wp_widgets_namespaceObject.registerLegacyWidgetBlock)({
inserter: false
});
(0,external_wp_widgets_namespaceObject.registerWidgetGroupBlock)({
inserter: false
});
if (false) {}
// Show a console log warning if the browser is not in Standards rendering mode.
const documentMode = document.compatMode === 'CSS1Compat' ? 'Standards' : 'Quirks';
if (documentMode !== 'Standards') {
// eslint-disable-next-line no-console
console.warn("Your browser is using Quirks Mode. \nThis can cause rendering issues such as blocks overlaying meta boxes in the editor. Quirks Mode can be triggered by PHP errors or HTML code appearing before the opening <!DOCTYPE html>. Try checking the raw page source or your site's PHP error log and resolving errors there, removing any HTML before the doctype, or disabling plugins.");
}
// This is a temporary fix for a couple of issues specific to Webkit on iOS.
// Without this hack the browser scrolls the mobile toolbar off-screen.
// Once supported in Safari we can replace this in favor of preventScroll.
// For details see issue #18632 and PR #18686
// Specifically, we scroll `interface-interface-skeleton__body` to enable a fixed top toolbar.
// But Mobile Safari forces the `html` element to scroll upwards, hiding the toolbar.
const isIphone = window.navigator.userAgent.indexOf('iPhone') !== -1;
if (isIphone) {
window.addEventListener('scroll', event => {
const editorScrollContainer = document.getElementsByClassName('interface-interface-skeleton__body')[0];
if (event.target === document) {
// Scroll element into view by scrolling the editor container by the same amount
// that Mobile Safari tried to scroll the html element upwards.
if (window.scrollY > 100) {
editorScrollContainer.scrollTop = editorScrollContainer.scrollTop + window.scrollY;
}
// Undo unwanted scroll on html element, but only in the visual editor.
if (document.getElementsByClassName('is-mode-visual')[0]) {
window.scrollTo(0, 0);
}
}
});
}
// Prevent the default browser action for files dropped outside of dropzones.
window.addEventListener('dragover', e => e.preventDefault(), false);
window.addEventListener('drop', e => e.preventDefault(), false);
root.render( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(editor, {
settings: settings,
postId: postId,
postType: postType,
initialEdits: initialEdits
}));
return root;
}
/**
* Used to reinitialize the editor after an error. Now it's a deprecated noop function.
*/
function reinitializeEditor() {
external_wp_deprecated_default()('wp.editPost.reinitializeEditor', {
since: '6.2',
version: '6.3'
});
}
(window.wp = window.wp || {}).editPost = __webpack_exports__;
/******/ })()
; |