tinymce-plugin.js 128.5 KB
Newer Older
Five-菜鸟级's avatar
init  
Five-菜鸟级 已提交
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
/*! 
*  @plugin tinymce-plugin
*  @version 0.0.3-beta.22 (2022-8-5)
*  @description tinymce-plugin
*  @copyright (2022) Five(Li Hailong) . All rights reserved. https://github.com/tinymce-plugintinymce-plugin
*/

(function(exports) {
  "use strict";
  let tp$tinymce = tinymce;
  let global$1 = tp$tinymce.util.Tools;
  let global$7 = tp$tinymce.html.Node;
  tp$tinymce.html.Schema;
  let global$6 = tp$tinymce.util.XHR;
  let global$11 = tp$tinymce.util.I18n;
  let tp$Serialize = new tp$tinymce.html.Serializer().serialize;
  let tp$DomParser = new tp$tinymce.html.DomParser().parse;
  let tp$State = {};
  window.tp$State = tp$State;
  let tp$getStyleValue = (key, str) => {
    let m = str ? str.match(new RegExp(key + ':(.+?)"?[;}]')) : "";
    return m ? m[1] : false;
  };
  function tp$SetSpecialStyle(editor, _self, specialStyleClass, specialStyleValue) {
    if (editor.tp$Style.mapping && editor.tp$Style.mapping["" + _self.getAttribute("data-id")]) {
      editor.tp$Style.mapping["" + _self.getAttribute("data-id")].specialStyle["" + specialStyleClass] = specialStyleValue;
    }
  }
  let tp$Component = {
    customTags: {}
  };
  let keys = Object.keys;
  let __assign = function() {
    __assign = Object.assign || function __assign2(t) {
      for (var s, i = 1, n = arguments.length; i < n; i++) {
        s = arguments[i];
        for (var p in s)
          if (Object.prototype.hasOwnProperty.call(s, p))
            t[p] = s[p];
      }
      return t;
    };
    return __assign.apply(this, arguments);
  };
  let hasOwnProperty = Object.hasOwnProperty;
  var isNullable = function(a) {
    return a === null || a === void 0;
  };
  var isNonNullable = function(a) {
    return !isNullable(a);
  };
  const getFormatStyle = (style) => {
    if (typeof style === "object") {
      return JSON.stringify(style).replace(/"([-A-Za-z]+?)":""[,}]/g, "").replace(/,/gi, ";").replace(/{/gi, "").replace(/}/gi, "").replace(/"/gi, "");
    }
  };
  const getObjStyle = (style) => {
    if (typeof style === "string" && style !== "{}") {
      style = JSON.stringify(style);
      return JSON.parse(("{" + style.replace(/:/g, '": "').replace(/;\s*/g, '","') + "}").replace(/,\"\"\}$/, "}"));
    }
    return style;
  };
  const getStyleSheetClass = (className, content) => {
    const result = content.match(new RegExp(`.${className}\\s*\\{([\\s\\S]+)\\}`));
    return result && result[1] ? result[1].replace(/\}([\s\S]+)/, "").trim() : "";
  };
  var has = function(obj, key) {
    return hasOwnProperty.call(obj, key);
  };
  var getDimension = function(node, styles, dimension, defaultValue) {
    if (defaultValue === void 0) {
      defaultValue = null;
    }
    var value = node.attr(dimension);
    if (isNonNullable(value)) {
      return value;
    } else if (!has(styles, dimension)) {
      return defaultValue;
    } else {
      return null;
    }
  };
  const toHump = (name) => {
    return name.replace(/[-|\_](\w)/g, function(all, letter) {
      return letter.toUpperCase();
    });
  };
  const toLine = (name) => {
    return name.replace(/([A-Z])/g, "_$1").toLowerCase().replace(/\-/g, "_");
  };
  const toHyphen = (name) => {
    return name.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/\_/g, "-");
  };
  var getCurrentValue = function(block, styleName) {
    let resValue = "";
    if (!block)
      return "";
    styleName = toHump(styleName);
    while (block.nodeName !== "P" && block.nodeName !== "LI" && block.nodeName !== "DIV" && block.nodeName !== "BODY") {
      if (block.style[styleName]) {
        resValue = block.style[styleName];
        break;
      }
      block = block.parentNode;
    }
    return resValue;
  };
  let getButtonsStyle = (obj, style) => {
    let styleStr = "";
    styleStr += obj["tp-buttons"] ? '.tp-buttons[data-tp-style="' + style + '"] {' + obj["tp-buttons"] + "}\n" : "";
    styleStr += obj["tp-buttons:hover"] ? '.tp-buttons[data-tp-style="' + style + '"]:hover {' + obj["tp-buttons:hover"] + "}\n" : "";
    styleStr += obj["tp-buttons::before"] ? '.tp-buttons[data-tp-style="' + style + '"]::before {' + obj["tp-buttons::before"] + "}\n" : "";
    styleStr += obj["tp-buttons::after"] ? '.tp-buttons[data-tp-style="' + style + '"]::after {' + obj["tp-buttons::after"] + "}\n" : "";
    return styleStr;
  };
  const setIntervalFn = (func, delay, outTime) => {
    !outTime && (outTime = delay * 100);
    let setIntervalObj = {
      id: null,
      outTime,
      outId: null
    };
    setIntervalObj.id = setInterval((obj) => {
      func(() => {
        clearTimeout(obj.outId);
        clearInterval(obj.id);
      });
    }, delay, setIntervalObj);
    setIntervalObj.outId = setTimeout(() => {
      setIntervalObj.id && clearInterval(setIntervalObj.id);
    }, setIntervalObj.outTime);
  };
  let getTp$ComponentFn = function(customTag, fnName) {
    if (typeof customTag[fnName] === "function")
      return customTag[fnName];
    if (typeof tp$Component.customTags[customTag.name][fnName] === "function")
      return tp$Component.customTags[customTag.name][fnName];
    return function() {
    };
  };
  const autoToPX = (data, noPerCent) => {
    if (!noPerCent) {
      return typeof data === "string" && data.length > 0 && data.match(/^[0-9]{1,8}$/) ? data + "px" : data;
    } else {
      return typeof data === "string" && !data.match(/\s/) && data.length > 0 ? parseInt(data) + "px" : data;
    }
  };
  const tp$Translate = (text) => {
    let textList = text.split("_");
    return textList.length > 1 ? global$11.translate([textList[0] + " {0}", textList[1]]) : global$11.translate(text);
  };
  tinymce.tp$HtmlPanelFn = window.tp$HtmlPanelFn = function(e, _id, styleName) {
    tp$State["buttonsStyle"] && (tp$State["buttonsStyle"][_id] = styleName);
    document.querySelector("#" + _id + "_StyleID").innerHTML = e.nextElementSibling.innerHTML;
  };
  const tp$skt = {
    count: 0
  };
  const createSkt = (opt) => {
    let sktID = new Date().getTime() + "-" + tp$skt.count++;
    let sktHtml = `
  <div id="${sktID}" class="skt skt-loading" data-v-e3347e98=""><div class="skt-tox-tinymce" data-v-e3347e98="" style="height: 200px;"><div class="skt-tox-editor-container" data-v-e3347e98=""><div class="skt-tox-editor-header" data-v-e3347e98=""><div class="skt-tox-menubar" data-v-e3347e98=""><button class="skt-tox-mbtn skt-tox-mbtn--select" data-v-e3347e98=""><span class="skt-tox-mbtn__select-label skeleton" data-v-e3347e98="">File</span></button><button class="skt-tox-mbtn skt-tox-mbtn--select" data-v-e3347e98=""><span class="skt-tox-mbtn__select-label skeleton" data-v-e3347e98="">Edit</span></button><button class="skt-tox-mbtn skt-tox-mbtn--select" data-v-e3347e98=""><span class="skt-tox-mbtn__select-label skeleton" data-v-e3347e98="">View</span></button><button class="skt-tox-mbtn skt-tox-mbtn--select" data-v-e3347e98=""><span class="skt-tox-mbtn__select-label skeleton" data-v-e3347e98="">Format</span></button><button class="skt-tox-mbtn skt-tox-mbtn--select" data-v-e3347e98=""><span class="skt-tox-mbtn__select-label skeleton" data-v-e3347e98="">Tools</span></button></div><div class="skt-tox-toolbar-overlord" data-v-e3347e98=""><div class="skt-tox-toolbar" data-v-e3347e98=""><div class="skt-tox-toolbar__group" data-v-e3347e98=""><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn skt-tox-tbtn--select skt-tox-tbtn--bespoke" data-v-e3347e98=""><span class="skt-tox-tbtn__select-label skt-tox-tbtn--select skt-tox-tbtn--bespoke skeleton" data-v-e3347e98="">4</span><div class="skt-tox-tbtn__select-chevron skeleton" data-v-e3347e98=""></div></button><button class="skt-tox-tbtn skt-tox-tbtn--select skt-tox-tbtn--bespoke" data-v-e3347e98=""><span class="skt-tox-tbtn__select-label skt-tox-tbtn--select skt-tox-tbtn--bespoke skeleton" data-v-e3347e98="">4</span><div class="skt-tox-tbtn__select-chevron skeleton" data-v-e3347e98=""></div></button><button class="skt-tox-tbtn skt-tox-tbtn--select skt-tox-tbtn--bespoke" data-v-e3347e98=""><span class="skt-tox-tbtn__select-label skt-tox-tbtn--select skt-tox-tbtn--bespoke skeleton" data-v-e3347e98="">4</span><div class="skt-tox-tbtn__select-chevron skeleton" data-v-e3347e98=""></div></button><button class="skt-tox-tbtn skt-tox-split-button" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><div class="skt-tox-tbtn__select-chevron skeleton" data-v-e3347e98=""></div></button><button class="skt-tox-tbtn skt-tox-split-button" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><div class="skt-tox-tbtn__select-chevron skeleton" data-v-e3347e98=""></div></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn skt-tox-split-button" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><div class="skt-tox-tbtn__select-chevron skeleton" data-v-e3347e98=""></div></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn skt-tox-split-button" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><div class="skt-tox-tbtn__select-chevron skeleton" data-v-e3347e98=""></div></button><button class="skt-tox-tbtn skt-tox-split-button" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><div class="skt-tox-tbtn__select-chevron skeleton" data-v-e3347e98=""></div></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button></div><div class="skt-tox-toolbar__group" data-v-e3347e98=""><button class="skt-tox-tbtn" data-v-e3347e98=""><span class="skt-tox-icon tox-tbtn__icon-wrap skeleton" data-v-e3347e98="">4</span><!--v-if--></button></div></div></div><div class="skt-tox-anchorbar" data-v-e3347e98=""></div></div><div class="skt-tox-sidebar-wrap-box" data-v-e3347e98=""><p class="skeleton" data-v-e3347e98=""> &nbsp; </p><p class="skeleton" data-v-e3347e98="">&nbsp; </p><p class="skeleton" data-v-e3347e98=""></p></div></div><div class="skt-tox-statusbar" data-v-e3347e98=""><div class="skeleton" data-v-e3347e98=""> PP </div><span class="skeleton" data-v-e3347e98="" style="margin-left: calc(100% - 120px);">Powered by Five </span></div></div></div>
`;
    document.querySelector(opt.selector).outerHTML = sktHtml + document.querySelector(opt.selector).outerHTML;
    return sktID;
  };
  const createHtmlPanel = (editor, panelID, dataList) => {
    let buttonsStyleName = "";
    buttonsStyleName = tp$State["buttonsStyle"] && tp$State["buttonsStyle"][panelID];
    !dataList ? dataList = keys(editor.tp$CustomTags.buttons.styleSheetList) : "";
    if (!buttonsStyleName) {
      buttonsStyleName = tp$State["buttonsStyle"] && (tp$State["buttonsStyle"][panelID] = dataList[0]);
    }
    let panelStr = "";
    let buttonsStyleInit = "";
    let buttonsStyleStr = "";
    dataList.forEach((styleName, idx) => {
      styleName === buttonsStyleName ? buttonsStyleInit = `<span class="tp-buttons" data-tp-style="${styleName}">${tp$Translate(styleName)}</span>` : "";
      panelStr += `<li ><input id="${panelID + "_" + idx}" type="radio" name="${panelID}" ${buttonsStyleName === styleName ? " checked " : ""}  onclick="tinymce.tp$HtmlPanelFn(this,'${panelID}','${styleName}')"> <label for="${panelID + "_" + idx}" > <span class="tp-buttons" data-tp-style="${styleName}">${tp$Translate(styleName)}</span></label></li>
`;
      buttonsStyleStr += getButtonsStyle(editor.tp$CustomTags.buttons.styleSheetList[styleName], styleName);
    });
    return `<div style="width: 100%; position: relative; " >
 
  <style>
  .tox .tox-dialog__body-content ul{
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0;
    max-height:160px;
    overflow: auto;
    border-top: 1px solid #ccc;

  }
  .tox .tox-dialog__body-content ul input{
    display: none;
  }
  .tox .tox-dialog__body-content ul label{
    border: 2px solid transparent;
    display: inline-block;
    position: relative;
    padding: 2px;
    cursor: pointer;
    
  }
  .tox .tox-dialog__body-content ul label::after{
    content:"\u2714";
    font-size: 20px;
    border-radius: 15px;
    width: 22px;
    height: 22px;
    display: none;
    color:  #fff;
    background:  #1C6CA1;
    border: 2px solid #1C6CA1;
    position: absolute;
    text-align: center;
    line-height: 20px;
    z-index: 9;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    
  }
  .tox .tox-dialog__body-content ul input:checked + label::after{
    display: block;
  }
  .tox .tox-dialog__body-content ul input:checked + label{
  
    pointer-events: none;
   
  }
  .tox .tox-dialog__body-content ul input:checked + label>span{
    opacity: 0.5;
  }
  .tox .tox-dialog__body-content .showStyle{
    display: block;
    position: absolute;
    right: 20px;
    top: 30px;
    -webkit-transform: translatY(-50%);
    transform: translateY(-50%);

  }
  .tox .tox-dialog__body-content .tox-form__group h2.title_h2{
    margin: 0;
    padding: 0;
    margin-top: -20px;
    min-height: 60px;
    line-height:60px;
  }
  .tox .tox-dialog__body-content li{
    line-style:none;
    display: inline-block;
    margin: 0 4px;
    margin-top: 5px;
  }
    ${buttonsStyleStr.replace(/.tp-buttons/g, ".tox .tox-dialog__body-content .tp-buttons")}
     </style>
     <div class="showStyle" id="${panelID + "_StyleID"}">${buttonsStyleInit}</div>
     <h2 class="title_h2">${global$11.translate("Select tmplate")}:</h2>
     <ul>
      ${panelStr}
     </ul>
     </div>
     `;
  };
  let tp$getFirstStyleValue = (_block, _styleName) => {
    let _resValue = "";
    if (!_block)
      return "";
    _styleName = toHump(_styleName);
    while (_block.nodeName && _block.nodeName.toLowerCase() !== "#text") {
      _resValue = _block.style[_styleName];
      _block = _block.firstChild;
    }
    return _resValue;
  };
  const toUpdateIndent2em = (editor, value, blocks) => {
    blocks = blocks || editor.selection.getSelectedBlocks();
    global$1.each(blocks, function(block) {
      if (editor.dom.getStyle(block, "text-indent") || value) {
        let kv = "";
        let kl = "";
        if (value === "remove") {
          -parseInt(editor.dom.getStyle(block, "text-indent")) == parseInt(editor.dom.getStyle(block, "margin-left")) && editor.dom.setStyle(block, "margin-left", null);
          editor.dom.setStyle(block, "text-indent", null);
        } else {
          value = parseInt(value) || 2;
          if (block && block.firstChild) {
            kv = tp$getFirstStyleValue(block, "font-size");
            kl = tp$getFirstStyleValue(block, "letter-spacing");
            if (kv) {
              kv = (parseInt(kv) + parseInt(kl ? kl : 0)) * value + "px";
            } else
              kv = (parseInt(kl ? kl : 0) + 16) * value + "px";
          }
          value > 0 && -parseInt(editor.dom.getStyle(block, "text-indent")) == parseInt(editor.dom.getStyle(block, "margin-left")) && editor.dom.setStyle(block, "margin-left", null);
          editor.dom.setStyle(block, "text-indent", kv ? kv : value + "em");
          value < 0 && editor.dom.setStyle(block, "margin-left", kv ? kv.replace(/^-/, "") : -value + "em");
        }
      }
    });
  };
  const tp$RegisterCommand = (editor) => {
    var cmd = function(command) {
      return function() {
        return editor.execCommand(command);
      };
    };
    editor.addCommand("tpLetterspacing", function(ui, value) {
      editor.formatter.apply("tpLetterspacing", { value });
      toUpdateIndent2em(editor);
    });
    editor.addCommand("tpLineheight", function(ui, value) {
      editor.formatter.apply("tpLineheight", { value });
    });
    editor.addCommand("tpIndent", function(ui, value) {
      toUpdateIndent2em(editor, value || 2);
    });
    editor.addCommand("mceTpAlignleft", function(ui, value) {
      let _dom = editor.dom.getParent(editor.selection.getNode(), "tp-tabs,tp-buttons,tp-collapse");
      editor.dom.setStyle(_dom, "float", "left");
    });
    editor.addCommand("mceTpAlignright", function(ui, value) {
      let _dom = editor.dom.getParent(editor.selection.getNode(), "tp-tabs,tp-buttons,tp-collapse");
      editor.dom.setStyle(_dom, "float", "right");
    });
    editor.addCommand("mceTpAligncenter", function(ui, value) {
      let _dom = editor.dom.getParent(editor.selection.getNode(), "tp-tabs,tp-buttons,tp-collapse");
      editor.dom.setStyle(_dom, "float", null);
      editor.dom.setStyle(_dom, "margin-left", "auto");
      editor.dom.setStyle(_dom, "margin-right", "auto");
    });
    editor.ui.registry.addButton("tpalignleft", {
      tooltip: "Align left",
      onAction: cmd("mceTpAlignleft"),
      icon: "align-left"
    });
    editor.ui.registry.addButton("tpalignright", {
      tooltip: "Align right",
      onAction: cmd("mceTpAlignright"),
      icon: "align-right"
    });
    editor.ui.registry.addButton("tpaligncenter", {
      tooltip: "Align center",
      onAction: cmd("mceTpAligncenter"),
      icon: "align-center"
    });
  };
  const tp$RegisterFormatter = (editor) => {
    editor.formatter.register({
      alignleft: [
        {
          selector: "figure.image",
          collapsed: false,
          classes: "align-left",
          ceFalseOverride: true,
          preview: "font-family font-size"
        },
        {
          selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
          styles: { textAlign: "left" },
          inherit: false,
          preview: false,
          defaultBlock: "div"
        },
        {
          selector: "img,table,audio,video,tp-buttons,tp-tabs",
          collapsed: false,
          styles: { float: "left" },
          preview: "font-family font-size"
        }
      ],
      aligncenter: [
        {
          selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
          styles: { textAlign: "center" },
          inherit: false,
          preview: "font-family font-size",
          defaultBlock: "div"
        },
        {
          selector: "figure.image",
          collapsed: false,
          classes: "align-center",
          ceFalseOverride: true,
          preview: "font-family font-size"
        },
        {
          selector: "img,audio,video",
          collapsed: false,
          styles: {
            display: "block",
            marginLeft: "auto",
            marginRight: "auto"
          },
          preview: false
        },
        {
          selector: "table,tp-buttons,tp-tabs",
          collapsed: false,
          styles: {
            marginLeft: "auto",
            marginRight: "auto"
          },
          preview: "font-family font-size"
        }
      ],
      alignright: [
        {
          selector: "figure.image",
          collapsed: false,
          classes: "align-right",
          ceFalseOverride: true,
          preview: "font-family font-size"
        },
        {
          selector: "figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",
          styles: { textAlign: "right" },
          inherit: false,
          preview: "font-family font-size",
          defaultBlock: "div"
        },
        {
          selector: "img,table,audio,video,tp-buttons,tp-tabs",
          collapsed: false,
          styles: { float: "right" },
          preview: "font-family font-size"
        }
      ],
      afterParagraph: {
        selector: "p,ul,ol,dl,li,table",
        defaultBlock: "p",
        deep: false,
        styles: { "margin-bottom": "%value" }
      },
      beforeParagraph: {
        selector: "p,ul,ol,dl,li,table",
        defaultBlock: "p",
        deep: false,
        styles: { "margin-top": "%value" }
      },
      borderParagraph: {
        selector: "p,ul,ol,dl,li,table",
        defaultBlock: "p",
        deep: false,
        styles: { "border-width": "%valueW", "border-style": "%valueS", "border-color": "%valueC" }
      },
      paddingParagraph: {
        selector: "p,ul,ol,dl,li,table",
        defaultBlock: "p",
        deep: false,
        styles: { "padding": "%value" }
      },
      tpParagraph: {
        selector: "p,ul,ol,dl,li,table",
        defaultBlock: "p",
        deep: false,
        styles: { "background": "%background", "text-indent": "%indent" }
      },
      tpLetterspacing: {
        inline: "span",
        remove_similar: true,
        styles: { "letter-spacing": "%value" }
      },
      tpLineheight: {
        selector: "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",
        styles: { "line-height": "%value" }
      }
    });
    editor.on("ExecCommand", function(cmd) {
      cmd.command === "FontSize" && toUpdateIndent2em(editor);
    });
  };
  let tp$ComponentSetStyleMapping = function(editor, _self, cmd, _customTag) {
    !editor.tp$Style.mapping ? editor.tp$Style.mapping = {} : "";
    !editor.tp$Style.mapping["" + _self.getAttribute("data-id")] ? editor.tp$Style.mapping["" + _self.getAttribute("data-id")] = {
      styleCustomTags: _customTag.name,
      stylePath: _customTag.name === "buttons" ? "styleSheetList" : "styleSheetLoadList",
      styleTemplate: _self.getAttribute("data-style") || "default",
      quantity: _self.children.length - 1,
      specialStyle: {}
    } : __assign(editor.tp$Style.mapping["" + _self.getAttribute("data-id")], { styleTemplate: _self.getAttribute("data-tp-style") || "default", quantity: _self.children.length - 1 });
  };
  const setupWebComponent = (win, doc, editor, _customTag, _tagName) => {
    const template = doc.createElement("template");
    const staticStyle = document.createElement("style");
    const customStyle = document.createElement("style");
    staticStyle.textContent = `body{
      padding: 0;
      margin: 0;
  }
  :host {
      overflow: hidden;
      display: block; 
  }`;
    template.innerHTML = _customTag.template.innerHTML;
    class TpComponent extends win.HTMLElement {
      constructor() {
        super();
        this.setAttribute("contenteditable", false);
        this.setAttribute("data-mce-tp-component", _tagName);
        this.attachShadow({ mode: "open" });
        this.tp$state = typeof _customTag.state === "object" ? JSON.parse(JSON.stringify(_customTag.state)) : {};
        tp$ComponentSetStyleMapping(editor, this, "init", _customTag);
        this.tpComponentDelete = typeof _customTag.tpComponentDelete === "function" ? _customTag.tpComponentDelete.bind(this) : () => {
          this.remove();
        };
        this.tpComponentCmd = typeof _customTag.tpComponentCmdFn === "object" ? JSON.stringify(_customTag.tpComponentCmdFn) !== "{}" ? (cmd, props) => {
          _customTag.tpComponentCmdFn[cmd](this, props);
          tp$ComponentSetStyleMapping(editor, this, cmd, _customTag);
        } : (cmd, props) => {
          tp$Component.customTags[_tagName].tpComponentCmdFn[cmd](this, props);
          tp$ComponentSetStyleMapping(editor, this, cmd, _customTag);
        } : () => {
          console.log("\u65E0\u53EF\u7528cmd");
        };
        customStyle.id = "tpComponentStyle_" + this.getAttribute("data-id");
        if (_tagName == "tabs") {
          customStyle.textContent = _customTag.styleSheetLoadList && _customTag.styleSheetLoadList[this.getAttribute("data-tp-style") || "default"] ? _customTag.styleSheetLoadList[this.getAttribute("data-tp-style") || "default"].replace(/.tp-tabs\s*\{/g, ":host   {").replace(/.tp-tabs_label\b\s/g, "::slotted(.tp-tabs_label)   ").replace(/.tp-tabs_label:hover\b\s/g, "::slotted(.tp-tabs_label:hover)   ").replace(/.tp-tabs_label.checked\b\s/g, "::slotted(.tp-tabs_label.checked)   ") : "";
        }
        if (_tagName == "collapse") {
          customStyle.textContent = _customTag.styleSheetLoadList && _customTag.styleSheetLoadList[this.getAttribute("data-tp-style") || "default"] ? _customTag.styleSheetLoadList[this.getAttribute("data-tp-style") || "default"].replace(/>/g, " ").replace(/.tp-collapse\s*\{/g, ":host   {").replace(/label.tp-collapse_label\b\s/g, "::slotted(.tp-collapse_label)   ").replace(/label.tp-collapse_label::/g, "::slotted(.tp-collapse_label)::").replace(/.tp-tabs_label:hover\b\s/g, "::slotted(.tp-tabs_label:hover)   ").replace(/.tp-tabs_label.checked\b\s/g, "::slotted(.tp-tabs_label.checked)   ") : "";
        }
        if (_tagName == "buttons") {
          customStyle.textContent = _customTag.styleSheetList && _customTag.styleSheetList[this.getAttribute("data-tp-style") || "default"] ? getButtonsStyle(_customTag.styleSheetList[this.getAttribute("data-tp-style") || "default"], this.getAttribute("data-tp-style") || "default").replace(/\[data-tp-style=(.*?)\]/g, "").replace(/>/g, " ").replace(/.tp-buttons\s*\{/g, ":host   {").replace(/.tp-buttons:hover\s*\{/g, ":host(:hover)   {").replace(/.tp-buttons::before\s*\{/g, ":host(.tp-buttons)::before   {").replace(/.tp-buttons::after\s*\{/g, ":host(.tp-buttons)::after   {") : "";
        }
        template.content.prepend(customStyle);
        template.content.prepend(staticStyle);
        this.shadowRoot.appendChild(template.content.cloneNode(true));
      }
      connectedCallback() {
        getTp$ComponentFn(_customTag, "headerEditableFn")(this, _customTag.isHeaderEditable, _tagName, editor);
        getTp$ComponentFn(_customTag, "contentEditableFn")(this, _customTag.isContentEditable, _tagName, editor);
        getTp$ComponentFn(_customTag, "connectedCallback")(this.shadowRoot, this);
      }
      static get observedAttributes() {
        return ["data-top-bg", "data-mce-tp-component", "data-value"];
      }
      static tp$Delete() {
        console.log(this);
      }
    }
    try {
      win.customElements.define("tp-" + _tagName, TpComponent);
    } catch (_a) {
    }
  };
  const createComponentsCustomTag = (editor) => {
    const win = editor.getWin();
    const doc = editor.getDoc();
    let toolbar = editor.toolbar;
    let baseSource = editor.baseURI.source;
    typeof toolbar === "object" && (toolbar = toolbar.jion(" "));
    if (/tpIconlists/.test(toolbar)) {
      global$6.send({
        url: baseSource + "plugins/tpIconlists/tpIconlists.css",
        async: false,
        dataType: "text",
        success: function(text) {
          editor.dom.addStyle(text);
        }
      });
    }
    tp$RegisterFormatter(editor);
    tp$RegisterCommand(editor);
    const tpComponentStyle = `.mce-content-body [data-mce-tp-component][contenteditable=false][data-mce-selected] {
      outline: none;
      cursor: default;
      box-shadow: 0 0 0 2px #b4d7ff;
      position: relative;
      z-index:999;
      border-color: #B4D7FF;
      border-style: solid;
  }
  .mce-content-body .tp-partition[contentEditable=false],
  .mce-content-body .tp-partition[contentEditable=false]:focus,
  .mce-content-body .tp-partition[contentEditable=false]:hover{
    outline: none!important;
    box-shadow: none!important;
  }
  .mce-content-body tp-buttons .tp-component_inline>a{
       color: inherit;
       font:inherit;
       text-decoration: none;
       
  }
  .mce-content-body .tp-collapse .tp-collapse_label>p:first-child{
      display: inline-block;
  }
  .mce-content-body .tp-component_inline{display: table-cell; margin: 0 }
  .mce-content-body *[contentEditable=false] *[contentEditable=true]:focus {
      outline: none!important;
  }
  .mce-content-body tp-buttons{
    display: inline-block;
    vertical-align: middle;
  }
  .mce-content-body img{
      max-width: 100%;
  }
  .mce-content-body [data-mce-tp-component]{
      border: 1px dashed #bbb;
  }
  .mce-content-body *[contentEditable=false] *[contentEditable=true]:hover {
      outline: none!important;
  }`;
    editor.dom.addStyle(tpComponentStyle);
    editor.tp$Style = {};
    editor.getTpStyle = (args) => {
      return "<style>" + editor.tp$OutputStyle + " </style>";
    };
    let componentList = editor.tp$CustomTags || tp$Component.customTags;
    global$1.each(componentList, function(item, key) {
      setupWebComponent(win, doc, editor, item, key);
    });
    editor.parser.addAttributeFilter("data-tp-component", (nodes) => {
      nodes && nodes.forEach((node) => {
        let customtag = node.attr("data-tp-component");
        componentList[customtag] ? getTp$ComponentFn(componentList[customtag], "parserFn")(node, customtag, editor) : "";
      });
    });
    editor.serializer.addAttributeFilter("data-mce-tp-component", (nodes) => {
      nodes && nodes.forEach((node) => {
        let customtag = node.attr("data-mce-tp-component");
        componentList[customtag] ? getTp$ComponentFn(componentList[customtag], "serializerFn")(node, customtag, editor) : " ";
      });
    });
    editor.setContent(editor.getContent({ source_view: true }));
  };
  const setCustomTags = (customTag, setAttribute, setValue, editor, isAssign) => {
    if (editor) {
      !editor.tp$CustomTags && (editor.tp$CustomTags = JSON.parse(JSON.stringify(tp$Component.customTags)));
      isAssign ? __assign(editor.tp$CustomTags[customTag][setAttribute], setValue) : editor.tp$CustomTags[customTag][setAttribute] = setValue;
    } else {
      isAssign ? __assign(tp$Component.customTags[customTag][setAttribute], setValue) : tp$Component.customTags[customTag][setAttribute] = setValue;
    }
  };
  const createCustomTags = (customTag, init, editor) => {
    if (editor) {
      !editor.tp$CustomTags && (editor.tp$CustomTags = JSON.parse(JSON.stringify(tp$Component.customTags)));
      editor.tp$CustomTags[customTag] = init;
    } else {
      tp$Component.customTags[customTag] = init;
    }
  };
  const setStyleSheetList = (customTag, styleName, text, editor) => {
    setCustomTags("buttons", "styleSheetList", { [styleName]: {
      "tp-buttons": getStyleSheetClass("tp-buttons", text),
      "tp-buttons:hover": getStyleSheetClass("tp-buttons:hover", text),
      "tp-buttons::before": getStyleSheetClass("tp-buttons::before", text),
      "tp-buttons::after": getStyleSheetClass("tp-buttons::after", text)
    } }, editor, true);
  };
  const componentsApi = {
    custom_elements: "",
    setCustomTags,
    createCustomTags,
    setStyleSheetList,
    createHtmlPanel
  };
  var tabs = {
    name: "tabs",
    styleSheet: {
      selector: "default",
      styleSheetList: {
        default: {
          "tp-tabs": ``,
          "tp-tabs_top": ``,
          "tp-tabs_label.checked": ` `,
          "tp-tabs_main": ` `,
          "tp-tab_main.checked": ` `
        }
      }
    },
    styleSheetLoadList: {},
    styleFn: () => {
    },
    state: {
      count: 0
    },
    tpComponentDeleteFn: function() {
      console.log(this);
    },
    tpComponentMonitorCmd: () => {
    },
    tpComponentCmdFn: {
      tabAdd: (_self, _props) => {
        let partitionEditableWrapper = document.createElement("div");
        partitionEditableWrapper.setAttribute("contenteditable", false);
        partitionEditableWrapper.setAttribute("class", "tp-partition tp-tabs_label");
        partitionEditableWrapper.setAttribute("data-idx", _self.tp$state.count);
        let partitionEditableWrapperChlid = document.createElement("p");
        partitionEditableWrapperChlid.setAttribute("class", "tp-component_inline");
        partitionEditableWrapperChlid.setAttribute("data-idx", _self.tp$state.count);
        partitionEditableWrapperChlid.setAttribute("contenteditable", true);
        partitionEditableWrapperChlid.innerHTML = _props.title;
        partitionEditableWrapper.appendChild(partitionEditableWrapperChlid);
        _self.insertBefore(partitionEditableWrapper, _self.lastChild);
        let partitionEditableMain = document.createElement("div");
        partitionEditableMain.setAttribute("class", "tp-tab_main");
        partitionEditableMain.setAttribute("style", "overflow: hidden; max-height: 0; transition: all 0s");
        partitionEditableMain.innerHTML = _props.content;
        _self.lastChild.appendChild(partitionEditableMain);
        _self.tp$state.count++;
      },
      tabDelete: (_self, _props) => {
        _self.children[--_self.tp$state.count].remove();
        _self.lastChild.lastChild.remove();
      },
      delete: (_self, _props) => {
        _self.remove();
      },
      getStyle: (_self, _props) => {
      },
      setStyle: (_self, _props) => {
        console.log(_self.querySelector(".tp-tabs_top"));
        _self.setAttribute("data-top-style", _props["tp-tabs_top"]);
        _self.shadowRoot.querySelector(".tp-tabs_top").setAttribute("style", _props["tp-tabs_top"]);
      }
    },
    template: {
      innerHTML: `
<div class="tp-tabs">
  <div class="tp-tabs_top" id="headerID">
      <slot></slot>
  </div>
  <div class="tp-tabs_main">
      <slot name="content" ></slot>
  </div>
</div>
    `
    },
    connectedCallback: (shadowRoot, dom) => {
      let isChecked = (ele) => {
        return ele.className && ele.className.indexOf("tp-partition tp-tabs_label") !== -1 || ele.parentNode && (ele.parentNode.className && ele.parentNode.className.indexOf("tp-partition tp-tabs_label") !== -1 || ele.parentNode.parentNode && ele.parentNode.parentNode.className && ele.parentNode.parentNode.className.indexOf("tp-partition tp-tabs_label") !== -1);
      };
      shadowRoot.getElementById("headerID").addEventListener("click", function(e) {
        if (isChecked(e.target)) {
          let _idex = e.target.getAttribute("data-idx") || e.target.parentNode.getAttribute("data-idx") || "0";
          let _tabsToplist = dom.querySelectorAll("div.tp-partition.tp-tabs_label");
          let oldSelectTopDom = dom.querySelector("div.tp-partition.tp-tabs_label.checked");
          oldSelectTopDom ? oldSelectTopDom.setAttribute("class", "tp-partition tp-tabs_label") : "";
          let newSelectTopDom = _tabsToplist[_idex];
          newSelectTopDom ? newSelectTopDom.setAttribute("class", "tp-partition tp-tabs_label checked") : "";
          let _tabslist = dom.querySelectorAll("div.tp-tab_main");
          let oldSelectDom = dom.querySelector("div.tp-tab_main[contenteditable=true]");
          oldSelectDom ? oldSelectDom.setAttribute("contenteditable", false) || (oldSelectDom.style.maxHeight = "0px") : "";
          let newSelectDom = _tabslist[_idex];
          newSelectDom ? newSelectDom.setAttribute("contenteditable", true) || (newSelectDom.style.maxHeight = "10000px") : "";
        }
      });
    },
    isContentEditable: true,
    contentEditableFn: (_self, _isEditable, _customtag) => {
      if (_self.lastChild && _self.lastChild.className === "tp-" + _customtag + "_main") {
        const partitionEditableWrapper = document.createElement("div");
        partitionEditableWrapper.setAttribute("contenteditable", false);
        partitionEditableWrapper.setAttribute("class", "tp-partition tp-tabs_main");
        partitionEditableWrapper.setAttribute("slot", "content");
        if (_self.lastChild.firstChild) {
          _self.lastChild.firstChild.setAttribute("class", "tp-tab_main");
          _self.lastChild.firstChild.setAttribute("style", "overflow: hidden; max-height: 10000px; transition: all 0s");
          _isEditable ? _self.lastChild.firstChild.setAttribute("contenteditable", true) : "";
          partitionEditableWrapper.setAttribute("style", _self.lastChild.getAttribute("style"));
          partitionEditableWrapper.appendChild(_self.lastChild.firstChild);
        }
        while (_self.lastChild.firstChild) {
          _self.lastChild.firstChild.setAttribute("class", "tp-tab_main");
          _self.lastChild.firstChild.setAttribute("style", "overflow: hidden; max-height: 0; transition: all 0s");
          partitionEditableWrapper.appendChild(_self.lastChild.firstChild);
        }
        _self.removeChild(_self.lastChild);
        _self.appendChild(partitionEditableWrapper);
      }
    },
    isHeaderEditable: true,
    headerEditableFn: (_self, _isEditable, _customtag) => {
      let _len = _self.children.length;
      _self.getAttribute("data-id");
      _self.shadowRoot.querySelector("#headerID.tp-tabs_top").setAttribute("style", _self.getAttribute("data-top-style") ? _self.getAttribute("data-top-style") : "");
      for (let i = _len - 2; i >= 0; i--) {
        _self.tp$state.count++;
        _self.children[i].setAttribute("contenteditable", false);
        _self.children[i].setAttribute("class", "tp-partition tp-" + _customtag + "_label" + (i === 0 ? " checked" : ""));
        _self.children[i].setAttribute("data-idx", i);
        _self.children[i].firstChild.setAttribute("class", "tp-component_inline");
        _self.children[i].firstChild.setAttribute("data-idx", i);
        _isEditable ? _self.children[i].firstChild.setAttribute("contenteditable", true) : "";
      }
    },
    parserFn: (node, customtag) => {
      node.attr({
        "data-tp-component": null,
        "data-mce-tp-component": customtag,
        "data-top-style": node.firstChild.attr("style")
      });
      while (node.firstChild.name === "input") {
        node.firstChild.remove();
      }
      let _node = node.firstChild.firstChild;
      while (_node && _node.name === "label") {
        let _nextNode = _node.next;
        let placeTop = new global$7("div", 1);
        _node.name = "p";
        _node.wrap(placeTop);
        _node = _nextNode;
      }
      let tabMainFirst = node.lastChild.firstChild;
      while (tabMainFirst && tabMainFirst.name === "label") {
        let tabMainFirstNext = tabMainFirst.next.next;
        tabMainFirst.remove();
        tabMainFirst = tabMainFirstNext;
      }
      node.firstChild.unwrap();
      node.type = 1;
      node.name = "tp-" + customtag;
    },
    serializerFn: (node, customtag) => {
      node.attr({
        "data-mce-tp-component": null,
        "data-tp-component": customtag,
        "contenteditable": null,
        "class": "tp-" + customtag
      });
      let placeTop = new global$7("div", 1);
      placeTop.attr("class", "tp-tabs_top");
      placeTop.attr("style", node.attr("data-top-style"));
      node.attr("data-top-style", null);
      let _node = node.firstChild;
      let cloneNodeList = [];
      while (_node.attr("data-idx")) {
        let _nextNode = _node.next;
        _node.firstChild.name = "label";
        _node.firstChild.attr({
          contenteditable: null,
          "data-idx": null,
          class: "tp-" + customtag + "_label",
          for: node.attr("data-id") + "tab" + _node.attr("data-idx")
        });
        cloneNodeList.push(tp$Serialize(_node.firstChild));
        placeTop.append(_node.firstChild);
        _node.remove();
        _node = _nextNode;
      }
      let _lastNode = node.lastChild.firstChild;
      let _count = 0;
      while (_lastNode && _lastNode.attr("class") === "tp-tab_main") {
        let _nextNode = _lastNode.next;
        let placeInput = new global$7("input", 1);
        placeInput.shortEnded = true;
        placeInput.attr({ id: node.attr("data-id") + "tab" + _count, type: "radio", name: node.attr("data-id") });
        _count == 0 ? placeInput.attr("checked", "") : "";
        node.append(placeInput);
        _lastNode.attr({
          contenteditable: null,
          style: null,
          class: "tp-tab_main tp-tab_main_" + _count
        });
        if (cloneNodeList[_count]) {
          node.lastChild.insert(tp$DomParser(cloneNodeList[_count]), _lastNode, true);
          _count++;
        }
        _lastNode = _nextNode;
      }
      node.append(placeTop);
      node.firstChild.attr({
        contenteditable: null,
        class: "tp-tabs_main"
      });
      node.append(node.firstChild);
      node.type = 1;
      node.name = "div";
    }
  };
  var buttons = {
    name: "buttons",
    template: {
      innerHTML: `
<div class="tp-buttons">
<div class="tp-buttons_main">
    <slot></slot>
</div>
</div>
    `
    },
    styleSheetList: {
      default: {
        "tp-buttons": `

          display: inline-block;
          background: rgb(179, 70, 70);
          padding: 14px 25px;
          color: #333;
          border-radius: 8px;
          -webkit-transition: all .2s ease-in-out;
          transition: all .2s ease-in-out;
          border: 1px solid transparent;
          box-sizing: border-box;
          word-wrap: break-word;
          cursor: pointer;
          text-decoration: none;`,
        "tp-buttons:hover": `
           color: rgb(179, 70, 70) ;
           background: transparent;
           border-color: rgb(179, 70, 70) ;
           `,
        "tp-buttons::before": ` `,
        "tp-buttons::after": ` `
      }
    },
    isContentEditable: true,
    connectedCallback: () => {
    },
    tpComponentCmdFn: {
      upData: (_self, _props) => {
        _self.shadowRoot.children[1].textContent = getButtonsStyle(_props.editor.tp$CustomTags.buttons.styleSheetList[_props.styleName], _props.styleName).replace(/\[data-tp-style=(.*?)\]/g, "").replace(/>/g, " ").replace(/.tp-buttons\s*\{/g, ":host   {").replace(/.tp-buttons:hover\s*\{/g, ":host(:hover)   {").replace(/.tp-buttons::before\s*\{/g, ":host(::before)   {").replace(/.tp-buttons::after\s*\{/g, ":host(::after)   {");
      }
    },
    contentEditableFn: (_self, _isEditable, _customtag, editor) => {
      if (_self.firstChild && _self.firstChild.tagName === "A") {
        const Wrapper = document.createElement("p");
        Wrapper.setAttribute("contenteditable", true);
        Wrapper.setAttribute("class", "tp-component_inline");
        _self.firstChild.innerHTML = "<span>" + _self.firstChild.innerHTML + "</span>";
        _self.firstChild.setAttribute("href", "javascript:;");
        Wrapper.appendChild(_self.firstChild);
        _self.appendChild(Wrapper);
      }
    },
    isHeaderEditable: true,
    parserFn: (node, customtag, editor) => {
      node.attr({
        "data-tp-component": null
      });
      let _text = node.attr("style");
      let placeDivStyle = {};
      let _tem = "";
      _tem = tp$getStyleValue("margin", _text);
      _tem && (placeDivStyle.margin = _tem);
      _tem = tp$getStyleValue("padding", _text);
      _tem && (placeDivStyle.padding = _tem);
      _tem = tp$getStyleValue("border", _text);
      _tem && (placeDivStyle.border = _tem);
      _tem = tp$getStyleValue("background", _text);
      _tem && (placeDivStyle["background"] = _tem);
      _tem = tp$getStyleValue("border-radius", _text);
      _tem && (placeDivStyle["border-radius"] = _tem);
      _tem = tp$getStyleValue("border-width", _text);
      _tem && (placeDivStyle["border-width"] = _tem);
      _tem = tp$getStyleValue("border-style", _text);
      _tem && (placeDivStyle["border-style"] = _tem);
      _tem = tp$getStyleValue("border-color", _text);
      _tem && (placeDivStyle["border-color"] = _tem);
      let placeDiv = new global$7("div", 1);
      placeDiv.type = 1;
      placeDiv.attr({
        "data-mce-tp-component": customtag,
        "data-tp-style": node.attr("data-tp-style") || "default",
        "style": getFormatStyle(placeDivStyle) || null,
        "data-id": node.attr("data-id")
      });
      node.attr("class") && placeDiv.attr("class", node.attr("class"));
      !editor.tp$Style.mapping ? editor.tp$Style.mapping = {} : "";
      !editor.tp$Style.mapping["" + node.attr("data-id")] ? editor.tp$Style.mapping["" + node.attr("data-id")] = {
        styleCustomTags: "buttons",
        stylePath: "styleSheetList",
        styleTemplate: node.attr("data-tp-style") || "default",
        specialStyle: {}
      } : __assign(editor.tp$Style.mapping["" + node.attr("data-id")], { styleTemplate: node.attr("data-tp-style") || "default" });
      node.attr("style", getFormatStyle(__assign(getObjStyle(node.attr("style")) || {}, { margin: "", padding: "", background: "", "border-style": "", "border-color": "", "border-width": "", "border-radius": "", border: "" })) || null);
      node.attr("data-id", null);
      node.attr("data-mce-style", null);
      node.wrap(placeDiv);
      placeDiv.name = "tp-" + customtag;
    },
    serializerFn: (node, customtag) => {
      let ATags = node;
      while (ATags.name !== "a" && ATags.firstChild.name !== "#text") {
        ATags = ATags.firstChild;
      }
      node.attr({
        "data-mce-tp-component": null,
        "data-tp-component": customtag,
        "contenteditable": null,
        "data-tp-style": node.attr("data-tp-style") || "default",
        "href": ATags && ATags.attr("href") ? ATags.attr("href") : null,
        "style": ATags && ATags.attr("style") ? getFormatStyle(__assign(getObjStyle(node.attr("style")) || {}, getObjStyle(ATags.attr("style")) || {})) : node.attr("style"),
        "target": ATags && ATags.attr("target") ? ATags.attr("target") : null,
        "rel": ATags && ATags.attr("rel") ? ATags.attr("rel") : null,
        "title": ATags && ATags.attr("title") ? ATags.attr("title") : null
      });
      node.firstChild.unwrap();
      ATags && ATags.unwrap();
      node.name = "a";
    }
  };
  var collapse = {
    name: "collapse",
    template: {
      innerHTML: `
<div class="tp-collapse">
<div class="header" id="headerID">
  <slot name="header"></slot>
</div>
<div class="tp-collapse_mainBox">
    <slot></slot>
</div>
</div>
    `
    },
    isContentEditable: true,
    connectedCallback: () => {
    },
    tpComponentCmdFn: {
      upData: (_self, _props) => {
        let _style = _props.style;
        let padding_style = tp$getStyleValue("padding", _style);
        let border_style = tp$getStyleValue("border", _style);
        let borderWidth_style = tp$getStyleValue("border-width", _style);
        tp$SetSpecialStyle(_props.editor, _self, "tp-collapse_main", (padding_style ? "padding: " + padding_style + "!important; " : "") + (border_style ? "border: " + border_style + "!important;" : "") + (borderWidth_style ? "border-width: " + borderWidth_style + "!important;" : ""));
      }
    },
    contentEditableFn: (_self, _isEditable, _customtag, editor) => {
      const partitionEditableWrapper = document.createElement("div");
      partitionEditableWrapper.setAttribute("contenteditable", false);
      partitionEditableWrapper.setAttribute("class", "tp-partition tp-collapse_main");
      _isEditable ? _self.lastChild.setAttribute("contenteditable", true) : "";
      if (_self.lastChild.getAttribute("class") === "tp-collapse_main") {
        let _style = _self.lastChild.getAttribute("style");
        let padding_style = tp$getStyleValue("padding", _style);
        let border_style = tp$getStyleValue("border", _style);
        let borderWidth_style = tp$getStyleValue("border-width", _style);
        tp$SetSpecialStyle(editor, _self, "tp-collapse_main", (padding_style ? "padding: " + padding_style + "!important; " : "") + (border_style ? "border: " + border_style + "!important;" : "") + (borderWidth_style ? "border-width: " + borderWidth_style + "!important;" : ""));
      }
      partitionEditableWrapper.appendChild(_self.lastChild);
      _self.appendChild(partitionEditableWrapper);
    },
    isHeaderEditable: true,
    headerEditableFn: (_self, _isEditable, _customtag, editor) => {
      if (_self.firstChild.contenteditable !== "true") {
        const headerWrapper = document.createElement("div");
        _isEditable ? headerWrapper.setAttribute("contenteditable", true) : "";
        headerWrapper.setAttribute("slot", "header");
        headerWrapper.setAttribute("class", "tp-collapse_label");
        headerWrapper.setAttribute("style", "min-height: 20px; " + _self.getAttribute("data-top-style"));
        while (_self.firstChild && _self.firstChild.className !== "tp-" + _customtag + "_main") {
          headerWrapper.appendChild(_self.firstChild);
        }
        _self.insertBefore(headerWrapper, _self.firstChild);
      }
    },
    parserFn: (node, customtag) => {
      node.attr({
        "data-tp-component": null,
        "data-mce-tp-component": customtag
      });
      node.attr("data-id", node.firstChild.attr("id"));
      node.firstChild.remove();
      node.lastChild.attr("class", "tp-" + customtag + "_main");
      node.type = 1;
      node.name = "tp-" + customtag;
    },
    serializerFn: (node, customtag) => {
      node.attr({
        "data-mce-tp-component": null,
        "data-tp-component": customtag,
        "contenteditable": null,
        "class": "tp-" + customtag
      });
      node.firstChild.type = 1;
      node.firstChild.name = "label";
      node.firstChild.attr({
        contenteditable: null,
        for: node.attr("data-id")
      });
      let mainStyle = node.lastChild.attr("style");
      node.lastChild.unwrap();
      node.lastChild.attr({
        contenteditable: null,
        class: "tp-" + customtag + "_main",
        style: mainStyle
      });
      let placeInput = new global$7("input", 1);
      placeInput.shortEnded = true;
      placeInput.attr({ id: node.attr("data-id"), type: "checkbox" });
      node.insert(placeInput, node.firstChild, true);
      node.attr("data-id", null);
      node.type = 1;
      node.name = "div";
    }
  };
  const getSktType = (name) => {
    return /select$/.test(name);
  };
  const splitObj = {
    "forecolor": true,
    "backcolor": true,
    tpLetterspacing: true,
    tpIconlists: true,
    tpColumns: true,
    table: true
  };
  const menubarObj = {
    title: {
      file: {
        zh_CN: "\u6587\u4EF6",
        en_US: "File"
      },
      edit: {
        zh_CN: "\u7F16\u8F91",
        en_US: "Edit"
      },
      view: {
        zh_CN: "\u67E5\u770B",
        en_US: "View"
      },
      insert: {
        zh_CN: "\u63D2\u5165",
        en_US: "Insert"
      },
      format: {
        zh_CN: "\u683C\u5F0F",
        en_US: "Format"
      },
      table: {
        zh_CN: "\u8868\u683C",
        en_US: "Table"
      },
      tools: {
        zh_CN: "\u5DE5\u5177",
        en_US: "Tools"
      },
      help: {
        zh_CN: "\u5E2E\u52A9",
        en_US: "Help"
      }
    },
    items: {
      code: "tools",
      spellchecker: "tools",
      spellcheckerlanguage: "tools",
      wordcount: "tools",
      image: "insert",
      link: "insert",
      media: "insert",
      hr: "insert",
      template: "insert",
      codesample: "insert",
      charmap: "insert",
      inserttable: "table",
      emoticons: "insert",
      pagebreak: "insert",
      nonbreaking: "insert",
      anchor: "insert",
      toc: "insert",
      insertdatetime: "insert",
      bold: "format",
      italic: "format",
      underline: "format",
      strikethrough: "format",
      blockquote: "format",
      subscript: "format",
      superscript: "format",
      removeformat: "format",
      formatselect: "format",
      fontselect: "format",
      fontsizes: "format",
      forecolor: "format",
      backcolor: "format",
      fontformats: "format",
      blockformats: "format",
      codeformat: "format",
      align: "format",
      table: "table",
      lineheight: "format",
      help: "help"
    }
  };
  const menubarTitle = {
    file: true,
    view: true,
    edit: true
  };
  const getToolbarGroups = (toolbar) => {
    let toolbar_groups = [];
    let toolbarList = toolbar.split("|");
    toolbarList.forEach((item) => {
      let toolbarItem = item.split(" ");
      let toolbarGroup = [];
      toolbarItem.forEach((cItem) => {
        cItem && toolbarGroup.push({ isSelect: getSktType(cItem), name: cItem });
        cItem && menubarObj.items[cItem] && (menubarTitle[menubarObj.items[cItem]] = true);
      });
      toolbarGroup.length > 0 && toolbar_groups.push(toolbarGroup);
    });
    return toolbar_groups;
  };
  const getMenubarGroups = (menubar) => {
    let menubar_groups = [];
    let menubarList = menubar.split("|");
    menubarList.forEach((item) => {
      let menubarItem = item.split(" ");
      let menubarGroup = [];
      menubarItem.forEach((cItem) => {
        cItem && menubarGroup.push({ isSelect: getSktType(cItem), name: cItem });
      });
      menubar_groups.push(menubarGroup);
    });
    return menubar_groups;
  };
  const getStyle = () => {
    return `.skt-tox-tinymce{

    border: 1px solid #ccc;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
    overflow: hidden;
    position: relative;
    visibility: inherit!important;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    vertical-align: initial;
    white-space: normal;
        height: 200px;
  }
  
  .skt-tox-editor-container{
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
  }
  .skt-tox-editor-header{
     box-shadow: none;
     transition: box-shadow .5s;
         z-index: 1;
  }
  .skt-tox-anchorbar{
    display: flex;
    flex: 0 0 auto;
     border-top: 1px solid #ccc;
  }
  .skt-tox-tinymce .skt-tox-statusbar{
    align-items: center;
    background-color: #fff;
    border-top: 1px solid #ccc;
    color: rgba(34,47,62,.7);
    display: flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 400;
    height: 18px;
    overflow: hidden;
    padding: 0 8px;
    position: relative;
    text-transform: uppercase;
  
  }
  .skt-tox-tinymce .skt-tox-toolbar,.skt-tox-tinymce .skt-tox-menubar{
   background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23cccccc'/%3E%3C/svg%3E") left 0 top 0 #fff;
     background-color: #fff;
    display: flex;
    flex: 0 0 auto;
    flex-shrink: 0;
    flex-wrap: wrap;
    padding: 0 0;
   
  }
  .skt-tox-mbtn{
   align-items: center;
    background: 0 0;
    border: 0;
    border-radius: 3px;
    box-shadow: none;
    color: #222f3e;
    display: flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    height: 34px;
    justify-content: center;
    margin: 2px 0 3px 0;
    outline: 0;
    overflow: hidden;
    padding: 0 4px;
    text-transform: none;
    width: auto;
  }
  .skt-tox-mbtn__select-label {
    cursor: default;
    font-weight: 400;
    margin: 0 4px;
  }
  .skt-tox-tbtn.skt-tox-split-button{
    border: 0;
    border-radius: 3px;
    box-sizing: border-box;
    display: flex;
    width: 50px;
    margin: 2px 0 3px 0;
    overflow: hidden;
  }
  .skt-tox-split-button .skt-tox-tbtn__select-chevron{
    margin-left: 5px;
  
  }
  .skt-tox-toolbar__group{
    border-right:1px solid #ccc;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    margin: 0 0;
    padding: 0 4px 0 4px;
  }
  .skt-tox-toolbar__group:last-child {
  border-right: 0px;
  }
  .skt-tox-sidebar-wrap-box{
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
    width: 100%;
  }
  .skt-tox-sidebar-wrap-box p{
     height: 16px;
     width: calc(100% - 40px);
     margin: 5px 20px;
  }
  .skt-tox-sidebar-wrap-box p:first-child{
    width: calc(100% - 74px)!important;
    margin-top: 20px;
    margin-left: 54px!important;
  }
  
  .skt-tox-sidebar-wrap-box p:nth-child(3n+2){
    width: 90%;
    margin-right:8%;
  }
  .skt-tox-sidebar-wrap-box p:nth-child(3n+3){
    width: calc(100% - 74px);
    margin-left: 54px
  }
  .skt-tox-sidebar-wrap-box p:nth-child(3n+1){
    width: 75%;
    margin-right:8%;
  }
  .skt-tox-sidebar-wrap-box p:last-child{
    width: 65%!important;
    margin-left: 20px;
  }
  .skt-tox-tbtn{
    align-items: center;
    background: 0 0;
    border: 0;
    border-radius: 3px;
    box-shadow: none;
    color: #222f3e;
    display: flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    height: 34px;
    justify-content: center;
    margin: 2px 0 3px 0;
    outline: 0;
    overflow: hidden;
    padding: 0;
    text-transform: none;
    width: 34px;
  }
  .skt-tox-tbtn--select{
    margin: 2px 0 3px 0;
    padding: 0 4px;
    padding-right: 3px;
    width: auto;
  }
  .skt-tox-tbtn__select-label{ 
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 7em;
    font-weight: 400;
    margin: 0 4px;
  }
  .skt-tox-tbtn__select-chevron{
    align-items: center;
    display: flex;
    justify-content: center;
    width: 10px;
    height: 14px;
  }
  .skt-tox-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
  }
  
  @-webkit-keyframes skeleton-ani {
  0% {
    left: -90%
  }
  
  to {
    left: 120%
  }
  }
  
  @keyframes skeleton-ani {
  0% {
    left: -90%
  }
  
  to {
    left: 120%
  }
  }
  .skt{
    display: none;
    width: 100%;
    top:0;
    position: absolute;
    z-index: 99;
    background: #fff;
  }
  .skt.skt-loading{
   display: block;
  }
  .skt-loading .skeleton {
  position: relative;
  overflow: hidden;
  border: none !important;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0) !important;
  background-image: none !important;
  pointer-events: none;
  }
  
  .skt-loading .skeleton:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9;
  width: 100%;
  height: 100%;
  background-color: #ebf1f8;
  display: block
  }
  
  .skt-loading .skeleton:not(.not-round):after {
  border-radius: 4px
  }
  .skt-loading .tox-tbtn__select-chevron{
  display: inline-block;
  width: 8px;
  height: 18px;
  }
  .skt-loading .tox-icon { display: inline-block; width: 24px; height: 24px;}
  .skt-loading .skeleton:not(.not-before):before {
  position: absolute;
  top: 0;
  width: 30%;
  height: 100%;
  content: "";
  background: -webkit-gradient(linear, left top, right top, color-stop(0, hsla(0, 0%, 100%, 0)), color-stop(50%, hsla(0, 0%, 100%, .3)), to(hsla(0, 0%, 100%, 0)));
  background: -o-linear-gradient(left, hsla(0, 0%, 100%, 0) 0, hsla(0, 0%, 100%, .3) 50%, hsla(0, 0%, 100%, 0) 100%);
  background: linear-gradient(90deg, hsla(0, 0%, 100%, 0) 0, hsla(0, 0%, 100%, .3) 50%, hsla(0, 0%, 100%, 0));
  -webkit-transform: skewX(-45deg);
  -ms-transform: skewX(-45deg);
  transform: skewX(-45deg);
  z-index: 99;
  -webkit-animation: skeleton-ani 1s ease infinite;
  animation: skeleton-ani 1s ease infinite;
  display: block
  }
  .skt-loading .skeleton.badge:after {
  background-color: #f8fafc
  }`;
  };
  const getDarkStyle = () => {
    return `[data-isdark] .skt-tox-tinymce{

    border: 1px solid #000;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
    overflow: hidden;
    position: relative;
    visibility: inherit!important;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    vertical-align: initial;
    white-space: normal;
        height: 200px;
  }
  
  .skt-tox-editor-container{
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
  }
  .skt-tox-editor-header{
     box-shadow: none;
     transition: box-shadow .5s;
         z-index: 1;
  }
  [data-isdark] .skt-tox-anchorbar{
    display: flex;
    flex: 0 0 auto;
     border-top: 1px solid #000;
  }
  [data-isdark] .skt-tox-tinymce .skt-tox-statusbar{
    align-items: center;
    background-color: #222f3e;
    border-top: 1px solid #000;
    color: rgba(34,47,62,.7);
    display: flex;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 400;
    height: 18px;
    overflow: hidden;
    padding: 0 8px;
    position: relative;
    text-transform: uppercase;
  
  }
  [data-isdark] .skt-tox-tinymce  .skt-tox-toolbar,[data-isdark] .skt-tox-tinymce .skt-tox-menubar{
   background:url("data:image/svg+xml;charset=utf8,%3Csvg height='39px' viewBox='0 0 40 39px' width='40' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='0' y='38px' width='100' height='1' fill='%23000000'/%3E%3C/svg%3E") left 0 top 0 #222f3e;
     background-color: #222f3e;
    display: flex;
    flex: 0 0 auto;
    flex-shrink: 0;
    flex-wrap: wrap;
    padding: 0 0;
   
  }
  [data-isdark] .skt-tox-tinymce .skt-tox-mbtn{
   align-items: center;
    background: 0 0;
    border: 0;
    border-radius: 3px;
    box-shadow: none;
    color: #fff;
    display: flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    height: 34px;
    justify-content: center;
    margin: 2px 0 3px 0;
    outline: 0;
    overflow: hidden;
    padding: 0 4px;
    text-transform: none;
    width: auto;
  }
  .skt-tox-mbtn__select-label {
    cursor: default;
    font-weight: 400;
    margin: 0 4px;
  }
  .skt-tox-tbtn.skt-tox-split-button{
    border: 0;
    border-radius: 3px;
    box-sizing: border-box;
    display: flex;
    width: 50px;
    margin: 2px 0 3px 0;
    overflow: hidden;
  }
  .skt-tox-split-button .skt-tox-tbtn__select-chevron{
    margin-left: 5px;
  
  }
  [data-isdark] .skt-tox-tinymce .skt-tox-toolbar__group{
    border-right:1px solid #000;
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    margin: 0 0;
    padding: 0 4px 0 4px;
  }
  .skt-tox-toolbar__group:last-child {
  border-right: 0px;
  }
  .skt-tox-sidebar-wrap-box{
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
    width: 100%;
  }
  .skt-tox-sidebar-wrap-box p{
     height: 16px;
     width: calc(100% - 40px);
     margin: 5px 20px;
  }
  .skt-tox-sidebar-wrap-box p:first-child{
    width: calc(100% - 74px)!important;
    margin-top: 20px;
    margin-left: 54px!important;
  }
  
  .skt-tox-sidebar-wrap-box p:nth-child(3n+2){
    width: 90%;
    margin-right:8%;
  }
  .skt-tox-sidebar-wrap-box p:nth-child(3n+3){
    width: calc(100% - 74px);
    margin-left: 54px
  }
  .skt-tox-sidebar-wrap-box p:nth-child(3n+1){
    width: 75%;
    margin-right:8%;
  }
  .skt-tox-sidebar-wrap-box p:last-child{
    width: 65%!important;
    margin-left: 20px;
  }
  [data-isdark] .skt-tox-tinymce .skt-tox-tbtn{
    align-items: center;
    background: 0 0;
    border: 0;
    border-radius: 3px;
    box-shadow: none;
    color: #fff;
    display: flex;
    flex: 0 0 auto;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    height: 34px;
    justify-content: center;
    margin: 2px 0 3px 0;
    outline: 0;
    overflow: hidden;
    padding: 0;
    text-transform: none;
    width: 34px;
  }
  .skt-tox-tbtn--select{
    margin: 2px 0 3px 0;
    padding: 0 4px;
    padding-right: 3px;
    width: auto;
  }
  .skt-tox-tbtn__select-label{ 
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 7em;
    font-weight: 400;
    margin: 0 4px;
  }
  .skt-tox-tbtn__select-chevron{
    align-items: center;
    display: flex;
    justify-content: center;
    width: 10px;
    height: 14px;
  }
  .skt-tox-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
  }
  
  @-webkit-keyframes skeleton-ani {
  0% {
    left: -90%
  }
  
  to {
    left: 120%
  }
  }
  
  @keyframes skeleton-ani {
  0% {
    left: -90%
  }
  
  to {
    left: 120%
  }
  }
   .skt[data-isdark]{
    display: none;
    width: 100%;
    top:0;
    position: absolute;
    z-index: 99;
    background: #222f3e
  }
  .skt.skt-loading{
   display: block;
  }
  .skt-loading .skeleton {
  position: relative;
  overflow: hidden;
  border: none !important;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0) !important;
  background-image: none !important;
  pointer-events: none;
  }
  
  .skt-loading .skeleton:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9;
  width: 100%;
  height: 100%;
  background-color: #ebf1f8;
  display: block
  }
  
  .skt-loading .skeleton:not(.not-round):after {
  border-radius: 4px
  }
  .skt-loading .tox-tbtn__select-chevron{
  display: inline-block;
  width: 8px;
  height: 18px;
  }
  .skt-loading .tox-icon { display: inline-block; width: 24px; height: 24px;}
  .skt-loading .skeleton:not(.not-before):before {
  position: absolute;
  top: 0;
  width: 30%;
  height: 100%;
  content: "";
  background: -webkit-gradient(linear, left top, right top, color-stop(0, hsla(0, 0%, 100%, 0)), color-stop(50%, hsla(0, 0%, 100%, .3)), to(hsla(0, 0%, 100%, 0)));
  background: -o-linear-gradient(left, hsla(0, 0%, 100%, 0) 0, hsla(0, 0%, 100%, .3) 50%, hsla(0, 0%, 100%, 0) 100%);
  background: linear-gradient(90deg, hsla(0, 0%, 100%, 0) 0, hsla(0, 0%, 100%, .3) 50%, hsla(0, 0%, 100%, 0));
  -webkit-transform: skewX(-45deg);
  -ms-transform: skewX(-45deg);
  transform: skewX(-45deg);
  z-index: 99;
  -webkit-animation: skeleton-ani 1s ease infinite;
  animation: skeleton-ani 1s ease infinite;
  display: block
  }
  .skt-loading .skeleton.badge:after {
  background-color: #f8fafc
  }`;
  };
  const createSkeleton = (opt) => {
    if (!document.querySelector("style#skt-tox-style")) {
      let style = document.createElement("style");
      style.type = "text/css";
      style.id = "skt-tox-style";
      try {
        style.appendChild(document.createTextNode(getStyle()));
      } catch (ex) {
        style.styleSheet.cssText = getStyle();
      }
      let head = document.getElementsByTagName("head")[0];
      head.appendChild(style);
    }
    if (!document.querySelector("style#skt-dark-tox-style")) {
      let style = document.createElement("style");
      style.type = "text/css";
      style.id = "skt-dark-tox-style";
      try {
        style.appendChild(document.createTextNode(getDarkStyle()));
      } catch (ex) {
        style.styleSheet.cssText = getDarkStyle();
      }
      let head = document.getElementsByTagName("head")[0];
      head.appendChild(style);
    }
    let toolbar_groups = [];
    if (typeof opt.toolbar === "string") {
      toolbar_groups = getToolbarGroups(opt.toolbar);
    } else if (Array.isArray(opt.toolbar)) {
      opt.toolbar.forEach((ele) => {
        toolbar_groups.push(...getToolbarGroups(ele));
      });
    }
    let menubar_groups = [];
    if (opt.menubar === false)
      ;
    else if (typeof opt.menubar === "string") {
      menubar_groups = getMenubarGroups(opt.menubar);
    } else {
      for (let key in menubarObj.title) {
        menubarTitle[key] && menubar_groups.push(menubarObj.title[key][opt.language || "en_US"]);
      }
    }
    let height = opt.min_height || opt.height || 200;
    let placeholderList = [];
    let placeholderLen = height - 150;
    for (let i = 0; i < placeholderLen; i += 50)
      placeholderList.push("1");
    let sktSelector = opt.selector ? document.querySelector(opt.selector).parentNode : opt.target.parentNode;
    let sktDom = document.createElement("div");
    sktDom.className = "skt skt-loading";
    if (/dark$/.test(opt.skin)) {
      sktDom.setAttribute("data-isdark", "true");
    }
    sktDom.innerHTML = createTemplate({ selector: opt.selector, toolbar: toolbar_groups, menubar: menubar_groups, branding: opt.branding === false ? false : true, placeholderList, height });
    sktSelector.style.position = "relative";
    sktSelector.style.minHeight = height + "px";
    sktSelector.append(sktDom);
    return sktDom;
  };
  const createMenubarTemplate = (data) => {
    let strHtml = "";
    data.forEach((item) => {
      if (typeof item === "object") {
        item.forEach((cItem) => {
          strHtml += '<button  class="skt-tox-mbtn skt-tox-mbtn--select"><span class="skt-tox-mbtn__select-label skeleton">' + cItem + "</span></button>\n";
        });
      } else {
        strHtml += '<button  class="skt-tox-mbtn skt-tox-mbtn--select"><span class="skt-tox-mbtn__select-label skeleton">' + item + "</span></button>\n";
      }
    });
    return strHtml;
  };
  const createToolbarTemplate = (data) => {
    let strHtml = "";
    data.forEach((item) => {
      strHtml += '<div class="skt-tox-toolbar__group">\n';
      item.forEach((ele) => {
        strHtml += '<button class="skt-tox-tbtn ' + (ele.isSelect ? " skt-tox-tbtn--select" : "") + (splitObj[ele.name] ? " skt-tox-split-button" : "") + '"><span class="' + (ele.isSelect ? "skt-tox-tbtn__select-label skt-tox-tbtn--select" : "skt-tox-icon tox-tbtn__icon-wrap") + ' skeleton">' + ele.name + "</span>" + (ele.isSelect || splitObj[ele.name] ? '<div class="skt-tox-tbtn__select-chevron skeleton"></div>' : "") + "</button>\n";
      });
      strHtml += "</div>\n";
    });
    return strHtml;
  };
  const createWrapBoxTemplate = (data) => {
    let strHtml = "";
    data.forEach((item) => {
      strHtml += '<p class="skeleton"></p>\n';
    });
    return strHtml;
  };
  const createTemplate = (sktData) => {
    return `
<div class="skt-tox-tinymce"    style="height: ${sktData.height}px" >
<div class="skt-tox-editor-container">
    <div class="skt-tox-editor-header">
<div  class="skt-tox-menubar">
     ${createMenubarTemplate(sktData.menubar)} 
</div>
    <div class="skt-tox-toolbar-overlord">
    <div class="skt-tox-toolbar">
     ${createToolbarTemplate(sktData.toolbar)}
    </div>
    </div>
    <div class="skt-tox-anchorbar"></div>
</div>
<div class="skt-tox-sidebar-wrap-box">

    <p  class="skeleton"> &nbsp; </p>
      ${createWrapBoxTemplate(sktData.placeholderList)}
    <p class="skeleton"> </p>
</div>
</div> 
<div class="skt-tox-statusbar">
 <div class="skeleton">
      PP
  </div> 
  ${sktData.branding ? '<span class="skeleton" style="margin-left: calc(100% - 120px)">Powered by Five </span>' : ""}
 </div>
</div>`;
  };
  tp$Component.customTags[tabs.name] = tabs;
  tp$Component.customTags[buttons.name] = buttons;
  tp$Component.customTags[collapse.name] = collapse;
  let styleCheckedConvert = (className, styleValue, quantity) => {
    let _output = "\n";
    for (let i = 0; i < quantity; i++) {
      _output += `.tp-${className} > input:nth-child(${i + 1}):checked ~ .tp-${className}_top > .tp-${className}_label:nth-child(${i + 1}){${styleValue}}

               .tp-${className} > input:nth-child(${i + 1}):checked ~ .tp-${className}_main  .tp-tab_main_${i}{ max-height: 10000px; }

            `;
    }
    return _output;
  };
  let tp$createSpecialStyle = (_output, classNameMapping) => {
    let styleStr = "";
    keys(_output.specialStyle).forEach((_obj) => {
      styleStr += _output.specialStyle[_obj] ? "\n " + classNameMapping[_obj] + " { " + _output.specialStyle[_obj] + "} " : "";
    });
    return styleStr;
  };
  let createTpComponentStyleSheet = (editor) => {
    editor.tp$OutputStyle = "";
    let maxQuantity = 2;
    let _outputStyle = "";
    let _outputButtonsStyle = "";
    let _outputCollapseStyle = "";
    let _outputCollapseSpecialStyle = "";
    let _outputTabsList = {};
    let _outputCollapseList = {};
    let _buttonsStyleList = {};
    if (editor.tp$Style && editor.tp$Style.mapping) {
      !editor.tp$CustomTags && (editor.tp$CustomTags = JSON.parse(JSON.stringify(tp$Component.customTags)));
      keys(editor.tp$Style.mapping).forEach((obj) => {
        let _output = editor.tp$Style.mapping[obj];
        if (_output.styleCustomTags === "tabs") {
          if (!_outputTabsList[_output.styleTemplate]) {
            _outputStyle = editor.tp$CustomTags[_output.styleCustomTags][_output.stylePath][_output.styleTemplate];
            _outputTabsList[_output.styleTemplate] = true;
          }
          maxQuantity < _output.quantity ? maxQuantity = _output.quantity : "";
        }
        if (_output.styleCustomTags === "collapse") {
          if (!_outputCollapseList[_output.styleTemplate]) {
            _outputCollapseStyle += editor.tp$CustomTags[_output.styleCustomTags][_output.stylePath][_output.styleTemplate];
            _outputCollapseList[_output.styleTemplate] = true;
          }
          _outputCollapseSpecialStyle += _output.specialStyle ? tp$createSpecialStyle(_output, { "tp-collapse_main": '.tp-collapse > input[id="' + obj + '"]:checked + .tp-collapse_label + .tp-collapse_main' }) : "";
        }
        if (_output.styleCustomTags === "buttons" && !_buttonsStyleList[_output.styleTemplate]) {
          _outputButtonsStyle += getButtonsStyle(editor.tp$CustomTags[_output.styleCustomTags][_output.stylePath][_output.styleTemplate], _output.styleTemplate);
          _buttonsStyleList[_output.styleTemplate] = true;
        }
      });
    }
    let _getChecked = "";
    let _outputChecked = "";
    if (_outputStyle) {
      _outputStyle = _outputStyle.replace(/.tp-tabs\s*{/g, "div.tp-tabs[data-id] {").replace(/\n.tp-tabs\s/g, "\n.tp-tabs[data-id] ") + ".tp-tabs[data-id] > input { display: none;} \n .tp-tabs .tp-tabs_main .tp-tab_main { overflow: hidden;max-height: 0px;}";
      _getChecked = _outputStyle.match(/.tp-tabs_label.checked\s*{\n([\s\S]+)\n}/)[1];
      _outputChecked = _getChecked ? styleCheckedConvert("tabs", _getChecked, maxQuantity) : "";
    }
    editor.tp$OutputStyle = (_outputButtonsStyle ? `@font-face {
  font-family: "iconfont"; /* Project id 2627438 */
  src: url('//at.alicdn.com/t/font_2627438_tl87y8epxj.woff2?t=1630480852428') format('woff2'),
       url('//at.alicdn.com/t/font_2627438_tl87y8epxj.woff?t=1630480852428') format('woff'),
       url('//at.alicdn.com/t/font_2627438_tl87y8epxj.ttf?t=1630480852428') format('truetype');
}` : "") + _outputButtonsStyle + _outputCollapseStyle + _outputCollapseSpecialStyle + _outputStyle + _outputChecked;
  };
  const tp$PanelComponents = {
    iframeLayout: `
   <style>
   .iframeLayout .iframeLayout_margin {
      border: 1px dashed #333;
      background: #F9CC9D;
      position: relative;
      margin: 0;
      padding: 0;
      font-size: 0;
    }
    .iframeLayout .iframeLayout_margin .iframeLayout_border {
      margin: 39px;
      background: #FDDD9B;
      border: 1px solid #333;
      position: relative;
    }
    .iframeLayout .iframeLayout_margin .iframeLayout_border .iframeLayout_padding {
      margin: 39px;
      background: #c3d08b;
      border: 1px dashed #333;
      position: relative;
    }
    .iframeLayout .iframeLayout_margin .iframeLayout_border .iframeLayout_padding .iframeLayout_size{
      min-height: 40px;
      position: relative;
      text-align: center;
      line-height: 40px;
      margin: 39px;
      border: 1px solid #333;
    }
    .iframeLayout .iframeLayout_margin .iframeLayout_border .iframeLayout_padding .iframeLayout_size span {
      font-size: 20px;
      color: #666;
      display: inline-block;
      vertical-align: middle;
    }
    .iframeLayout .iframeLayout_margin .iframeLayout_border .iframeLayout_padding .iframeLayout_size input {
      position: relative;
      display: inline-block;
      vertical-align: middle;
    }
    .iframeLayout .iframeLayout_margin label {
      font-size: 20px;
      color: #000;
      position: absolute;
      top: 2px;
      left: 2px;
    }
    .iframeLayout .iframeLayout_margin input {
      position: absolute;
      width: 31px;
      height: 31px;
      display: block;
      margin: 0 auto;
      text-align: center;
      line-height: 31px;
      font-size: 12px;
      border: 1px solid #ccc;
      background: #fff;
      border-radius: 3px;
      overflow: hidden;
      padding: 1px;
    }
    .iframeLayout .iframeLayout_margin input:focus {
      outline: none;
      border-color: #1f81c3;
    }
    .iframeLayout .iframeLayout_margin .iframeLayout_top {
      top: 2px;
      left: 50%;
      transform: translateX(-50%);
    }
    .iframeLayout .iframeLayout_margin .iframeLayout_right {
      top: 50%;
      right: 2px;
      transform: translateY(-50%);
    }
    .iframeLayout .iframeLayout_margin .iframeLayout_bottom {
      bottom: 2px;
      left: 50%;
      transform: translateX(-50%);
    }
    .iframeLayout .iframeLayout_margin .iframeLayout_left {
      top: 50%;
      left: 2px;
      transform: translateY(-50%);
    }
   
   </style>
  <div class="iframeLayout">
  <div class="iframeLayout_margin">
       <label for=""> margin </label>
          <input type="text" class="margin iframeLayout_top" placeholder="-" id="ifrLayoutMagrginTop" >
          <input type="text" class="margin iframeLayout_right" placeholder="-" id="ifrLayoutMagrginRight" >
          <input type="text" class="margin iframeLayout_bottom" placeholder="-" id="ifrLayoutMagrginBottom" >
          <input type="text" class="margin iframeLayout_left" placeholder="-" id="ifrLayoutMagrginLeft" >
       <div class="iframeLayout_border">
         <label for=""> border </label>
          <input type="text" class="border iframeLayout_top" placeholder="-" id="ifrLayoutBorderTop" >
          <input type="text" class="border iframeLayout_right" placeholder="-" id="ifrLayoutBorderRight" >
          <input type="text" class="border iframeLayout_bottom" placeholder="-" id="ifrLayoutBorderBottom" >
          <input type="text" class="border iframeLayout_left" placeholder="-" id="ifrLayoutBorderLeft" >
     
         <div class="iframeLayout_padding">
           <label for=""> padding </label>
              <input type="text" class="padding iframeLayout_top" placeholder="-" id="ifrLayoutPaddingTop" >
              <input type="text" class="padding iframeLayout_right" placeholder="-" id="ifrLayoutPaddingRight" >
              <input type="text" class="padding iframeLayout_bottom" placeholder="-" id="ifrLayoutPaddingBottom" >
              <input type="text" class="padding iframeLayout_left" placeholder="-" id="ifrLayoutPaddingLeft" >
              <div class="iframeLayout_size">
                  <input type="text" class="size"  id="ifrLayoutWidth" >
                  <span>X</span>
                  <input type="text" class="size"  id="ifrLayoutHeight" >
              </div>
         </div>
      </div>
  </div>
</div>
  <script>
   console.log(this)
  
  <\/script>
  
  `
  };
  const getComponents = (type) => {
    return tp$PanelComponents[type];
  };
  tp$tinymce.Editor.prototype.tp$ = {
    Components: componentsApi,
    Node: {
      getDimension
    },
    I18n: {
      add: tp$tinymce.i18n.add
    },
    isDev: () => {
      return window === null || window === void 0 ? void 0 : window.__TP_DEV__;
    },
    Tools: {
      getFormatStyle,
      autoToPX,
      getCurrentValue,
      namingFormat: {
        toHump,
        toLine,
        toHyphen
      },
      selection: {
        cell: function(initial) {
          let value = initial;
          let action = initial;
          let get = function() {
            return value;
          };
          var getAction = function() {
            return action;
          };
          let set = function(v, s) {
            value = v;
            s ? action = s : "";
          };
          return {
            get,
            set,
            getAction
          };
        }
      }
    },
    PanelComponents: {
      getComponents
    }
  };
  let tp$addI18n = {
    en: {
      "Spacing before paragraph": "Spacing before paragraph",
      "Icon Library": "Icon Library",
      "Write here": "Write here",
      "Picture background fill": "Picture background fill",
      "Templates Style": "Templates Style",
      "Collapse": "Folding Panel",
      "Style {0}": "Style {0}",
      "Icon List": "Icon List",
      Buttons: "Buttons",
      "Hanging Indent": "Hanging Indent",
      "Spacing after paragraph": "Spacing after paragraph",
      "Iconfont Size": "Iconfont Size",
      "Line Height": "Line Height",
      Tabs: "Tabs",
      "Select tmplate": "Select Tmplate",
      Padding: "Padding",
      "Iconfont Color": "Iconfont Color",
      "Letter spacing": "Letter spacing",
      "border Radius": "Rounded Border",
      "Panel head": "Panel head",
      "Panel main": "Panel main",
      "Indent mode": "Indent mode",
      Margin: "Margin",
      "Horizontal columns": "Horizontal columns",
      "First line indent": "First line indent"
    },
    es: {
      "Line Height": "Altura de la l\xEDnea",
      "Indent mode": "Modo de sangr\xEDa",
      "Write here": "Escriba aqui",
      "Hanging Indent": "Sangr\xEDa",
      "Spacing before paragraph": "Espacio antes del p\xE1rrafo",
      Margin: "Margen",
      "Horizontal columns": "Columnas horizontales",
      "Collapse": "panel plegable",
      "border Radius": "borde redondeado",
      "Panel main": "Panel principal",
      "Picture background fill": "Relleno de fondo de la imagen",
      "Select tmplate": "Seleccione TMPLATE",
      "Panel head": "Cabezal",
      "First line indent": "Incidente de primera linea",
      "Icon List": "Lista de iconos",
      Tabs: "Pesta\xF1as",
      "Style {0}": "Estilo {0}",
      "Templates Style": "Estilo de plantillas",
      "Iconfont Size": "Tama\xF1o de \xEDcono",
      Padding: "Relleno",
      "Icon Library": "Biblioteca de iconos",
      "Letter spacing": "Espaciado de letras",
      "Spacing after paragraph": "Espacio despu\xE9s del p\xE1rrafo",
      Buttons: "Botones",
      "Iconfont Color": "Color de icono"
    },
    fr: {
      "Hanging Indent": "Retrait",
      "Spacing after paragraph": "Espacement apr\xE8s paragraphe",
      "Style {0}": "Style {0}",
      Margin: "Marge",
      "First line indent": "Retrait de premi\xE8re ligne",
      Padding: "Rembourrage",
      "Templates Style": "Style de mod\xE8les",
      "Icon Library": "Biblioth\xE8que d'ic\xF4nes",
      "border Radius": "fronti\xE8re arrondie",
      "Line Height": "Hauteur de la ligne",
      "Write here": "Ecrire ici",
      "Icon List": "Liste d'ic\xF4nes",
      "Picture background fill": "Boullage de l'arri\xE8re-plan de l'image",
      "Letter spacing": "L'espacement des lettres",
      "Spacing before paragraph": "Espacement avant le paragraphe",
      "Collapse": "panneau de pliage",
      "Panel head": "T\xEAte de panneau",
      Tabs: "Onglets",
      "Panel main": "Panneau principal",
      Buttons: "Boutons",
      "Horizontal columns": "Colonnes horizontales",
      "Select tmplate": "S\xE9lectionnez TMPlate",
      "Indent mode": "Mode de retrait",
      "Iconfont Size": "Taille de l'ic\xF4ne",
      "Iconfont Color": "Couleur ic\xF4ne"
    },
    de: {
      "Picture background fill": "Bildhintergrund",
      "First line indent": "Erster Zeileneinzug",
      "Hanging Indent": "H\xE4ngender Einzug",
      "Icon Library": "Icon Library",
      Buttons: "Tasten",
      "Panel head": "Panelkopf",
      "Templates Style": "Vorlagen Stil",
      "Indent mode": "Einzugsmodus",
      Padding: "Polsterung",
      "Spacing before paragraph": "Abstand vor Absatz",
      "Select tmplate": "W\xE4hlen Sie TMplate",
      Margin: "Rand",
      Tabs: "Registerkarten",
      "Icon List": "Symbolliste",
      "Style {0}": "Stil {0}",
      "Spacing after paragraph": "Abstand nach Absatz",
      "Write here": "Hier schreiben",
      "border Radius": "abgerundete Grenze",
      "Letter spacing": "Buchstaben-Abstand",
      "Line Height": "Zeilenh\xF6he",
      "Horizontal columns": "Horizontale Spalten",
      "Panel main": "Panel Main",
      "Collapse": "Klappfeld",
      "Iconfont Size": "Symbolgr\xF6\xDFe",
      "Iconfont Color": "Symbolfarbe"
    },
    zh_CN: {
      "Collapse": "\u6298\u53E0\u9762\u677F",
      "Write here": "\u5728\u8FD9\u91CC\u5199\u5165\u5185\u5BB9",
      "Tabs": "\u6807\u7B7E\u9762\u677F",
      "Panel head": "\u677F\u5934",
      "Panel main": "\u677F\u4F53",
      "Padding": "\u5185\u8FB9\u8DDD",
      "Margin": "\u5916\u8FB9\u8DDD",
      "border Radius": "\u8FB9\u6846\u5706\u89D2",
      "Templates Style": "\u6A21\u677F\u6837\u5F0F",
      "Buttons": "\u6309\u94AE\u7EC4\u4EF6",
      "Icon List": "\u56FE\u6807\u5217\u8868",
      "Icon Library": "\u56FE\u6807\u5E93",
      "Horizontal columns": "\u6C34\u5E73\u5206\u5217",
      "Style {0}": "\u6837\u5F0F {0}",
      "Select tmplate": "\u9009\u62E9\u6A21\u677F\u6837\u5F0F",
      "Letter spacing": "\u5B57\u6BCD\u95F4\u8DDD",
      "Picture background fill": "\u56FE\u7247\u80CC\u666F\u586B\u5145",
      "Spacing before paragraph": "\u6BB5\u524D\u8DDD",
      "Spacing after paragraph": "\u6BB5\u540E\u8DDD",
      "First line indent": "\u9996\u884C\u7F29\u8FDB",
      "Hanging Indent": "\u60AC\u6302\u7F29\u8FDB",
      "Indent mode": "\u60AC\u6302\u65B9\u5F0F",
      "Iconfont Size": "\u56FE\u6807\u5927\u5C0F",
      "Iconfont Color": "\u56FE\u6807\u989C\u8272",
      "Line Height": "\u884C\u9AD8"
    },
    ja: {
      "Line Height": "\u884C\u306E\u9AD8\u3055",
      "Collapse": "\u6298\u308A\u305F\u305F\u307F\u30D1\u30CD\u30EB",
      "Panel head": "\u30D1\u30CD\u30EB\u30D8\u30C3\u30C9",
      "Picture background fill": "\u753B\u50CF\u306E\u80CC\u666F\u5857\u308A\u3064\u3076\u3057",
      "First line indent": "\u30D5\u30A1\u30FC\u30B9\u30C8\u30E9\u30A4\u30F3\u30A4\u30F3\u30C7\u30F3\u30C8",
      "Spacing after paragraph": "\u6BB5\u843D\u5F8C\u306E\u9593\u9694",
      Padding: "\u30D1\u30C7\u30A3\u30F3\u30B0",
      "Letter spacing": "\u6587\u5B57\u9593\u9694",
      "border Radius": "\u4E38\u3044\u5883\u754C",
      "Hanging Indent": "\u30CF\u30F3\u30AE\u30F3\u30B0\u30A4\u30F3\u30C7\u30F3\u30C8",
      Tabs: "\u30BF\u30D6",
      "Iconfont Size": "\u30A2\u30A4\u30B3\u30F3\u30B5\u30A4\u30BA",
      "Spacing before paragraph": "\u6BB5\u843D\u306E\u524D\u306E\u9593\u9694",
      "Templates Style": "\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30B9\u30BF\u30A4\u30EB",
      "Style {0}": "\u30B9\u30BF\u30A4\u30EB{0}",
      "Horizontal columns": "\u6C34\u5E73\u5217",
      Margin: "\u30DE\u30FC\u30B8\u30F3",
      "Select tmplate": "tmplate\u3092\u9078\u629E\u3057\u307E\u3059",
      "Panel main": "\u30D1\u30CD\u30EB\u30E1\u30A4\u30F3",
      "Icon Library": "\u30A2\u30A4\u30B3\u30F3\u30E9\u30A4\u30D6\u30E9\u30EA",
      "Write here": "\u3053\u3053\u306B\u66F8\u3044\u3066\u304F\u3060\u3055\u3044",
      Buttons: "\u30DC\u30BF\u30F3",
      "Icon List": "\u30A2\u30A4\u30B3\u30F3\u30EA\u30B9\u30C8",
      "Indent mode": "\u30A4\u30F3\u30C7\u30F3\u30C8\u30E2\u30FC\u30C9",
      "Iconfont Color": "\u30A2\u30A4\u30B3\u30F3\u306E\u8272"
    },
    ko: {
      "Collapse": "\uC811\uB294 \uD328\uB110",
      "Icon List": "\uC544\uC774\uCF58 \uBAA9\uB85D",
      Padding: "\uC2EC",
      "Letter spacing": "\uBB38\uC790 \uAC04\uACA9",
      "Templates Style": "\uD15C\uD50C\uB9BF \uC2A4\uD0C0\uC77C",
      "Select tmplate": "tmplate\uB97C \uC120\uD0DD\uD558\uC2ED\uC2DC\uC624",
      "Spacing after paragraph": "\uB2E8\uB77D \uD6C4 \uAC04\uACA9",
      Tabs: "\uD0ED",
      Buttons: "\uBC84\uD2BC",
      "Write here": "\uC5EC\uAE30 \uC4F0\uC2DC \uC624",
      Margin: "\uC5EC\uC720",
      "Horizontal columns": "\uC218\uD3C9 \uC5F4",
      "Panel main": "\uD328\uB110 \uBA54\uC778",
      "Picture background fill": "\uC0AC\uC9C4 \uBC30\uACBD \uCC44\uC6B0\uAE30",
      "Style {0}": "\uC2A4\uD0C0\uC77C {0}",
      "Icon Library": "\uC544\uC774\uCF58 \uB77C\uC774\uBE0C\uB7EC\uB9AC",
      "First line indent": "\uCCAB \uBC88\uC9F8 \uC904\uC758 \uB4E4\uC5EC \uC4F0\uAE30",
      "Spacing before paragraph": "\uB2E8\uB77D \uC804\uC5D0 \uAC04\uACA9",
      "Hanging Indent": "\uB0B4\uC5B4 \uC4F0\uAE30",
      "border Radius": "\uB465\uADFC \uD14C\uB450\uB9AC",
      "Iconfont Color": "\uC544\uC774\uCF58 \uC0C9\uC0C1",
      "Panel head": "\uD328\uB110 \uD5E4\uB4DC",
      "Line Height": "\uB77C\uC778 \uB192\uC774",
      "Indent mode": "\uB4E4\uC5EC \uC4F0\uAE30 \uBAA8\uB4DC",
      "Iconfont Size": "\uC544\uC774\uCF58 \uD06C\uAE30"
    },
    nl: {
      "Indent mode": "Inspringende modus",
      "Panel head": "Paneelhoofd",
      "Write here": "Schrijf hier",
      "Panel main": "Paneelhoofd",
      Padding: "Vulling",
      "Templates Style": "Sjablonenstijl",
      "Spacing before paragraph": "Afstand v\xF3\xF3r paragraaf",
      "Icon List": "Pictogramlijst",
      "First line indent": "Eerste regel inspring",
      Tabs: "Tabbladen",
      "Horizontal columns": "Horizontale kolommen",
      "Collapse": "vouwpaneel",
      "Spacing after paragraph": "Afstand na paragraaf",
      "Hanging Indent": "Hangend inspring",
      "Picture background fill": "Foto achtergrond vulling",
      "border Radius": "afgeronde grens",
      "Icon Library": "Icon bibliotheek",
      "Iconfont Color": "Pictogramkleur",
      Buttons: "Toetsen",
      "Letter spacing": "Letterafstand",
      "Line Height": "Lijnhoogte",
      "Style {0}": "Stijl {0}",
      Margin: "Marge",
      "Select tmplate": "Selecteer TMPLATE",
      "Iconfont Size": "Pictogramformaat"
    },
    hu: {
      "Templates Style": "Sablonok st\xEDlusa",
      Padding: "P\xE1rn\xE1z\xE1s",
      "Select tmplate": "V\xE1lassza a Tmplate lehet\u0151s\xE9get",
      "Write here": "\xCDrj ide",
      "Horizontal columns": "V\xEDzszintes oszlopok",
      "Spacing before paragraph": "T\xE1vols\xE1g a bekezd\xE9s el\u0151tt",
      "First line indent": "Els\u0151 sor beh\xFAz\xE1s",
      Margin: "\xC1rr\xE9s",
      "Spacing after paragraph": "T\xE1vols\xE1g a bekezd\xE9s ut\xE1n",
      "Panel main": "Panel",
      "Indent mode": "Beh\xFAz\xE1si m\xF3d",
      "Icon Library": "Ikonk\xF6nyvt\xE1r",
      "Panel head": "Panelfej",
      "Style {0}": "St\xEDlus {0}",
      "Picture background fill": "K\xE9p h\xE1tt\xE9r t\xF6lt\xE9se",
      "Hanging Indent": "F\xFCgg\u0151leges beh\xFAz\xE1s",
      "Line Height": "Vonalmagass\xE1g",
      "Iconfont Color": "Ikonsz\xEDn",
      Buttons: "Gombok",
      "Collapse": "\xF6sszecsukhat\xF3 panel",
      Tabs: "Lapok",
      "Icon List": "Ikonlista",
      "Letter spacing": "Bet\u0171t\xE1vols\xE1gok",
      "border Radius": "lekerek\xEDtett hat\xE1r",
      "Iconfont Size": "Ikonm\xE9ret"
    },
    pt: {
      "Panel head": "Cabe\xE7a do painel",
      "Collapse": "painel dobr\xE1vel",
      Tabs: "Guias",
      "Picture background fill": "Foto preenchimento de fundo",
      "Letter spacing": "Espa\xE7amento de carta",
      "Write here": "Escreva aqui",
      "Spacing after paragraph": "Espa\xE7amento ap\xF3s o par\xE1grafo",
      Buttons: "Bot\xF5es",
      "Hanging Indent": "Pendurar recuo",
      "Templates Style": "Estilo de modelos",
      "Panel main": "Main do painel",
      "Line Height": "Altura da linha",
      "Indent mode": "Modo de recuo",
      "Horizontal columns": "Colunas horizontais",
      "Style {0}": "Estilo {0}",
      "First line indent": "Recado de primeira linha",
      "Icon Library": "Icon Library",
      "Select tmplate": "Selecione tmplate",
      "Icon List": "Lista de \xEDcones",
      Padding: "Preenchimento",
      Margin: "Margem",
      "Spacing before paragraph": "Espa\xE7amento antes do par\xE1grafo",
      "Iconfont Color": "Cor do \xEDcone",
      "border Radius": "borda arredondada",
      "Iconfont Size": "Tamanho do \xEDcone"
    },
    cs: {
      "Letter spacing": "Mezera dopisu",
      "First line indent": "Prvn\xED \u0159\xE1dek",
      "Picture background fill": "Napln\u011Bn\xED pozad\xED obr\xE1zku",
      Margin: "Okraj",
      "Line Height": "V\xFD\u0161ka \u0159\xE1dku",
      Buttons: "Tla\u010D\xEDtka",
      "Indent mode": "Re\u017Eim odsazen\xED",
      Padding: "Polstrov\xE1n\xED",
      "Iconfont Size": "Velikost ikony",
      "border Radius": "zaoblen\xE1 hranice",
      "Horizontal columns": "Horizont\xE1ln\xED sloupce",
      "Panel main": "Hlavn\xED panel",
      Tabs: "Karty",
      "Hanging Indent": "Vis\xEDc\xED odsazen\xED",
      "Templates Style": "Styl \u0161ablon",
      "Select tmplate": "Vyberte TMplate",
      "Spacing after paragraph": "Rozestupy po odstavci",
      "Write here": "Pi\u0161te zde",
      "Style {0}": "Style {0}",
      "Collapse": "Skl\xE1dac\xED panel",
      "Icon List": "Seznam ikon",
      "Icon Library": "Knihovna ikon",
      "Panel head": "Hlava panelu",
      "Iconfont Color": "Barva ikon",
      "Spacing before paragraph": "Mezery p\u0159ed odstavcem"
    },
    vi: {
      "Select tmplate": "Ch\u1ECDn TMPLATE",
      "Collapse": "B\u1EA3ng g\u1EA5p",
      "Spacing after paragraph": "Kho\u1EA3ng c\xE1ch sau \u0111o\u1EA1n v\u0103n",
      "Panel main": "B\u1EA3ng ch\xEDnh",
      "Templates Style": "Ki\u1EC3u m\u1EABu",
      Margin: "L\u1EC1",
      "Write here": "Vi\u1EBFt \u1EDF \u0111\xE2y",
      "Panel head": "\u0110\u1EA7u b\u1EA3ng",
      "Spacing before paragraph": "Kho\u1EA3ng c\xE1ch tr\u01B0\u1EDBc \u0111o\u1EA1n v\u0103n",
      "Iconfont Size": "K\xEDch c\u1EE1 bi\u1EC3u t\u01B0\u1EE3ng",
      Padding: "\u0110\u1EC7m",
      "Line Height": "Chi\u1EC1u cao gi\u1EEFa c\xE1c d\xF2ng",
      "Indent mode": "Ch\u1EBF \u0111\u1ED9 th\u1EE5t l\u1EC1",
      "Horizontal columns": "C\u1ED9t ngang",
      "border Radius": "Bi\xEAn gi\u1EDBi tr\xF2n",
      "First line indent": "D\xF2ng \u0111\u1EA7u ti\xEAn th\u1EE5t l\u1EC1",
      "Style {0}": "Ki\u1EC3u {0}",
      "Hanging Indent": "Treo th\u1EE5t",
      Tabs: "Tab",
      Buttons: "n\xFAt",
      "Icon Library": "Th\u01B0 vi\u1EC7n bi\u1EC3u t\u01B0\u1EE3ng",
      "Icon List": "Danh s\xE1ch bi\u1EC3u t\u01B0\u1EE3ng",
      "Letter spacing": "Kho\u1EA3ng c\xE1ch ch\u1EEF c\xE1i",
      "Picture background fill": "H\xECnh \u1EA3nh n\u1EC1n l\u1EA5p \u0111\u1EA7y",
      "Iconfont Color": "M\xE0u bi\u1EC3u t\u01B0\u1EE3ng"
    }
  };
  tp$tinymce.addI18n = function(_i18n) {
    return function() {
      __assign(arguments[1], tp$addI18n[arguments[0]]);
      _i18n.apply(this, arguments);
    };
  }(tp$tinymce.addI18n);
  let tp$IconManager = {
    default: {
      icons: {
        "tp-tab-add": '<svg t="1629385862141" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7236" width="24" height="24"><path d="M714.27370623 141.21142578h67.41385716c27.91277775 0 51.74690871 9.88762917 71.49250467 29.66288824C872.91577659 190.6396849 882.78363013 214.42932121 882.78363013 242.33221152V309.79550667c0 9.2696528-3.26291773 17.20447542-9.88762917 23.78963631-6.56044191 6.59010498-14.51504016 9.88762917-23.81435532 9.88762989-9.29931517 0-17.27368832-3.29752417-23.83413096-9.88762989-6.60493653-6.59010498-9.89751734-14.51998353-9.89751661-23.78963631V242.3371556c0-9.26470871-3.26291773-17.19458725-9.88762918-23.78469295-6.56538599-6.59010498-14.51504016-9.88762917-23.83907504-9.88762918H714.19954925c-9.29931517 0-17.24402596-3.29752417-23.82424278-9.88762915s-9.87774172-14.51998353-9.87774171-23.88851305c0-9.2696528 3.29752417-17.20447542 9.87774171-23.78963633 6.58021754-6.59010498 14.52492761-9.88762917 23.82918686-9.88762916h0.0692129zM444.60344607 141.21142578h134.80793941c9.31414671 0 17.23413778 3.29752417 23.8687374 9.98650588 6.55055444 6.49122901 9.87774172 14.52492761 9.87774171 23.78963633 0 9.2696528-3.32718727 17.20447542-9.87774171 23.78963632-6.63459962 6.59010498-14.55459069 9.88762917-23.8687374 9.88762916H444.60344607c-9.29931517 0-17.24402596-3.29752417-23.82424277-9.88762916-6.61482398-6.59010498-9.89751734-14.51998353-9.89751734-23.78963632 0-9.26470871 3.28269263-17.30335141 9.89751734-23.78469297C427.35942084 144.50894996 435.30413091 141.21142578 444.60344607 141.21142578z m404.47819957 269.60599063c9.29931517 0 17.25391343 3.39640089 23.81435532 9.88762917 6.62471144 6.59010498 9.88762917 14.51998353 9.88762917 23.88851303v134.80793942c0 9.26470871-3.26291773 17.19458725-9.88762917 23.78469223-6.56044191 6.59504907-14.51504016 9.88762917-23.81435532 9.88762916-9.29931517 0-17.27368832-3.29258081-23.83413096-9.88762916-6.60493653-6.59010498-9.89751734-14.51998353-9.89751661-23.78469223V444.59355861c0-9.36852878 3.29258081-17.29840732 9.89751661-23.88851303 6.56044191-6.49122901 14.53481506-9.88762917 23.82918687-9.88762918z m0 269.60599063c9.29931517 0 17.25391343 3.29752417 23.81435532 9.88762989 6.62471144 6.59010498 9.88762917 14.51998353 9.88762917 23.8934564v67.34958763c0 27.90783367-9.86785426 51.79634669-29.60356207 71.57160502-19.74559598 19.6664949-43.5797262 29.55412407-71.49250466 29.55412407h-67.41385717c-9.32403415 0-17.25391343-3.29258081-23.85390586-9.88762916-6.56538599-6.59010498-9.86785426-14.51998353-9.86785426-23.78469223 0-9.37347288 3.30246827-17.30335141 9.86785426-23.89345641 6.59999243-6.59010498 14.53481506-9.88762917 23.85390586-9.8876299h67.41385717c9.29931517 0 17.25391343-3.29258081 23.80446786-9.88762916 6.63459962-6.59010498 9.89751734-14.51998353 9.89751734-23.78469223V714.10067325c0-9.2696528 3.30741236-17.19953134 9.89751663-23.78963632 6.59504907-6.59010498 14.53481506-9.88762917 23.8440184-9.88762989h-0.04943799zM242.37670615 141.21142578H309.79550667c9.30920334 0 17.21930624 3.29752417 23.82918686 9.98650588 6.58516089 6.49122901 9.8826858 14.52492761 9.8826858 23.78963633 0 9.2696528-3.29752417 17.20447542-9.87774172 23.78963632-6.61482398 6.59010498-14.52492761 9.88762917-23.83413094 9.88762916H242.38164951c-9.31414671 0-17.27368832 3.29752417-23.83413023 9.88762918-6.61482398 6.59010498-9.90246071 14.51998353-9.9024607 23.88851303V309.79550667c0 9.37347288-3.28269263 17.20447542-9.89751736 23.8934564-6.56044191 6.48628492-14.52492761 9.88762917-23.82424277 9.88762989-9.30920334 0-17.25391343-3.40134426-23.8242435-9.88762989-6.6098799-6.69392507-9.88762917-14.51998353-9.88762917-23.8934564V242.44097568C141.21142578 214.42932121 151.07928004 190.64957307 170.83476348 170.97319c19.74559598-19.77525907 43.56983876-29.66288824 71.48756058-29.66288823l0.05932545-0.09887599z m202.22673992 674.01497657h134.80793941c9.31414671 0 17.23413778 3.29752417 23.86873739 9.8876299 6.55055444 6.59010498 9.87774172 14.51998353 9.87774172 23.89345641 0 9.26470871-3.32718727 17.19458725-9.87774172 23.78469223-6.63459962 6.59504907-14.55459069 9.88762917-23.86873739 9.88762916H444.60344607c-9.29931517 0-17.24402596-3.29258081-23.82424277-9.88762916-6.61482398-6.59010498-9.89751734-14.51998353-9.89751734-23.78469223 0-9.37347288 3.28269263-17.30335141 9.89751734-23.89345641 6.58021754-6.59010498 14.52492761-9.88762917 23.82424277-9.8876299z m-269.61587808-404.40404185c9.29931517 0 17.23908188 3.3914568 23.79952377 9.88268508 6.63459962 6.59010498 9.90246071 14.51998353 9.90246072 23.88851304v134.8079394c0 9.26470871-3.26291773 17.19458725-9.90246072 23.78469224-6.56044191 6.59504907-14.50020861 9.88762917-23.79952377 9.88762916-9.31414671 0-17.27368832-3.29258081-23.83413096-9.88762916C144.53861305 596.59608526 141.25097633 588.66620673 141.25097633 579.40149802V444.59355861c0-9.36852878 3.28763673-17.29840732 9.9024607-23.88851303 6.56044191-6.49122901 14.51998353-9.88762917 23.82918686-9.88762918z m0 269.60104654c9.29931517 0 17.23908188 3.29752417 23.79952377 9.88762989 6.63459962 6.59010498 9.90246071 14.51998353 9.90246072 23.8934564v67.34958763c0 9.36852878 3.29258081 17.30335141 9.89751734 23.88851231 6.59010498 6.59010498 14.53481506 9.88762917 23.83413024 9.88762917h67.41385715c9.31414671 0 17.25391343 3.29752417 23.85390586 9.88762989 6.56538599 6.59010498 9.87774172 14.51998353 9.87774243 23.78963633 0 9.36852878-3.31235572 17.19458725-9.87774243 23.8885123-6.59999243 6.49122901-14.53975915 9.88762917-23.85390587 9.88762917H242.42120006c-27.91277775 0-51.72713307-9.88762917-71.49250396-29.66288823-19.75548343-19.77031497-29.63322515-43.55500721-29.63322515-71.46284086V714.19954925c0-9.2696528 3.28269263-17.20447542 9.89751662-23.78963633 6.59010498-6.59010498 14.53481506-9.88762917 23.83413095-9.88762916l-0.03955053-0.09887672z m337.02973524-336.95557825c9.31414671 0 17.23413778 3.29752417 23.8687374 9.88762917 6.55055444 6.59010498 9.86291017 14.51998353 9.86291017 23.78963632v101.12572983h101.13067391c9.29931517 0 17.22919442 3.29752417 23.82918687 9.88762917 6.56538599 6.59010498 9.87279762 14.51998353 9.87279762 23.78963632 0 9.36852878-3.30741236 17.30335141-9.86785427 23.88851304-6.60493653 6.59010498-14.53481506 9.88762917-23.83413022 9.88762916H545.7489508v101.12572983c0 9.2696528-3.31235572 17.20447542-9.86291017 23.78963632-6.63459962 6.59010498-14.55459069 9.88762917-23.8687374 9.88762917-9.29931517 0-17.22919442-3.29752417-23.82424278-9.88762917-6.59010498-6.59010498-9.87774172-14.51998353-9.87774171-23.78963632V545.72423181H377.18958892c-9.30425926 0-17.22425033-3.29752417-23.85390588-9.88762918-6.56538599-6.59010498-9.87774172-14.51998353-9.87774171-23.88851303 0-9.2696528 3.31235572-17.20447542 9.87774171-23.78963632 6.62965553-6.59010498 14.5496466-9.88762917 23.85390588-9.88762917h101.12572982V377.14509429c0-9.2696528 3.28763673-17.20447542 9.8777417-23.78963633 6.59504907-6.59010498 14.52492761-9.88762917 23.82918688-9.88762918z" p-id="7237"></path></svg>',
        "tp-tab-delete": '<svg t="1629436983964" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="17120" width="20" height="20"><path d="M950.857143 0H73.142857C31.695238 0 0 31.695238 0 73.142857v877.714286c0 41.447619 31.695238 73.142857 73.142857 73.142857h877.714286c41.447619 0 73.142857-31.695238 73.142857-73.142857V73.142857c0-41.447619-31.695238-73.142857-73.142857-73.142857z m-24.380953 926.47619H97.52381V97.52381h828.95238v828.95238z"  p-id="17121"></path><path d="M316.952381 560.761905h390.095238c26.819048 0 48.761905-21.942857 48.761905-48.761905s-21.942857-48.761905-48.761905-48.761905H316.952381c-26.819048 0-48.761905 21.942857-48.761905 48.761905s21.942857 48.761905 48.761905 48.761905z" p-id="17122"></path></svg>',
        "tpButtons": '<svg t="1630068696978" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21708" width="28" height="28"><path d="M800 256h-64a32 32 0 0 0-31.84-32H159.84C142.4 224 128 238.432 128 256.224v415.552A32 32 0 0 0 159.84 704H160v64H128c-35.328 0-64-28.48-64-63.904V223.904C64 188.608 92.864 160 128 160h608c35.328 0 64 28.48 64 63.904V256zM192 351.84A64 64 0 0 1 256.16 288h639.68A64 64 0 0 1 960 351.84v448.32A64 64 0 0 1 895.84 864H256.16A64 64 0 0 1 192 800.16v-448.32z m64 32.384v383.552A31.968 31.968 0 0 0 287.744 800h576.512c17.184 0 31.744-14.4 31.744-32.224V384.224A31.968 31.968 0 0 0 864.256 352H287.744C270.56 352 256 366.4 256 384.224z" p-id="21709"></path><path  transform="scale(0.45) translate(280, 780)" d="M393.944329 226.04293h185.769284c115.432212 0 203.353552 33.325024 203.353552 137.979782 0 51.618335-28.361723 104.796566-76.576651 121.388173v3.828832c60.694087 14.180861 105.3638 56.723446 105.3638 132.732863 0 113.446891-94.019111 165.348844-217.676222 165.348844H393.944329zM571.488713 453.787564c70.904307 0 102.385819-28.361723 102.38582-73.59867 0-49.349398-33.466833-69.060795-100.967733-69.060795h-66.650049V453.787564z m12.904584 246.463371c76.576651 0 118.268384-27.227254 118.268384-85.085168 0-54.596316-40.982689-77.427503-118.268384-77.427504H506.256751v163.079906zM908.284171 638.138762V450.525966h-59.985043v-82.674422l65.231962-5.246919 12.904584-113.446891h93.310068v113.446891h104.796565v87.921341h-104.796565V638.138762c0 48.498546 19.711397 70.904307 57.716105 70.904307a124.366154 124.366154 0 0 0 41.691733-9.21756l18.151502 81.256336a276.101371 276.101371 0 0 1-89.481235 15.882564c-100.825924 0.99266-139.539676-62.679407-139.539676-158.825647zM1210.903753 362.604625h91.04113l7.657665 56.014403h2.977981c37.153857-36.303005 80.405484-66.650048 138.12159-66.650049 91.750173 0 131.172968 63.672068 131.172968 170.170337v265.182108h-111.461571v-251.001247c0-65.231962-18.151503-88.772192-59.985043-88.772192-34.884919 0-56.723446 16.591608-88.772193 47.789503v291.983936h-110.752527z"></path></svg>',
        "tpIconlists": '<svg t="1630921705647" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8438" width="20" height="20"><path d="M944.384 591.36 375.36 591.36c-43.968 0-79.68-35.584-79.68-79.424 0-43.84 35.648-79.424 79.68-79.424l569.088 0C988.416 432.512 1024.064 468.096 1024.064 511.936 1024.064 555.776 988.416 591.36 944.384 591.36L944.384 591.36zM944.384 273.664 375.36 273.664c-43.968 0-79.68-35.584-79.68-79.424 0-43.84 35.648-79.424 79.68-79.424l569.088 0C988.416 114.816 1024.064 150.336 1024.064 194.24 1024.064 238.08 988.416 273.664 944.384 273.664L944.384 273.664zM166.464 861.376l12.032 60.416c0.064 0.576 0.128 1.344 0.128 2.432 0 1.728-0.384 3.136-1.28 4.288-0.896 1.152-2.176 1.792-3.968 1.792-1.664 0-3.392-0.448-5.248-1.408l-58.752-27.904-57.984 29.248c-1.92 0.96-3.648 1.472-5.184 1.536-1.856 0-3.2-0.576-4.096-1.728-0.96-1.152-1.408-2.624-1.408-4.288 0-0.512 0.064-1.28 0.256-2.432l10.368-60.672-47.936-42.304C1.216 818.24 0.064 816.384 0.064 814.656c-0.064-2.944 2.368-4.864 7.232-5.632l65.088-9.6 28.48-55.424c1.6-3.328 3.712-4.992 6.272-5.056 2.624-0.064 4.736 1.6 6.464 4.864l30.016 54.72 65.344 8.064c4.864 0.704 7.296 2.496 7.36 5.504l0 0c0 1.792-1.088 3.712-3.328 5.824L166.464 861.376 166.464 861.376zM166.464 532.352l12.032 60.416C178.56 593.28 178.624 594.112 178.624 595.2c0 1.728-0.384 3.136-1.28 4.288C176.448 600.64 175.104 601.28 173.376 601.28c-1.664 0-3.392-0.448-5.248-1.408L109.44 572.032 51.456 601.28C49.6 602.24 47.872 602.752 46.272 602.752c-1.856 0-3.2-0.512-4.096-1.728-0.96-1.152-1.408-2.56-1.408-4.288 0-0.448 0.064-1.28 0.256-2.432l10.368-60.672L3.392 491.392C1.216 489.216 0.064 487.296 0.064 485.632c-0.064-3.008 2.368-4.864 7.232-5.632l65.088-9.6 28.48-55.424C102.464 411.584 104.576 409.92 107.136 409.856c2.624-0.064 4.736 1.6 6.464 4.864l30.016 54.72 65.344 8.064c4.864 0.64 7.296 2.496 7.36 5.504l0 0c0 1.792-1.088 3.712-3.328 5.824L166.464 532.352 166.464 532.352zM166.464 214.656l12.032 60.416C178.56 275.584 178.624 276.416 178.624 277.44c0 1.664-0.384 3.136-1.28 4.288C176.448 282.944 175.104 283.584 173.376 283.584c-1.664 0-3.392-0.448-5.248-1.408L109.44 254.336 51.456 283.584c-1.92 0.96-3.648 1.472-5.184 1.536-1.856 0-3.2-0.576-4.096-1.728-0.96-1.152-1.408-2.56-1.408-4.288 0-0.512 0.064-1.28 0.256-2.432l10.368-60.672L3.392 173.696C1.216 171.52 0.064 169.6 0.064 167.872c-0.064-3.008 2.368-4.864 7.232-5.632l65.088-9.6 28.48-55.424C102.464 93.888 104.576 92.224 107.136 92.16c2.624 0 4.736 1.6 6.464 4.864l30.016 54.72 65.344 8.064c4.864 0.64 7.296 2.496 7.36 5.504l0 0c0 1.792-1.088 3.712-3.328 5.824L166.464 214.656 166.464 214.656zM375.36 761.536l569.088 0c43.968 0 79.68 35.584 79.68 79.424 0 43.84-35.648 79.424-79.68 79.424L375.36 920.384c-43.968 0-79.68-35.584-79.68-79.424C295.68 797.12 331.328 761.536 375.36 761.536L375.36 761.536zM375.36 761.536" p-id="8439"></path></svg>',
        "list-bull-tp-iconlists_tick": '<div style="width: 45px"><p style="height: 20px"><img style="width: 20px; height: 20px; display:inline-block; vertical-align: middle" src="/tinymce/icons/tp/tp-tick.png"/> <span style="display: inline-block;vertical-align: middle; width: 20px;background-color: #B9BCC1; height:5px" ></span><p  style="height: 20px" ><img style="width: 20px; height: 20px; display:inline-block; vertical-align: middle" src="/tinymce/icons/tp/tp-tick.png"/> <span style="display: inline-block;vertical-align: middle; width: 20px;background-color: #B9BCC1; height:5px" ></span></p></div>',
        "tpParagraph": '<svg t="1631187903361" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1637" width="24" height="24"><path d="M122.368 165.888h778.24c-9.216 0-16.384-7.168-16.384-16.384v713.728c0-9.216 7.168-16.384 16.384-16.384h-778.24c9.216 0 16.384 7.168 16.384 16.384V150.016c0 8.192-6.656 15.872-16.384 15.872z m-32.768 684.544c0 26.112 20.992 47.104 47.104 47.104h750.08c26.112 0 47.104-20.992 47.104-47.104V162.304c0-26.112-20.992-47.104-47.104-47.104H136.704c-26.112 0-47.104 20.992-47.104 47.104v688.128z" p-id="1638"></path><path d="M597.504 300.544h230.912v49.152h-230.912zM596.992 437.76h230.912v49.152h-230.912zM210.432 574.976h617.984v49.152H210.432zM210.432 712.192h617.984v49.152H210.432zM246.784 296.448h88.064V501.76h-29.184v29.184h117.248V501.76h-29.696V296.448H481.28v29.184h29.184V238.08H217.6v87.552h29.184z" p-id="1639"></path></svg>',
        "tpColumns": '<svg t="1631064221790" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="26578" width="20" height="20"><path d="M416 64H128c-35.2 0-64 28.8-64 64v768c0 35.2 28.8 64 64 64h288c35.2 0 64-28.8 64-64V128c0-35.2-28.8-64-64-64z m0 800c0 19.2-12.8 32-32 32H160c-19.2 0-32-12.8-32-32V160c0-19.2 12.8-32 32-32h224c19.2 0 32 12.8 32 32v704zM896 64H608c-35.2 0-64 28.8-64 64v768c0 35.2 28.8 64 64 64h288c35.2 0 64-28.8 64-64V128c0-35.2-28.8-64-64-64z m0 800c0 19.2-12.8 32-32 32H640c-19.2 0-32-12.8-32-32V160c0-19.2 12.8-32 32-32h224c19.2 0 32 12.8 32 32v704z"></path></svg>',
        "tpLetterspacing": '<svg t="1610616201691" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="969" width="24" height="24"><path d="M682.666667 704l128 106.666667-128 106.666666v-85.333333H341.333333v85.333333L213.333333 810.666667l128-106.666667v85.333333h341.333334v-85.333333zM170.666667 170.666667v682.666666H85.333333V170.666667h85.333334z m768 0v682.666666h-85.333334V170.666667h85.333334z m-394.666667 0l202.666667 469.333333h-89.6l-38.4-93.866667h-213.333334L366.933333 640H277.333333l202.666667-469.333333h64zM512 255.146667L432.213333 469.333333h159.573334L512 255.146667z" p-id="970"></path></svg>',
        "tpIndent2em": '<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M170.666667 563.2v-102.4H887.466667v102.4zM170.666667 836.266667v-102.4H887.466667v102.4zM512 290.133333v-102.4H887.466667v102.4zM238.933333 341.333333V136.533333l204.8 102.4z"  p-id="5210"></path></svg>',
        "tpIconfont": '<svg t="1631797032825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="16487" width="30" height="30"><path d="M805.096727 186.810182H218.903273c-17.687273 0-32.116364 14.405818-32.116364 32.116363v586.170182c0 17.687273 14.429091 32.116364 32.116364 32.116364h586.193454c17.687273 0 32.116364-14.429091 32.116364-32.116364V218.903273c0-17.687273-14.429091-32.116364-32.116364-32.116364z m0-46.545455a78.685091 78.685091 0 0 1 78.661818 78.661818v586.170182a78.685091 78.685091 0 0 1-78.661818 78.661818H218.903273a78.685091 78.685091 0 0 1-78.661818-78.661818V218.903273a78.685091 78.685091 0 0 1 78.661818-78.661818h586.193454z"  p-id="16488"></path><path d="M581.818182 465.454545h162.909091v-162.90909h-162.909091v162.90909z m-23.272727-186.181818h209.454545v209.454546h-209.454545v-209.454546zM372.363636 744.727273c51.386182 0 93.090909-41.751273 93.090909-93.090909 0-51.386182-41.751273-93.090909-93.090909-93.090909-51.386182 0-93.090909 41.751273-93.090909 93.090909 0 51.386182 41.751273 93.090909 93.090909 93.090909z m0 23.272727c-64.116364 0-116.363636-52.037818-116.363636-116.363636 0-64.116364 52.037818-116.363636 116.363636-116.363637 64.116364 0 116.363636 52.037818 116.363637 116.363637 0 64.116364-52.037818 116.363636-116.363637 116.363636zM736.907636 721.454545l-80.663272-139.636363-80.663273 139.636363h161.326545zM535.272727 744.727273l120.971637-209.454546 120.971636 209.454546H535.272727zM417.093818 393.774545l44.776727-43.52-61.812363-8.96L372.363636 285.253818l-27.694545 56.040727-61.905455 8.983273 44.683637 43.52-10.519273 61.672727 55.226182-29.090909 55.458909 29.137455-10.519273-61.742546z m24.994909 8.145455l16.384 96.116364-86.318545-45.381819-86.109091 45.381819 16.407273-96.116364L232.727273 334.010182l96.488727-13.963637L372.363636 232.727273l43.147637 87.296 96.488727 13.963636-69.911273 67.956364z"  ></path></svg>',
        "tp-columns-default": '<svg t="1631071826197" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="27031" width="60" height="40"  style="transform: translateX(7px)"; ><path  d="M213.333333 341.333333H85.333333v384h128V341.333333m85.333334 0v384a85.333333 85.333333 0 0 1-85.333334 85.333334H85.333333a85.333333 85.333333 0 0 1-85.333333-85.333334V341.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h128a85.333333 85.333333 0 0 1 85.333334 85.333333z"  p-id="27032"></path><path d="M576 341.333333h-128v384h128V341.333333m85.333333 0v384a85.333333 85.333333 0 0 1-85.333333 85.333334h-128a85.333333 85.333333 0 0 1-85.333333-85.333334V341.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h128a85.333333 85.333333 0 0 1 85.333333 85.333333z"  p-id="27033"></path></svg>',
        "tp-columns-columns-2": '<svg t="1631071826197" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="27031" width="60" height="40"  style="transform: translateX(7px)"; ><path  d="M213.333333 341.333333H85.333333v384h128V341.333333m85.333334 0v384a85.333333 85.333333 0 0 1-85.333334 85.333334H85.333333a85.333333 85.333333 0 0 1-85.333333-85.333334V341.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h128a85.333333 85.333333 0 0 1 85.333334 85.333333z"  p-id="27032"></path><path d="M576 341.333333h-128v384h128V341.333333m85.333333 0v384a85.333333 85.333333 0 0 1-85.333333 85.333334h-128a85.333333 85.333333 0 0 1-85.333333-85.333334V341.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h128a85.333333 85.333333 0 0 1 85.333333 85.333333z"  p-id="27033"></path></svg>',
        "tp-columns-columns-3": '<svg t="1631071826197" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="27031" width="40" height="40"><path d="M213.333333 341.333333H85.333333v384h128V341.333333m85.333334 0v384a85.333333 85.333333 0 0 1-85.333334 85.333334H85.333333a85.333333 85.333333 0 0 1-85.333333-85.333334V341.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h128a85.333333 85.333333 0 0 1 85.333334 85.333333z"  p-id="27032"></path><path d="M576 341.333333h-128v384h128V341.333333m85.333333 0v384a85.333333 85.333333 0 0 1-85.333333 85.333334h-128a85.333333 85.333333 0 0 1-85.333333-85.333334V341.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h128a85.333333 85.333333 0 0 1 85.333333 85.333333z"  p-id="27033"></path><path d="M938.666667 341.333333h-128v384h128V341.333333m85.333333 0v384a85.333333 85.333333 0 0 1-85.333333 85.333334h-128a85.333333 85.333333 0 0 1-85.333334-85.333334V341.333333a85.333333 85.333333 0 0 1 85.333334-85.333333h128a85.333333 85.333333 0 0 1 85.333333 85.333333z" p-id="27034"></path></svg>',
        "tpLineHeight": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M9.984 12.984v-1.969h12v1.969h-12zM9.984 18.984v-1.969h12v1.969h-12zM9.984 5.016h12v1.969h-12v-1.969zM6 6.984v10.031h2.484l-3.469 3.469-3.516-3.469h2.484v-10.031h-2.484l3.516-3.469 3.469 3.469h-2.484z"></path></svg>'
      }
    }
  };
  tp$tinymce.IconManager.add = function(_icon) {
    return function() {
      __assign(arguments[1].icons, tp$IconManager[arguments[0]] ? tp$IconManager[arguments[0]].icons : {});
      _icon.apply(this, arguments);
    };
  }(tp$tinymce.IconManager.add);
  function initSetup(editor) {
    var _a;
    editor.on("BeforeGetContent", (e) => {
      !e.source_view ? createTpComponentStyleSheet(e.target) : "";
    });
    if (editor.settings && editor.settings.tp_dark_light_mode) {
      editor.addCommand("tpDarkLightMode", function(ui, value) {
        editor.settings.skin = (value === null || value === void 0 ? void 0 : value.skin) || "oxide";
        editor.settings.content_css = (value === null || value === void 0 ? void 0 : value.content_css) || "default";
        editor.editorManager.execCommand("mceRemoveEditor", false, editor.id);
        editor.editorManager.settings = editor.settings;
        editor.editorManager.execCommand("mceAddEditor", false, editor.id);
      });
    }
    if (editor.settings && (editor.settings.tp_i18n || editor.settings.tp_i18n_langs)) {
      if (editor.settings.tp_i18n_langs) {
        const defaultLangsObj = {
          "zh": { code: "zh_CN", title: "Chinese", name: "\u4E2D\u6587" },
          "en": { code: "en", title: "Chinese", name: "English" },
          "es": { code: "es", title: "Spanish", name: "Espa\xF1ol" },
          "fr": { code: "fr", title: "French", name: "Fran\xE7ais" },
          "de": { code: "de", title: "German", name: "Deutsch" },
          "ko": { code: "ko", title: "Korean", name: "\uD55C\uAD6D \uC0AC\uB78C" },
          "ja": { code: "ja", title: "Japanese", name: "\u65E5\u672C\u8A9E" },
          "nl": { code: "nl", title: "Dutch", name: "Nederlands" },
          "hu": { code: "hu", title: "Hungarian", name: "Magyar" },
          "pt": { code: "pt", title: "Portuguese", name: "Portugu\xEAs" },
          "cs": { code: "cs", title: "Czech", name: "\u010Ce\u0161tina" },
          "vi": { code: "vi", title: "Vietnamese", name: "Vi\u1EC7tName" }
        };
        editor.settings.tp_i18n_Locale = (val, setTpI18n) => {
          let locale = editor.settings.language;
          try {
            locale = JSON.parse(val).locale;
          } catch (error) {
          }
          /^zh/.test(locale) && (locale = "zh_CN");
          setTpI18n(locale);
        };
        let defaultLangsDataList = [
          { title: "English", code: "en" },
          { title: "Chinese", code: "zh_CN", items: { English: "\u82F1\u8BED", Spanish: "\u897F\u73ED\u7259\u8BED", French: "\u6CD5\u8BED", German: "\u5FB7\u8BED", Chinese: "\u4E2D\u6587", Japanese: "\u65E5\u6587", Korean: "\u97E9\u8BED", Dutch: "\u8377\u5170", Hungarian: "\u5308\u7259\u5229\u8BED", Portuguese: "\u8461\u8404\u7259\u8BED", Czech: "\u6377\u514B\u8BED", Uyghur: "\u7EF4\u543E\u5C14\u8BED", Vietnamese: "\u8D8A\u5357\u8BED" } },
          { title: "Spanish", code: "es", items: { English: "Ingl\xE9s", Spanish: "Espa\xF1ol", French: "Franc\xE9s", German: "Alem\xE1n", Chinese: "Chino", Japanese: "Japon\xE9s", Korean: "Coreano", Dutch: "Holand\xE9s", Hungarian: "H\xFAngaro", Portuguese: "Portugu\xE9s", Czech: "Checo", Uyghur: "Uigur", Vietnamese: "Vietnamita" } },
          { title: "French", code: "fr", items: { English: "Anglais", Spanish: "Espagnol", French: "Fran\xE7ais", German: "Allemagne", Chinese: "Chinois", Japanese: "Japonais", Korean: "Cor\xE9ens", Dutch: "N\xE9erlandais", Hungarian: "Hongrois", Portuguese: "Portugais", Czech: "Tch\xE8que", Uyghur: "Ou\xEFghour", Vietnamese: "Vietnamien" } },
          { title: "German", code: "de", items: { English: "Englisch", Spanish: "Spanisch", French: "Franz\xF6sisch", German: "Deutsch", Chinese: "Chinesisch", Japanese: "Japanisch", Korean: "Koreanisch", Dutch: "Niederl\xE4ndisch", Hungarian: "Ungarisch", Portuguese: "Portugiesisch", Czech: "Tschechisch", Uyghur: "Uigurisch", Vietnamese: "Vietnamesisch" } },
          { title: "Korean", code: "ko", items: { English: "\uC740\uB9AC\uC2DC", Spanish: "\uC2A4\uD398\uC778\uC758", French: "\uD504\uB791\uC2A4\uC5B4", German: "\uB3C5\uC77C\uC758", Chinese: "\uC911\uAD6D \uC0AC\uB78C", Japanese: "\uC77C\uBCF8 \uC0AC\uB78C", Korean: "\uD55C\uAD6D \uC0AC\uB78C", Dutch: "\uB124\uB35C\uB780\uB4DC\uC758", Hungarian: "\uD5DD\uAC00\uB9AC\uC5B4", Portuguese: "\uD3EC\uB974\uD22C\uAC08\uC5B4", Czech: "\uCCB4\uCF54\uC758", Uyghur: "\uC704\uAD6C\uB974\uC5B4", Vietnamese: "\uBCA0\uD2B8\uB0A8\uC5B4" } },
          { title: "Japanese", code: "ja", items: { English: "\u30A4\u30F3\u30B0\u30EA\u30C3\u30B7\u30E5", Spanish: "\u30B9\u30DA\u30A4\u30F3\u8A9E", French: "\u30D5\u30E9\u30F3\u30B9\u8A9E", German: "\u30C9\u30A4\u30C4\u8A9E", Chinese: "\u4E2D\u56FD\u8A9E", Japanese: "\u65E5\u672C\u8A9E", Korean: "\u97D3\u56FD\u8A9E", Dutch: "\u30AA\u30E9\u30F3\u30C0\u8A9E", Hungarian: "\u30CF\u30F3\u30AC\u30EA\u30FC\u8A9E", Portuguese: "\u30DD\u30EB\u30C8\u30AC\u30EB\u8A9E", Czech: "\u30C1\u30A7\u30B3\u8A9E", Uyghur: "\u30A6\u30A4\u30B0\u30EB", Vietnamese: "\u30D9\u30C8\u30CA\u30E0\u4EBA" } },
          { title: "Dutch", code: "nl", items: { English: "Engels", Spanish: "Spaans", French: "Frans", German: "Duits", Chinese: "Chinees", Japanese: "Japans", Korean: "Koreaans", Dutch: "Nederlands", Hungarian: "Hongaars", Portuguese: "Portugees", Czech: "Tsjechisch", Uyghur: "OeigoerName", Vietnamese: "Vietnamees" } },
          { title: "Hungarian", code: "hu", items: { English: "Angol", Spanish: "Spanyol", French: "Francia", German: "N\xE9met", Chinese: "K\xEDnai", Japanese: "Jap\xE1n", Korean: "Koreai", Dutch: "Hollandia", Hungarian: "Magyar", Portuguese: "Portug\xE1l", Czech: "Cseh", Uyghur: "Ujgur", Vietnamese: "Vietn\xE1mi" } },
          { title: "Portuguese", code: "pt", items: { English: "Ingl\xEAs", Spanish: "spanhol", French: "Franc\xEAs", German: "Alem\xE3o", Chinese: "Chin\xEAs", Japanese: "Japon\xEAs", Korean: "Coreano", Dutch: "Holand\xEAs", Hungarian: "H\xFAngaro", Portuguese: "Portugu\xEAs", Czech: "Checo", Uyghur: "Uygur", Vietnamese: "Vietnamita" } },
          { title: "Czech", code: "cs", items: { English: "angli\u010Dtina", Spanish: "\u0160pan\u011Bl\u0161tina", French: "Francouz\u0161tina", German: "N\u011Bm\u010Dina", Chinese: "\u010C\xEDn\u0161tina", Japanese: "Japon\u0161tina", Korean: "Korej\u0161tina", Dutch: "Nizozem\u0161tina", Hungarian: "Ma\u010Far\u0161tina", Portuguese: "Portugal\u0161tina", Czech: "\u010Ce\u0161tina", Uyghur: "Ujgursk\xE1", Vietnamese: "Vietnam\u0161tina" } },
          { title: "Vietnamese", code: "vi", items: { English: "Comment", Spanish: "T\xE2y Ban", French: "Ph\xE1p", German: "\u0110\u1EE9c", Chinese: "Hoa", Japanese: "Nh\u1EADt", Korean: "H\xE0n", Dutch: "H\xE0", Hungarian: "Hungary", Portuguese: "PortugueName", Czech: "S\xE9c", Uyghur: "ch\xE0o.", Vietnamese: "Vi\u1EC7tName" } }
        ];
        var lang = navigator.language || (navigator === null || navigator === void 0 ? void 0 : navigator.userLanguage);
        lang = lang.substr(0, 2);
        if (defaultLangsObj[lang]) {
          let _items = {};
          _items["" + defaultLangsObj[lang].title] = defaultLangsObj[lang].name;
          editor.editorManager.i18n.add("en", _items);
        }
        let baseURL = editor.settings.tp_i18n_url || (((_a = editor.baseUri) === null || _a === void 0 ? void 0 : _a.source.replace(/\/$/, "")) ? editor.baseUri.source.replace(/\/$/, "") : "") + "/langs/" || "";
        defaultLangsDataList.map((_i18n) => {
          _i18n.items && editor.editorManager.i18n.add(_i18n.code, _i18n.items);
          _i18n.code !== "en" && editor.editorManager.ScriptLoader.add(_i18n.url || (baseURL === null || baseURL === void 0 ? void 0 : baseURL.replace(/\/$/, "")) + "/" + _i18n.code + ".js");
          if (_i18n.code && defaultLangsObj[lang]) {
            let _items = {};
            _items["" + defaultLangsObj[lang].title] = defaultLangsObj[lang].name;
            editor.editorManager.i18n.add(_i18n.code, _items);
          }
        });
        let defaultLangsDataList2 = [
          { title: "English", code: "en", items: { "Extension": "Extension" } },
          { title: "Chinese", code: "zh_CN", items: { "Extension": "\u6269\u5C55" } },
          { title: "Spanish", code: "es", items: { "Extension": "Ampliaci\xF3n" } },
          { title: "French", code: "fr", items: { "Extension": "\xC9largissement" } },
          { title: "German", code: "de", items: { Extension: "Erweiterung" } },
          { title: "Korean", code: "ko", items: { Extension: "\uD655\uB300" } },
          { title: "Japanese", code: "ja", items: { Extension: "\u62E1\u5F35" } },
          { title: "Dutch", code: "nl", items: { Extension: "Uitbreiding" } },
          { title: "Hungarian", code: "hu", items: { Extension: "Kiterjeszt\xE9s" } },
          { title: "Portuguese", code: "pt", items: { Extension: "Extens\xE3o" } },
          { title: "Czech", code: "cs", items: { Extension: "Roz\u0161\xED\u0159en\xED" } },
          { title: "Vietnamese", code: "vi", items: { Extension: "M\u1EDF" } }
        ];
        defaultLangsDataList2.map((_i18n) => {
          _i18n.items && editor.editorManager.i18n.add(_i18n.code, _i18n.items);
        });
        editor.addCommand("mceTpI18n", function(ui, value) {
          editor.settings.tp_i18n = value;
          editor.settings.language = value;
          editor.editorManager.execCommand("mceRemoveEditor", false, editor.id);
          editor.editorManager.settings = editor.settings;
          editor.editorManager.execCommand("mceAddEditor", false, editor.id);
        });
        editor.ui.registry.getAll().icons["i18n"] || editor.ui.registry.addIcon("i18n", '<svg t="1656142365638" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2658" width="24" height="24"><path d="M864 64a96 96 0 0 1 96 96v704a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V160a96 96 0 0 1 96-96h704z m0 64H160a32 32 0 0 0-32 32v704a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V160a32 32 0 0 0-32-32z m-322.4 256c0-31.456 40.64-44.032 58.4-18.08l133.6 195.168V384a32 32 0 0 1 64 0v280.48c0 31.456-40.64 44.032-58.4 18.08l-133.6-195.168v177.088a32 32 0 1 1-64 0z"  p-id="2659"></path><path d="M448 352a32 32 0 0 1 0 64H288v80h160a32 32 0 0 1 31.776 28.256L480 528a32 32 0 0 1-32 32H288v72.48h160a32 32 0 1 1 0 64H256a32 32 0 0 1-32-32V384a32 32 0 0 1 32-32z"  p-id="2660" data-spm-anchor-id="a313x.7781069.0.i5" class="selected"></path></svg>');
        editor.ui.registry.addNestedMenuItem("tpI18n", {
          text: "i18n",
          icon: "i18n",
          getSubmenuItems: function() {
            let _currentCodeVal = editor.settings.language || editor.settings.tp_i18n || "en";
            let langsDataList = editor.settings.tp_i18n_langs && editor.settings.tp_i18n_langs.length > 0 ? editor.settings.tp_i18n_langs : defaultLangsDataList;
            return global$1.map(langsDataList, function(item) {
              return {
                type: "togglemenuitem",
                text: item.title,
                active: _currentCodeVal === item.code ? true : false,
                onAction: function() {
                  editor.execCommand("mceTpI18n", false, item.code);
                }
              };
            });
          }
        });
      }
      editor.on("init", (e) => {
        editor.editorContainer.onmouseover = () => {
          let _language = editor.settings.language || editor.settings.tp_i18n || "en";
          let _currentCodeVal = editor.editorManager.i18n.getCode();
          _currentCodeVal != _language && editor.editorManager.i18n.setCode(_language);
        };
      });
    }
    editor.on("init", (e) => {
      createComponentsCustomTag(editor);
      editor.getTpContent = (args) => {
        return editor.getTpStyle(args) + editor.getContent(args);
      };
    });
  }
  tp$tinymce.init = function(_init) {
    return function() {
      let sktDom = "";
      !arguments[0].language && (arguments[0].language = "en");
      if (typeof arguments[0].setup == "function") {
        arguments[0].setup = function(_setup) {
          return function(editor) {
            initSetup(editor);
            _setup.apply(this, arguments);
          };
        }(arguments[0].setup);
      } else {
        arguments[0].setup = function(editor) {
          initSetup(editor);
        };
      }
      arguments[0].skeletonScreen && (sktDom = createSkeleton(arguments[0]));
      arguments[0].custom_elements = (arguments[0].custom_elements ? arguments[0].custom_elements + "," : "") + "tp-collapse,tp-tabs,tp-buttons";
      const resEditor = _init.apply(this, arguments);
      resEditor.then((editor) => {
        let initFn = () => {
          var _a;
          if (sktDom) {
            let parentNode = sktDom.parentNode;
            sktDom.remove();
            (_a = parentNode.querySelector(".skt.skt-loading")) === null || _a === void 0 ? void 0 : _a.remove();
          }
        };
        if (editor[0]) {
          initFn();
        } else {
          setIntervalFn((clear) => {
            if (editor[0]) {
              clear();
              initFn();
            }
          }, 20);
        }
      });
      return resEditor;
    };
  }(tp$tinymce.init);
  let getContentStyle = function(content) {
    return new Promise((resolve, reject) => {
      let result = content.match(/<(style)\s*>([\s\S]+)<\/\1>/);
      resolve(result && result[2] ? result[2].trim() : "");
    });
  };
  tp$tinymce.Editor.prototype.setTpContent = function(content, args) {
    getContentStyle(content).then((res) => {
    });
    return this.setContent(content, args);
  };
  window.localStorage.setItem = function(_setItem) {
    return function(keyName, keyValue) {
      if (/locale$/.test(keyName)) {
        tp$tinymce.editors.forEach((editor) => {
          setTimeout(() => {
            if (!editor.settings.tp_i18n_setCode && editor.settings.tp_i18n_Locale) {
              editor.settings.tp_i18n_Locale(keyValue, (val) => {
                editor.execCommand("mceTpI18n", false, val);
              });
            }
          }, 50);
        });
      }
      if (/APPEARANCE_KEY/.test(keyName)) {
        tp$tinymce.editors.forEach((editor) => {
          setTimeout(() => {
            if (editor.settings.tp_dark_light_mode) {
              editor.execCommand("tpDarkLightMode", false, { skin: "oxide" + (keyValue == "dark" ? "-dark" : ""), content_css: keyValue == "dark" ? "dark" : "" });
            }
          }, 50);
        });
      }
      _setItem.apply(this, arguments);
    };
  }(window.localStorage.__proto__.setItem);
  const tinymcePlugin2 = {
    global$1: tinymce.util.Tools,
    global$7: tinymce.html.Node,
    componentsApi,
    setDev: () => {
      window === null || window === void 0 ? void 0 : window.__TP_DEV__ = true;
    },
    createSkt
  };
  var exportToModuleLoaders = function(_tinymcePlugin) {
    if (typeof module === "object") {
      try {
        module.exports = _tinymcePlugin;
      } catch (_) {
      }
    }
  };
  var exportToWindowGlobal = function(_tinymcePlugin) {
    window.tinymcePlugin = _tinymcePlugin;
    window.tinymce.tinymcePlugin = _tinymcePlugin;
    window.tinyMCE.tinymcePlugin = _tinymcePlugin;
  };
  exportToWindowGlobal(tinymcePlugin2);
  exportToModuleLoaders(tinymcePlugin2);
  exports["default"] = tinymcePlugin2;
  exports.tinymcePlugin = tinymcePlugin2;
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
  return exports;
}({}));