@emailmaker/emailmaker 1.0.98 → 1.0.100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +1 -1
  2. package/asset-manifest.json +165 -0
  3. package/css.worker.js +2 -0
  4. package/css.worker.js.LICENSE.txt +6 -0
  5. package/editor.worker.js +1 -0
  6. package/emailmaker-esm.js +1 -0
  7. package/emailmaker.d.ts +1826 -0
  8. package/emailmaker.js +1 -0
  9. package/html.worker.js +1 -0
  10. package/iframe/429.js +1 -1
  11. package/iframe/766.js +1 -1
  12. package/iframe/iframe-eblock.e88ae8a9ae883be1118b.html +1 -0
  13. package/iframe/iframe.e88ae8a9ae883be1118b.html +1 -0
  14. package/iframe/js/330.4622fd92.js +1 -0
  15. package/iframe/sandbox-eblock.js +1 -1
  16. package/iframe/sandbox.js +1 -1
  17. package/package.json +1 -1
  18. package/plugin.html +294 -0
  19. package/plugin_blocks_test.html +144 -0
  20. package/plugin_default.html +56 -0
  21. package/plugin_idigital.html +254 -0
  22. package/plugin_nota.html +861 -0
  23. package/plugin_s.html +31 -0
  24. package/static/css/1169.c8d4ad26.chunk.css +1 -0
  25. package/static/css/57.c4280089.chunk.css +1 -0
  26. package/static/css/6501.e131603e.chunk.css +1 -0
  27. package/static/css/6798.4b23f0cb.chunk.css +1 -0
  28. package/static/css/84.709e209c.chunk.css +1 -0
  29. package/static/js/1169.baef237c.chunk.js +2 -0
  30. package/static/js/1169.baef237c.chunk.js.LICENSE.txt +6 -0
  31. package/static/js/1303.92cc3c9c.js +2 -0
  32. package/static/js/1303.92cc3c9c.js.LICENSE.txt +11 -0
  33. package/static/js/1538.68b12a82.chunk.js +2 -0
  34. package/static/js/1538.68b12a82.chunk.js.LICENSE.txt +23 -0
  35. package/static/js/1729.a0be903e.chunk.js +1 -0
  36. package/static/js/1880.5668de7d.chunk.js +1 -0
  37. package/static/js/207.2a052cc2.js +2 -0
  38. package/static/js/207.2a052cc2.js.LICENSE.txt +59 -0
  39. package/static/js/2624.5a8b68ca.js +2 -0
  40. package/static/js/2624.5a8b68ca.js.LICENSE.txt +21 -0
  41. package/static/js/2642.b60a63f6.chunk.js +1 -0
  42. package/static/js/2854.da9b4ca6.js +2 -0
  43. package/static/js/2854.da9b4ca6.js.LICENSE.txt +31 -0
  44. package/static/js/3017.102adc4c.chunk.js +1 -0
  45. package/static/js/3019.8534e1e7.chunk.js +2 -0
  46. package/static/js/3019.8534e1e7.chunk.js.LICENSE.txt +6 -0
  47. package/static/js/3065.c2b60870.js +2 -0
  48. package/static/js/3065.c2b60870.js.LICENSE.txt +39 -0
  49. package/static/js/3085.bcc62ca0.chunk.js +2 -0
  50. package/static/js/3085.bcc62ca0.chunk.js.LICENSE.txt +54 -0
  51. package/static/js/4309.6c1989bb.chunk.js +1 -0
  52. package/static/js/4972.a230fee4.js +1 -0
  53. package/static/js/57.3e1e762a.chunk.js +1 -0
  54. package/static/js/6144.a3bf0881.chunk.js +2 -0
  55. package/static/js/6144.a3bf0881.chunk.js.LICENSE.txt +6 -0
  56. package/static/js/6419.3f1ccca4.js +2 -0
  57. package/static/js/6419.3f1ccca4.js.LICENSE.txt +1 -0
  58. package/static/js/6501.40bbf4df.chunk.js +1 -0
  59. package/static/js/6798.65ecf642.chunk.js +2 -0
  60. package/static/js/6798.65ecf642.chunk.js.LICENSE.txt +39 -0
  61. package/static/js/6801.562ec824.chunk.js +2 -0
  62. package/static/js/6801.562ec824.chunk.js.LICENSE.txt +6 -0
  63. package/static/js/6819.16ca9581.chunk.js +2 -0
  64. package/static/js/6819.16ca9581.chunk.js.LICENSE.txt +6 -0
  65. package/static/js/6957.7ea22637.chunk.js +1 -0
  66. package/static/js/7463.51929d73.chunk.js +2 -0
  67. package/static/js/7463.51929d73.chunk.js.LICENSE.txt +6 -0
  68. package/static/js/84.25bf13c1.chunk.js +1 -0
  69. package/static/js/8473.88a48c70.chunk.js +2 -0
  70. package/static/js/8473.88a48c70.chunk.js.LICENSE.txt +101 -0
  71. package/static/js/8521.0e5efd08.chunk.js +2 -0
  72. package/static/js/8521.0e5efd08.chunk.js.LICENSE.txt +6 -0
  73. package/static/js/9644.eb778968.chunk.js +2 -0
  74. package/static/js/9644.eb778968.chunk.js.LICENSE.txt +6 -0
  75. package/static/js/9960.6fbe3e6d.chunk.js +2 -0
  76. package/static/js/9960.6fbe3e6d.chunk.js.LICENSE.txt +30 -0
  77. package/static/js/9981.4c03120e.js +1 -0
  78. package/static/js/ant-locale/locale-ar_EG-js.a068e3a8.chunk.js +1 -0
  79. package/static/js/ant-locale/locale-az_AZ-js.b84a560f.chunk.js +1 -0
  80. package/static/js/ant-locale/locale-bg_BG-js.3d7c7e4f.chunk.js +1 -0
  81. package/static/js/ant-locale/locale-bn_BD-js.dd1a7e84.chunk.js +1 -0
  82. package/static/js/ant-locale/locale-by_BY-js.49b7fc6b.chunk.js +1 -0
  83. package/static/js/ant-locale/locale-ca_ES-js.24fe4aef.chunk.js +1 -0
  84. package/static/js/ant-locale/locale-cs_CZ-js.1e90fb24.chunk.js +1 -0
  85. package/static/js/ant-locale/locale-da_DK-js.61788209.chunk.js +1 -0
  86. package/static/js/ant-locale/locale-de_DE-js.8e7fdd44.chunk.js +1 -0
  87. package/static/js/ant-locale/locale-el_GR-js.6c5e0839.chunk.js +1 -0
  88. package/static/js/ant-locale/locale-en_GB-js.92cc4647.chunk.js +1 -0
  89. package/static/js/ant-locale/locale-es_ES-js.a31d70e0.chunk.js +1 -0
  90. package/static/js/ant-locale/locale-et_EE-js.337814a0.chunk.js +1 -0
  91. package/static/js/ant-locale/locale-eu_ES-js.18f1c965.chunk.js +1 -0
  92. package/static/js/ant-locale/locale-fa_IR-js.f0f50266.chunk.js +1 -0
  93. package/static/js/ant-locale/locale-fi_FI-js.e2e08d8a.chunk.js +1 -0
  94. package/static/js/ant-locale/locale-fr_BE-js.2e2298ab.chunk.js +1 -0
  95. package/static/js/ant-locale/locale-fr_CA-js.b2f59d9c.chunk.js +1 -0
  96. package/static/js/ant-locale/locale-fr_FR-js.5d07a79a.chunk.js +1 -0
  97. package/static/js/ant-locale/locale-ga_IE-js.afa510f9.chunk.js +1 -0
  98. package/static/js/ant-locale/locale-gl_ES-js.72e19ffc.chunk.js +1 -0
  99. package/static/js/ant-locale/locale-he_IL-js.47b71730.chunk.js +1 -0
  100. package/static/js/ant-locale/locale-hi_IN-js.7af15f51.chunk.js +1 -0
  101. package/static/js/ant-locale/locale-hr_HR-js.4ebb11e0.chunk.js +1 -0
  102. package/static/js/ant-locale/locale-hu_HU-js.ecde5d7e.chunk.js +1 -0
  103. package/static/js/ant-locale/locale-hy_AM-js.15e07ba1.chunk.js +1 -0
  104. package/static/js/ant-locale/locale-id_ID-js.ab0888b9.chunk.js +1 -0
  105. package/static/js/ant-locale/locale-is_IS-js.fdbfc750.chunk.js +1 -0
  106. package/static/js/ant-locale/locale-it_IT-js.59a531ef.chunk.js +1 -0
  107. package/static/js/ant-locale/locale-ja_JP-js.7870613a.chunk.js +1 -0
  108. package/static/js/ant-locale/locale-ka_GE-js.853f3af0.chunk.js +1 -0
  109. package/static/js/ant-locale/locale-kk_KZ-js.5fdcc75b.chunk.js +1 -0
  110. package/static/js/ant-locale/locale-km_KH-js.988792d2.chunk.js +1 -0
  111. package/static/js/ant-locale/locale-kmr_IQ-js.6903b04d.chunk.js +1 -0
  112. package/static/js/ant-locale/locale-kn_IN-js.5fbd9645.chunk.js +1 -0
  113. package/static/js/ant-locale/locale-ko_KR-js.07676057.chunk.js +1 -0
  114. package/static/js/ant-locale/locale-ku_IQ-js.8d56188e.chunk.js +1 -0
  115. package/static/js/ant-locale/locale-lt_LT-js.976c50a6.chunk.js +1 -0
  116. package/static/js/ant-locale/locale-lv_LV-js.d2b7eb7a.chunk.js +1 -0
  117. package/static/js/ant-locale/locale-mk_MK-js.1a324243.chunk.js +1 -0
  118. package/static/js/ant-locale/locale-ml_IN-js.9ca0875e.chunk.js +1 -0
  119. package/static/js/ant-locale/locale-mn_MN-js.e5c5e6b3.chunk.js +1 -0
  120. package/static/js/ant-locale/locale-ms_MY-js.68d51cfa.chunk.js +1 -0
  121. package/static/js/ant-locale/locale-my_MM-js.1d798fbf.chunk.js +1 -0
  122. package/static/js/ant-locale/locale-nb_NO-js.85b15451.chunk.js +1 -0
  123. package/static/js/ant-locale/locale-ne_NP-js.db143616.chunk.js +1 -0
  124. package/static/js/ant-locale/locale-nl_BE-js.71247744.chunk.js +1 -0
  125. package/static/js/ant-locale/locale-nl_NL-js.26845b27.chunk.js +1 -0
  126. package/static/js/ant-locale/locale-pl_PL-js.44a62852.chunk.js +1 -0
  127. package/static/js/ant-locale/locale-pt_BR-js.17328a86.chunk.js +1 -0
  128. package/static/js/ant-locale/locale-pt_PT-js.05d4d804.chunk.js +1 -0
  129. package/static/js/ant-locale/locale-ro_RO-js.3e1e40bb.chunk.js +1 -0
  130. package/static/js/ant-locale/locale-si_LK-js.facbc144.chunk.js +1 -0
  131. package/static/js/ant-locale/locale-sk_SK-js.32bd8996.chunk.js +1 -0
  132. package/static/js/ant-locale/locale-sl_SI-js.f054d794.chunk.js +1 -0
  133. package/static/js/ant-locale/locale-sr_RS-js.317370b5.chunk.js +1 -0
  134. package/static/js/ant-locale/locale-sv_SE-js.ecd8298d.chunk.js +1 -0
  135. package/static/js/ant-locale/locale-ta_IN-js.ee264565.chunk.js +1 -0
  136. package/static/js/ant-locale/locale-th_TH-js.f1d32c8f.chunk.js +1 -0
  137. package/static/js/ant-locale/locale-tk_TK-js.015ee01f.chunk.js +1 -0
  138. package/static/js/ant-locale/locale-tr_TR-js.4c6d775a.chunk.js +1 -0
  139. package/static/js/ant-locale/locale-uk_UA-js.cef1c751.chunk.js +1 -0
  140. package/static/js/ant-locale/locale-ur_PK-js.b5d52218.chunk.js +1 -0
  141. package/static/js/ant-locale/locale-vi_VN-js.c5140ea5.chunk.js +1 -0
  142. package/static/js/ant-locale/locale-zh_CN-js.861c7ef0.chunk.js +1 -0
  143. package/static/js/ant-locale/locale-zh_HK-js.ca14eb1f.chunk.js +1 -0
  144. package/static/js/ant-locale/locale-zh_TW-js.69bb4746.chunk.js +1 -0
  145. package/static/js/emailmaker_core.c2851865.js +2 -0
  146. package/static/js/emailmaker_core.c2851865.js.LICENSE.txt +23 -0
  147. package/static/js/mergeTags/locale0.24c6e2da.chunk.js +1 -0
  148. package/static/js/mergeTags/locale1.24fd0fd2.chunk.js +1 -0
  149. package/static/media/ai-image.7c42c2e12001ebf31881.png +0 -0
  150. package/static/media/codicon.f13d28f3e470ec5c0896.ttf +0 -0
  151. package/static/media/empty-image.1827d6561f3c4042dfb3.png +0 -0
  152. package/static/media/fb.ff10384394f8044ec889.png +0 -0
  153. package/static/media/frame_dark.318d7ed53535d80662dc.png +0 -0
  154. package/static/media/frame_light.22a9b4ec728365d8193f.png +0 -0
  155. package/static/media/frame_template_gallery.85693b3950e7689fb3a5.png +0 -0
  156. package/static/media/icon-border-radius.2a56b93a7711558098a622296b7ae2e1.svg +1 -0
  157. package/static/media/icon-create-block.0b077f4000bf7907b9ea871d28c7fb1e.svg +1 -0
  158. package/static/media/icon-menu-block-welcome.1c534a003522feadd2e7.png +0 -0
  159. package/static/media/ig.47a89992b4bec92d4364.png +0 -0
  160. package/static/media/project-email-back-dark.9916625a9a714830b770.svg +29 -0
  161. package/static/media/project-email-back.0ce470def19ce7c063e0.svg +29 -0
  162. package/static/media/sign_up_01.333271584216122b89ba.png +0 -0
  163. package/static/media/sign_up_01_blocks.5538cfdb90d4869794dc.png +0 -0
  164. package/static/media/sign_up_02.d99d2aa6bf1ea74f01fa.png +0 -0
  165. package/static/media/sign_up_02_blocks.837fc2c9a9461fda13be.png +0 -0
  166. package/static/media/sign_up_03.5545ffad60a2cb5e0336.png +0 -0
  167. package/static/media/sign_up_03_blocks.126601f7a6fbea4b6c54.png +0 -0
  168. package/static/media/sign_up_04.398a4ca50d5f5b3cd837.png +0 -0
  169. package/static/media/sign_up_04_blocks.255c5c07b23cbcc256fd.png +0 -0
  170. package/static/media/sign_up_05.4c58df1be2edaa79d52b.png +0 -0
  171. package/static/media/sign_up_05_blocks.431b6844fdf3e14642c2.png +0 -0
  172. package/static/media/tg.10f004529a98df9732b9.png +0 -0
  173. package/static/media/tw.823a7736ac2d82815c71.png +0 -0
  174. package/static/media/video.854adea50295d0a3f7ae.png +0 -0
  175. package/static/media/vk.fe41df919f4e8718e0b3.png +0 -0
  176. package/static/media/yd.c40d05dde64ef695fdf2.png +0 -0
  177. package/static/media/yt.4ac57e55d158b40c7fc1.png +0 -0
  178. package/translations.pot +76 -76
  179. package/iframe/iframe-eblock.441a4dbc4384f20fcf1e.html +0 -1
  180. package/iframe/iframe.441a4dbc4384f20fcf1e.html +0 -1
  181. package/iframe/js/330.378aec42.js +0 -1
  182. /package/iframe/js/{330.378aec42.js.LICENSE.txt → 330.4622fd92.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(globalThis.webpackChunkemail_maker=globalThis.webpackChunkemail_maker||[]).push([[84],{6239:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"meta-viewport-require",description:'<meta name="viewport"> with non-blank content must be present in <head> tag.',init(e,t){let n=!1,r=!1,i="",o=null;e.addListener("tagstart",t=>{const s=t.tagName.toLowerCase();if("head"===s)n=!0,o=t;else if("meta"===s){const n=e.getMapAttrs(t.attrs);n.name&&"viewport"===n.name.toLowerCase()&&(r=!0,i=n.content||"")}}),e.addListener("end",()=>{n&&o&&(r?""===i.trim()&&t.error('<meta name="viewport"> content attribute must not be empty.',o.line,o.col,this,o.raw):t.error('<meta name="viewport"> must be present in <head> tag.',o.line,o.col,this,o.raw))})}}},7686:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"space-tab-mixed-disabled",description:"Do not mix tabs and spaces for indentation.",init(e,t,n){let r="nomix",i=null;if("string"===typeof n){const e=/^([a-z]+)(\d+)?/.exec(n);e&&(r=e[1],i=e[2]&&parseInt(e[2],10))}e.addListener("text",n=>{const o=n.raw,s=/(^|\r?\n)([ \t]+)/g;let a;for(;a=s.exec(o);){const o=e.fixPos(n,a.index+a[1].length);if(1!==o.col)continue;const s=a[2];"space"===r?i?!1!==/^ +$/.test(s)&&s.length%i===0||t.warn(`Please use space for indentation and keep ${i} length.`,o.line,1,this,n.raw):!1===/^ +$/.test(s)&&t.warn("Please use space for indentation.",o.line,1,this,n.raw):"tab"===r&&!1===/^\t+$/.test(s)?t.warn("Please use tab for indentation.",o.line,1,this,n.raw):!0===/ +\t|\t+ /.test(s)&&t.warn("Do not mix tabs and spaces for indentation.",o.line,1,this,n.raw)}})}}},8028:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-whitespace",description:"All attributes should be separated by only one space and not have leading/trailing whitespace.",init(e,t,n){const r=Array.isArray(n)?n:[];e.addListener("tagstart",e=>{const n=e.attrs;let i;const o=e.col+e.tagName.length+1;n.forEach(n=>{i=n;const s=n.name;-1===r.indexOf(s)&&(n.value.trim()!==n.value&&t.error(`The attributes of [ ${s} ] must not have leading or trailing whitespace.`,e.line,o+i.index,this,i.raw),n.value.replace(/ +(?= )/g,"")!==n.value&&t.error(`The attributes of [ ${s} ] must be separated by only one space.`,e.line,o+i.index,this,i.raw))})})}}},11247:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-value",description:"The id and class attribute values must meet the specified rules.",init(e,t,n){let r;if(r="string"===typeof n?{underline:{regId:/^[a-z\d]+(_[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by an underscore."},dash:{regId:/^[a-z\d]+(-[a-z\d]+)*$/,message:"The id and class attribute values must be in lowercase and split by a dash."},hump:{regId:/^[a-z][a-zA-Z\d]*([A-Z][a-zA-Z\d]*)*$/,message:"The id and class attribute values must meet the camelCase style."}}[n]:n,"object"===typeof r&&r.regId){let n=r.regId;const i=r.message;n instanceof RegExp||(n=new RegExp(n)),e.addListener("tagstart",e=>{const r=e.attrs;let o;const s=e.col+e.tagName.length+1;for(let a=0,l=r.length;a<l;a++)if(o=r[a],"id"===o.name.toLowerCase()&&!1===n.test(o.value)&&t.warn(i,e.line,s+o.index,this,o.raw),"class"===o.name.toLowerCase()){const r=o.value.split(/\s+/g);let a;for(let l=0,c=r.length;l<c;l++)a=r[l],a&&!1===n.test(a)&&t.warn(i,e.line,s+o.index,this,a)}})}}}},13285:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"form-method-require",description:'The method attribute of a <form> element must be present with a valid value: "get", "post", or "dialog".',init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase();if("form"===r){const i=e.getMapAttrs(n.attrs),o=n.col+r.length+1;if(void 0===i.method)t.warn("The method attribute must be present on <form> elements.",n.line,o,this,n.raw);else{const e=i.method.toLowerCase();"get"!==e&&"post"!==e&&"dialog"!==e&&t.warn('The method attribute of <form> must have a valid value: "get", "post", or "dialog".',n.line,o,this,n.raw)}}})}}},14148:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tagname-lowercase",description:"All html element names must be in lowercase.",init(e,t,n){const r=Array.isArray(n)?n:[];e.addListener("tagstart,tagend",e=>{const n=e.tagName;-1===r.indexOf(n)&&n!==n.toLowerCase()&&t.error(`The html element name of [ ${n} ] must be in lowercase.`,e.line,e.col,this,e.raw)})}}},15688:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLParser=t.Reporter=t.HTMLRules=t.HTMLHint=void 0;const r=n(18713);t.HTMLParser=r.default;const i=n(28970);t.Reporter=i.default;const o=n(36391);t.HTMLRules=o;function s(e,t){return new Array(e+1).join(t||" ")}t.HTMLHint=new class{constructor(){this.rules={},this.defaultRuleset={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0}}addRule(e){this.rules[e.id]=e}verify(e,t=this.defaultRuleset){0===Object.keys(t).length&&(t=this.defaultRuleset),e=e.replace(/^\s*<!--\s*htmlhint\s+([^\r\n]+?)\s*-->/i,(e,n)=>(n.replace(/(?:^|,)\s*([^:,]+)\s*(?:\:\s*([^,\s]+))?/g,(e,n,r)=>(t[n]=!(void 0!==r&&r.length>0)||JSON.parse(r),"")),""));const n=new r.default,o=new i.default(e,t),s=this.rules;let a;for(const r in t)a=s[r],void 0!==a&&!1!==t[r]&&a.init(n,o,t[r]);return n.parse(e),o.messages}format(e,t={}){const n=[],r={white:"",grey:"",red:"",reset:""};t.colors&&(r.white="\x1b[37m",r.grey="\x1b[90m",r.red="\x1b[31m",r.reset="\x1b[39m");const i=t.indent||0;return e.forEach(e=>{let t=e.evidence;const o=e.line,a=e.col,l=t.length;let c=a>41?a-40:1,u=t.length>a+60?a+60:l;a<41&&(u+=40-a+1),t=t.replace(/\t/g," ").substring(c-1,u),c>1&&(t=`...${t}`,c-=3),u<l&&(t+="..."),n.push(`${r.white+s(i)}L${o} |${r.grey}${t}${r.reset}`);let d=a-c;const h=t.substring(0,d).match(/[^\u0000-\u00ff]/g);null!==h&&(d+=h.length),n.push(`${r.white+s(i)+s(String(o).length+3+d)}^ ${r.red}${e.message} (${e.rule.id})${r.reset}`)}),n}},Object.values(o).forEach(e=>{t.HTMLHint.addRule(e)})},18713:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(){this._listeners={},this._mapCdataTags=this.makeMap("script,style"),this._arrBlocks=[],this.lastEvent=null}makeMap(e){const t={},n=e.split(",");for(let r=0;r<n.length;r++)t[n[r]]=!0;return t}parse(e){const t=this._mapCdataTags,n=/<(?:\/([^\s>]+)\s*|!--([\s\S]*?)--|!([^>]*?)|([\w\-:]+)((?:\s+[^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s"'>]*))?)*?)\s*(\/?))>/g,r=/\s*([^\s"'>\/=\x00-\x0F\x7F\x80-\x9F]+)(?:\s*=\s*(?:(")([^"]*)"|(')([^']*)'|([^\s"'>]*)))?/g,i=/\r?\n/g;let o,s,a,l,c,u,d=0,h=null,f=[],p=0,g=0,m=1;const b=this._arrBlocks;this.fire("start",{pos:0,line:1,col:1});const y=()=>{const e=l.find(e=>"type"===e.name)||{value:""};return t[a]&&-1===e.value.indexOf("text/ng-template")},w=(e,t,n,r)=>{const o=n-g+1;for(void 0===r&&(r={}),r.raw=t,r.pos=n,r.line=m,r.col=o,b.push(r),this.fire(e,r);i.exec(t);)m++,g=n+i.lastIndex};for(;o=n.exec(e);)if(s=o.index,s>d&&(u=e.substring(d,s),h?f.push(u):w("text",u,d)),d=n.lastIndex,!(a=o[1])||(h&&a===h&&(u=f.join(""),w("cdata",u,p,{tagName:h,attrs:c}),h=null,c=void 0,f=[]),h))if(h)f.push(o[0]);else if(a=o[4]){l=[];const e=o[5];let t,n=0;for(;t=r.exec(e);){const e=t[1],r=t[2]?t[2]:t[4]?t[4]:"",i=t[3]?t[3]:t[5]?t[5]:t[6]?t[6]:"";l.push({name:e,value:i,quote:r,index:t.index,raw:t[0]}),n+=t[0].length}n===e.length?(w("tagstart",o[0],s,{tagName:a,attrs:l,close:o[6]}),y()&&(h=a,c=l.concat(),f=[],p=d)):w("text",o[0],s)}else(o[2]||o[3])&&w("comment",o[0],s,{content:o[2]||o[3],long:!!o[2]});else w("tagend",o[0],s,{tagName:a});e.length>d&&(u=e.substring(d,e.length),w("text",u,d)),this.fire("end",{pos:d,line:m,col:e.length-g+1})}addListener(e,t){const n=this._listeners,r=e.split(/[,\s]/);let i;for(let o=0,s=r.length;o<s;o++)i=r[o],void 0===n[i]&&(n[i]=[]),n[i].push(t)}fire(e,t){void 0===t&&(t={}),t.type=e;let n=[];const r=this._listeners[e],i=this._listeners.all;void 0!==r&&(n=n.concat(r)),void 0!==i&&(n=n.concat(i));const o=this.lastEvent;null!==o&&(delete o.lastEvent,t.lastEvent=o),this.lastEvent=t;for(let s=0,a=n.length;s<a;s++)n[s].call(this,t)}removeListener(e,t){const n=this._listeners[e];if(void 0!==n)for(let r=0,i=n.length;r<i;r++)if(n[r]===t){n.splice(r,1);break}}fixPos(e,t){const n=e.raw.substr(0,t).split(/\r?\n/),r=n.length-1;let i,o=e.line;return r>0?(o+=r,i=n[r].length+1):i=e.col+t,{line:o,col:i}}getMapAttrs(e){const t={};let n;for(let r=0,i=e.length;r<i;r++)n=e[r],t[n.name]=n.value;return t}}},22610:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"head-script-disabled",description:"The <script> tag cannot be used in a <head> tag.",init(e,t){const n=/^(text\/javascript|application\/javascript)$/i;let r=!1;const i=i=>{const o=e.getMapAttrs(i.attrs).type,s=i.tagName.toLowerCase();"head"===s&&(r=!0),!0!==r||"script"!==s||o&&!0!==n.test(o)||t.warn("The <script> tag cannot be used in a <head> tag.",i.line,i.col,this,i.raw)},o=t=>{"head"===t.tagName.toLowerCase()&&(e.removeListener("tagstart",i),e.removeListener("tagend",o))};e.addListener("tagstart",i),e.addListener("tagend",o)}}},23495:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.capitalize=void 0;t.capitalize=e=>{const t=e.split(" ");for(var n=0;n<t.length;n++)t[n]=t[n].charAt(0).toUpperCase()+t[n].slice(1);return t.join(" ")}},23949:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tagname-specialchars",description:"All special characters must be escaped.",init(e,t){const n=/[^a-zA-Z0-9\-:_]/;e.addListener("tagstart,tagend",e=>{const r=e.tagName;n.test(r)&&t.error(`The html element name of [ ${r} ] contains special character.`,e.line,e.col,this,e.raw)})}}},26079:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-duplication",description:"Elements cannot have duplicate attributes.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r,i;const o=e.col+e.tagName.length+1,s={};for(let a=0,l=n.length;a<l;a++)r=n[a],i=r.name,!0===s[i]&&t.error(`Duplicate of attribute name [ ${r.name} ] was found.`,e.line,o+r.index,this,r.raw),s[i]=!0})}}},26691:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-style-disabled",description:"Inline style cannot be used.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;for(let o=0,s=n.length;o<s;o++)r=n[o],"style"===r.name.toLowerCase()&&t.warn(`Inline style [ ${r.raw} ] cannot be used.`,e.line,i+r.index,this,r.raw)})}}},27484:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"link-rel-canonical-require",description:'<link rel="canonical"> with non-blank href must be present in <head> tag.',init(e,t){let n=!1,r=!1,i="",o=null;e.addListener("tagstart",t=>{const s=t.tagName.toLowerCase();if("head"===s)n=!0,o=t;else if("link"===s){const n=e.getMapAttrs(t.attrs);n.rel&&"canonical"===n.rel.toLowerCase()&&(r=!0,i=n.href||"")}}),e.addListener("end",()=>{n&&o&&(r?""===i.trim()&&t.error('<link rel="canonical"> href attribute must not be empty.',o.line,o.col,this,o.raw):t.error('<link rel="canonical"> must be present in <head> tag.',o.line,o.col,this,o.raw))})}}},28075:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-unsafe-chars",description:"Attribute values cannot contain unsafe chars.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1,o=/[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;let s;for(let a=0,l=n.length;a<l;a++)if(r=n[a],s=o.exec(r.value),null!==s){const n=escape(s[0]).replace(/%u/,"\\u").replace(/%/,"\\x");t.warn(`The value of attribute [ ${r.name} ] cannot contain an unsafe char [ ${n} ].`,e.line,i+r.index,this,r.raw)}})}}},28953:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"inline-script-disabled",description:"Inline script cannot be used.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;let o;const s=/^on(unload|message|submit|select|scroll|resize|mouseover|mouseout|mousemove|mouseleave|mouseenter|mousedown|load|keyup|keypress|keydown|focus|dblclick|click|change|blur|error)$/i;for(let a=0,l=n.length;a<l;a++)r=n[a],o=r.name.toLowerCase(),!0===s.test(o)?t.warn(`Inline script [ ${r.raw} ] cannot be used.`,e.line,i+r.index,this,r.raw):"src"!==o&&"href"!==o||/^\s*javascript:/i.test(r.value)&&t.warn(`Inline script [ ${r.raw} ] cannot be used.`,e.line,i+r.index,this,r.raw)})}}},28970:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.default=class{constructor(e,t){this.html=e,this.lines=e.split(/\r?\n/);const n=/\r?\n/.exec(e);this.brLen=null!==n?n[0].length:0,this.ruleset=t,this.messages=[]}info(e,t,n,r,i){this.report("info",e,t,n,r,i)}warn(e,t,n,r,i){this.report("warning",e,t,n,r,i)}error(e,t,n,r,i){this.report("error",e,t,n,r,i)}report(e,t,n,r,i,o){const s=this.lines,a=this.brLen;let l="",c=0;for(let u=n-1,d=s.length;u<d&&(l=s[u],c=l.length,r>c&&n<d);u++)n++,1!==(r-=c)&&(r-=a);this.messages.push({type:e,message:t,raw:o,evidence:l,line:n,col:r,rule:{id:i.id,description:i.description,link:`https://htmlhint.com/rules/${i.id}`}})}}},30058:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-class-ad-disabled",description:"The id and class attributes cannot use the ad keyword, it will be blocked by adblock software.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r,i;const o=e.col+e.tagName.length+1;for(let s=0,a=n.length;s<a;s++)r=n[s],i=r.name,/^(id|class)$/i.test(i)&&/(^|[-_])ad([-_]|$)/i.test(r.value)&&t.warn(`The value of attribute ${i} cannot use the ad keyword.`,e.line,o+r.index,this,r.raw)})}}},33091:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"style-disabled",description:"<style> tags cannot be used.",init(e,t){e.addListener("tagstart",e=>{"style"===e.tagName.toLowerCase()&&t.warn("The <style> tag cannot be used.",e.line,e.col,this,e.raw)})}}},33510:(e,t,n)=>{t.Ay=void 0;var r=n(94266);var i=n(59168);Object.defineProperty(t,"Ay",{enumerable:!0,get:function(){return i.HTMLMonacoLinter}})},36116:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPath","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","onBlur","onChange","onClick","onFocus","onKeyUp","onLoad","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"];function r(e,t){if(t instanceof RegExp)return!!t.test(e)&&{match:e,pattern:t};const n=t[0],r=t[t.length-1],i=t[t.length-2],o="/"===n&&("/"===r||"/"===i&&"i"===r);if(o){return o&&"i"===r?new RegExp(t.slice(1,-2),"i").test(e):new RegExp(t.slice(1,-1)).test(e)}return e===t}t.default={id:"attr-lowercase",description:"All attribute names must be in lowercase.",init(e,t,i){const o=(Array.isArray(i)?i:[]).concat(n);e.addListener("tagstart",e=>{const n=e.attrs;let i;const s=e.col+e.tagName.length+1;for(let a=0,l=n.length;a<l;a++){i=n[a];const l=i.name;o.find(e=>r(l,e))||l===l.toLowerCase()||t.error(`The attribute name of [ ${l} ] must be in lowercase.`,e.line,s+i.index,this,i.raw)}})}}},36391:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.titleRequire=t.tagSelfClose=t.tagsCheck=t.tagPair=t.tagnameSpecialChars=t.tagnameLowercase=t.tagNoObsolete=t.styleDisabled=t.srcNotEmpty=t.specCharEscape=t.spaceTabMixedDisabled=t.scriptDisabled=t.metaViewportRequire=t.metaDescriptionRequire=t.metaCharsetRequire=t.mainRequire=t.linkRelCanonicalRequire=t.inputRequiresLabel=t.inlineStyleDisabled=t.inlineScriptDisabled=t.idUnique=t.idClassValue=t.idClassAdDisabled=t.htmlLangRequire=t.hrefAbsOrRel=t.headScriptDisabled=t.h1Require=t.frameTitleRequire=t.formMethodRequire=t.emptyTagNotSelfClosed=t.doctypeHTML5=t.doctypeFirst=t.buttonTypeRequire=t.attrWhitespace=t.attrValueSingleQuotes=t.attrValueNotEmpty=t.attrValueDoubleQuotes=t.attrUnsafeChars=t.attrSort=t.attrValueNoDuplication=t.attrNoUnnecessaryWhitespace=t.attrNoDuplication=t.attrLowercase=t.altRequire=void 0;var r=n(38530);Object.defineProperty(t,"altRequire",{enumerable:!0,get:function(){return r.default}});var i=n(36116);Object.defineProperty(t,"attrLowercase",{enumerable:!0,get:function(){return i.default}});var o=n(26079);Object.defineProperty(t,"attrNoDuplication",{enumerable:!0,get:function(){return o.default}});var s=n(43903);Object.defineProperty(t,"attrNoUnnecessaryWhitespace",{enumerable:!0,get:function(){return s.default}});var a=n(48527);Object.defineProperty(t,"attrValueNoDuplication",{enumerable:!0,get:function(){return a.default}});var l=n(88020);Object.defineProperty(t,"attrSort",{enumerable:!0,get:function(){return l.default}});var c=n(28075);Object.defineProperty(t,"attrUnsafeChars",{enumerable:!0,get:function(){return c.default}});var u=n(78028);Object.defineProperty(t,"attrValueDoubleQuotes",{enumerable:!0,get:function(){return u.default}});var d=n(61452);Object.defineProperty(t,"attrValueNotEmpty",{enumerable:!0,get:function(){return d.default}});var h=n(76735);Object.defineProperty(t,"attrValueSingleQuotes",{enumerable:!0,get:function(){return h.default}});var f=n(8028);Object.defineProperty(t,"attrWhitespace",{enumerable:!0,get:function(){return f.default}});var p=n(66746);Object.defineProperty(t,"buttonTypeRequire",{enumerable:!0,get:function(){return p.default}});var g=n(61730);Object.defineProperty(t,"doctypeFirst",{enumerable:!0,get:function(){return g.default}});var m=n(58212);Object.defineProperty(t,"doctypeHTML5",{enumerable:!0,get:function(){return m.default}});var b=n(81544);Object.defineProperty(t,"emptyTagNotSelfClosed",{enumerable:!0,get:function(){return b.default}});var y=n(13285);Object.defineProperty(t,"formMethodRequire",{enumerable:!0,get:function(){return y.default}});var w=n(41299);Object.defineProperty(t,"frameTitleRequire",{enumerable:!0,get:function(){return w.default}});var v=n(88578);Object.defineProperty(t,"h1Require",{enumerable:!0,get:function(){return v.default}});var k=n(22610);Object.defineProperty(t,"headScriptDisabled",{enumerable:!0,get:function(){return k.default}});var x=n(43035);Object.defineProperty(t,"hrefAbsOrRel",{enumerable:!0,get:function(){return x.default}});var _=n(45141);Object.defineProperty(t,"htmlLangRequire",{enumerable:!0,get:function(){return _.default}});var C=n(30058);Object.defineProperty(t,"idClassAdDisabled",{enumerable:!0,get:function(){return C.default}});var E=n(11247);Object.defineProperty(t,"idClassValue",{enumerable:!0,get:function(){return E.default}});var S=n(59e3);Object.defineProperty(t,"idUnique",{enumerable:!0,get:function(){return S.default}});var O=n(28953);Object.defineProperty(t,"inlineScriptDisabled",{enumerable:!0,get:function(){return O.default}});var L=n(26691);Object.defineProperty(t,"inlineStyleDisabled",{enumerable:!0,get:function(){return L.default}});var A=n(66583);Object.defineProperty(t,"inputRequiresLabel",{enumerable:!0,get:function(){return A.default}});var $=n(27484);Object.defineProperty(t,"linkRelCanonicalRequire",{enumerable:!0,get:function(){return $.default}});var M=n(84744);Object.defineProperty(t,"mainRequire",{enumerable:!0,get:function(){return M.default}});var j=n(46557);Object.defineProperty(t,"metaCharsetRequire",{enumerable:!0,get:function(){return j.default}});var D=n(94999);Object.defineProperty(t,"metaDescriptionRequire",{enumerable:!0,get:function(){return D.default}});var N=n(6239);Object.defineProperty(t,"metaViewportRequire",{enumerable:!0,get:function(){return N.default}});var T=n(39353);Object.defineProperty(t,"scriptDisabled",{enumerable:!0,get:function(){return T.default}});var P=n(7686);Object.defineProperty(t,"spaceTabMixedDisabled",{enumerable:!0,get:function(){return P.default}});var z=n(60761);Object.defineProperty(t,"specCharEscape",{enumerable:!0,get:function(){return z.default}});var R=n(62433);Object.defineProperty(t,"srcNotEmpty",{enumerable:!0,get:function(){return R.default}});var I=n(33091);Object.defineProperty(t,"styleDisabled",{enumerable:!0,get:function(){return I.default}});var q=n(78815);Object.defineProperty(t,"tagNoObsolete",{enumerable:!0,get:function(){return q.default}});var U=n(14148);Object.defineProperty(t,"tagnameLowercase",{enumerable:!0,get:function(){return U.default}});var F=n(23949);Object.defineProperty(t,"tagnameSpecialChars",{enumerable:!0,get:function(){return F.default}});var V=n(79960);Object.defineProperty(t,"tagPair",{enumerable:!0,get:function(){return V.default}});var W=n(73343);Object.defineProperty(t,"tagsCheck",{enumerable:!0,get:function(){return W.default}});var B=n(38659);Object.defineProperty(t,"tagSelfClose",{enumerable:!0,get:function(){return B.default}});var H=n(52979);Object.defineProperty(t,"titleRequire",{enumerable:!0,get:function(){return H.default}})},38530:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"alt-require",description:"The alt attribute of an <img> element must be present and alt attribute of area[href] and input[type=image] must have a value.",init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase(),i=e.getMapAttrs(n.attrs),o=n.col+r.length+1;let s;"img"!==r||"alt"in i?("area"===r&&"href"in i||"input"===r&&"image"===i.type)&&("alt"in i&&""!==i.alt||(s="area"===r?"area[href]":"input[type=image]",t.warn(`The alt attribute of ${s} must have a value.`,n.line,o,this,n.raw))):t.warn("An alt attribute must be present on <img> elements.",n.line,o,this,n.raw)})}}},38659:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-self-close",description:"Empty tags must be self closed.",init(e,t){const n=e.makeMap("area,base,basefont,bgsound,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",e=>{const r=e.tagName.toLowerCase();void 0!==n[r]&&(e.close||t.warn(`The empty tag : [ ${r} ] must be self closed.`,e.line,e.col,this,e.raw))})}}},39353:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"script-disabled",description:"The <script> tag cannot be used.",init(e,t){e.addListener("tagstart",e=>{"script"===e.tagName.toLowerCase()&&t.error("The <script> tag cannot be used.",e.line,e.col,this,e.raw)})}}},41299:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"frame-title-require",description:"A <frame> or <iframe> element must have an accessible name.",init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase(),i=e.getMapAttrs(n.attrs),o=n.col+r.length+1;if("frame"===r||"iframe"===r){const e=i.role;if("presentation"===e||"none"===e)return;const s="aria-label"in i&&""!==i["aria-label"].trim(),a="aria-labelledby"in i&&""!==i["aria-labelledby"].trim(),l="title"in i&&""!==i.title.trim();s||a||l||t.warn(`A <${r}> element must have an accessible name.`,n.line,o,this,n.raw)}})}}},43035:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"href-abs-or-rel",description:"An href attribute must be either absolute or relative.",init(e,t,n){const r="abs"===n?"absolute":"relative";e.addListener("tagstart",e=>{const n=e.attrs;let i;const o=e.col+e.tagName.length+1;for(let s=0,a=n.length;s<a;s++)if(i=n[s],"href"===i.name){("absolute"===r&&!1===/^\w+?:/.test(i.value)||"relative"===r&&!0===/^https?:\/\//.test(i.value))&&t.warn(`The value of the href attribute [ ${i.value} ] must be ${r}.`,e.line,o+i.index,this,i.raw);break}})}}},43903:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-no-unnecessary-whitespace",description:"No spaces between attribute names and values.",init(e,t,n){const r=Array.isArray(n)?n:[];e.addListener("tagstart",e=>{const n=e.attrs,i=e.col+e.tagName.length+1;for(let o=0;o<n.length;o++)if(-1===r.indexOf(n[o].name)){const r=/(\s*)=(\s*)/.exec(n[o].raw.trim());!r||0===r[1].length&&0===r[2].length||t.error(`The attribute '${n[o].name}' must not have spaces between the name and value.`,e.line,i+n[o].index,this,n[o].raw)}})}}},45141:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});t.default={id:"html-lang-require",description:"The lang attribute of an <html> element must be present and should be valid.",init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase(),i=e.getMapAttrs(n.attrs),o=n.col+r.length+1,s=new RegExp("((?<grandfathered>(en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang))|((?<language>([A-Za-z]{2,3}(-(?<extlang>[A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-(?<script>[A-Za-z]{4}))?(-(?<region>[A-Za-z]{2}|[0-9]{3}))?(-(?<variant>[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-(?<extension>[0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(?<privateUse>x(-[A-Za-z0-9]{1,8})+))?)|(?<privateUse2>x(-[A-Za-z0-9]{1,8})+))","g");"html"===r&&("lang"in i?i.lang?s.test(i.lang)||t.warn("The lang attribute value of <html> element must be a valid BCP47.",n.line,o,this,n.raw):t.warn("The lang attribute of <html> element must have a value.",n.line,o,this,n.raw):t.warn("An lang attribute must be present on <html> elements.",n.line,o,this,n.raw))})}}},46557:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"meta-charset-require",description:'<meta charset=""> must be present in <head> tag.',init(e,t){let n=!1,r=!1,i="",o=null;e.addListener("tagstart",t=>{const s=t.tagName.toLowerCase();if("head"===s)n=!0,o=t;else if("meta"===s){const n=e.getMapAttrs(t.attrs);void 0!==n.charset&&(r=!0,i=n.charset||"")}}),e.addListener("end",()=>{n&&o&&(r?""===i.trim()&&t.error('<meta charset=""> value must not be empty.',o.line,o.col,this,o.raw):t.error('<meta charset=""> must be present in <head> tag.',o.line,o.col,this,o.raw))})}}},47824:(e,t,n)=>{n.r(t),n.d(t,{default:()=>gd});var r=n(98173);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){l(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}function h(e){return{}.toString.call(e).includes("Object")}function f(e){return"function"===typeof e}var p=d(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),g={changes:function(e,t){return h(t)||p("changeType"),Object.keys(t).some(function(t){return!function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)})&&p("changeField"),t},selector:function(e){f(e)||p("selectorType")},handler:function(e){f(e)||h(e)||p("handlerType"),h(e)&&Object.values(e).some(function(e){return!f(e)})&&p("handlersType")},initial:function(e){var t;e||p("initialIsRequired"),h(e)||p("initialType"),t=e,Object.keys(t).length||p("initialContent")}};function m(e,t){return f(t)?t(e.current):t}function b(e,t){return e.current=u(u({},e.current),t),t}function y(e,t,n){return f(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e.current[n])}),n}const w={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g.initial(e),g.handler(t);var n={current:e},r=d(y)(n,t),i=d(b)(n),o=d(g.changes)(e),s=d(m)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return g.selector(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(r,i,o,s)(e)}]}};var v,k=(v=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.length>=v.length?v.apply(this,r):function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return e.apply(t,[].concat(r,i))}})({configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "}),x={config:function(e){var t;return e||k("configIsRequired"),t=e,{}.toString.call(t).includes("Object")||k("configType"),e.urls?{paths:{vs:e.urls.monacoBase}}:e}};function _(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],_(e[n],t[n]))}),a(a({},e),t)}var C={type:"cancelation",msg:"operation is manually canceled"};function E(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(C):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var S,O,L=["monaco"],A=w.create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),$=(O=2,function(e){if(Array.isArray(e))return e}(S=A)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(S,O)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(S,O)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),M=$[0],j=$[1];function D(e){return document.body.appendChild(e)}function N(e){var t=M(function(e){return{config:e.config,reject:e.reject}}),n=function(e){var t=document.createElement("script");return e&&(t.src=e),t}("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function T(){var e=M(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var n=t.m;P(n),e.resolve(n)},function(t){e.reject(t)})}function P(e){M().monaco||j({monaco:e})}var z=new Promise(function(e,t){return j({resolve:e,reject:t})}),R={config:function(e){var t=x.config(e),n=t.monaco,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,L);j(function(e){return{config:_(e.config,r),monaco:n}})},init:function(){var e=M(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(j({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),E(z);if(window.monaco&&window.monaco.editor)return P(window.monaco),e.resolve(window.monaco),E(z);!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(D,N)(T)}return E(z)},__getMonacoInstance:function(){return M(function(e){return e.monaco})}},I={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},q={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}};var U=function({children:e}){return r.createElement("div",{style:q.container},e)},F=U;var V=function({width:e,height:t,isEditorReady:n,loading:i,_ref:o,className:s,wrapperProps:a}){return r.createElement("section",{style:{...I.wrapper,width:e,height:t},...a},!n&&r.createElement(F,null,i),r.createElement("div",{ref:o,style:{...I.fullWidth,...!n&&I.hide},className:s}))},W=(0,r.memo)(V);var B=function(e){(0,r.useEffect)(e,[])};var H=function(e,t,n=!0){let i=(0,r.useRef)(!0);(0,r.useEffect)(i.current||!n?()=>{i.current=!1}:e,t)};function Z(){}function J(e,t,n,r){return function(e,t){return e.editor.getModel(X(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?X(e,r):void 0)}(e,t,n,r)}function X(e,t){return e.Uri.parse(t)}var Y=function({original:e,modified:t,language:n,originalLanguage:i,modifiedLanguage:o,originalModelPath:s,modifiedModelPath:a,keepCurrentOriginalModel:l=!1,keepCurrentModifiedModel:c=!1,theme:u="light",loading:d="Loading...",options:h={},height:f="100%",width:p="100%",className:g,wrapperProps:m={},beforeMount:b=Z,onMount:y=Z}){let[w,v]=(0,r.useState)(!1),[k,x]=(0,r.useState)(!0),_=(0,r.useRef)(null),C=(0,r.useRef)(null),E=(0,r.useRef)(null),S=(0,r.useRef)(y),O=(0,r.useRef)(b),L=(0,r.useRef)(!1);B(()=>{let e=R.init();return e.then(e=>(C.current=e)&&x(!1)).catch(e=>"cancelation"!==e?.type&&void 0),()=>_.current?function(){let e=_.current?.getModel();l||e?.original?.dispose(),c||e?.modified?.dispose(),_.current?.dispose()}():e.cancel()}),H(()=>{if(_.current&&C.current){let t=_.current.getOriginalEditor(),r=J(C.current,e||"",i||n||"text",s||"");r!==t.getModel()&&t.setModel(r)}},[s],w),H(()=>{if(_.current&&C.current){let e=_.current.getModifiedEditor(),r=J(C.current,t||"",o||n||"text",a||"");r!==e.getModel()&&e.setModel(r)}},[a],w),H(()=>{let e=_.current.getModifiedEditor();e.getOption(C.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],w),H(()=>{_.current?.getModel()?.original.setValue(e||"")},[e],w),H(()=>{let{original:e,modified:t}=_.current.getModel();C.current.editor.setModelLanguage(e,i||n||"text"),C.current.editor.setModelLanguage(t,o||n||"text")},[n,i,o],w),H(()=>{C.current?.editor.setTheme(u)},[u],w),H(()=>{_.current?.updateOptions(h)},[h],w);let A=(0,r.useCallback)(()=>{if(!C.current)return;O.current(C.current);let r=J(C.current,e||"",i||n||"text",s||""),l=J(C.current,t||"",o||n||"text",a||"");_.current?.setModel({original:r,modified:l})},[n,t,o,e,i,s,a]),$=(0,r.useCallback)(()=>{!L.current&&E.current&&(_.current=C.current.editor.createDiffEditor(E.current,{automaticLayout:!0,...h}),A(),C.current?.editor.setTheme(u),v(!0),L.current=!0)},[h,u,A]);return(0,r.useEffect)(()=>{w&&S.current(_.current,C.current)},[w]),(0,r.useEffect)(()=>{!k&&!w&&$()},[k,w,$]),r.createElement(W,{width:p,height:f,isEditorReady:w,loading:d,_ref:E,className:g,wrapperProps:m})};(0,r.memo)(Y);var K=function(e){let t=(0,r.useRef)();return(0,r.useEffect)(()=>{t.current=e},[e]),t.current},G=new Map;var Q=function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:i,language:o,path:s,theme:a="light",line:l,loading:c="Loading...",options:u={},overrideServices:d={},saveViewState:h=!0,keepCurrentModel:f=!1,width:p="100%",height:g="100%",className:m,wrapperProps:b={},beforeMount:y=Z,onMount:w=Z,onChange:v,onValidate:k=Z}){let[x,_]=(0,r.useState)(!1),[C,E]=(0,r.useState)(!0),S=(0,r.useRef)(null),O=(0,r.useRef)(null),L=(0,r.useRef)(null),A=(0,r.useRef)(w),$=(0,r.useRef)(y),M=(0,r.useRef)(),j=(0,r.useRef)(i),D=K(s),N=(0,r.useRef)(!1),T=(0,r.useRef)(!1);B(()=>{let e=R.init();return e.then(e=>(S.current=e)&&E(!1)).catch(e=>"cancelation"!==e?.type&&void 0),()=>O.current?(M.current?.dispose(),f?h&&G.set(s,O.current.saveViewState()):O.current.getModel()?.dispose(),void O.current.dispose()):e.cancel()}),H(()=>{let r=J(S.current,e||i||"",t||o||"",s||n||"");r!==O.current?.getModel()&&(h&&G.set(D,O.current?.saveViewState()),O.current?.setModel(r),h&&O.current?.restoreViewState(G.get(s)))},[s],x),H(()=>{O.current?.updateOptions(u)},[u],x),H(()=>{!O.current||void 0===i||(O.current.getOption(S.current.editor.EditorOption.readOnly)?O.current.setValue(i):i!==O.current.getValue()&&(T.current=!0,O.current.executeEdits("",[{range:O.current.getModel().getFullModelRange(),text:i,forceMoveMarkers:!0}]),O.current.pushUndoStop(),T.current=!1))},[i],x),H(()=>{let e=O.current?.getModel();e&&o&&S.current?.editor.setModelLanguage(e,o)},[o],x),H(()=>{void 0!==l&&O.current?.revealLine(l)},[l],x),H(()=>{S.current?.editor.setTheme(a)},[a],x);let P=(0,r.useCallback)(()=>{if(L.current&&S.current&&!N.current){$.current(S.current);let r=s||n,c=J(S.current,i||e||"",t||o||"",r||"");O.current=S.current?.editor.create(L.current,{model:c,automaticLayout:!0,...u},d),h&&O.current.restoreViewState(G.get(r)),S.current.editor.setTheme(a),void 0!==l&&O.current.revealLine(l),_(!0),N.current=!0}},[e,t,n,i,o,s,u,d,h,a,l]);return(0,r.useEffect)(()=>{x&&A.current(O.current,S.current)},[x]),(0,r.useEffect)(()=>{!C&&!x&&P()},[C,x,P]),j.current=i,(0,r.useEffect)(()=>{x&&v&&(M.current?.dispose(),M.current=O.current?.onDidChangeModelContent(e=>{T.current||v(O.current.getValue(),e)}))},[x,v]),(0,r.useEffect)(()=>{if(x){let e=S.current.editor.onDidChangeMarkers(e=>{let t=O.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=S.current.editor.getModelMarkers({resource:t});k?.(e)}});return()=>{e?.dispose()}}return()=>{}},[x,k]),r.createElement(W,{width:p,height:g,isEditorReady:x,loading:c,_ref:L,className:m,wrapperProps:b})},ee=(0,r.memo)(Q),te=n(2604),ne=n(33510),re=n(52919),ie=n(89114),oe=n(64796);const se=100;class ae extends ie.m{constructor(e,t,n,r){super(e,t,n,r),this._onScrollDisposable=null,this._editor=e}updateColorDecorators(e){if(this._onScrollDisposable&&(this._onScrollDisposable.dispose(),this._onScrollDisposable=null),e.length>=500){const t=this._editor;let[n,r]=[Number.MAX_VALUE,Number.MIN_VALUE];const i=()=>{const i=t.getVisibleRanges(),[o,s]=i.reduce((e,{startLineNumber:t,endLineNumber:n})=>[Math.min(t,e[0]),Math.max(n,e[1])],[Number.MAX_VALUE,Number.MIN_VALUE]);if(n-o>se||s-r>se){let t=e.filter(({colorInfo:e})=>{const{startLineNumber:t,endLineNumber:n}=e.range;return o-t<se&&n-s<se});super.updateColorDecorators(t)}};this._onScrollDisposable=t.onDidScrollChange(i),i()}else super.updateColorDecorators(e)}dispose(){var e;null===(e=this._onScrollDisposable)||void 0===e||e.dispose(),super.dispose()}}var le=n(47014),ce=n(1047),ue=n(22536),de=n(38540),he=n(62093),fe=n(29022),pe=n(32947);function ge(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function me(e){return e>47&&e<58}function be(e,t,n){return n=n||90,(e&=-33)>=(t=t||65)&&e<=n}function ye(e){return me(e)||we(e)}function we(e){return 95===e||be(e)}function ve(e){return function(e){return 32===e||9===e||160===e}(e)||10===e||13===e}function ke(e){return 39===e||34===e}class xe{constructor(e,t,n){null==n&&"string"===typeof e&&(n=e.length),this.string=e,this.pos=this.start=t||0,this.end=n||0}eof(){return this.pos>=this.end}limit(e,t){return new xe(this.string,e,t)}peek(){return this.string.charCodeAt(this.pos)}next(){if(this.pos<this.string.length)return this.string.charCodeAt(this.pos++)}eat(e){const t=this.peek(),n="function"===typeof e?e(t):t===e;return n&&this.next(),n}eatWhile(e){const t=this.pos;for(;!this.eof()&&this.eat(e););return this.pos!==t}backUp(e){this.pos-=e||1}current(){return this.substring(this.start,this.pos)}substring(e,t){return this.string.slice(e,t)}error(e,t=this.pos){return new _e(`${e} at ${t+1}`,t,this.string)}}class _e extends Error{constructor(e,t,n){super(e),this.pos=t,this.string=n}}function Ce(e){return e.tokens[e.pos]}function Ee(e){return e.tokens[e.pos++]}function Se(e,t=e.start,n=e.pos){return e.tokens.slice(t,n)}function Oe(e){return e.pos<e.size}function Le(e,t){const n=Ce(e);return!(!n||!t(n))&&(e.pos++,!0)}function Ae(e,t,n=Ce(e)){n&&null!=n.start&&(t+=` at ${n.start}`);const r=new Error(t);return r.pos=n&&n.start,r}function $e(e,t){const n={type:"TokenGroup",elements:[]};let r,i=n;const o=[];for(;Oe(e)&&(r=je(e,t)||Me(e,t));)if(i.elements.push(r),Le(e,et))o.push(i),i=r;else{if(Le(e,tt))continue;if(Le(e,nt))do{o.length&&(i=o.pop())}while(Le(e,nt))}return n}function Me(e,t){if(Le(e,Ge)){const n=$e(e,t);return qe(Ee(e),"group",!1)&&(n.repeat=function(e){return Be(Ce(e))?e.tokens[e.pos++]:void 0}(e)),n}}function je(e,t){let n;const r={type:"TokenElement",name:void 0,attributes:void 0,value:void 0,repeat:void 0,selfClose:!1,elements:[]};for(function(e,t){const n=e.pos;if(t.jsx&&Le(e,He))for(;Oe(e);){const{pos:t}=e;if(!Le(e,Je)||!Le(e,He)){e.pos=t;break}}for(;Oe(e)&&Le(e,Ze););if(e.pos!==n)return e.start=n,!0;return!1}(e,t)&&(r.name=Se(e));Oe(e);)if(e.start=e.pos,r.repeat||Qe(r)||!Le(e,Be))if(!r.value&&Re(e))r.value=Ie(e);else{if(!(n=Ne(e,"id",t)||Ne(e,"class",t)||De(e))){!Qe(r)&&Le(e,rt)&&(r.selfClose=!0,!r.repeat&&Le(e,Be)&&(r.repeat=e.tokens[e.pos-1]));break}r.attributes?r.attributes=r.attributes.concat(n):r.attributes=Array.isArray(n)?n.slice():[n]}else r.repeat=e.tokens[e.pos-1];return Qe(r)?void 0:r}function De(e){if(Le(e,Xe)){const t=[];let n;for(;Oe(e);)if(n=Te(e))t.push(n);else{if(Le(e,Ye))break;if(!Le(e,Ve))throw Ae(e,`Unexpected "${Ce(e).type}" token`)}return t}}function Ne(e,t,n){if(Ue(Ce(e),t)){e.pos++;const i={name:[(r=t,{type:"Literal",value:r})]};return n.jsx&&Re(e)?(i.value=Ie(e),i.expression=!0):i.value=ze(e)?Se(e):void 0,i}var r}function Te(e){return Pe(e)?{value:Se(e)}:ze(e,!0)?{name:Se(e),value:Le(e,We)&&(Pe(e)||ze(e,!0))?Se(e):void 0}:void 0}function Pe(e){const t=e.pos,n=Ce(e);if(Fe(n)){for(e.pos++;Oe(e);)if(Fe(Ee(e),n.single))return e.start=t,!0;throw Ae(e,"Unclosed quote",n)}return!1}function ze(e,t){const n=e.pos,r={attribute:0,expression:0,group:0};for(;Oe(e);){const n=Ce(e);if(r.expression)qe(n,"expression")&&(r[n.context]+=n.open?1:-1);else{if(Fe(n)||Ue(n)||Ve(n)||Be(n))break;if(qe(n)){if(!t)break;if(n.open)r[n.context]++;else{if(!r[n.context])break;r[n.context]--}}}e.pos++}return n!==e.pos&&(e.start=n,!0)}function Re(e){const t=e.pos;if(Le(e,Ke)){let n=0;for(;Oe(e);){const t=Ee(e);if(qe(t,"expression"))if(t.open)n++;else{if(!n)break;n--}}return e.start=t,!0}return!1}function Ie(e){let t=e.start,n=e.pos;return qe(e.tokens[t],"expression",!0)&&t++,qe(e.tokens[n-1],"expression",!1)&&n--,Se(e,t,n)}function qe(e,t,n){return Boolean(e&&"Bracket"===e.type&&(!t||e.context===t)&&(null==n||e.open===n))}function Ue(e,t){return Boolean(e&&"Operator"===e.type&&(!t||e.operator===t))}function Fe(e,t){return Boolean(e&&"Quote"===e.type&&(null==t||e.single===t))}function Ve(e){return Boolean(e&&"WhiteSpace"===e.type)}function We(e){return Ue(e,"equal")}function Be(e){return Boolean(e&&"Repeater"===e.type)}function He(e){if(function(e){return"Literal"===e.type}(e)){const t=e.value.charCodeAt(0);return t>=65&&t<=90}return!1}function Ze(e){return"Literal"===e.type||"RepeaterNumber"===e.type||"RepeaterPlaceholder"===e.type}function Je(e){return Ue(e,"class")}function Xe(e){return qe(e,"attribute",!0)}function Ye(e){return qe(e,"attribute",!1)}function Ke(e){return qe(e,"expression",!0)}function Ge(e){return qe(e,"group",!0)}function Qe(e){return!e.name&&!e.value&&!e.attributes}function et(e){return Ue(e,"child")}function tt(e){return Ue(e,"sibling")}function nt(e){return Ue(e,"climb")}function rt(e){return Ue(e,"close")}function it(e){return!!e.eat(92)&&(e.start=e.pos,e.eof()||e.pos++,!0)}function ot(e,t){return function(e,t){const n=e.pos;if((t.expression||t.attribute)&&e.eat(36)&&e.eat(123)){let t;e.start=e.pos;let r="";if(e.eatWhile(me)?(t=Number(e.current()),r=e.eat(58)?st(e):""):be(e.peek())&&(r=st(e)),e.eat(125))return{type:"Field",index:t,name:r,start:n,end:e.pos};throw e.error("Expecting }")}e.pos=n}(e,t)||function(e){const t=e.pos;if(e.eat(36)&&e.eat(35))return{type:"RepeaterPlaceholder",value:void 0,start:t,end:e.pos};e.pos=t}(e)||function(e){const t=e.pos;if(e.eatWhile(36)){const n=e.pos-t;let r=!1,i=1,o=0;if(e.eat(64)){for(;e.eat(94);)o++;r=e.eat(45),e.start=e.pos,e.eatWhile(me)&&(i=Number(e.current()))}return e.start=t,{type:"RepeaterNumber",size:n,reverse:r,base:i,parent:o,start:t,end:e.pos}}}(e)||function(e){const t=e.pos;if(e.eat(42)){e.start=e.pos;let n=1,r=!1;return e.eatWhile(me)?n=Number(e.current()):r=!0,{type:"Repeater",count:n,value:0,implicit:r,start:t,end:e.pos}}}(e)||function(e){const t=e.pos;if(e.eatWhile(ve))return{type:"WhiteSpace",start:t,end:e.pos,value:e.substring(t,e.pos)}}(e)||function(e,t){const n=e.pos;let r="";for(;!e.eof();){if(it(e)){r+=e.current();continue}const n=e.peek();if(n===t.quote||36===n||at(n,t))break;if(t.expression&&125===n)break;if(!t.quote&&!t.expression){if(!t.attribute&&!ft(n))break;if(lt(n,t)||ct(n,t)||ke(n)||ut(n))break}r+=e.string[e.pos++]}if(n!==e.pos)return e.start=n,{type:"Literal",value:r,start:n,end:e.pos}}(e,t)||function(e){const t=dt(e.peek());if(t)return{type:"Operator",operator:t,start:e.pos++,end:e.pos}}(e)||function(e){const t=e.peek();if(ke(t))return{type:"Quote",single:39===t,start:e.pos++,end:e.pos}}(e)||function(e){const t=e.peek(),n=ut(t);if(n)return{type:"Bracket",open:ht(t),context:n,start:e.pos++,end:e.pos}}(e)}function st(e){const t=[];for(e.start=e.pos;!e.eof();)if(e.eat(123))t.push(e.pos);else if(e.eat(125)){if(!t.length){e.pos--;break}t.pop()}else e.pos++;if(t.length)throw e.pos=t.pop(),e.error("Expecting }");return e.current()}function at(e,t){const n=dt(e);return!(!n||t.quote||t.expression)&&(!t.attribute||"equal"===n)}function lt(e,t){return ve(e)&&!t.expression}function ct(e,t){return 42===e&&!t.attribute&&!t.expression}function ut(e){return 40===e||41===e?"group":91===e||93===e?"attribute":123===e||125===e?"expression":void 0}function dt(e){return(62===e?"child":43===e&&"sibling")||94===e&&"climb"||46===e&&"class"||35===e&&"id"||47===e&&"close"||61===e&&"equal"||void 0}function ht(e){return 123===e||91===e||40===e}function ft(e){return ye(e)||45===e||58===e||33===e}const pt={child:">",class:".",climb:"^",id:"#",equal:"=",close:"/",sibling:"+"},gt={Literal:e=>e.value,Quote:e=>e.single?"'":'"',Bracket:e=>"attribute"===e.context?e.open?"[":"]":"expression"===e.context?e.open?"{":"}":e.open?"(":"}",Operator:e=>pt[e.operator],Field:(e,t)=>null!=e.index?e.name?`\${${e.index}:${e.name}}`:`\${${e.index}`:e.name?t.getVariable(e.name):"",RepeaterPlaceholder(e,t){let n;for(let r=t.repeaters.length-1;r>=0;r--)if(t.repeaters[r].implicit){n=t.repeaters[r];break}return t.inserted=!0,t.getText(n&&n.value)},RepeaterNumber(e,t){let n=1;const r=t.repeaters.length-1,i=t.repeaters[r];if(i&&(n=e.reverse?e.base+i.count-i.value-1:e.base+i.value,e.parent)){const o=Math.max(0,r-e.parent);if(o!==r){const e=t.repeaters[o];n+=i.count*e.value}}let o=String(n);for(;o.length<e.size;)o="0"+o;return o},WhiteSpace:e=>e.value};function mt(e,t){if(!gt[e.type])throw new Error(`Unknown token ${e.type}`);return gt[e.type](e,t)}const bt=/^((https?:|ftp:|file:)?\/\/|(www|ftp)\.)[^ ]*$/,yt=/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,5}$/;function wt(e,t={}){let n,r=!1;t.text&&(n=Array.isArray(t.text)?t.text.filter(e=>e.trim()):t.text);const i={type:"Abbreviation",children:xt(e,{inserted:!1,repeaters:[],text:t.text,cleanText:n,repeatGuard:t.maxRepeat||Number.POSITIVE_INFINITY,getText(e){var i;let o;if(r=!0,Array.isArray(t.text)){if(void 0!==e&&e>=0&&e<n.length)return n[e];o=void 0!==e?t.text[e]:t.text.join("\n")}else o=null!==(i=t.text)&&void 0!==i?i:"";return o},getVariable(e){const n=t.variables&&t.variables[e];return null!=n?n:e}})};if(null!=t.text&&!r){const e=At(Lt(i.children));if(e){const n=Array.isArray(t.text)?t.text.join("\n"):t.text;$t(e,n),"a"===e.name&&t.href&&function(e,t){var n;let r="";bt.test(t)?(r=t,/\w+:/.test(r)||r.startsWith("//")||(r=`http://${r}`)):yt.test(t)&&(r=`mailto:${t}`);const i=null===(n=e.attributes)||void 0===n?void 0:n.find(e=>"href"===e.name);i?i.value||(i.value=[r]):(e.attributes||(e.attributes=[]),e.attributes.push({name:"href",value:[r],valueType:"doubleQuote"}))}(e,n)}}return i}function vt(e,t){let n=[];if(e.repeat){const r=e.repeat,i=Object.assign({},r);let o;i.count=i.implicit&&Array.isArray(t.text)?t.cleanText.length:i.count||1,t.repeaters.push(i);for(let s=0;s<i.count;s++){if(i.value=s,e.repeat=i,o=St(e)?xt(e,t):kt(e,t),i.implicit&&!t.inserted){const e=Lt(o),n=e&&At(e);n&&$t(n,t.getText(i.value))}if(n=n.concat(o),--t.repeatGuard<=0)break}t.repeaters.pop(),e.repeat=r,i.implicit&&(t.inserted=!0)}else n=n.concat(St(e)?xt(e,t):kt(e,t));return n}function kt(e,t){let n=[];const r={type:"AbbreviationNode",name:e.name&&Ct(e.name,t),value:e.value&&Et(e.value,t),attributes:void 0,children:n,repeat:e.repeat&&Object.assign({},e.repeat),selfClosing:e.selfClose};let i=[r];for(const o of e.elements)n=n.concat(vt(o,t));if(e.attributes){r.attributes=[];for(const n of e.attributes)r.attributes.push(_t(n,t))}return r.name||r.attributes||!r.value||r.value.some(Ot)?r.children=n:i=i.concat(n),i}function xt(e,t){let n=[];for(const r of e.elements)n=n.concat(vt(r,t));return e.repeat&&(n=function(e,t){for(const n of e)n.repeat||(n.repeat=Object.assign({},t));return e}(n,e.repeat)),n}function _t(e,t){let n,r=!1,i=!1,o=e.expression?"expression":"raw";const s=e.name&&Ct(e.name,t);if(s&&"!"===s[0]&&(r=!0),s&&"."===s[s.length-1]&&(i=!0),e.value){const r=e.value.slice();if(Fe(r[0])){const e=r.shift();r.length&&Lt(r).type===e.type&&r.pop(),o=e.single?"singleQuote":"doubleQuote"}else qe(r[0],"expression",!0)&&(o="expression",r.shift(),qe(Lt(r),"expression",!1)&&r.pop());n=Et(r,t)}return{name:i||r?s.slice(r?1:0,i?-1:void 0):s,value:n,boolean:i,implied:r,valueType:o}}function Ct(e,t){let n="";for(let r=0;r<e.length;r++)n+=mt(e[r],t);return n}function Et(e,t){const n=[];let r="";for(let i,o=0;o<e.length;o++)i=e[o],Ot(i)?(r&&(n.push(r),r=""),n.push(i)):r+=mt(i,t);return r&&n.push(r),n}function St(e){return"TokenGroup"===e.type}function Ot(e){return"object"===typeof e&&"Field"===e.type&&null!=e.index}function Lt(e){return e[e.length-1]}function At(e){return e.children.length?At(Lt(e.children)):e}function $t(e,t){if(e.value){"string"===typeof Lt(e.value)?e.value[e.value.length-1]+=t:e.value.push(t)}else e.value=[t]}function Mt(e,t){try{return wt(function(e,t={}){const n={tokens:r=e,start:0,pos:0,size:r.length};var r;const i=$e(n,t);if(Oe(n))throw Ae(n,"Unexpected character");return i}("string"===typeof e?function(e){const t=new xe(e),n=[],r={group:0,attribute:0,expression:0,quote:0};let i,o=0;for(;!t.eof();){if(o=t.peek(),i=ot(t,r),!i)throw t.error("Unexpected character");n.push(i),"Quote"===i.type?r.quote=o===r.quote?0:o:"Bracket"===i.type&&(r[i.context]+=i.open?1:-1)}return n}(e):e,t),t)}catch(n){throw n instanceof _e&&"string"===typeof e&&(n.message+=`\n${e}\n${"-".repeat(n.pos)}^`),n}}function jt(e,t){return function(e){const t=e.pos;if(e.eat(36)&&e.eat(123)){let n;e.start=e.pos;let r="";if(e.eatWhile(me)?(n=Number(e.current()),r=e.eat(58)?Dt(e):""):be(e.peek())&&(r=Dt(e)),e.eat(125))return{type:"Field",index:n,name:r,start:t,end:e.pos};throw e.error("Expecting }")}e.pos=t}(e)||function(e){const t=e.pos;if(function(e){const t=e.pos;e.eat(45);const n=e.pos,r=e.eatWhile(me),i=e.pos;if(e.eat(46)){const t=e.eatWhile(me);r||t||(e.pos=i)}e.pos===n&&(e.pos=t);return e.pos!==t}(e)){e.start=t;const n=e.current();return e.start=e.pos,e.eat(37)||e.eatWhile(we),{type:"NumberValue",value:Number(n),rawValue:n,unit:e.current(),start:t,end:e.pos}}}(e)||function(e){const t=e.pos;if(e.eat(35)){const n=e.pos;let r="",i="";if(e.eatWhile(Rt)?(r=e.substring(n,e.pos),i=Tt(e)):e.eat(116)?(r="0",i=Tt(e)||"0"):i=Tt(e),r||i||e.eof()){const{r:n,g:o,b:s,a:a}=function(e,t){let n="0",r="0",i="0",o=Number(null!=t&&""!==t?t:1);if("t"===e)o=0;else switch(e.length){case 0:break;case 1:n=r=i=e+e;break;case 2:n=r=i=e;break;case 3:n=e[0]+e[0],r=e[1]+e[1],i=e[2]+e[2];break;default:n=(e+=e).slice(0,2),r=e.slice(2,4),i=e.slice(4,6)}return{r:parseInt(n,16),g:parseInt(r,16),b:parseInt(i,16),a:o}}(r,i);return{type:"ColorValue",r:n,g:o,b:s,a:a,raw:e.substring(t+1,e.pos),start:t,end:e.pos}}return Nt(e,t)}e.pos=t}(e)||function(e){const t=e.peek(),n=e.pos;let r=!1;if(ke(t)){for(e.pos++;!e.eof();){if(e.eat(t)){r=!0;break}e.pos++}return e.start=n,{type:"StringValue",value:e.substring(n+1,e.pos-(r?1:0)),quote:39===t?"single":"double",start:n,end:e.pos}}}(e)||function(e){const t=e.peek();if(function(e){return 40===e||41===e}(t))return{type:"Bracket",open:40===t,start:e.pos++,end:e.pos}}(e)||Pt(e)||function(e){const t=e.pos;if(e.eatWhile(ve))return{type:"WhiteSpace",start:t,end:e.pos}}(e)||function(e,t){const n=e.pos;e.eat(zt)?e.eatWhile(n?It:qt):e.eat(we)?e.eatWhile(t?qt:It):(e.eat(46),e.eatWhile(qt));if(n!==e.pos)return e.start=n,Nt(e,e.start=n)}(e,t)}function Dt(e){const t=[];for(e.start=e.pos;!e.eof();)if(e.eat(123))t.push(e.pos);else if(e.eat(125)){if(!t.length){e.pos--;break}t.pop()}else e.pos++;if(t.length)throw e.pos=t.pop(),e.error("Expecting }");return e.current()}function Nt(e,t=e.start,n=e.pos){return{type:"Literal",value:e.substring(t,n),start:t,end:n}}function Tt(e){const t=e.pos;return e.eat(46)?(e.start=t,e.eatWhile(me)?e.current():"1"):""}function Pt(e){const t=(43===(n=e.peek())?"+":33===n&&"!")||44===n&&","||58===n&&":"||45===n&&"-"||void 0;var n;if(t)return{type:"Operator",operator:t,start:e.pos++,end:e.pos}}function zt(e){return 64===e||36===e}function Rt(e){return me(e)||be(e,65,70)}function It(e){return ye(e)||45===e}function qt(e){return we(e)||37===e||47===e}function Ut(e){return"ColorValue"===e.type||"NumberValue"===e.type&&!e.unit}function Ft(e,t){let n=0,r=0;for(;t.length;){const e=Vt(t);if("Literal"!==e.type&&"NumberValue"!==e.type)break;n=e.start,r||(r=e.end),t.pop()}n!==r&&t.push(Nt(e,n,r))}function Vt(e){return e[e.length-1]}function Wt(e){return e.tokens[e.pos]}function Bt(e){return e.pos<e.size}function Ht(e,t){return!!t(Wt(e))&&(e.pos++,!0)}function Zt(e,t,n=Wt(e)){n&&null!=n.start&&(t+=` at ${n.start}`);const r=new Error(t);return r.pos=n&&n.start,r}function Jt(e,t){let n,r,i=!1;const o=[],s=Wt(e),a=!!t.value;for(a||!Kt(s)||function(e){const t=e.tokens[e.pos],n=e.tokens[e.pos+1];return t&&n&&Kt(t)&&"Bracket"===n.type}(e)||(e.pos++,n=s.value,Ht(e,cn)),a&&Ht(e,tn);Bt(e);)if(Ht(e,an))i=!0;else if(r=Xt(e,a))o.push(r);else if(!Ht(e,sn))break;if(n||o.length||i)return{name:n,value:o,important:i}}function Xt(e,t){const n=[];let r,i;for(;Bt(e);)if(r=Wt(e),ln(r))e.pos++,Kt(r)&&(i=Yt(e))?n.push({type:"FunctionCall",name:r.value,arguments:i}):n.push(r);else{if(!(cn(r)||t&&tn(r)))break;e.pos++}return n.length?{type:"CSSValue",value:n}:void 0}function Yt(e){const t=e.pos;if(Ht(e,Qt)){const n=[];let r;for(;Bt(e)&&!Ht(e,en);)if(r=Xt(e,!0))n.push(r);else if(!Ht(e,tn)&&!Ht(e,on))throw Zt(e,"Unexpected token");return e.start=t,n}}function Kt(e){return e&&"Literal"===e.type}function Gt(e,t){return e&&"Bracket"===e.type&&(null==t||e.open===t)}function Qt(e){return Gt(e,!0)}function en(e){return Gt(e,!1)}function tn(e){return e&&"WhiteSpace"===e.type}function nn(e,t){return e&&"Operator"===e.type&&(!t||e.operator===t)}function rn(e){return nn(e,"+")}function on(e){return nn(e,",")}function sn(e){return on(e)}function an(e){return nn(e,"!")}function ln(e){return"StringValue"===e.type||"ColorValue"===e.type||"NumberValue"===e.type||"Literal"===e.type||"Field"===e.type}function cn(e){return nn(e,":")||nn(e,"-")}function un(e,t){try{const n="string"===typeof e?function(e,t){let n,r=0;const i=new xe(e),o=[];for(;!i.eof();){if(n=jt(i,0===r&&!t),!n)throw i.error("Unexpected character");if("Bracket"===n.type&&(!r&&n.open&&Ft(i,o),r+=n.open?1:-1,r<0))throw i.error("Unexpected bracket",n.start);o.push(n),Ut(n)&&(n=Pt(i))&&o.push(n)}return o}(e,t&&t.value):e;return function(e,t={}){const n=function(e){return{tokens:e,start:0,pos:0,size:e.length}}(e),r=[];let i;for(;Bt(n);)if(i=Jt(n,t))r.push(i);else if(!Ht(n,rn))throw Zt(n,"Unexpected token");return r}(n,t)}catch(n){throw n instanceof _e&&"string"===typeof e&&(n.message+=`\n${e}\n${"-".repeat(n.pos)}^`),n}}function dn(e,t,n){if(e&&t){e.length&&n&&fn(e,n);for(const n of t)fn(e,n);return e}const r=e||t;return r&&r.slice()}function hn(e,t,n){return e.name=t.name,n.options["output.reverseAttributes"]||(e.value=t.value),e.implied||(e.implied=t.implied),e.boolean||(e.boolean=t.boolean),"expression"!==e.valueType&&(e.valueType=t.valueType),e}function fn(e,t){const n=e.length-1;"string"===typeof e[n]&&"string"===typeof t?e[n]+=t:e.push(t)}function pn(e){let t;for(;e.children.length;)t=e,e=e.children[e.children.length-1];return{parent:t,node:e}}function gn(e){return"AbbreviationNode"===e.type}function mn(e,t,n){let r=[];for(const i of e.children){const e=t(i);if(e){r=r.concat(e.children);const n=pn(e);gn(n.node)&&(n.node.children=n.node.children.concat(mn(i,t)))}else r.push(i),i.children=mn(i,t)}return e.children=r}function bn(e,t){e.selfClosing&&(t.selfClosing=!0),null!=e.value&&(t.value=e.value),e.repeat&&(t.repeat=e.repeat)}function yn(e,t=0){return{options:e,value:"",level:t,offset:0,line:0,column:0}}function wn(e,t){On(e,(0,e.options["output.text"])(t,e.offset,e.line,e.column))}function vn(e,t){const n=t.split(/\r\n|\r|\n/g);for(let r=0,i=n.length-1;r<=i;r++)wn(e,n[r]),r!==i&&kn(e,!0)}function kn(e,t){const n=e.options["output.baseIndent"];wn(e,e.options["output.newline"]+n),e.line++,e.column=n.length,t&&function(e,t=e.level){const n=e.options["output.indent"];wn(e,n.repeat(Math.max(t,0)))}(e,!0===t?e.level:t)}function xn(e,t,n){On(e,(0,e.options["output.field"])(t,n,e.offset,e.line,e.column))}function _n(e,t){return Ln(e,t.options["output.attributeCase"])}function Cn(e,t,n){return"expression"===e.valueType?n?"{":"}":"single"===t.options["output.attributeQuotes"]?"'":'"'}function En(e,t){return e.boolean||t.options["output.booleanAttributes"].includes((e.name||"").toLowerCase())}function Sn(e,t){return"string"===typeof e?t.options.inlineElements.includes(e.toLowerCase()):e.name?Sn(e.name,t):Boolean(e.value&&!e.attributes)}function On(e,t){e.value+=t,e.offset+=t.length,e.column+=t.length}function Ln(e,t){return t?"upper"===t?e.toUpperCase():e.toLowerCase():e}const An={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};function $n(e,t,n){const r=function(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(gn(n))return n}}(t),i=n.context?n.context.name:"",o=((r?r.name:i)||"").toLowerCase();e.name=An[o]||(Sn(o,n)?"span":"div")}const Mn={ru:{common:["\u0434\u0430\u043b\u0435\u043a\u043e-\u0434\u0430\u043b\u0435\u043a\u043e","\u0437\u0430","\u0441\u043b\u043e\u0432\u0435\u0441\u043d\u044b\u043c\u0438","\u0433\u043e\u0440\u0430\u043c\u0438","\u0432 \u0441\u0442\u0440\u0430\u043d\u0435","\u0433\u043b\u0430\u0441\u043d\u044b\u0445","\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b\u0445","\u0436\u0438\u0432\u0443\u0442","\u0440\u044b\u0431\u043d\u044b\u0435","\u0442\u0435\u043a\u0441\u0442\u044b"],words:["\u0432\u0434\u0430\u043b\u0438","\u043e\u0442 \u0432\u0441\u0435\u0445","\u043e\u043d\u0438","\u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0445","\u0434\u043e\u043c\u0430\u0445","\u043d\u0430 \u0431\u0435\u0440\u0435\u0433\u0443","\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0430","\u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e","\u044f\u0437\u044b\u043a\u043e\u0432\u043e\u0433\u043e","\u043e\u043a\u0435\u0430\u043d\u0430","\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439","\u0440\u0443\u0447\u0435\u0435\u043a","\u0434\u0430\u043b\u044c","\u0436\u0443\u0440\u0447\u0438\u0442","\u043f\u043e \u0432\u0441\u0435\u0439","\u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442","\u0435\u0435","\u0432\u0441\u0435\u043c\u0438","\u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u043c\u0438","\u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438","\u044d\u0442\u0430","\u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f","\u0441\u0442\u0440\u0430\u043d\u0430","\u043a\u043e\u0442\u043e\u0440\u043e\u0439","\u0436\u0430\u0440\u0435\u043d\u043d\u044b\u0435","\u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f","\u0437\u0430\u043b\u0435\u0442\u0430\u044e\u0442","\u043f\u0440\u044f\u043c\u043e","\u0440\u043e\u0442","\u0434\u0430\u0436\u0435","\u0432\u0441\u0435\u043c\u043e\u0433\u0443\u0449\u0430\u044f","\u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044f","\u043d\u0435","\u0438\u043c\u0435\u0435\u0442","\u0432\u043b\u0430\u0441\u0442\u0438","\u043d\u0430\u0434","\u0440\u044b\u0431\u043d\u044b\u043c\u0438","\u0442\u0435\u043a\u0441\u0442\u0430\u043c\u0438","\u0432\u0435\u0434\u0443\u0449\u0438\u043c\u0438","\u0431\u0435\u0437\u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u043d\u044b\u0439","\u043e\u0431\u0440\u0430\u0437","\u0436\u0438\u0437\u043d\u0438","\u043e\u0434\u043d\u0430\u0436\u0434\u044b","\u043e\u0434\u043d\u0430","\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f","\u0441\u0442\u0440\u043e\u0447\u043a\u0430","\u0440\u044b\u0431\u043d\u043e\u0433\u043e","\u0442\u0435\u043a\u0441\u0442\u0430","\u0438\u043c\u0435\u043d\u0438","lorem","ipsum","\u0440\u0435\u0448\u0438\u043b\u0430","\u0432\u044b\u0439\u0442\u0438","\u0431\u043e\u043b\u044c\u0448\u043e\u0439","\u043c\u0438\u0440","\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438","\u0432\u0435\u043b\u0438\u043a\u0438\u0439","\u043e\u043a\u0441\u043c\u043e\u043a\u0441","\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0430\u043b","\u043e","\u0437\u043b\u044b\u0445","\u0437\u0430\u043f\u044f\u0442\u044b\u0445","\u0434\u0438\u043a\u0438\u0445","\u0437\u043d\u0430\u043a\u0430\u0445","\u0432\u043e\u043f\u0440\u043e\u0441\u0430","\u043a\u043e\u0432\u0430\u0440\u043d\u044b\u0445","\u0442\u043e\u0447\u043a\u0430\u0445","\u0437\u0430\u043f\u044f\u0442\u043e\u0439","\u043d\u043e","\u0442\u0435\u043a\u0441\u0442","\u0434\u0430\u043b","\u0441\u0431\u0438\u0442\u044c","\u0441\u0435\u0431\u044f","\u0442\u043e\u043b\u043a\u0443","\u043e\u043d","\u0441\u043e\u0431\u0440\u0430\u043b","\u0441\u0435\u043c\u044c","\u0441\u0432\u043e\u0438\u0445","\u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0445","\u0431\u0443\u043a\u0432","\u043f\u043e\u0434\u043f\u043e\u044f\u0441\u0430\u043b","\u0438\u043d\u0438\u0446\u0438\u0430\u043b","\u0437\u0430","\u043f\u043e\u044f\u0441","\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f","\u0434\u043e\u0440\u043e\u0433\u0443","\u0432\u0437\u043e\u0431\u0440\u0430\u0432\u0448\u0438\u0441\u044c","\u043f\u0435\u0440\u0432\u0443\u044e","\u0432\u0435\u0440\u0448\u0438\u043d\u0443","\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0445","\u0433\u043e\u0440","\u0431\u0440\u043e\u0441\u0438\u043b","\u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439","\u0432\u0437\u0433\u043b\u044f\u0434","\u043d\u0430\u0437\u0430\u0434","\u0441\u0438\u043b\u0443\u044d\u0442","\u0441\u0432\u043e\u0435\u0433\u043e","\u0440\u043e\u0434\u043d\u043e\u0433\u043e","\u0433\u043e\u0440\u043e\u0434\u0430","\u0431\u0443\u043a\u0432\u043e\u0433\u0440\u0430\u0434","\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","\u0434\u0435\u0440\u0435\u0432\u043d\u0438","\u0430\u043b\u0444\u0430\u0432\u0438\u0442","\u043f\u043e\u0434\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a","\u0441\u0432\u043e\u0435\u0433\u043e","\u043f\u0435\u0440\u0435\u0443\u043b\u043a\u0430","\u0433\u0440\u0443\u0441\u0442\u043d\u044b\u0439","\u0440\u0435\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439","\u0432\u043e\u043f\u0440\u043e\u0441","\u0441\u043a\u0430\u0442\u0438\u043b\u0441\u044f","\u0435\u0433\u043e","\u0449\u0435\u043a\u0435","\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b","\u0441\u0432\u043e\u0439","\u043f\u0443\u0442\u044c","\u0434\u043e\u0440\u043e\u0433\u0435","\u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043b","\u0440\u0443\u043a\u043e\u043f\u0438\u0441\u044c","\u043e\u043d\u0430","\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u043b\u0430","\u043c\u043e\u0435\u0439","\u0432\u0441\u0435","\u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f","\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e","\u0440\u0430\u0437","\u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435","\u0447\u0442\u043e","\u043c\u0435\u043d\u044f","\u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c","\u044d\u0442\u043e","\u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0430","\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0441\u044f","\u0442\u044b","\u043b\u0443\u0447\u0448\u0435","\u0441\u0432\u043e\u044e","\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0443\u044e","\u0441\u0442\u0440\u0430\u043d\u0443","\u043f\u043e\u0441\u043b\u0443\u0448\u0430\u0432\u0448\u0438\u0441\u044c","\u0440\u0443\u043a\u043e\u043f\u0438\u0441\u0438","\u043d\u0430\u0448","\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b","\u0441\u0432\u043e\u0439","\u043f\u0443\u0442\u044c","\u0432\u0441\u043a\u043e\u0440\u0435","\u0435\u043c\u0443","\u043f\u043e\u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0441\u044f","\u043a\u043e\u0432\u0430\u0440\u043d\u044b\u0439","\u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u0435\u043b\u044c","\u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0445","\u0442\u0435\u043a\u0441\u0442\u043e\u0432","\u043d\u0430\u043f\u043e\u0438\u0432\u0448\u0438\u0439","\u044f\u0437\u044b\u043a\u043e\u043c","\u0440\u0435\u0447\u044c\u044e","\u0437\u0430\u043c\u0430\u043d\u0438\u0432\u0448\u0438\u0439","\u0441\u0432\u043e\u0435","\u0430\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u043e","\u043a\u043e\u0442\u043e\u0440\u043e\u0435","\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u043e","\u0441\u043d\u043e\u0432\u0430","\u0441\u043d\u043e\u0432\u0430","\u0441\u0432\u043e\u0438\u0445","\u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445","\u0435\u0441\u043b\u0438","\u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b\u0438","\u0442\u043e","\u0436\u0438\u0432\u0435\u0442","\u0442\u0430\u043c","\u0434\u043e","\u0441\u0438\u0445","\u043f\u043e\u0440"]},sp:{common:["mujer","uno","dolor","m\xe1s","de","poder","mismo","si"],words:["ejercicio","preferencia","perspicacia","laboral","pa\xf1o","suntuoso","molde","namibia","planeador","mirar","dem\xe1s","oficinista","excepci\xf3n","odio","consecuencia","casi","auto","chicharra","velo","elixir","ataque","no","odio","temporal","cu\xf3rum","dign\xedsimo","facilismo","letra","nihilista","expedici\xf3n","alma","alveolar","aparte","le\xf3n","animal","como","paria","belleza","modo","natividad","justo","ataque","s\xe9quito","pillo","sed","ex","y","voluminoso","temporalidad","verdades","racional","asunci\xf3n","incidente","marejada","placenta","amanecer","fuga","previsor","presentaci\xf3n","lejos","necesariamente","sospechoso","adiposidad","quind\xedo","p\xf3cima","voluble","d\xe9bito","sinti\xf3","accesorio","falda","sapiencia","volutas","queso","permacultura","laudo","soluciones","entero","pan","litro","tonelada","culpa","libertario","mosca","dictado","reincidente","nascimiento","dolor","escolar","impedimento","m\xednima","mayores","repugnante","dulce","obcecado","monta\xf1a","enigma","total","delet\xe9reo","d\xe9cima","c\xe1bala","fotograf\xeda","dolores","molesto","olvido","paciencia","resiliencia","voluntad","molestias","magn\xedfico","distinci\xf3n","ovni","marejada","cerro","torre","y","abogada","manantial","corporal","agua","crep\xfasculo","ataque","desierto","laboriosamente","angustia","afortunado","alma","encefalograma","materialidad","cosas","o","renuncia","error","menos","conejo","abad\xeda","analfabeto","remo","fugacidad","oficio","en","alm\xe1cigo","vos","pan","represi\xf3n","n\xfameros","triste","refugiado","trote","inventor","corchea","repelente","magma","recusado","patr\xf3n","expl\xedcito","paloma","s\xedndrome","inmune","autoinmune","comodidad","ley","vietnamita","demonio","tasmania","repeler","ap\xe9ndice","arquitecto","columna","yugo","computador","mula","a","prop\xf3sito","fantas\xeda","alias","rayo","tenedor","deleznable","ventana","cara","anemia","corrupto"]},latin:{common:["lorem","ipsum","dolor","sit","amet","consectetur","adipisicing","elit"],words:["exercitationem","perferendis","perspiciatis","laborum","eveniet","sunt","iure","nam","nobis","eum","cum","officiis","excepturi","odio","consectetur","quasi","aut","quisquam","vel","eligendi","itaque","non","odit","tempore","quaerat","dignissimos","facilis","neque","nihil","expedita","vitae","vero","ipsum","nisi","animi","cumque","pariatur","velit","modi","natus","iusto","eaque","sequi","illo","sed","ex","et","voluptatibus","tempora","veritatis","ratione","assumenda","incidunt","nostrum","placeat","aliquid","fuga","provident","praesentium","rem","necessitatibus","suscipit","adipisci","quidem","possimus","voluptas","debitis","sint","accusantium","unde","sapiente","voluptate","qui","aspernatur","laudantium","soluta","amet","quo","aliquam","saepe","culpa","libero","ipsa","dicta","reiciendis","nesciunt","doloribus","autem","impedit","minima","maiores","repudiandae","ipsam","obcaecati","ullam","enim","totam","delectus","ducimus","quis","voluptates","dolores","molestiae","harum","dolorem","quia","voluptatem","molestias","magni","distinctio","omnis","illum","dolorum","voluptatum","ea","quas","quam","corporis","quae","blanditiis","atque","deserunt","laboriosam","earum","consequuntur","hic","cupiditate","quibusdam","accusamus","ut","rerum","error","minus","eius","ab","ad","nemo","fugit","officia","at","in","id","quos","reprehenderit","numquam","iste","fugiat","sit","inventore","beatae","repellendus","magnam","recusandae","quod","explicabo","doloremque","aperiam","consequatur","asperiores","commodi","optio","dolor","labore","temporibus","repellat","veniam","architecto","est","esse","mollitia","nulla","a","similique","eos","alias","dolore","tenetur","deleniti","porro","facere","maxime","corrupti"]}},jn=/^lorem([a-z]*)(\d*)(-\d*)?$/i;function Dn(e,t){return Math.floor(Math.random()*(t-e)+e)}function Nn(e,t){const n=e.length,r=Math.min(n,t),i=[];for(;i.length<r;){const t=e[Dn(0,n)];i.includes(t)||i.push(t)}return i}function Tn(e,t){var n,r;return e.length&&(e=[(n=e[0],n[0].toUpperCase()+n.slice(1))].concat(e.slice(1))),e.join(" ")+(t||(r="?!...")[Dn(0,r.length-1)])}function Pn(e){if(e.length<2)return e;const t=(e=e.slice()).length,n=/,$/;let r=0;r=t>3&&t<=6?Dn(0,1):t>6&&t<=12?Dn(0,2):Dn(1,4);for(let i,o=0;o<r;o++)i=Dn(0,t-2),n.test(e[i])||(e[i]+=",");return e}function zn(e,t,n){const r=[];let i,o=0;for(n&&e.common&&(i=e.common.slice(0,t),o+=i.length,r.push(Tn(Pn(i),".")));o<t;)i=Nn(e.words,Math.min(Dn(2,30),t-o)),o+=i.length,r.push(Tn(Pn(i)));return r.join(" ")}function Rn(e){"class"===e.name?e.name="className":"for"===e.name&&(e.name="htmlFor")}function In(e){return"select"!==e.name}const qn=/^(-+)([a-z0-9]+[a-z0-9-]*)/i,Un=/^(_+)([a-z0-9]+[a-z0-9-_]*)/i,Fn=e=>/^[a-z]\-/i.test(e),Vn=e=>/^[a-z]/i.test(e);function Wn(e,t,n){!function(e){const t=Bn(e),n=[];for(const r of t.classNames){const e=r.indexOf("_");e>0&&!r.startsWith("-")?(n.push(r.slice(0,e)),n.push(r.slice(e))):n.push(r)}n.length&&(t.classNames=n.filter(Gn),t.block=Jn(t.classNames),Yn(e,t.classNames.join(" ")))}(e),function(e,t,n){const r=Bn(e),i=[],{options:o}=n,s=t.slice(1).concat(e);for(let l of r.classNames){let e,t="";const r=l;(e=l.match(qn))&&(t=Zn(s,e[1].length,n.context)+o["bem.element"]+e[2],i.push(t),l=l.slice(e[0].length)),(e=l.match(Un))&&(t||(t=Zn(s,e[1].length),i.push(t)),i.push(`${t}${o["bem.modifier"]}${e[2]}`),l=l.slice(e[0].length)),l===r&&i.push(r)}const a=i.filter(Gn);a.length&&Yn(e,a.join(" "))}(e,t,n)}function Bn(e){if(!e._bem){let t="";if(e.attributes)for(const n of e.attributes)if("class"===n.name&&n.value){t=Kn(n.value);break}e._bem=Hn(t)}return e._bem}function Hn(e){const t=e?e.split(/\s+/):[];return{classNames:t,block:Jn(t)}}function Zn(e,t=0,n){let r=Math.max(e.length-t,0);do{const t=e[r];if(t){const e=Bn(t);if(e.block)return e.block}}while(0<r--);if(n){const e=function(e){return e._bem||(e._bem=Hn(e.attributes&&e.attributes.class||"")),e._bem}(n);if(e.block)return e.block}return""}function Jn(e){return Xn(e,Fn)||Xn(e,Vn)||void 0}function Xn(e,t){for(const n of e){if(qn.test(n)||Un.test(n))break;if(t(n))return n}}function Yn(e,t){for(const n of e.attributes)if("class"===n.name){n.value=[t];break}}function Kn(e){let t="";for(const n of e)t+="string"===typeof n?n:n.name;return t}function Gn(e,t,n){return!!e&&n.indexOf(e)===t}function Qn(e,t,n){const r=(e,r,o)=>{const{parent:s,current:a}=n;n.parent=a,n.current=e,t(e,r,o,n,i),n.current=a,n.parent=s},i=(e,t,i)=>{n.ancestors.push(n.current),r(e,t,i),n.ancestors.pop()};e.children.forEach(r)}function er(e){return{current:null,parent:void 0,ancestors:[],config:e,field:1,out:yn(e.options)}}const tr=[{type:"Field",index:0,name:""}];function nr(e){return!!e&&(!e.name&&!e.attributes)}function rr(e,t){return!!e&&Sn(e,t)}function ir(e){return"object"===typeof e&&"Field"===e.type}function or(e,t){const{out:n}=t;let r=-1;for(const i of e)"string"===typeof i?vn(n,i):(xn(n,t.field+i.index,i.name),i.index>r&&(r=i.index));-1!==r&&(t.field+=r+1)}function sr(e){return!e.implied||"raw"!==e.valueType||!!e.value&&e.value.length>0}function ar(e){const t=[],n={pos:0,text:e};let r,i=n.pos,o=n.pos;for(;n.pos<n.text.length;)o=n.pos,(r=lr(n))?(i!==n.pos&&t.push(e.slice(i,o)),t.push(r),i=n.pos):n.pos++;return i!==n.pos&&t.push(e.slice(i)),t}function lr(e){if(91===cr(e)){const t=++e.pos;let n=t,r=t,i=1;for(;e.pos<e.text.length;){const o=cr(e);if(ur(o)){for(n=e.pos;dr(cr(e));)e.pos++;r=e.pos}else{if(91===o)i++;else if(93===o&&0===--i)return{before:e.text.slice(t,n),after:e.text.slice(r,e.pos++),name:e.text.slice(n,r)};e.pos++}}}}function cr(e,t=e.pos){return e.text.charCodeAt(t)}function ur(e){return e>=65&&e<=90}function dr(e){return ur(e)||e>47&&e<58||95===e||45===e}function hr(e,t){const{comment:n}=t;if(!n.enabled||!n.trigger||!e.name||!e.attributes)return!1;for(const r of e.attributes)if(r.name&&n.trigger.includes(r.name))return!0;return!1}function fr(e,t,n){const r={},{out:i}=n;for(const o of e.attributes)o.name&&o.value&&(r[o.name.toUpperCase()]=o.value);for(const o of t)"string"===typeof o?vn(i,o):r[o.name]&&(vn(i,o.before),or(r[o.name],n),vn(i,o.after))}const pr=/^<([\w\-:]+)[\s>]/;function gr(e,t){const n=er(t);return n.comment=function(e){const{options:t}=e;return{enabled:t["comment.enabled"],trigger:t["comment.trigger"],before:t["comment.before"]?ar(t["comment.before"]):void 0,after:t["comment.after"]?ar(t["comment.after"]):void 0}}(t),Qn(e,mr,n),n.out.value}function mr(e,t,n,r,i){const{out:o,config:s}=r,a=wr(e,t,n,r),l=function(e){const{config:t,parent:n}=e;if(!n||nr(n)||n.name&&t.options["output.formatSkip"].includes(n.name))return 0;return 1}(r);if(o.level+=l,a&&kn(o,!0),e.name){const t=function(e,t){return Ln(e,t.options["output.tagCase"])}(e.name,s);if(function(e,t){hr(e,t)&&t.comment.before&&fr(e,t.comment.before,t)}(e,r),vn(o,`<${t}`),e.attributes)for(const n of e.attributes)sr(n)&&br(n,r);if(!e.selfClosing||e.children.length||e.value){if(vn(o,">"),!yr(e,r,i)){if(e.value){const t=e.value.some(vr)||function(e,t){if(e.length&&"string"===typeof e[0]){const n=pr.exec(e[0]);if((null===n||void 0===n?void 0:n.length)&&!t.options.inlineElements.includes(n[1].toLowerCase()))return!0}return!1}(e.value,s);t&&kn(r.out,++o.level),or(e.value,r),t&&kn(r.out,--o.level)}if(e.children.forEach(i),!e.value&&!e.children.length){const t=s.options["output.formatLeafNode"]||s.options["output.formatForce"].includes(e.name);t&&kn(r.out,++o.level),or(tr,r),t&&kn(r.out,--o.level)}}vn(o,`</${t}>`),function(e,t){hr(e,t)&&t.comment.after&&fr(e,t.comment.after,t)}(e,r)}else vn(o,`${function(e){switch(e.options["output.selfClosingStyle"]){case"xhtml":return" /";case"xml":return"/";default:return""}}(s)}>`)}else!yr(e,r,i)&&e.value&&(or(e.value,r),e.children.forEach(i));if(a&&t===n.length-1&&r.parent){const e=nr(r.parent)?0:1;kn(o,o.level-e)}o.level-=l}function br(e,t){const{out:n,config:r}=t;if(e.name){const i=_n(e.name,r),o=Cn(e,r,!0),s=Cn(e,r);let a=e.value;En(e,r)&&!a?r.options["output.compactBoolean"]||(a=[i]):a||(a=tr),vn(n," "+i),a?(vn(n,"="+o),or(a,t),vn(n,s)):"html"!==r.options["output.selfClosingStyle"]&&vn(n,"="+o+s)}}function yr(e,t,n){if(e.value&&e.children.length){const r=e.value.findIndex(ir);if(-1!==r){or(e.value.slice(0,r),t);const i=t.out.line;let o=r+1;return e.children.forEach(n),t.out.line!==i&&"string"===typeof e.value[o]&&vn(t.out,e.value[o++].trimLeft()),or(e.value.slice(o),t),!0}}return!1}function wr(e,t,n,r){const{config:i,parent:o}=r;if(!i.options["output.format"])return!1;if(0===t&&!o)return!1;if(o&&nr(o)&&1===n.length)return!1;if(nr(e)){if(nr(n[t-1])||nr(n[t+1])||e.value.some(vr)||e.value.some(ir)&&e.children.length)return!0}if(Sn(e,i)){if(0===t){for(let e=0;e<n.length;e++)if(!Sn(n[e],i))return!0}else if(!Sn(n[t-1],i))return!0;if(i.options["output.inlineBreak"]){let e=1,r=t,o=t;for(;rr(n[--r],i);)e++;for(;rr(n[++o],i);)e++;if(e>=i.options["output.inlineBreak"])return!0}for(let t=0,n=e.children.length;t<n;t++)if(wr(e.children[t],t,e.children,r))return!0;return!1}return!0}function vr(e){return"string"===typeof e&&/\r|\n/.test(e)}function kr(e,t,n){const r=er(t);return r.options=n||{},Qn(e,xr,r),r.out.value}function xr(e,t,n,r,i){const{out:o,options:s}=r,{primary:a,secondary:l}=function(e){const t=[],n=[];if(e.attributes)for(const r of e.attributes)_r(r)?t.push(r):n.push(r);return{primary:t,secondary:n}}(e),c=r.parent?1:0;o.level+=c,function(e,t,n,r){if(!r.parent&&0===t)return!1;return!nr(e)}(e,t,0,r)&&kn(o,!0),!e.name||"div"===e.name&&a.length||vn(o,(s.beforeName||"")+e.name+(s.afterName||"")),function(e,t){for(const n of e)if(n.value)if("class"===n.name){vn(t.out,".");or(n.value.map(e=>"string"===typeof e?e.replace(/\s+/g,"."):e),t)}else vn(t.out,"#"),or(n.value,t)}(a,r),function(e,t){if(e.length){const{out:n,config:r,options:i}=t;i.beforeAttribute&&vn(n,i.beforeAttribute);for(let o=0;o<e.length;o++){const s=e[o];vn(n,_n(s.name||"",r)),En(s,r)&&!s.value?!r.options["output.compactBoolean"]&&i.booleanValue&&vn(n,"="+i.booleanValue):(vn(n,"="+Cn(s,r,!0)),or(s.value||tr,t),vn(n,Cn(s,r))),o!==e.length-1&&i.glueAttribute&&vn(n,i.glueAttribute)}i.afterAttribute&&vn(n,i.afterAttribute)}}(l.filter(sr),r),!e.selfClosing||e.value||e.children.length?(!function(e,t){if(!e.value&&e.children.length)return;const n=e.value||tr,r=function(e){const t=[];let n=[];for(const r of e)if("string"===typeof r){const e=r.split(/\r\n?|\n/g);for(n.push(e.shift()||"");e.length;)t.push(n),n=[e.shift()||""]}else n.push(r);return n.length&&t.push(n),t}(n),{out:i,options:o}=t;if(1===r.length)(e.name||e.attributes)&&wn(i," "),or(n,t);else{const e=[];let n=0;for(const t of r){const r=Cr(t);e.push(r),r>n&&(n=r)}i.level++;for(let s=0;s<r.length;s++)kn(i,!0),o.beforeTextLine&&wn(i,o.beforeTextLine),or(r[s],t),o.afterTextLine&&(wn(i," ".repeat(n-e[s])),wn(i,o.afterTextLine));i.level--}}(e,r),e.children.forEach(i)):r.options.selfClose&&vn(o,r.options.selfClose),o.level-=c}function _r(e){return"class"===e.name||"id"===e.name}function Cr(e){let t=0;for(const n of e)t+="string"===typeof n?n.length:n.name.length;return t}const Er={html:gr,haml:function(e,t){return kr(e,t,{beforeName:"%",beforeAttribute:"(",afterAttribute:")",glueAttribute:" ",afterTextLine:" |",booleanValue:"true",selfClose:"/"})},slim:function(e,t){return kr(e,t,{beforeAttribute:" ",glueAttribute:" ",beforeTextLine:"| ",selfClose:"/"})},pug:function(e,t){return kr(e,t,{beforeAttribute:"(",afterAttribute:")",glueAttribute:", ",beforeTextLine:"| ",selfClose:"xml"===t.options["output.selfClosingStyle"]?"/":""})}};function Sr(e,t){let n;if("string"===typeof e){let r=t;t.options["jsx.enabled"]&&(r=Object.assign(Object.assign({},r),{jsx:!0})),t.options["markup.href"]&&(r=Object.assign(Object.assign({},r),{href:!0})),e=Mt(e,r),n=t.text,t.text=void 0}return e=function(e,t){const n=[],r=t.options["output.reverseAttributes"],i=e=>{const o=e.name&&t.snippets[e.name];if(!o||n.includes(o))return null;const s=Mt(o,t);n.push(o),mn(s,i),n.pop();for(const t of s.children){if(e.attributes){const n=t.attributes||[],i=e.attributes||[];t.attributes=r?i.concat(n):n.concat(i)}bn(e,t)}return s};return mn(e,i),e}(e,t),function(e,t,n){const r=[e],i=e=>{t(e,r,n),r.push(e),e.children.forEach(i),r.pop()};e.children.forEach(i)}(e,Lr,t),t.text=null!==n&&void 0!==n?n:t.text,e}function Or(e,t){return(Er[t.syntax]||gr)(e,t)}function Lr(e,t,n){!function(e,t,n){!e.name&&e.attributes&&$n(e,t,n)}(e,t,n),function(e,t){if(!e.attributes)return;const n=[],r={};for(const i of e.attributes)if(i.name){const e=i.name;if(e in r){const n=r[e];"class"===e?n.value=dn(n.value,i.value," "):hn(n,i,t)}else n.push(r[e]=Object.assign({},i))}else n.push(i);e.attributes=n}(e,n),function(e,t,n){let r;if(e.name&&(r=e.name.match(jn))){const i=Mn[r[1]]||Mn.latin,o=r[2]?Math.max(1,Number(r[2])):30,s=Dn(o,r[3]?Math.max(o,Number(r[3].slice(1))):o),a=e.repeat||function(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if("AbbreviationNode"===n.type&&n.repeat)return n.repeat}}(t);e.name=e.attributes=void 0,e.value=[zn(i,s,!a||0===a.value)],e.repeat&&t.length>1&&$n(e,t,n)}}(e,t,n),"xsl"===n.syntax&&function(e){var t;"xsl:variable"!==(t=e.name)&&"xsl:with-param"!==t||!e.attributes||!e.children.length&&!e.value||(e.attributes=e.attributes.filter(In))}(e),n.options["jsx.enabled"]&&function(e){e.attributes&&e.attributes.forEach(Rn)}(e),n.options["bem.enabled"]&&Wn(e,t,n)}const Ar=/^([a-z-]+)(?:\s*:\s*([^\n\r;]+?);*)?$/,$r={value:!0};function Mr(e,t){const n=t.match(Ar);if(n){const t={},r=n[2]?n[2].split("|").map(Dr):[];for(const e of r)for(const n of e)Tr(n,t);return{type:"Property",key:e,property:n[1],value:r,keywords:t,dependencies:[]}}return{type:"Raw",key:e,value:t}}function jr(e,t){return e.key===t.key?0:e.key<t.key?-1:1}function Dr(e){return un(e.trim(),$r)[0].value}function Nr(e){return"Property"===e.type}function Tr(e,t){for(const n of e.value)if("Literal"===n.type)t[n.value]=n;else if("FunctionCall"===n.type)t[n.name]=n;else if("Field"===n.type){const e=n.name.trim();e&&(t[e]={type:"Literal",value:e})}}function Pr(e,t,n=!1){if((e=e.toLowerCase())===(t=t.toLowerCase()))return 1;if(!e||!t||e.charCodeAt(0)!==t.charCodeAt(0))return 0;const r=e.length,i=t.length;if(!n&&r>i)return 0;const o=Math.min(r,i),s=Math.max(r,i);let a=1,l=1,c=s,u=0,d=0,h=!1,f=!1;for(;a<r;){for(u=e.charCodeAt(a),h=!1,f=!1;l<i;){if(d=t.charCodeAt(l),u===d){h=!0,c+=s-(f?a:l);break}f=45===d,l++}if(!h){if(!n)return 0;break}a++}const p=s-o;return c*(a/s)/(zr(s)-zr(p))}function zr(e){return e*(e+1)/2}function Rr(e,t){return e.r||e.g||e.b||e.a?1===e.a?function(e,t){const n=t&&qr(e.r)&&qr(e.g)&&qr(e.b)?Ur:Fr;return"#"+n(e.r)+n(e.g)+n(e.b)}(e,t):function(e){const t=[e.r,e.g,e.b];1!==e.a&&t.push(Ir(e.a,8));return`${3===t.length?"rgb":"rgba"}(${t.join(", ")})`}(e):"transparent"}function Ir(e,t=4){return e.toFixed(t).replace(/\.?0+$/,"")}function qr(e){return!(e%17)}function Ur(e){return(e>>4).toString(16)}function Fr(e){return function(e,t){for(;e.length<t;)e="0"+e;return e}(e.toString(16),2)}function Vr(e,t){var n;const r=yn(t.options),i=t.options["output.format"];"@@section"===(null===(n=t.context)||void 0===n?void 0:n.name)&&(e=e.filter(e=>e.snippet));for(let o=0;o<e.length;o++)i&&0!==o&&kn(r,!0),Wr(e[o],r,t);return r.value}function Wr(e,t,n){const r=n.options["stylesheet.json"];if(e.name){vn(t,(r?e.name.replace(/\-(\w)/g,(e,t)=>t.toUpperCase()):e.name)+n.options["stylesheet.between"]),e.value.length?function(e,t,n){const r=n.options["stylesheet.json"],i=r?function(e){if(1===e.value.length){const t=e.value[0];if(1===t.value.length&&"NumberValue"===t.value[0].type)return t.value[0]}}(e):null;if(!i||i.unit&&"px"!==i.unit){const i=function(e){return e.options["stylesheet.jsonDoubleQuotes"]?'"':"'"}(n);r&&wn(t,i);for(let r=0;r<e.value.length;r++)0!==r&&wn(t,", "),Hr(e.value[r],t,n);r&&wn(t,i)}else wn(t,String(i.value))}(e,t,n):xn(t,0,""),r?wn(t,","):(Br(e,t,!0),wn(t,n.options["stylesheet.after"]))}else{for(const r of e.value)for(const e of r.value)Zr(e,t,n);Br(e,t,e.value.length>0)}}function Br(e,t,n){e.important&&(n&&wn(t," "),wn(t,"!important"))}function Hr(e,t,n){for(let r=0,i=-1;r<e.value.length;r++){const o=e.value[r];0===r||"Field"===o.type&&o.start===i||wn(t," "),Zr(o,t,n),i=o.end}}function Zr(e,t,n){if("ColorValue"===e.type)wn(t,Rr(e,n.options["stylesheet.shortHex"]));else if("Literal"===e.type)vn(t,e.value);else if("NumberValue"===e.type)vn(t,Ir(e.value,4)+e.unit);else if("StringValue"===e.type){const n="double"===e.quote?'"':"'";vn(t,n+e.value+n)}else if("Field"===e.type)xn(t,e.index,e.name);else if("FunctionCall"===e.type){wn(t,e.name+"(");for(let r=0;r<e.arguments.length;r++)r&&wn(t,", "),Hr(e.arguments[r],t,n);wn(t,")")}}const Jr="lg";function Xr(e,t){var n;const r=(null===(n=t.cache)||void 0===n?void 0:n.stylesheetSnippets)||function(e){const t=[];for(const n of Object.keys(e))t.push(Mr(n,e[n]));return function(e){e=e.slice().sort(jr);const t=[];let n;for(const r of e.filter(Nr)){for(;t.length;){if(n=t[t.length-1],r.property.startsWith(n.property)&&45===r.property.charCodeAt(n.property.length)){n.dependencies.push(r),t.push(r);break}t.pop()}t.length||t.push(r)}return e}(t)}(t.snippets);t.cache&&(t.cache.stylesheetSnippets=r),"string"===typeof e&&(e=un(e,{value:si(t)}));const i=function(e,t){if(t.context){if("@@section"===t.context.name)return e.filter(e=>"Raw"===e.type);if("@@property"===t.context.name)return e.filter(e=>"Property"===e.type)}return e}(r,t);for(const o of e)Yr(o,i,t);return e}function Yr(e,t,n){if(!function(e,t){let n=null;const r=1===e.value.length?e.value[0]:null;if(r&&1===r.value.length){const e=r.value[0];"FunctionCall"===e.type&&e.name===Jr&&(n=e)}if(n||e.name===Jr)return n=n?Object.assign(Object.assign({},n),{name:"linear-gradient"}):{type:"FunctionCall",name:"linear-gradient",arguments:[ti(ri(0,""))]},t.context||(e.name="background-image"),e.value=[ti(n)],!0;return!1}(e,n)){const r=n.options["stylesheet.fuzzySearchMinScore"];if(si(n)){const i=n.context.name,o=t.find(e=>"Property"===e.type&&e.property===i);Kr(e,n,o,r),e.snippet=o}else if(e.name){const i=Gr(e.name,t,r,!0);e.snippet=i,i&&("Property"===i.type?function(e,t,n){const r=e.name,i=function(e,t){for(let n=0,r=0;n<e.length;n++){if(r=t.indexOf(e[n],r),-1===r)return e.slice(n);r++}return""}(r,t.key);if(i){if(e.value.length)return e;const r=ei(i,n,t);if(!r)return e;e.value.push(ti(r))}if(e.name=t.property,e.value.length)Kr(e,n,t);else if(t.value.length){const r=t.value[0];e.value=1===t.value.length||r.some(ii)?r:r.map(e=>oi(e,n))}}(e,i,n):function(e,t){let n,r=0;const i=/\$\{(\d+)(:[^}]+)?\}/g,o=e.value[0],s=[];for(;n=i.exec(t.value);)r!==n.index&&s.push(ni(t.value.slice(r,n.index))),r=n.index+n[0].length,o&&o.value.length?s.push(o.value.shift()):s.push(ri(Number(n[1]),n[2]?n[2].slice(1):""));const a=t.value.slice(r);a&&s.push(ni(a));e.name=void 0,e.value=[ti(...s)]}(e,i))}}return(e.name||n.context)&&function(e,t){const n=t.options["stylesheet.unitAliases"],r=t.options["stylesheet.unitless"];for(const i of e.value)for(const o of i.value)"NumberValue"===o.type&&(o.unit?o.unit=n[o.unit]||o.unit:0===o.value||r.includes(e.name)||(o.unit=o.rawValue.includes(".")?t.options["stylesheet.floatUnit"]:t.options["stylesheet.intUnit"]))}(e,n),e}function Kr(e,t,n,r){for(const i of e.value){const e=[];for(const o of i.value)if("Literal"===o.type)e.push(ei(o.value,t,n,r)||o);else if("FunctionCall"===o.type){const i=ei(o.name,t,n,r);i&&"FunctionCall"===i.type?e.push(Object.assign(Object.assign({},i),{arguments:o.arguments.concat(i.arguments.slice(o.arguments.length))})):e.push(o)}else e.push(o);i.value=e}}function Gr(e,t,n=0,r=!1){let i=null,o=0;for(const s of t){const t=Pr(e,Qr(s),r);if(1===t)return s;t&&t>=o&&(o=t,i=s)}return o>=n?i:null}function Qr(e){return"string"===typeof e?e:e.key}function ei(e,t,n,r){let i;if(n){if(i=Gr(e,Object.keys(n.keywords),r))return n.keywords[i];for(const t of n.dependencies)if(i=Gr(e,Object.keys(t.keywords),r))return t.keywords[i]}return(i=Gr(e,t.options["stylesheet.keywords"],r))?ni(i):null}function ti(...e){return{type:"CSSValue",value:e}}function ni(e){return{type:"Literal",value:e}}function ri(e,t){return{type:"Field",index:e,name:t}}function ii(e){for(const t of e.value)if("Field"===t.type||"FunctionCall"===t.type&&t.arguments.some(ii))return!0;return!1}function oi(e,t,n={index:1}){let r=[];for(const i of e.value)switch(i.type){case"ColorValue":r.push(ri(n.index++,Rr(i,t.options["stylesheet.shortHex"])));break;case"Literal":r.push(ri(n.index++,i.value));break;case"NumberValue":r.push(ri(n.index++,`${i.value}${i.unit}`));break;case"StringValue":const e="single"===i.quote?"'":'"';r.push(ri(n.index++,e+i.value+e));break;case"FunctionCall":r.push(ri(n.index++,i.name),ni("("));for(let o=0,s=i.arguments.length;o<s;o++)r=r.concat(oi(i.arguments[o],t,n).value),o!==s-1&&r.push(ni(", "));r.push(ni(")"));break;default:r.push(i)}return Object.assign(Object.assign({},e),{value:r})}function si(e){return!!e.context&&("@@value"===e.context.name||!e.context.name.startsWith("@@"))}const ai={markup:"html",stylesheet:"css"},li={type:"markup",syntax:"html",variables:{lang:"en",locale:"en-US",charset:"UTF-8",indentation:"\t",newline:"\n"},snippets:{},options:{inlineElements:["a","abbr","acronym","applet","b","basefont","bdo","big","br","button","cite","code","del","dfn","em","font","i","iframe","img","input","ins","kbd","label","map","object","q","s","samp","select","small","span","strike","strong","sub","sup","textarea","tt","u","var"],"output.indent":"\t","output.baseIndent":"","output.newline":"\n","output.tagCase":"","output.attributeCase":"","output.attributeQuotes":"double","output.format":!0,"output.formatLeafNode":!1,"output.formatSkip":["html"],"output.formatForce":["body"],"output.inlineBreak":3,"output.compactBoolean":!1,"output.booleanAttributes":["contenteditable","seamless","async","autofocus","autoplay","checked","controls","defer","disabled","formnovalidate","hidden","ismap","loop","multiple","muted","novalidate","readonly","required","reversed","selected","typemustmatch"],"output.reverseAttributes":!1,"output.selfClosingStyle":"html","output.field":(e,t)=>t,"output.text":e=>e,"markup.href":!0,"comment.enabled":!1,"comment.trigger":["id","class"],"comment.before":"","comment.after":"\n\x3c!-- /[#ID][.CLASS] --\x3e","bem.enabled":!1,"bem.element":"__","bem.modifier":"_","jsx.enabled":!1,"stylesheet.keywords":["auto","inherit","unset","none"],"stylesheet.unitless":["z-index","line-height","opacity","font-weight","zoom","flex","flex-grow","flex-shrink"],"stylesheet.shortHex":!0,"stylesheet.between":": ","stylesheet.after":";","stylesheet.intUnit":"px","stylesheet.floatUnit":"em","stylesheet.unitAliases":{e:"em",p:"%",x:"ex",r:"rem"},"stylesheet.json":!1,"stylesheet.jsonDoubleQuotes":!1,"stylesheet.fuzzySearchMinScore":0}},ci={markup:{snippets:ui({a:"a[href]","a:blank":"a[href='http://${0}' target='_blank' rel='noopener noreferrer']","a:link":"a[href='http://${0}']","a:mail":"a[href='mailto:${0}']","a:tel":"a[href='tel:+${0}']",abbr:"abbr[title]","acr|acronym":"acronym[title]",base:"base[href]/",basefont:"basefont/",br:"br/",frame:"frame/",hr:"hr/",bdo:"bdo[dir]","bdo:r":"bdo[dir=rtl]","bdo:l":"bdo[dir=ltr]",col:"col/",link:"link[rel=stylesheet href]/","link:css":"link[href='${1:style}.css']","link:print":"link[href='${1:print}.css' media=print]","link:favicon":"link[rel='shortcut icon' type=image/x-icon href='${1:favicon.ico}']","link:mf|link:manifest":"link[rel='manifest' href='${1:manifest.json}']","link:touch":"link[rel=apple-touch-icon href='${1:favicon.png}']","link:rss":"link[rel=alternate type=application/rss+xml title=RSS href='${1:rss.xml}']","link:atom":"link[rel=alternate type=application/atom+xml title=Atom href='${1:atom.xml}']","link:im|link:import":"link[rel=import href='${1:component}.html']",meta:"meta/","meta:utf":"meta[http-equiv=Content-Type content='text/html;charset=UTF-8']","meta:vp":"meta[name=viewport content='width=${1:device-width}, initial-scale=${2:1.0}']","meta:compat":"meta[http-equiv=X-UA-Compatible content='${1:IE=7}']","meta:edge":"meta:compat[content='${1:ie=edge}']","meta:redirect":"meta[http-equiv=refresh content='0; url=${1:http://example.com}']","meta:kw":"meta[name=keywords content]","meta:desc":"meta[name=description content]",style:"style",script:"script","script:src":"script[src]",img:"img[src alt]/","img:s|img:srcset":"img[srcset src alt]","img:z|img:sizes":"img[sizes srcset src alt]",picture:"picture","src|source":"source/","src:sc|source:src":"source[src type]","src:s|source:srcset":"source[srcset]","src:t|source:type":"source[srcset type='${1:image/}']","src:z|source:sizes":"source[sizes srcset]","src:m|source:media":"source[media='(${1:min-width: })' srcset]","src:mt|source:media:type":"source:media[type='${2:image/}']","src:mz|source:media:sizes":"source:media[sizes srcset]","src:zt|source:sizes:type":"source[sizes srcset type='${1:image/}']",iframe:"iframe[src frameborder=0]",embed:"embed[src type]/",object:"object[data type]",param:"param[name value]/",map:"map[name]",area:"area[shape coords href alt]/","area:d":"area[shape=default]","area:c":"area[shape=circle]","area:r":"area[shape=rect]","area:p":"area[shape=poly]",form:"form[action]","form:get":"form[method=get]","form:post":"form[method=post]",label:"label[for]",input:"input[type=${1:text}]/",inp:"input[name=${1} id=${1}]","input:h|input:hidden":"input[type=hidden name]","input:t|input:text":"inp[type=text]","input:search":"inp[type=search]","input:email":"inp[type=email]","input:url":"inp[type=url]","input:p|input:password":"inp[type=password]","input:datetime":"inp[type=datetime]","input:date":"inp[type=date]","input:datetime-local":"inp[type=datetime-local]","input:month":"inp[type=month]","input:week":"inp[type=week]","input:time":"inp[type=time]","input:tel":"inp[type=tel]","input:number":"inp[type=number]","input:color":"inp[type=color]","input:c|input:checkbox":"inp[type=checkbox]","input:r|input:radio":"inp[type=radio]","input:range":"inp[type=range]","input:f|input:file":"inp[type=file]","input:s|input:submit":"input[type=submit value]","input:i|input:image":"input[type=image src alt]","input:b|input:btn|input:button":"input[type=button value]","input:reset":"input:button[type=reset]",isindex:"isindex/",select:"select[name=${1} id=${1}]","select:d|select:disabled":"select[disabled.]","opt|option":"option[value]",textarea:"textarea[name=${1} id=${1} cols=${2:30} rows=${3:10}]",marquee:"marquee[behavior direction]","menu:c|menu:context":"menu[type=context]","menu:t|menu:toolbar":"menu[type=toolbar]",video:"video[src]",audio:"audio[src]","html:xml":"html[xmlns=http://www.w3.org/1999/xhtml]",keygen:"keygen/",command:"command/","btn:s|button:s|button:submit":"button[type=submit]","btn:r|button:r|button:reset":"button[type=reset]","btn:d|button:d|button:disabled":"button[disabled.]","fst:d|fset:d|fieldset:d|fieldset:disabled":"fieldset[disabled.]",bq:"blockquote",fig:"figure",figc:"figcaption",pic:"picture",ifr:"iframe",emb:"embed",obj:"object",cap:"caption",colg:"colgroup",fst:"fieldset",btn:"button",optg:"optgroup",tarea:"textarea",leg:"legend",sect:"section",art:"article",hdr:"header",ftr:"footer",adr:"address",dlg:"dialog",str:"strong",prog:"progress",mn:"main",tem:"template",fset:"fieldset",datag:"datagrid",datal:"datalist",kg:"keygen",out:"output",det:"details",sum:"summary",cmd:"command","ri:d|ri:dpr":"img:s","ri:v|ri:viewport":"img:z","ri:a|ri:art":"pic>src:m+img","ri:t|ri:type":"pic>src:t+img","!!!":"{<!DOCTYPE html>}",doc:"html[lang=${lang}]>(head>meta[charset=${charset}]+meta[http-equiv='X-UA-Compatible'][content='IE=edge']+meta:vp+title{${1:Document}})+body","!|html:5":"!!!+doc",c:"{\x3c!-- ${0} --\x3e}","cc:ie":"{\x3c!--[if IE]>${0}<![endif]--\x3e}","cc:noie":"{\x3c!--[if !IE]>\x3c!--\x3e${0}\x3c!--<![endif]--\x3e}"})},xhtml:{options:{"output.selfClosingStyle":"xhtml"}},xml:{options:{"output.selfClosingStyle":"xml"}},xsl:{snippets:ui({"tm|tmatch":"xsl:template[match mode]","tn|tname":"xsl:template[name]",call:"xsl:call-template[name]",ap:"xsl:apply-templates[select mode]",api:"xsl:apply-imports",imp:"xsl:import[href]",inc:"xsl:include[href]",ch:"xsl:choose","wh|xsl:when":"xsl:when[test]",ot:"xsl:otherwise",if:"xsl:if[test]",par:"xsl:param[name]",pare:"xsl:param[name select]",var:"xsl:variable[name]",vare:"xsl:variable[name select]",wp:"xsl:with-param[name select]",key:"xsl:key[name match use]",elem:"xsl:element[name]",attr:"xsl:attribute[name]",attrs:"xsl:attribute-set[name]",cp:"xsl:copy[select]",co:"xsl:copy-of[select]",val:"xsl:value-of[select]","for|each":"xsl:for-each[select]",tex:"xsl:text",com:"xsl:comment",msg:"xsl:message[terminate=no]",fall:"xsl:fallback",num:"xsl:number[value]",nam:"namespace-alias[stylesheet-prefix result-prefix]",pres:"xsl:preserve-space[elements]",strip:"xsl:strip-space[elements]",proc:"xsl:processing-instruction[name]",sort:"xsl:sort[select order]",choose:"xsl:choose>xsl:when+xsl:otherwise",xsl:"!!!+xsl:stylesheet[version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform]>{\n|}","!!!":'{<?xml version="1.0" encoding="UTF-8"?>}'}),options:{"output.selfClosingStyle":"xml"}},jsx:{options:{"jsx.enabled":!0}},pug:{snippets:ui({"!!!":"{doctype html}"})},stylesheet:{snippets:ui({"@f":"@font-face {\n\tfont-family: ${1};\n\tsrc: url(${2});\n}","@ff":"@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}","@i|@import":"@import url(${0});","@kf":"@keyframes ${1:identifier} {\n\t${2}\n}","@m|@media":"@media ${1:screen} {\n\t${0}\n}",ac:"align-content:start|end|flex-start|flex-end|center|space-between|space-around|stretch|space-evenly",ai:"align-items:start|end|flex-start|flex-end|center|baseline|stretch",anim:"animation:${1:name} ${2:duration} ${3:timing-function} ${4:delay} ${5:iteration-count} ${6:direction} ${7:fill-mode}",animdel:"animation-delay:time",animdir:"animation-direction:normal|reverse|alternate|alternate-reverse",animdur:"animation-duration:${1:0}s",animfm:"animation-fill-mode:both|forwards|backwards",animic:"animation-iteration-count:1|infinite",animn:"animation-name",animps:"animation-play-state:running|paused",animtf:"animation-timing-function:linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier(${1:0.1}, ${2:0.7}, ${3:1.0}, ${3:0.1})",ap:"appearance:none",as:"align-self:start|end|auto|flex-start|flex-end|center|baseline|stretch",b:"bottom",bd:"border:${1:1px} ${2:solid} ${3:#000}",bdb:"border-bottom:${1:1px} ${2:solid} ${3:#000}",bdbc:"border-bottom-color:${1:#000}",bdbi:"border-bottom-image:url(${0})",bdbk:"border-break:close",bdbli:"border-bottom-left-image:url(${0})|continue",bdblrs:"border-bottom-left-radius",bdbri:"border-bottom-right-image:url(${0})|continue",bdbrrs:"border-bottom-right-radius",bdbs:"border-bottom-style",bdbw:"border-bottom-width",bdc:"border-color:${1:#000}",bdci:"border-corner-image:url(${0})|continue",bdcl:"border-collapse:collapse|separate",bdf:"border-fit:repeat|clip|scale|stretch|overwrite|overflow|space",bdi:"border-image:url(${0})",bdl:"border-left:${1:1px} ${2:solid} ${3:#000}",bdlc:"border-left-color:${1:#000}",bdlen:"border-length",bdli:"border-left-image:url(${0})",bdls:"border-left-style",bdlw:"border-left-width",bdr:"border-right:${1:1px} ${2:solid} ${3:#000}",bdrc:"border-right-color:${1:#000}",bdri:"border-right-image:url(${0})",bdrs:"border-radius",bdrst:"border-right-style",bdrw:"border-right-width",bds:"border-style:none|hidden|dotted|dashed|solid|double|dot-dash|dot-dot-dash|wave|groove|ridge|inset|outset",bdsp:"border-spacing",bdt:"border-top:${1:1px} ${2:solid} ${3:#000}",bdtc:"border-top-color:${1:#000}",bdti:"border-top-image:url(${0})",bdtli:"border-top-left-image:url(${0})|continue",bdtlrs:"border-top-left-radius",bdtri:"border-top-right-image:url(${0})|continue",bdtrrs:"border-top-right-radius",bdts:"border-top-style",bdtw:"border-top-width",bdw:"border-width",bfv:"backface-visibility:hidden|visible",bg:"background:${1:#000}",bga:"background-attachment:fixed|scroll",bgbk:"background-break:bounding-box|each-box|continuous",bgc:"background-color:#${1:fff}",bgcp:"background-clip:padding-box|border-box|content-box|no-clip",bgi:"background-image:url(${0})",bgo:"background-origin:padding-box|border-box|content-box",bgp:"background-position:${1:0} ${2:0}",bgpx:"background-position-x",bgpy:"background-position-y",bgr:"background-repeat:no-repeat|repeat-x|repeat-y|space|round",bgsz:"background-size:contain|cover",bxsh:"box-shadow:${1:inset }${2:hoff} ${3:voff} ${4:blur} ${5:#000}|none",bxsz:"box-sizing:border-box|content-box|border-box",c:"color:${1:#000}",cr:"color:rgb(${1:0}, ${2:0}, ${3:0})",cra:"color:rgba(${1:0}, ${2:0}, ${3:0}, ${4:.5})",cl:"clear:both|left|right|none",cm:"/* ${0} */",cnt:"content:'${0}'|normal|open-quote|no-open-quote|close-quote|no-close-quote|attr(${0})|counter(${0})|counters(${0})",coi:"counter-increment",colm:"columns",colmc:"column-count",colmf:"column-fill",colmg:"column-gap",colmr:"column-rule",colmrc:"column-rule-color",colmrs:"column-rule-style",colmrw:"column-rule-width",colms:"column-span",colmw:"column-width",cor:"counter-reset",cp:"clip:auto|rect(${1:top} ${2:right} ${3:bottom} ${4:left})",cps:"caption-side:top|bottom",cur:"cursor:pointer|auto|default|crosshair|hand|help|move|pointer|text",d:"display:block|none|flex|inline-flex|inline|inline-block|grid|inline-grid|subgrid|list-item|run-in|compact|table|inline-table|table-caption|table-column|table-column-group|table-header-group|table-footer-group|table-row|table-row-group|table-cell|ruby|ruby-base|ruby-base-group|ruby-text|ruby-text-group",ec:"empty-cells:show|hide",f:"font:${1:1em} ${2:sans-serif}",fd:"font-display:auto|block|swap|fallback|optional",fef:"font-effect:none|engrave|emboss|outline",fem:"font-emphasize",femp:"font-emphasize-position:before|after",fems:"font-emphasize-style:none|accent|dot|circle|disc",ff:"font-family:serif|sans-serif|cursive|fantasy|monospace",fft:'font-family:"Times New Roman", Times, Baskerville, Georgia, serif',ffa:'font-family:Arial, "Helvetica Neue", Helvetica, sans-serif',ffv:"font-family:Verdana, Geneva, sans-serif",fl:"float:left|right|none",fs:"font-style:italic|normal|oblique",fsm:"font-smoothing:antialiased|subpixel-antialiased|none",fst:"font-stretch:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded",fv:"font-variant:normal|small-caps",fvs:"font-variation-settings:normal|inherit|initial|unset",fw:"font-weight:normal|bold|bolder|lighter",fx:"flex",fxb:"flex-basis:fill|max-content|min-content|fit-content|content",fxd:"flex-direction:row|row-reverse|column|column-reverse",fxf:"flex-flow",fxg:"flex-grow",fxsh:"flex-shrink",fxw:"flex-wrap:nowrap|wrap|wrap-reverse",fsz:"font-size",fsza:"font-size-adjust",gtc:"grid-template-columns:repeat(${0})|minmax()",gtr:"grid-template-rows:repeat(${0})|minmax()",gta:"grid-template-areas",gt:"grid-template",gg:"grid-gap",gcg:"grid-column-gap",grg:"grid-row-gap",gac:"grid-auto-columns:auto|minmax()",gar:"grid-auto-rows:auto|minmax()",gaf:"grid-auto-flow:row|column|dense|inherit|initial|unset",gd:"grid",gc:"grid-column",gcs:"grid-column-start",gce:"grid-column-end",gr:"grid-row",grs:"grid-row-start",gre:"grid-row-end",ga:"grid-area",h:"height",jc:"justify-content:start|end|stretch|flex-start|flex-end|center|space-between|space-around|space-evenly",ji:"justify-items:start|end|center|stretch",js:"justify-self:start|end|center|stretch",l:"left",lg:"background-image:linear-gradient(${1})",lh:"line-height",lis:"list-style",lisi:"list-style-image",lisp:"list-style-position:inside|outside",list:"list-style-type:disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman",lts:"letter-spacing:normal",m:"margin",mah:"max-height",mar:"max-resolution",maw:"max-width",mb:"margin-bottom",mih:"min-height",mir:"min-resolution",miw:"min-width",ml:"margin-left",mr:"margin-right",mt:"margin-top",ol:"outline",olc:"outline-color:${1:#000}|invert",olo:"outline-offset",ols:"outline-style:none|dotted|dashed|solid|double|groove|ridge|inset|outset",olw:"outline-width|thin|medium|thick","op|opa":"opacity",ord:"order",ori:"orientation:landscape|portrait",orp:"orphans",ov:"overflow:hidden|visible|hidden|scroll|auto",ovs:"overflow-style:scrollbar|auto|scrollbar|panner|move|marquee",ovx:"overflow-x:hidden|visible|hidden|scroll|auto",ovy:"overflow-y:hidden|visible|hidden|scroll|auto",p:"padding",pb:"padding-bottom",pgba:"page-break-after:auto|always|left|right",pgbb:"page-break-before:auto|always|left|right",pgbi:"page-break-inside:auto|avoid",pl:"padding-left",pos:"position:relative|absolute|relative|fixed|static",pr:"padding-right",pt:"padding-top",q:"quotes",qen:"quotes:'\\201C' '\\201D' '\\2018' '\\2019'",qru:"quotes:'\\00AB' '\\00BB' '\\201E' '\\201C'",r:"right",rsz:"resize:none|both|horizontal|vertical",t:"top",ta:"text-align:left|center|right|justify",tal:"text-align-last:left|center|right",tbl:"table-layout:fixed",td:"text-decoration:none|underline|overline|line-through",te:"text-emphasis:none|accent|dot|circle|disc|before|after",th:"text-height:auto|font-size|text-size|max-size",ti:"text-indent",tj:"text-justify:auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|tibetan",to:"text-outline:${1:0} ${2:0} ${3:#000}",tov:"text-overflow:ellipsis|clip",tr:"text-replace",trf:"transform:${1}|skewX(${1:angle})|skewY(${1:angle})|scale(${1:x}, ${2:y})|scaleX(${1:x})|scaleY(${1:y})|scaleZ(${1:z})|scale3d(${1:x}, ${2:y}, ${3:z})|rotate(${1:angle})|rotateX(${1:angle})|rotateY(${1:angle})|rotateZ(${1:angle})|translate(${1:x}, ${2:y})|translateX(${1:x})|translateY(${1:y})|translateZ(${1:z})|translate3d(${1:tx}, ${2:ty}, ${3:tz})",trfo:"transform-origin",trfs:"transform-style:preserve-3d",trs:"transition:${1:prop} ${2:time}",trsde:"transition-delay:${1:time}",trsdu:"transition-duration:${1:time}",trsp:"transition-property:${1:prop}",trstf:"transition-timing-function:${1:fn}",tsh:"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000}",tt:"text-transform:uppercase|lowercase|capitalize|none",tw:"text-wrap:none|normal|unrestricted|suppress",us:"user-select:none",v:"visibility:hidden|visible|collapse",va:"vertical-align:top|super|text-top|middle|baseline|bottom|text-bottom|sub",w:"width",whs:"white-space:nowrap|pre|pre-wrap|pre-line|normal",whsc:"white-space-collapse:normal|keep-all|loose|break-strict|break-all",wid:"widows",wm:"writing-mode:lr-tb|lr-tb|lr-bt|rl-tb|rl-bt|tb-rl|tb-lr|bt-lr|bt-rl",wob:"word-break:normal|keep-all|break-all",wos:"word-spacing",wow:"word-wrap:none|unrestricted|suppress|break-word|normal",z:"z-index",zom:"zoom:1"})},sass:{options:{"stylesheet.after":""}},stylus:{options:{"stylesheet.between":" ","stylesheet.after":""}}};function ui(e){const t={};return Object.keys(e).forEach(n=>{for(const r of n.split("|"))t[r]=e[n]}),t}function di(e={},t={}){const n=e.type||"markup",r=e.syntax||ai[n];return Object.assign(Object.assign(Object.assign({},li),e),{type:n,syntax:r,variables:hi(n,r,"variables",e,t),snippets:hi(n,r,"snippets",e,t),options:hi(n,r,"options",e,t)})}function hi(e,t,n,r,i={}){const o=ci[e],s=i[e],a=ci[t],l=i[t];return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},li[n]),o&&o[n]),a&&a[n]),s&&s[n]),l&&l[n]),r[n])}function fi(e,t=0){return{text:e,start:t,pos:e.length}}function pi(e){return e.pos===e.start}function gi(e,t=0){return e.text.charCodeAt(e.pos-1+t)}function mi(e){if(!pi(e))return e.text.charCodeAt(--e.pos)}function bi(e,t){if(pi(e))return!1;const n="function"===typeof t?t(gi(e)):t===gi(e);return n&&e.pos--,!!n}function yi(e,t){const n=e.pos;for(;bi(e,t););return e.pos<n}function wi(e){return 39===e||34===e}const vi={91:93,40:41,123:125};function ki(e){const t=e.pos;if(!bi(e,62))return!1;let n=!1;for(bi(e,47);!pi(e);){if(yi(e,Si),Ci(e)){if(bi(e,47)){n=bi(e,60);break}if(bi(e,60)){n=!0;break}if(bi(e,Si))continue;if(bi(e,61)){if(Ci(e))continue;break}if(_i(e)){n=!0;break}break}if(!xi(e))break}return e.pos=t,n}function xi(e){return function(e){const t=e.pos;if(function(e){const t=e.pos,n=mi(e);if(wi(n))for(;!pi(e);)if(mi(e)===n&&92!==gi(e))return!0;return e.pos=t,!1}(e)&&bi(e,61)&&Ci(e))return!0;return e.pos=t,!1}(e)||_i(e)}function _i(e){const t=e.pos,n=[];for(;!pi(e);){const t=gi(e);if(Ai(t))n.push(t);else if(Li(t)){if(n.pop()!==vi[t])break}else if(!Oi(t))break;e.pos--}return!(t===e.pos||!bi(e,61)||!Ci(e))||(e.pos=t,!1)}function Ci(e){return yi(e,Ei)}function Ei(e){return 58===e||45===e||function(e){return e&=-33,e>=65&&e<=90}(e)||function(e){return e>47&&e<58}(e)}function Si(e){return 32===e||9===e}function Oi(e){return!isNaN(e)&&61!==e&&!Si(e)&&!wi(e)}function Li(e){return 123===e||40===e||91===e}function Ai(e){return 125===e||41===e||93===e}const $i=e=>e.charCodeAt(0),Mi="#.*:$-_!@%^+>/".split("").map($i),ji={type:"markup",lookAhead:!0,prefix:""};function Di(e,t=e.length,n={}){const r=Object.assign(Object.assign({},ji),n);let i;t=Math.min(e.length,Math.max(0,null==t?e.length:t)),r.lookAhead&&(t=function(e,t,n){wi(e.charCodeAt(t))&&t++;for(;Ri(e.charCodeAt(t),n.type);)t++;return t}(e,t,r));const o=function(e,t,n){if(!n)return 0;const r=fi(e),i=n.split("").map($i);let o;r.pos=t;for(;!pi(r);)if(!Ni(r,93,91)&&!Ni(r,125,123)){if(o=r.pos,Ti(r,i))return o;r.pos--}return-1}(e,t,r.prefix||"");if(-1===o)return;const s=fi(e,o);s.pos=t;const a=[];for(;!pi(s);){if(i=gi(s),a.includes(125)){if(125===i){a.push(i),s.pos--;continue}if(123!==i){s.pos--;continue}}if(Ri(i,r.type))a.push(i);else if(zi(i,r.type)){if(a.pop()!==vi[i])break}else{if(a.includes(93)||a.includes(125)){s.pos--;continue}if(ki(s)||!Pi(i))break}s.pos--}if(!a.length&&s.pos!==t){const r=e.slice(s.pos,t).replace(/^[*+>^]+/,"");return{abbreviation:r,location:t-r.length,start:n.prefix?o-n.prefix.length:t-r.length,end:t}}}function Ni(e,t,n){const r=e.pos;if(bi(e,t))for(;!pi(e);){if(bi(e,n))return!0;e.pos--}return e.pos=r,!1}function Ti(e,t){const n=e.pos;let r=!1;for(let i=t.length-1;i>=0&&!pi(e)&&bi(e,t[i]);i--)r=0===i;return r||(e.pos=n),r}function Pi(e){return e>64&&e<91||e>96&&e<123||e>47&&e<58||Mi.includes(e)}function zi(e,t){return 40===e||"markup"===t&&(91===e||123===e)}function Ri(e,t){return 41===e||"markup"===t&&(93===e||125===e)}function Ii(e,t){const n=di(t);return"stylesheet"===n.type?function(e,t){return Vr(Xr(e,t),t)}(e,n):function(e,t){return Or(Sr(e,t),t)}(e,n)}var qi,Ui={properties:["additive-symbols","align-content","align-items","justify-items","justify-self","justify-items","align-self","all","alt","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","behavior","block-size","border","border-block-end","border-block-start","border-block-end-color","border-block-start-color","border-block-end-style","border-block-start-style","border-block-end-width","border-block-start-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline-end","border-inline-start","border-inline-end-color","border-inline-start-color","border-inline-end-style","border-inline-start-style","border-inline-end-width","border-inline-start-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation-filters","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","columns","column-span","column-width","contain","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","enable-background","fallback","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","glyph-orientation-horizontal","glyph-orientation-vertical","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","height","hyphens","image-orientation","image-rendering","ime-mode","inline-size","isolation","justify-content","kerning","left","letter-spacing","lighting-color","line-break","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block-end","margin-block-start","margin-bottom","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marker","marker-end","marker-mid","marker-start","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","motion","motion-offset","motion-path","motion-rotation","-moz-animation","-moz-animation-delay","-moz-animation-direction","-moz-animation-duration","-moz-animation-iteration-count","-moz-animation-name","-moz-animation-play-state","-moz-animation-timing-function","-moz-appearance","-moz-backface-visibility","-moz-background-clip","-moz-background-inline-policy","-moz-background-origin","-moz-border-bottom-colors","-moz-border-image","-moz-border-left-colors","-moz-border-right-colors","-moz-border-top-colors","-moz-box-align","-moz-box-direction","-moz-box-flex","-moz-box-flexgroup","-moz-box-ordinal-group","-moz-box-orient","-moz-box-pack","-moz-box-sizing","-moz-column-count","-moz-column-gap","-moz-column-rule","-moz-column-rule-color","-moz-column-rule-style","-moz-column-rule-width","-moz-columns","-moz-column-width","-moz-font-feature-settings","-moz-hyphens","-moz-perspective","-moz-perspective-origin","-moz-text-align-last","-moz-text-decoration-color","-moz-text-decoration-line","-moz-text-decoration-style","-moz-text-size-adjust","-moz-transform","-moz-transform-origin","-moz-transition","-moz-transition-delay","-moz-transition-duration","-moz-transition-property","-moz-transition-timing-function","-moz-user-focus","-moz-user-select","-ms-accelerator","-ms-behavior","-ms-block-progression","-ms-content-zoom-chaining","-ms-content-zooming","-ms-content-zoom-limit","-ms-content-zoom-limit-max","-ms-content-zoom-limit-min","-ms-content-zoom-snap","-ms-content-zoom-snap-points","-ms-content-zoom-snap-type","-ms-filter","-ms-flex","-ms-flex-align","-ms-flex-direction","-ms-flex-flow","-ms-flex-item-align","-ms-flex-line-pack","-ms-flex-order","-ms-flex-pack","-ms-flex-wrap","-ms-flow-from","-ms-flow-into","-ms-grid-column","-ms-grid-column-align","-ms-grid-columns","-ms-grid-column-span","-ms-grid-layer","-ms-grid-row","-ms-grid-row-align","-ms-grid-rows","-ms-grid-row-span","-ms-high-contrast-adjust","-ms-hyphenate-limit-chars","-ms-hyphenate-limit-lines","-ms-hyphenate-limit-zone","-ms-hyphens","-ms-ime-mode","-ms-interpolation-mode","-ms-layout-grid","-ms-layout-grid-char","-ms-layout-grid-line","-ms-layout-grid-mode","-ms-layout-grid-type","-ms-line-break","-ms-overflow-style","-ms-perspective","-ms-perspective-origin","-ms-perspective-origin-x","-ms-perspective-origin-y","-ms-progress-appearance","-ms-scrollbar-3dlight-color","-ms-scrollbar-arrow-color","-ms-scrollbar-base-color","-ms-scrollbar-darkshadow-color","-ms-scrollbar-face-color","-ms-scrollbar-highlight-color","-ms-scrollbar-shadow-color","-ms-scrollbar-track-color","-ms-scroll-chaining","-ms-scroll-limit","-ms-scroll-limit-x-max","-ms-scroll-limit-x-min","-ms-scroll-limit-y-max","-ms-scroll-limit-y-min","-ms-scroll-rails","-ms-scroll-snap-points-x","-ms-scroll-snap-points-y","-ms-scroll-snap-type","-ms-scroll-snap-x","-ms-scroll-snap-y","-ms-scroll-translation","-ms-text-align-last","-ms-text-autospace","-ms-text-combine-horizontal","-ms-text-justify","-ms-text-kashida-space","-ms-text-overflow","-ms-text-size-adjust","-ms-text-underline-position","-ms-touch-action","-ms-touch-select","-ms-transform","-ms-transform-origin","-ms-transform-origin-x","-ms-transform-origin-y","-ms-transform-origin-z","-ms-user-select","-ms-word-break","-ms-word-wrap","-ms-wrap-flow","-ms-wrap-margin","-ms-wrap-through","-ms-writing-mode","-ms-zoom","-ms-zoom-animation","nav-down","nav-index","nav-left","nav-right","nav-up","negative","-o-animation","-o-animation-delay","-o-animation-direction","-o-animation-duration","-o-animation-fill-mode","-o-animation-iteration-count","-o-animation-name","-o-animation-play-state","-o-animation-timing-function","object-fit","object-position","-o-border-image","-o-object-fit","-o-object-position","opacity","order","orphans","-o-table-baseline","-o-tab-size","-o-text-overflow","-o-transform","-o-transform-origin","-o-transition","-o-transition-delay","-o-transition-duration","-o-transition-property","-o-transition-timing-function","offset-block-end","offset-block-start","offset-inline-end","offset-inline-start","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","pad","padding","padding-bottom","padding-block-end","padding-block-start","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","paint-order","perspective","perspective-origin","pointer-events","position","prefix","quotes","range","resize","right","ruby-align","ruby-overhang","ruby-position","ruby-span","scrollbar-3dlight-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-darkshadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","scroll-behavior","scroll-snap-coordinate","scroll-snap-destination","scroll-snap-points-x","scroll-snap-points-y","scroll-snap-type","shape-image-threshold","shape-margin","shape-outside","shape-rendering","size","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","suffix","system","symbols","table-layout","tab-size","text-align","text-align-last","text-anchor","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","unicode-range","user-select","vertical-align","visibility","-webkit-animation","-webkit-animation-delay","-webkit-animation-direction","-webkit-animation-duration","-webkit-animation-fill-mode","-webkit-animation-iteration-count","-webkit-animation-name","-webkit-animation-play-state","-webkit-animation-timing-function","-webkit-appearance","-webkit-backdrop-filter","-webkit-backface-visibility","-webkit-background-clip","-webkit-background-composite","-webkit-background-origin","-webkit-border-image","-webkit-box-align","-webkit-box-direction","-webkit-box-flex","-webkit-box-flex-group","-webkit-box-ordinal-group","-webkit-box-orient","-webkit-box-pack","-webkit-box-reflect","-webkit-box-sizing","-webkit-break-after","-webkit-break-before","-webkit-break-inside","-webkit-column-break-after","-webkit-column-break-before","-webkit-column-break-inside","-webkit-column-count","-webkit-column-gap","-webkit-column-rule","-webkit-column-rule-color","-webkit-column-rule-style","-webkit-column-rule-width","-webkit-columns","-webkit-column-span","-webkit-column-width","-webkit-filter","-webkit-flow-from","-webkit-flow-into","-webkit-font-feature-settings","-webkit-hyphens","-webkit-line-break","-webkit-margin-bottom-collapse","-webkit-margin-collapse","-webkit-margin-start","-webkit-margin-top-collapse","-webkit-mask-clip","-webkit-mask-image","-webkit-mask-origin","-webkit-mask-repeat","-webkit-mask-size","-webkit-nbsp-mode","-webkit-overflow-scrolling","-webkit-padding-start","-webkit-perspective","-webkit-perspective-origin","-webkit-region-fragment","-webkit-tap-highlight-color","-webkit-text-fill-color","-webkit-text-size-adjust","-webkit-text-stroke","-webkit-text-stroke-color","-webkit-text-stroke-width","-webkit-touch-callout","-webkit-transform","-webkit-transform-origin","-webkit-transform-origin-x","-webkit-transform-origin-y","-webkit-transform-origin-z","-webkit-transform-style","-webkit-transition","-webkit-transition-delay","-webkit-transition-duration","-webkit-transition-property","-webkit-transition-timing-function","-webkit-user-drag","-webkit-user-modify","-webkit-user-select","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","zoom"]},Fi={tags:["body","head","html","address","blockquote","dd","div","section","article","aside","header","footer","nav","menu","dl","dt","fieldset","form","frame","frameset","h1","h2","h3","h4","h5","h6","iframe","noframes","object","ol","p","ul","applet","center","dir","hr","pre","a","abbr","acronym","area","b","base","basefont","bdo","big","br","button","caption","cite","code","col","colgroup","del","dfn","em","font","i","img","input","ins","isindex","kbd","label","legend","li","link","map","meta","noscript","optgroup","option","param","q","s","samp","script","select","small","span","strike","strong","style","sub","sup","table","tbody","td","textarea","tfoot","th","thead","title","tr","tt","u","var","canvas","main","figure","plaintext","figcaption","hgroup","details","summary"]},Vi=new Map,Wi=new Map,Bi=/^[a-z,A-Z,!,(,[,#,\.\{]/,Hi=/^[a-z,A-Z,!,(,[,#,\.]/,Zi=/^-?[a-z,A-Z,!,@,#]/,Ji=/[a-z,A-Z\.]/,Xi=ge(ge([],Fi.tags,!0),["lorem"],!1),Yi="bem",Ki="|",Gi="t",Qi="c";function eo(e,t,n,r,i){var o,s=so(r);if(!s){if(!Vi.has(r)){var a=function(e){var t=ao(e),n={type:t,syntax:e},r=di(n);return"xml"===e?{}:r.snippets}(r);Vi.set(r,Object.keys(a))}qi=null!==(o=Vi.get(r))&&void 0!==o?o:[]}var l={lookAhead:!s,type:ao(r)},c=function(e,t,n,r){var i=t.getLineContent(n.lineNumber),o=i.substr(0,n.column-1),s=function(e,t){for(var n,r=0;r<3;r++)if(e.endsWith("".concat(Ki).concat(Yi),t))t-=4,n=n?Yi+","+n:Yi;else if(e.endsWith("".concat(Ki).concat(Qi),t))t-=2,n=n?"c,"+n:Qi;else{if(!e.endsWith("".concat(Ki).concat(Gi),t))break;t-=2,n=n?"t,"+n:Gi}return{pos:t,filter:n}}(o,n.column-1),a=s.pos,l=s.filter,c=l?l.length+1:0,u=Di(i,a,r);if(!u)return;var d=new e.Range(n.lineNumber,u.location+1,n.lineNumber,u.location+u.abbreviation.length+c+1);return{abbreviationRange:d,abbreviation:u.abbreviation,currentLineTillPosition:o,filter:l}}(e,t,n,l);if(c){var u=c.abbreviationRange,d=c.abbreviation,h=c.currentLineTillPosition,f=c.filter,p=function(e){if(e){var t=e.match(/[\w,:,-,\.]*$/);if(t)return t[0]}}(h);if(p!==d||!h.endsWith("<".concat(d))||s){var g,m=function(e,t){var n=ao(e),r=t?t.split(",").map(function(e){return e.trim()}):[],i=r.includes("bem"),o=r.includes("c"),s={"output.formatSkip":["html"],"output.formatForce":["body"],"output.field":oo,"output.inlineBreak":0,"output.compactBoolean":!1,"output.reverseAttributes":!1,"markup.href":!0,"comment.enabled":o,"comment.trigger":["id","class"],"comment.before":"","comment.after":"\n\x3c!-- /[#ID][.CLASS] --\x3e","bem.enabled":i,"bem.element":"__","bem.modifier":"_","jsx.enabled":"jsx"===e,"stylesheet.shortHex":!0,"stylesheet.between":"stylus"===e?" ":": ","stylesheet.after":"sass"===e||"stylus"===e?"":";","stylesheet.intUnit":"px","stylesheet.floatUnit":"em","stylesheet.unitAliases":{e:"em",p:"%",x:"ex",r:"rem"},"stylesheet.fuzzySearchMinScore":.3,"output.format":!0,"output.selfClosingStyle":"html"};return{type:n,options:s,variables:{},snippets:{},syntax:e,text:void 0,maxRepeat:1e3}}(r,f),b="",y=[];if(function(t,n){if(function(e,t){if(!t)return!1;if(so(e)){if(t.includes("#")){if(t.startsWith("#"))return/^#[\d,a-f,A-F]{1,6}$/.test(t);if(Xi.includes(t.substring(0,t.indexOf("#"))))return!1}return Zi.test(t)}if(t.startsWith("!"))return!/[^!]/.test(t);if((/\(/.test(t)||/\)/.test(t))&&!/\{[^\}\{]*[\(\)]+[^\}\{]*\}(?:[>\+\*\^]|$)/.test(t)&&!/\(.*\)[>\+\*\^]/.test(t)&&!/\[[^\[\]\(\)]+=".*"\]/.test(t)&&!/[>\+\*\^]\(.*\)/.test(t))return!1;if("jsx"===e)return Hi.test(t)&&Ji.test(t);return Bi.test(t)&&Ji.test(t)}(t,d)){try{b=Ii(n,m),s&&"!important".startsWith(n)&&(b="!important")}catch(O){}b&&!function(e,t,n,r){var i,o;if(so(e)&&r){var s=null!==(i=r["stylesheet.between"])&&void 0!==i?i:": ",a=null!==(o=r["stylesheet.after"])&&void 0!==o?o:";",l=t.indexOf(s[0],Math.max(t.length-s.length,0));l=l>=0?l:t.length;var c=t.substring(0,l);return n==="".concat(c).concat(s,"${0}").concat(a)||n.replace(/\s/g,"")===t.replace(/\s/g,"")+a}if("xml"===e&&Xi.some(function(e){return e.startsWith(t.toLowerCase())}))return!0;if(Xi.includes(t.toLowerCase())||qi.includes(t))return!1;if(/[-,:]/.test(t)&&!/--|::/.test(t)&&!t.endsWith(":"))return!1;if("."===t)return!1;var u=t.match(/^([a-z,A-Z,\d]*)\.$/);if(u)return!u[1]||!Fi.tags.includes(u[1]);if("jsx"===e&&/^([A-Z][A-Za-z0-9]*)+$/.test(t))return!1;return n.toLowerCase()==="<".concat(t.toLowerCase(),">${1}</").concat(t.toLowerCase(),">")}(t,n,b,m.options)&&(g={kind:e.languages.CompletionItemKind.Property,label:d+(f?"|"+f.replace(",","|"):""),documentation:no(b),detail:"Emmet abbreviation",insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:u,insertText:ro(io(b))},y=[g])}}(r,d),s){if(d.length>4&&Ui.properties.some(function(e){return e.startsWith(d)}))return{suggestions:[],incomplete:!0};if(g&&b.length){g.range=u,g.insertText=ro(io(b)),g.documentation=no(b),g.label=b.replace(/([^\\])\$\{\d+\}/g,"$1").replace(/\$\{\d+:([^\}]+)\}/g,"$1"),g.filterText=d;var w=Wi.has(r)?Wi.get(r):Wi.get("css");if(!(y=to(e,null!==w&&void 0!==w?w:[],d,d,u,m,"Emmet Custom Snippet",!1)).find(function(e){return e.insertText===(null===g||void 0===g?void 0:g.insertText)})){var v=new RegExp(".*"+d.split("").map(function(e){return"$"===e||"+"===e?"\\"+e:e}).join(".*")+".*","i");(/\d/.test(d)||v.test(g.label))&&y.push(g)}}}else{var k=d,x=d.match(/(>|\+)([\w:-]+)$/);if(x&&3===x.length&&(k=x[2]),"xml"!==r){var _=to(e,Xi,k,d,u,m,"Emmet Abbreviation");y=y.concat(_)}if(!0===i.showAbbreviationSuggestions){var C=to(e,qi.filter(function(e){return!Xi.includes(e)}),k,d,u,m,"Emmet Abbreviation");g&&C.length>0&&k!==d&&(g.sortText="0"+g.label,C.forEach(function(e){e.filterText=d,e.sortText="9"+d})),y=y.concat(C)}"html"===r&&y.length>=2&&d.includes(":")&&(null===g||void 0===g?void 0:g.insertText)==="<".concat(d,">${0}</").concat(d,">")&&(y=y.filter(function(e){return e.label!==d}))}return!0===i.showSuggestionsAsSnippets&&y.forEach(function(t){return t.kind=e.languages.CompletionItemKind.Snippet}),y.length?{suggestions:y,incomplete:!0}:void 0}}}function to(e,t,n,r,i,o,s,a){if(void 0===a&&(a=!0),!n||!t)return[];var l=[];return t.forEach(function(t){if(t.startsWith(n.toLowerCase())&&(!a||t!==n.toLowerCase())){var c,u=r+t.substr(n.length);try{c=Ii(u,o)}catch(O){}if(c){var d={kind:e.languages.CompletionItemKind.Property,label:n+t.substr(n.length),documentation:no(c),detail:s,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:i,insertText:ro(io(c))};l.push(d)}}}),l}function no(e){return e.replace(/([^\\])\$\{\d+\}/g,"$1|").replace(/\$\{\d+:([^\}]+)\}/g,"$1")}function ro(e){return e?e.replace(/([^\\])(\$)([^\{])/g,"$1\\$2$3"):e}function io(e){if(!e||!e.trim())return e;var t=-1,n=[],r=!1,i=!1,o=0,s=e.length;try{for(;o<s&&!r;)if("$"==e[o++]&&"{"==e[o++]){for(var a=-1,l=-1;o<s&&/\d/.test(e[o]);)a=a<0?o:a,l=o+1,o++;if(!(-1===a||-1===l||o>=s||"}"!=e[o]&&":"!=e[o])){var c=e.substring(a,l);if(r="0"===c)break;var u=!1;if(":"==e[o++])for(;o<s;){if("}"==e[o]){u=!0;break}o++}Number(c)>Number(t)?(t=Number(c),n=[{numberStart:a,numberEnd:l}],i=!u):Number(c)===t&&n.push({numberStart:a,numberEnd:l})}}}catch(O){}if(i&&!r)for(var d=0;d<n.length;d++){var h=n[d].numberStart,f=n[d].numberEnd;e=e.substr(0,h)+"0"+e.substr(f)}return e}var oo=function(e,t){return"${".concat(e).concat(t?":"+t:"","}")};function so(e){return"css"===e}function ao(e){return so(e)?"stylesheet":"markup"}function lo(e,t,n,r){var i=e[t],o=i.type,s=i.language;return"html"===n&&"html"===s?""===o&&(0===t||"delimiter.html"===e[t-1].type)||"text.html.basic"===e[0].type:"css"===n&&"css"===s?""===o||o==="tag."+r:"jsx"===n&&(!!t&&["identifier.js","type.identifier.js","identifier.ts","type.identifier.ts"].includes(o))}var co={html:["!",".","}",":","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],jade:["!",".","}",":","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],slim:["!",".","}",":","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],haml:["!",".","}",":","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],xml:[".","}","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],xsl:["!",".","}","*","$","/","]",">","0","1","2","3","4","5","6","7","8","9"],css:[":","!","-","0","1","2","3","4","5","6","7","8","9"],scss:[":","!","-","0","1","2","3","4","5","6","7","8","9"],sass:[":","!","0","1","2","3","4","5","6","7","8","9"],less:[":","!","-","0","1","2","3","4","5","6","7","8","9"],stylus:[":","!","0","1","2","3","4","5","6","7","8","9"],javascript:["!",".","}","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"],typescript:["!",".","}","*","$","]","/",">","0","1","2","3","4","5","6","7","8","9"]},uo={handlebars:"html",php:"html",twig:"html"},ho={showExpandedAbbreviation:"always",showAbbreviationSuggestions:!0,showSuggestionsAsSnippets:!1};function fo(e,t,n){if(e){var r=t.map(function(t){return e.languages.registerCompletionItemProvider(t,{triggerCharacters:co[uo[t]||t],provideCompletionItems:function(t,r){return function(e,t,n,r){for(var i,o=t.column,s=t.lineNumber,a=e._tokenization||e.tokenization._tokenization,l=a._tokenizationStateStore,c=l.tokenizationSupport||a._tokenizationSupport,u=l.getBeginState(s-1).clone(),d=c.tokenize(e.getLineContent(s),!0,u,0),h=d.tokens,f=!1,p=h.length-1;p>=0;p--){var g=h[p];if(o-1>g.offset){if(!(f=lo(h,p,n,r))&&"css"===n&&"attribute.value.html"===g.type){do{if(p--<=0){if(0==s--)break;p=(h=(d=c.tokenize(e.getLineContent(s),!0,u,0)).tokens).length-1}g=h[p]}while("attribute.name.html"===g.type);"style"===((null===(i=e.getWordAtPosition({column:g.offset,lineNumber:s}))||void 0===i?void 0:i.word)||"")&&(f=!0)}break}}return f}(t,r,n,n)?eo(e,t,r,n,ho):void 0}})});return function(){r.forEach(function(e){return e.dispose()})}}}var po=n(86095),go=n(27941),mo=n(90614),bo=n(15626);const yo=(e,t)=>(vo(),ko(e.user.color,t),e.cursor?[{range:new fe.Range(e.cursor.lineNumber,e.cursor.column,e.cursor.lineNumber,e.cursor.column),options:{className:`applyColorToThis backgroundPrefix-${e.user.color.slice(1)}`,afterContentClassName:"cursor-hover",beforeContentClassName:"",style:`--cursor-color: ${e.user.color};`}}]:[]),wo=e=>e.selection?[{range:new fe.Range(e.selection.startLineNumber,e.selection.startColumn,e.selection.endLineNumber,e.selection.endColumn),options:{className:"user-selection-decoration"}}]:[],vo=()=>{const e=document.styleSheets[0];Array.from(e.cssRules).some(e=>e.cssText.includes(".applyColorToThis"))||e.insertRule(".applyColorToThis {\n border-left: 2px solid var(--cursor-color, #000);\n color: var(--cursor-color, #000);\n }",e.cssRules.length)},ko=(e,t)=>{const n=`backgroundPrefix-${e.slice(1)}`,r=document.styleSheets[0];Array.from(r.cssRules).some(e=>e.cssText.includes(`.${n}`))||r.insertRule(`.${n} { --cursor-color: ${e===t.color?"#000000":e}; }`,r.cssRules.length)},xo=(e,t,n)=>{if(!e.textContent){const r=document.createElement("div");r.style.background=t,r.style.color="#fff",r.textContent=n,r.className="cursor-hover",e.appendChild(r)}},_o=(e,t,n,r,i,o)=>{if(r)return;i(!0);const s=e.flatMap(e=>[...yo(e,o),...wo(e)]);n.current=t.deltaDecorations(n.current,s.map(e=>({range:e.range,options:e.options})));((e,t,n,r,i)=>{for(let d=0;d<e.length;d++){const h=e[d],f=h.className.split(" ");for(const e of f)if(e.startsWith(t)){const d=`#${e.replace(t,"")}`,f=r.find(e=>e.user.color===d);var o,s,a,l,c,u;f&&(n&&d!==(null===i||void 0===i?void 0:i.color)?xo(h,d,null!==f&&void 0!==f&&null!==(o=f.user)&&void 0!==o&&null!==(s=o.name)&&void 0!==s&&s.first_name?`${null===f||void 0===f||null===(a=f.user)||void 0===a||null===(l=a.name)||void 0===l?void 0:l.first_name} ${null===f||void 0===f||null===(c=f.user)||void 0===c||null===(u=c.name)||void 0===u?void 0:u.last_name}`.replace(/[\n\r]/g,""):f.user.name.email.split("@")[0]):h.style.backgroundColor=d)}}})(document.getElementsByClassName("applyColorToThis"),"backgroundPrefix-",!0,e,o),i(!1)},Co=()=>{const e=50,t=(e,t,n)=>e>100&&t>50&&t<150&&n<100,n=(e,t,n)=>{const r=e=>{const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)};return.2126*r(e)+.7152*r(t)+.0722*r(n)},r=(e,t,r)=>(n(255,255,255)+.05)/(n(e,t,r)+.05)>=4.5;let i;do{const n=Math.floor(206*Math.random()+e),o=Math.floor(206*Math.random()+e),s=Math.floor(206*Math.random()+e);n+o+s>=400&&!t(n,o,s)&&r(n,o,s)&&(i=`#${(n<<16|o<<8|s).toString(16).padStart(6,"0")}`)}while(!i);return i},Eo=()=>new Map,So=e=>{const t=Eo();return e.forEach((e,n)=>{t.set(n,e)}),t},Oo=(e,t,n)=>{let r=e.get(t);return void 0===r&&e.set(t,r=n()),r},Lo=()=>new Set,Ao=e=>e[e.length-1],$o=(e,t)=>{for(let n=0;n<t.length;n++)e.push(t[n])},Mo=Array.from,jo=Array.isArray;class Do{constructor(){this._observers=Eo()}on(e,t){return Oo(this._observers,e,Lo).add(t),t}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){const n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return Mo((this._observers.get(e)||Eo()).values()).forEach(e=>e(...t))}destroy(){this._observers=Eo()}}class No{constructor(){this._observers=Eo()}on(e,t){Oo(this._observers,e,Lo).add(t)}once(e,t){const n=(...r)=>{this.off(e,n),t(...r)};this.on(e,n)}off(e,t){const n=this._observers.get(e);void 0!==n&&(n.delete(t),0===n.size&&this._observers.delete(e))}emit(e,t){return Mo((this._observers.get(e)||Eo()).values()).forEach(e=>e(...t))}destroy(){this._observers=Eo()}}const To=Math.floor,Po=(Math.ceil,Math.abs),zo=(Math.imul,Math.round,Math.log10,Math.log2,Math.log,Math.sqrt,(e,t)=>e<t?e:t),Ro=(e,t)=>e>t?e:t,Io=(Number.isNaN,Math.pow),qo=(Math.sign,e=>0!==e?e<0:1/e<0),Uo=64,Fo=128,Vo=127,Wo=2147483647,Bo=Number.MAX_SAFE_INTEGER,Ho=(Number.MIN_SAFE_INTEGER,Number.isInteger||(e=>"number"===typeof e&&isFinite(e)&&To(e)===e)),Zo=(Number.isNaN,Number.parseInt,String.fromCharCode),Jo=(String.fromCodePoint,Zo(65535),/^\s*/g),Xo=/([A-Z])/g,Yo=(e,t)=>(e=>e.replace(Jo,""))(e.replace(Xo,e=>`${t}${(e=>e.toLowerCase())(e)}`)),Ko="undefined"!==typeof TextEncoder?new TextEncoder:null,Go=Ko?e=>Ko.encode(e):e=>{const t=unescape(encodeURIComponent(e)),n=t.length,r=new Uint8Array(n);for(let i=0;i<n;i++)r[i]=t.codePointAt(i);return r};let Qo="undefined"===typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});Qo&&1===Qo.decode(new Uint8Array).length&&(Qo=null);class es{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const ts=()=>new es,ns=e=>{let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t},rs=e=>{const t=new Uint8Array(ns(e));let n=0;for(let r=0;r<e.bufs.length;r++){const i=e.bufs[r];t.set(i,n),n+=i.length}return t.set(new Uint8Array(e.cbuf.buffer,0,e.cpos),n),t},is=(e,t)=>{const n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(2*n),e.cpos=0),e.cbuf[e.cpos++]=t},os=is,ss=(e,t)=>{for(;t>Vo;)is(e,Fo|Vo&t),t=To(t/128);is(e,Vo&t)},as=(e,t)=>{const n=qo(t);for(n&&(t=-t),is(e,(t>63?Fo:0)|(n?Uo:0)|63&t),t=To(t/64);t>0;)is(e,(t>Vo?Fo:0)|Vo&t),t=To(t/128)},ls=new Uint8Array(3e4),cs=ls.length/3,us=Ko&&Ko.encodeInto?(e,t)=>{if(t.length<cs){const n=Ko.encodeInto(t,ls).written||0;ss(e,n);for(let t=0;t<n;t++)is(e,ls[t])}else hs(e,Go(t))}:(e,t)=>{const n=unescape(encodeURIComponent(t)),r=n.length;ss(e,r);for(let i=0;i<r;i++)is(e,n.codePointAt(i))},ds=(e,t)=>{const n=e.cbuf.length,r=e.cpos,i=zo(n-r,t.length),o=t.length-i;e.cbuf.set(t.subarray(0,i),r),e.cpos+=i,o>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Ro(2*n,o)),e.cbuf.set(t.subarray(i)),e.cpos=o)},hs=(e,t)=>{ss(e,t.byteLength),ds(e,t)},fs=(e,t)=>{((e,t)=>{const n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(new Uint8Array(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(2*Ro(n,t)),e.cpos=0)})(e,t);const n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n},ps=new DataView(new ArrayBuffer(4)),gs=(e,t)=>{switch(typeof t){case"string":is(e,119),us(e,t);break;case"number":Ho(t)&&Po(t)<=Wo?(is(e,125),as(e,t)):(n=t,ps.setFloat32(0,n),ps.getFloat32(0)===n?(is(e,124),((e,t)=>{fs(e,4).setFloat32(0,t,!1)})(e,t)):(is(e,123),((e,t)=>{fs(e,8).setFloat64(0,t,!1)})(e,t)));break;case"bigint":is(e,122),((e,t)=>{fs(e,8).setBigInt64(0,t,!1)})(e,t);break;case"object":if(null===t)is(e,126);else if(jo(t)){is(e,117),ss(e,t.length);for(let n=0;n<t.length;n++)gs(e,t[n])}else if(t instanceof Uint8Array)is(e,116),hs(e,t);else{is(e,118);const n=Object.keys(t);ss(e,n.length);for(let r=0;r<n.length;r++){const i=n[r];us(e,i),gs(e,t[i])}}break;case"boolean":is(e,t?120:121);break;default:is(e,127)}var n};class ms extends es{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count>0&&ss(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}const bs=e=>{e.count>0&&(as(e.encoder,1===e.count?e.s:-e.s),e.count>1&&ss(e.encoder,e.count-2))};class ys{constructor(){this.encoder=new es,this.s=0,this.count=0}write(e){this.s===e?this.count++:(bs(this),this.count=1,this.s=e)}toUint8Array(){return bs(this),rs(this.encoder)}}const ws=e=>{if(e.count>0){const t=2*e.diff+(1===e.count?0:1);as(e.encoder,t),e.count>1&&ss(e.encoder,e.count-2)}};class vs{constructor(){this.encoder=new es,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(ws(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return ws(this),rs(this.encoder)}}class ks{constructor(){this.sarr=[],this.s="",this.lensE=new ys}write(e){this.s+=e,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(e.length)}toUint8Array(){const e=new es;return this.sarr.push(this.s),this.s="",us(e,this.sarr.join("")),ds(e,this.lensE.toUint8Array()),rs(e)}}const xs=e=>new Error(e),_s=()=>{throw xs("Method unimplemented")},Cs=()=>{throw xs("Unexpected case")},Es=xs("Unexpected end of array"),Ss=xs("Integer out of Range");class Os{constructor(e){this.arr=e,this.pos=0}}const Ls=e=>new Os(e),As=e=>e.pos!==e.arr.length,$s=(e,t)=>{const n=new Uint8Array(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n},Ms=e=>$s(e,Ds(e)),js=e=>e.arr[e.pos++],Ds=e=>{let t=0,n=1;const r=e.arr.length;for(;e.pos<r;){const r=e.arr[e.pos++];if(t+=(r&Vo)*n,n*=128,r<Fo)return t;if(t>Bo)throw Ss}throw Es},Ns=e=>{let t=e.arr[e.pos++],n=63&t,r=64;const i=(t&Uo)>0?-1:1;if(0===(t&Fo))return i*n;const o=e.arr.length;for(;e.pos<o;){if(t=e.arr[e.pos++],n+=(t&Vo)*r,r*=128,t<Fo)return i*n;if(n>Bo)throw Ss}throw Es},Ts=Qo?e=>Qo.decode(Ms(e)):e=>{let t=Ds(e);if(0===t)return"";{let n=String.fromCodePoint(js(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(js(e));else for(;t>0;){const r=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+r);e.pos+=r,n+=String.fromCodePoint.apply(null,i),t-=r}return decodeURIComponent(escape(n))}},Ps=(e,t)=>{const n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n},zs=[e=>{},e=>null,Ns,e=>Ps(e,4).getFloat32(0,!1),e=>Ps(e,8).getFloat64(0,!1),e=>Ps(e,8).getBigInt64(0,!1),e=>!1,e=>!0,Ts,e=>{const t=Ds(e),n={};for(let r=0;r<t;r++){n[Ts(e)]=Rs(e)}return n},e=>{const t=Ds(e),n=[];for(let r=0;r<t;r++)n.push(Rs(e));return n},Ms],Rs=e=>zs[127-js(e)](e);class Is extends Os{constructor(e,t){super(e),this.reader=t,this.s=null,this.count=0}read(){return 0===this.count&&(this.s=this.reader(this),As(this)?this.count=Ds(this)+1:this.count=-1),this.count--,this.s}}class qs extends Os{constructor(e){super(e),this.s=0,this.count=0}read(){if(0===this.count){this.s=Ns(this);const e=qo(this.s);this.count=1,e&&(this.s=-this.s,this.count=Ds(this)+2)}return this.count--,this.s}}class Us extends Os{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(0===this.count){const e=Ns(this),t=1&e;this.diff=To(e/2),this.count=1,t&&(this.count=Ds(this)+2)}return this.s+=this.diff,this.count--,this.s}}class Fs{constructor(e){this.decoder=new qs(e),this.str=Ts(this.decoder),this.spos=0}read(){const e=this.spos+this.decoder.read(),t=this.str.slice(this.spos,e);return this.spos=e,t}}crypto.subtle;const Vs=crypto.getRandomValues.bind(crypto),Ws=(Math.random,()=>Vs(new Uint32Array(1))[0]),Bs=[1e7]+-1e3+-4e3+-8e3+-1e11,Hs=()=>Bs.replace(/[018]/g,e=>(e^Ws()&15>>e/4).toString(16)),Zs=e=>new Promise(e),Js=(Promise.all.bind(Promise),e=>void 0===e?null:e);let Xs=new class{constructor(){this.map=new Map}setItem(e,t){this.map.set(e,t)}getItem(e){return this.map.get(e)}},Ys=!0;try{"undefined"!==typeof localStorage&&localStorage&&(Xs=localStorage,Ys=!1)}catch(O){}const Ks=Xs,Gs=Object.assign,Qs=Object.keys,ea=(Object.values,e=>Qs(e).length),ta=e=>Qs(e).length,na=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ra=Object.freeze,ia=e=>{for(const t in e){const n=e[t];"object"!==typeof n&&"function"!==typeof n||ia(e[t])}return ra(e)},oa=Symbol("Equality"),sa=(e,t,n=0)=>{try{for(;n<e.length;n++)e[n](...t)}finally{n<e.length&&sa(e,t,n+1)}},aa=e=>e,la=(e,t)=>{if(e===t)return!0;if(null==e||null==t||e.constructor!==t.constructor)return!1;if(null!=e[oa])return e[oa](t);switch(e.constructor){case ArrayBuffer:e=new Uint8Array(e),t=new Uint8Array(t);case Uint8Array:if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;break;case Set:if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;break;case Map:if(e.size!==t.size)return!1;for(const n of e.keys())if(!t.has(n)||!la(e.get(n),t.get(n)))return!1;break;case Object:if(ea(e)!==ea(t))return!1;for(const n in e)if(!na(e,n)||!la(e[n],t[n]))return!1;break;case Array:if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!la(e[n],t[n]))return!1;break;default:return!1}return!0};var ca=n(88295);const ua="undefined"!==typeof ca&&ca.release&&/node|io\.js/.test(ca.release.name)&&"[object process]"===Object.prototype.toString.call("undefined"!==typeof ca?ca:0),da="undefined"!==typeof window&&"undefined"!==typeof document&&!ua;"undefined"!==typeof navigator&&/Mac/.test(navigator.platform);let ha;const fa=[],pa=()=>{if(void 0===ha)if(ua){ha=Eo();const e=ca.argv;let t=null;for(let n=0;n<e.length;n++){const r=e[n];"-"===r[0]?(null!==t&&ha.set(t,""),t=r):null!==t?(ha.set(t,r),t=null):fa.push(r)}null!==t&&ha.set(t,"")}else"object"===typeof location?(ha=Eo(),(location.search||"?").slice(1).split("&").forEach(e=>{if(0!==e.length){const[t,n]=e.split("=");ha.set(`--${Yo(t,"-")}`,n),ha.set(`-${Yo(t,"-")}`,n)}})):ha=Eo();return ha},ga=e=>pa().has(e),ma=e=>Js(ua?{}[e.toUpperCase().replaceAll("-","_")]:Ks.getItem(e)),ba=e=>ga("--"+e)||null!==ma(e);ba("production");ua&&["true","1","2"].includes({}.FORCE_COLOR)||!ga("--no-colors")&&!ba("no-color")&&(!ua||ca.stdout.isTTY)&&(!ua||ga("--color")||null!==ma("COLORTERM")||(ma("TERM")||"").includes("color"));var ya=n(45764).Buffer;const wa=e=>new Uint8Array(e),va=da?e=>{let t="";for(let n=0;n<e.byteLength;n++)t+=Zo(e[n]);return btoa(t)}:e=>ya.from(e.buffer,e.byteOffset,e.byteLength).toString("base64"),ka=da?e=>{const t=atob(e),n=wa(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}:e=>{const t=ya.from(e,"base64");return n=t.buffer,r=t.byteOffset,i=t.byteLength,new Uint8Array(n,r,i);var n,r,i};class xa{constructor(e,t){this.left=e,this.right=t}}const _a=(e,t)=>new xa(e,t),Ca="undefined"!==typeof document?document:{},Ea=("undefined"!==typeof DOMParser&&new DOMParser,Ca.ELEMENT_NODE,Ca.TEXT_NODE,Ca.CDATA_SECTION_NODE,Ca.COMMENT_NODE,Ca.DOCUMENT_NODE,Ca.DOCUMENT_TYPE_NODE,Ca.DOCUMENT_FRAGMENT_NODE,Symbol),Sa=Date.now,Oa=Ea(),La=Ea(),Aa=Ea(),$a=Ea(),Ma=Ea(),ja=Ea(),Da=Ea(),Na=Ea(),Ta=Ea();Sa();_a("font-weight","bold"),_a("font-weight","normal"),_a("color","blue"),_a("color","green"),_a("color","grey"),_a("color","red"),_a("color","purple"),_a("color","orange"),_a("color","black");const Pa=(...e)=>{Ra.forEach(t=>t.print(e))},za=(...e)=>{e.unshift(Na),Ra.forEach(t=>t.print(e))},Ra=Lo();const Ia=e=>({[Symbol.iterator](){return this},next:e}),qa=(e,t)=>Ia(()=>{const{done:n,value:r}=e.next();return{done:n,value:n?void 0:t(r)}});class Ua{constructor(e,t){this.clock=e,this.len=t}}class Fa{constructor(){this.clients=new Map}}const Va=(e,t,n)=>t.clients.forEach((t,r)=>{const i=e.doc.store.clients.get(r);if(null!=i){const r=i[i.length-1],o=r.id.clock+r.length;for(let s=0,a=t[s];s<t.length&&a.clock<o;a=t[++s])Wl(e,i,a.clock,a.len,n)}}),Wa=(e,t)=>{const n=e.clients.get(t.client);return void 0!==n&&null!==((e,t)=>{let n=0,r=e.length-1;for(;n<=r;){const i=To((n+r)/2),o=e[i],s=o.clock;if(s<=t){if(t<s+o.len)return i;n=i+1}else r=i-1}return null})(n,t.clock)},Ba=e=>{e.clients.forEach(e=>{let t,n;for(e.sort((e,t)=>e.clock-t.clock),t=1,n=1;t<e.length;t++){const r=e[n-1],i=e[t];r.clock+r.len>=i.clock?r.len=Ro(r.len,i.clock+i.len-r.clock):(n<t&&(e[n]=i),n++)}e.length=n})},Ha=e=>{const t=new Fa;for(let n=0;n<e.length;n++)e[n].clients.forEach((r,i)=>{if(!t.clients.has(i)){const o=r.slice();for(let t=n+1;t<e.length;t++)$o(o,e[t].clients.get(i)||[]);t.clients.set(i,o)}});return Ba(t),t},Za=(e,t,n,r)=>{Oo(e.clients,t,()=>[]).push(new Ua(n,r))},Ja=()=>new Fa,Xa=e=>{const t=Ja();return e.clients.forEach((e,n)=>{const r=[];for(let t=0;t<e.length;t++){const n=e[t];if(n.deleted){const i=n.id.clock;let o=n.length;if(t+1<e.length)for(let n=e[t+1];t+1<e.length&&n.deleted;n=e[1+ ++t])o+=n.length;r.push(new Ua(i,o))}}r.length>0&&t.clients.set(n,r)}),t},Ya=(e,t)=>{ss(e.restEncoder,t.clients.size),Mo(t.clients.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{e.resetDsCurVal(),ss(e.restEncoder,t);const r=n.length;ss(e.restEncoder,r);for(let i=0;i<r;i++){const t=n[i];e.writeDsClock(t.clock),e.writeDsLen(t.len)}})},Ka=e=>{const t=new Fa,n=Ds(e.restDecoder);for(let r=0;r<n;r++){e.resetDsCurVal();const n=Ds(e.restDecoder),r=Ds(e.restDecoder);if(r>0){const i=Oo(t.clients,n,()=>[]);for(let t=0;t<r;t++)i.push(new Ua(e.readDsClock(),e.readDsLen()))}}return t},Ga=(e,t,n)=>{const r=new Fa,i=Ds(e.restDecoder);for(let o=0;o<i;o++){e.resetDsCurVal();const i=Ds(e.restDecoder),o=Ds(e.restDecoder),s=n.clients.get(i)||[],a=zl(n,i);for(let n=0;n<o;n++){const n=e.readDsClock(),o=n+e.readDsLen();if(n<a){a<o&&Za(r,i,a,o-a);let e=Il(s,n),l=s[e];for(!l.deleted&&l.id.clock<n&&(s.splice(e+1,0,Mu(t,l,n-l.id.clock)),e++);e<s.length&&(l=s[e++],l.id.clock<o);)l.deleted||(o<l.id.clock+l.length&&s.splice(e,0,Mu(t,l,o-l.id.clock)),l.delete(t))}else Za(r,i,n,o-n)}}if(r.clients.size>0){const e=new ll;return ss(e.restEncoder,0),Ya(e,r),e.toUint8Array()}return null},Qa=Ws;class el extends Do{constructor({guid:e=Hs(),collectionid:t=null,gc:n=!0,gcFilter:r=()=>!0,meta:i=null,autoLoad:o=!1,shouldLoad:s=!0}={}){super(),this.gc=n,this.gcFilter=r,this.clientID=Qa(),this.guid=e,this.collectionid=t,this.share=new Map,this.store=new Tl,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=s,this.autoLoad=o,this.meta=i,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=Zs(e=>{this.on("load",()=>{this.isLoaded=!0,e(this)})});const a=()=>Zs(e=>{const t=n=>{void 0!==n&&!0!==n||(this.off("sync",t),e())};this.on("sync",t)});this.on("sync",e=>{!1===e&&this.isSynced&&(this.whenSynced=a()),this.isSynced=void 0===e||!0===e,this.isSynced&&!this.isLoaded&&this.emit("load",[this])}),this.whenSynced=a()}load(){const e=this._item;null===e||this.shouldLoad||Gl(e.parent.doc,e=>{e.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(Mo(this.subdocs).map(e=>e.guid))}transact(e,t=null){return Gl(this,e,t)}get(e,t=vc){const n=Oo(this.share,e,()=>{const e=new t;return e._integrate(this,null),e}),r=n.constructor;if(t!==vc&&r!==t){if(r===vc){const r=new t;r._map=n._map,n._map.forEach(e=>{for(;null!==e;e=e.left)e.parent=r}),r._start=n._start;for(let e=r._start;null!==e;e=e.right)e.parent=r;return r._length=n._length,this.share.set(e,r),r._integrate(this,null),r}throw new Error(`Type with the name ${e} has already been defined with a different constructor`)}return n}getArray(e=""){return this.get(e,Rc)}getText(e=""){return this.get(e,nu)}getMap(e=""){return this.get(e,qc)}getXmlElement(e=""){return this.get(e,ou)}getXmlFragment(e=""){return this.get(e,iu)}toJSON(){const e={};return this.share.forEach((t,n)=>{e[n]=t.toJSON()}),e}destroy(){this.isDestroyed=!0,Mo(this.subdocs).forEach(e=>e.destroy());const e=this._item;if(null!==e){this._item=null;const t=e.content;t.doc=new el({guid:this.guid,...t.opts,shouldLoad:!1}),t.doc._item=e,Gl(e.parent.doc,n=>{const r=t.doc;e.deleted||n.subdocsAdded.add(r),n.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}}class tl{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return Ds(this.restDecoder)}readDsLen(){return Ds(this.restDecoder)}}class nl extends tl{readLeftID(){return Cl(Ds(this.restDecoder),Ds(this.restDecoder))}readRightID(){return Cl(Ds(this.restDecoder),Ds(this.restDecoder))}readClient(){return Ds(this.restDecoder)}readInfo(){return js(this.restDecoder)}readString(){return Ts(this.restDecoder)}readParentInfo(){return 1===Ds(this.restDecoder)}readTypeRef(){return Ds(this.restDecoder)}readLen(){return Ds(this.restDecoder)}readAny(){return Rs(this.restDecoder)}readBuf(){return(e=>{const t=wa(e.byteLength);return t.set(e),t})(Ms(this.restDecoder))}readJSON(){return JSON.parse(Ts(this.restDecoder))}readKey(){return Ts(this.restDecoder)}}class rl{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Ds(this.restDecoder),this.dsCurrVal}readDsLen(){const e=Ds(this.restDecoder)+1;return this.dsCurrVal+=e,e}}class il extends rl{constructor(e){super(e),this.keys=[],Ds(e),this.keyClockDecoder=new Us(Ms(e)),this.clientDecoder=new qs(Ms(e)),this.leftClockDecoder=new Us(Ms(e)),this.rightClockDecoder=new Us(Ms(e)),this.infoDecoder=new Is(Ms(e),js),this.stringDecoder=new Fs(Ms(e)),this.parentInfoDecoder=new Is(Ms(e),js),this.typeRefDecoder=new qs(Ms(e)),this.lenDecoder=new qs(Ms(e))}readLeftID(){return new xl(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new xl(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return 1===this.parentInfoDecoder.read()}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return Rs(this.restDecoder)}readBuf(){return Ms(this.restDecoder)}readJSON(){return Rs(this.restDecoder)}readKey(){const e=this.keyClockDecoder.read();if(e<this.keys.length)return this.keys[e];{const e=this.stringDecoder.read();return this.keys.push(e),e}}}class ol{constructor(){this.restEncoder=ts()}toUint8Array(){return rs(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){ss(this.restEncoder,e)}writeDsLen(e){ss(this.restEncoder,e)}}class sl extends ol{writeLeftID(e){ss(this.restEncoder,e.client),ss(this.restEncoder,e.clock)}writeRightID(e){ss(this.restEncoder,e.client),ss(this.restEncoder,e.clock)}writeClient(e){ss(this.restEncoder,e)}writeInfo(e){os(this.restEncoder,e)}writeString(e){us(this.restEncoder,e)}writeParentInfo(e){ss(this.restEncoder,e?1:0)}writeTypeRef(e){ss(this.restEncoder,e)}writeLen(e){ss(this.restEncoder,e)}writeAny(e){gs(this.restEncoder,e)}writeBuf(e){hs(this.restEncoder,e)}writeJSON(e){us(this.restEncoder,JSON.stringify(e))}writeKey(e){us(this.restEncoder,e)}}class al{constructor(){this.restEncoder=ts(),this.dsCurrVal=0}toUint8Array(){return rs(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){const t=e-this.dsCurrVal;this.dsCurrVal=e,ss(this.restEncoder,t)}writeDsLen(e){0===e&&Cs(),ss(this.restEncoder,e-1),this.dsCurrVal+=e}}class ll extends al{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new vs,this.clientEncoder=new ys,this.leftClockEncoder=new vs,this.rightClockEncoder=new vs,this.infoEncoder=new ms(os),this.stringEncoder=new ks,this.parentInfoEncoder=new ms(os),this.typeRefEncoder=new ys,this.lenEncoder=new ys}toUint8Array(){const e=ts();return ss(e,0),hs(e,this.keyClockEncoder.toUint8Array()),hs(e,this.clientEncoder.toUint8Array()),hs(e,this.leftClockEncoder.toUint8Array()),hs(e,this.rightClockEncoder.toUint8Array()),hs(e,rs(this.infoEncoder)),hs(e,this.stringEncoder.toUint8Array()),hs(e,rs(this.parentInfoEncoder)),hs(e,this.typeRefEncoder.toUint8Array()),hs(e,this.lenEncoder.toUint8Array()),ds(e,rs(this.restEncoder)),rs(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){gs(this.restEncoder,e)}writeBuf(e){hs(this.restEncoder,e)}writeJSON(e){gs(this.restEncoder,e)}writeKey(e){const t=this.keyMap.get(e);void 0===t?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(t)}}const cl=(e,t,n)=>{const r=new Map;n.forEach((e,n)=>{zl(t,n)>e&&r.set(n,e)}),Pl(t).forEach((e,t)=>{n.has(t)||r.set(t,0)}),ss(e.restEncoder,r.size),Mo(r.entries()).sort((e,t)=>t[0]-e[0]).forEach(([n,r])=>{((e,t,n,r)=>{r=Ro(r,t[0].id.clock);const i=Il(t,r);ss(e.restEncoder,t.length-i),e.writeClient(n),ss(e.restEncoder,r);const o=t[i];o.write(e,r-o.id.clock);for(let s=i+1;s<t.length;s++)t[s].write(e,0)})(e,t.clients.get(n),n,r)})},ul=(e,t,n,r=new il(e))=>Gl(t,e=>{e.local=!1;let t=!1;const n=e.doc,i=n.store,o=((e,t)=>{const n=Eo(),r=Ds(e.restDecoder);for(let i=0;i<r;i++){const r=Ds(e.restDecoder),i=new Array(r),o=e.readClient();let s=Ds(e.restDecoder);n.set(o,{i:0,refs:i});for(let n=0;n<r;n++){const r=e.readInfo();switch(31&r){case 0:{const t=e.readLen();i[n]=new uu(Cl(o,s),t),s+=t;break}case 10:{const t=Ds(e.restDecoder);i[n]=new Tu(Cl(o,s),t),s+=t;break}default:{const a=0===(192&r),l=new ju(Cl(o,s),null,(r&Fo)===Fo?e.readLeftID():null,null,(r&Uo)===Uo?e.readRightID():null,a?e.readParentInfo()?t.get(e.readString()):e.readLeftID():null,a&&32===(32&r)?e.readString():null,Du(e,r));i[n]=l,s+=l.length}}}}return n})(r,n),s=((e,t,n)=>{const r=[];let i=Mo(n.keys()).sort((e,t)=>e-t);if(0===i.length)return null;const o=()=>{if(0===i.length)return null;let e=n.get(i[i.length-1]);for(;e.refs.length===e.i;){if(i.pop(),!(i.length>0))return null;e=n.get(i[i.length-1])}return e};let s=o();if(null===s)return null;const a=new Tl,l=new Map,c=(e,t)=>{const n=l.get(e);(null==n||n>t)&&l.set(e,t)};let u=s.refs[s.i++];const d=new Map,h=()=>{for(const e of r){const t=e.id.client,r=n.get(t);r?(r.i--,a.clients.set(t,r.refs.slice(r.i)),n.delete(t),r.i=0,r.refs=[]):a.clients.set(t,[e]),i=i.filter(e=>e!==t)}r.length=0};for(;;){if(u.constructor!==Tu){const i=Oo(d,u.id.client,()=>zl(t,u.id.client))-u.id.clock;if(i<0)r.push(u),c(u.id.client,u.id.clock-1),h();else{const o=u.getMissing(e,t);if(null!==o){r.push(u);const e=n.get(o)||{refs:[],i:0};if(e.refs.length!==e.i){u=e.refs[e.i++];continue}c(o,zl(t,o)),h()}else(0===i||i<u.length)&&(u.integrate(e,i),d.set(u.id.client,u.id.clock+u.length))}}if(r.length>0)u=r.pop();else if(null!==s&&s.i<s.refs.length)u=s.refs[s.i++];else{if(s=o(),null===s)break;u=s.refs[s.i++]}}if(a.clients.size>0){const e=new ll;return cl(e,a,new Map),ss(e.restEncoder,0),{missing:l,update:e.toUint8Array()}}return null})(e,i,o),a=i.pendingStructs;if(a){for(const[e,n]of a.missing)if(n<zl(i,e)){t=!0;break}if(s){for(const[e,t]of s.missing){const n=a.missing.get(e);(null==n||n>t)&&a.missing.set(e,t)}a.update=rc([a.update,s.update])}}else i.pendingStructs=s;const l=Ga(r,e,i);if(i.pendingDs){const t=new il(Ls(i.pendingDs));Ds(t.restDecoder);const n=Ga(t,e,i);i.pendingDs=l&&n?rc([l,n]):l||n}else i.pendingDs=l;if(t){const t=i.pendingStructs.update;i.pendingStructs=null,dl(e.doc,t)}},n,!1),dl=(e,t,n,r=il)=>{const i=Ls(t);ul(i,e,n,new r(i))},hl=(e,t=new Uint8Array([0]),n=new ll)=>{((e,t,n=new Map)=>{cl(e,t.store,n),Ya(e,Xa(t.store))})(n,e,pl(t));const r=[n.toUint8Array()];if(e.store.pendingDs&&r.push(e.store.pendingDs),e.store.pendingStructs&&r.push(ic(e.store.pendingStructs.update,t)),r.length>1){if(n.constructor===sl)return tc(r.map((e,t)=>0===t?e:cc(e)));if(n.constructor===ll)return rc(r)}return r[0]},fl=e=>{const t=new Map,n=Ds(e.restDecoder);for(let r=0;r<n;r++){const n=Ds(e.restDecoder),r=Ds(e.restDecoder);t.set(n,r)}return t},pl=e=>fl(new tl(Ls(e))),gl=(e,t)=>(ss(e.restEncoder,t.size),Mo(t.entries()).sort((e,t)=>t[0]-e[0]).forEach(([t,n])=>{ss(e.restEncoder,t),ss(e.restEncoder,n)}),e),ml=(e,t=new al)=>(e instanceof Map?gl(t,e):((e,t)=>{gl(e,Pl(t.store))})(t,e),t.toUint8Array());class bl{constructor(){this.l=[]}}const yl=()=>new bl,wl=(e,t)=>e.l.push(t),vl=(e,t)=>{const n=e.l;n.length;e.l=n.filter(e=>t!==e),e.l.length},kl=(e,t,n)=>sa(e.l,[t,n]);class xl{constructor(e,t){this.client=e,this.clock=t}}const _l=(e,t)=>e===t||null!==e&&null!==t&&e.client===t.client&&e.clock===t.clock,Cl=(e,t)=>new xl(e,t),El=e=>{for(const[t,n]of e.doc.share.entries())if(n===e)return t;throw Cs()};class Sl{constructor(e,t,n,r=0){this.type=e,this.tname=t,this.item=n,this.assoc=r}}class Ol{constructor(e,t,n=0){this.type=e,this.index=t,this.assoc=n}}const Ll=(e,t,n)=>{let r=null,i=null;return null===e._item?i=El(e):r=Cl(e._item.id.client,e._item.id.clock),new Sl(r,i,t,n)},Al=(e,t,n=0)=>{let r=e._start;if(n<0){if(0===t)return Ll(e,null,n);t--}for(;null!==r;){if(!r.deleted&&r.countable){if(r.length>t)return Ll(e,Cl(r.id.client,r.id.clock+t),n);t-=r.length}if(null===r.right&&n<0)return Ll(e,r.lastId,n);r=r.right}return Ll(e,null,n)},$l=(e,t,n=!0)=>{const r=t.store,i=e.item,o=e.type,s=e.tname,a=e.assoc;let l=null,c=0;if(null!==i){if(zl(r,i.client)<=i.clock)return null;const e=n?$u(r,i):((e,t)=>{const n=ql(e,t);return{item:n,diff:t.clock-n.id.clock}})(r,i),t=e.item;if(!(t instanceof ju))return null;if(l=t.parent,null===l._item||!l._item.deleted){c=t.deleted||!t.countable?0:e.diff+(a>=0?0:1);let n=t.left;for(;null!==n;)!n.deleted&&n.countable&&(c+=n.length),n=n.left}}else{if(null!==s)l=t.get(s);else{if(null===o)throw Cs();{if(zl(r,o.client)<=o.clock)return null;const{item:e}=n?$u(r,o):{item:ql(r,o)};if(!(e instanceof ju&&e.content instanceof Au))return null;l=e.content.type}}c=a>=0?l._length:0}return((e,t,n=0)=>new Ol(e,t,n))(l,c,e.assoc)};class Ml{constructor(e,t){this.ds=e,this.sv=t}}const jl=(e,t)=>new Ml(e,t),Dl=(jl(Ja(),new Map),(e,t)=>void 0===t?!e.deleted:t.sv.has(e.id.client)&&(t.sv.get(e.id.client)||0)>e.id.clock&&!Wa(t.ds,e.id)),Nl=(e,t)=>{const n=Oo(e.meta,Nl,Lo),r=e.doc.store;n.has(t)||(t.sv.forEach((t,n)=>{t<zl(r,n)&&Fl(e,Cl(n,t))}),Va(e,t.ds,e=>{}),n.add(t))};class Tl{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Pl=e=>{const t=new Map;return e.clients.forEach((e,n)=>{const r=e[e.length-1];t.set(n,r.id.clock+r.length)}),t},zl=(e,t)=>{const n=e.clients.get(t);if(void 0===n)return 0;const r=n[n.length-1];return r.id.clock+r.length},Rl=(e,t)=>{let n=e.clients.get(t.id.client);if(void 0===n)n=[],e.clients.set(t.id.client,n);else{const e=n[n.length-1];if(e.id.clock+e.length!==t.id.clock)throw Cs()}n.push(t)},Il=(e,t)=>{let n=0,r=e.length-1,i=e[r],o=i.id.clock;if(o===t)return r;let s=To(t/(o+i.length-1)*r);for(;n<=r;){if(i=e[s],o=i.id.clock,o<=t){if(t<o+i.length)return s;n=s+1}else r=s-1;s=To((n+r)/2)}throw Cs()},ql=(e,t)=>{const n=e.clients.get(t.client);return n[Il(n,t.clock)]},Ul=(e,t,n)=>{const r=Il(t,n),i=t[r];return i.id.clock<n&&i instanceof ju?(t.splice(r+1,0,Mu(e,i,n-i.id.clock)),r+1):r},Fl=(e,t)=>{const n=e.doc.store.clients.get(t.client);return n[Ul(e,n,t.clock)]},Vl=(e,t,n)=>{const r=t.clients.get(n.client),i=Il(r,n.clock),o=r[i];return n.clock!==o.id.clock+o.length-1&&o.constructor!==uu&&r.splice(i+1,0,Mu(e,o,n.clock-o.id.clock+1)),o},Wl=(e,t,n,r,i)=>{if(0===r)return;const o=n+r;let s,a=Ul(e,t,n);do{s=t[a++],o<s.id.clock+s.length&&Ul(e,t,o),i(s)}while(a<t.length&&t[a].id.clock<o)};class Bl{constructor(e,t,n){this.doc=e,this.deleteSet=new Fa,this.beforeState=Pl(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=t,this.meta=new Map,this.local=n,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}}const Hl=(e,t)=>!(0===t.deleteSet.clients.size&&!((e,t)=>{for(const[n,r]of e)if(t(r,n))return!0;return!1})(t.afterState,(e,n)=>t.beforeState.get(n)!==e))&&(Ba(t.deleteSet),((e,t)=>{cl(e,t.doc.store,t.beforeState)})(e,t),Ya(e,t.deleteSet),!0),Zl=(e,t,n)=>{const r=t._item;(null===r||r.id.clock<(e.beforeState.get(r.id.client)||0)&&!r.deleted)&&Oo(e.changed,t,Lo).add(n)},Jl=(e,t)=>{let n=e[t],r=e[t-1],i=t;for(;i>0&&(r.deleted===n.deleted&&r.constructor===n.constructor&&r.mergeWith(n));n=r,r=e[--i-1])n instanceof ju&&null!==n.parentSub&&n.parent._map.get(n.parentSub)===n&&n.parent._map.set(n.parentSub,r);const o=t-i;return o&&e.splice(t+1-o,o),o},Xl=(e,t,n)=>{for(const[r,i]of e.clients.entries()){const e=t.clients.get(r);for(let r=i.length-1;r>=0;r--){const o=i[r],s=o.clock+o.len;for(let r=Il(e,o.clock),i=e[r];r<e.length&&i.id.clock<s;i=e[++r]){const i=e[r];if(o.clock+o.len<=i.id.clock)break;i instanceof ju&&i.deleted&&!i.keep&&n(i)&&i.gc(t,!1)}}}},Yl=(e,t)=>{e.clients.forEach((e,n)=>{const r=t.clients.get(n);for(let t=e.length-1;t>=0;t--){const n=e[t];for(let e=zo(r.length-1,1+Il(r,n.clock+n.len-1)),t=r[e];e>0&&t.id.clock>=n.clock;t=r[e])e-=1+Jl(r,e)}})},Kl=(e,t)=>{if(t<e.length){const n=e[t],r=n.doc,i=r.store,o=n.deleteSet,s=n._mergeStructs;try{Ba(o),n.afterState=Pl(n.doc.store),r.emit("beforeObserverCalls",[n,r]);const e=[];n.changed.forEach((t,r)=>e.push(()=>{null!==r._item&&r._item.deleted||r._callObserver(n,t)})),e.push(()=>{n.changedParentTypes.forEach((e,t)=>{t._dEH.l.length>0&&(null===t._item||!t._item.deleted)&&((e=e.filter(e=>null===e.target._item||!e.target._item.deleted)).forEach(e=>{e.currentTarget=t,e._path=null}),e.sort((e,t)=>e.path.length-t.path.length),kl(t._dEH,e,n))})}),e.push(()=>r.emit("afterTransaction",[n,r])),sa(e,[]),n._needFormattingCleanup&&Qc(n)}finally{r.gc&&Xl(o,i,r.gcFilter),Yl(o,i),n.afterState.forEach((e,t)=>{const r=n.beforeState.get(t)||0;if(r!==e){const e=i.clients.get(t),n=Ro(Il(e,r),1);for(let t=e.length-1;t>=n;)t-=1+Jl(e,t)}});for(let e=s.length-1;e>=0;e--){const{client:t,clock:n}=s[e].id,r=i.clients.get(t),o=Il(r,n);o+1<r.length&&Jl(r,o+1)>1||o>0&&Jl(r,o)}if(n.local||n.afterState.get(r.clientID)===n.beforeState.get(r.clientID)||(Pa(Na,Oa,"[yjs] ",La,ja,"Changed the client-id because another client seems to be using it."),r.clientID=Qa()),r.emit("afterTransactionCleanup",[n,r]),r._observers.has("update")){const e=new sl;Hl(e,n)&&r.emit("update",[e.toUint8Array(),n.origin,r,n])}if(r._observers.has("updateV2")){const e=new ll;Hl(e,n)&&r.emit("updateV2",[e.toUint8Array(),n.origin,r,n])}const{subdocsAdded:a,subdocsLoaded:l,subdocsRemoved:c}=n;(a.size>0||c.size>0||l.size>0)&&(a.forEach(e=>{e.clientID=r.clientID,null==e.collectionid&&(e.collectionid=r.collectionid),r.subdocs.add(e)}),c.forEach(e=>r.subdocs.delete(e)),r.emit("subdocs",[{loaded:l,added:a,removed:c},r,n]),c.forEach(e=>e.destroy())),e.length<=t+1?(r._transactionCleanups=[],r.emit("afterAllTransactions",[r,e])):Kl(e,t+1)}}},Gl=(e,t,n=null,r=!0)=>{const i=e._transactionCleanups;let o=!1,s=null;null===e._transaction&&(o=!0,e._transaction=new Bl(e,n,r),i.push(e._transaction),1===i.length&&e.emit("beforeAllTransactions",[e]),e.emit("beforeTransaction",[e._transaction,e]));try{s=t(e._transaction)}finally{if(o){const t=e._transaction===i[0];e._transaction=null,t&&Kl(i,0)}}return s};class Ql{constructor(e,t){this.gen=function*(e){const t=Ds(e.restDecoder);for(let n=0;n<t;n++){const t=Ds(e.restDecoder),n=e.readClient();let r=Ds(e.restDecoder);for(let i=0;i<t;i++){const t=e.readInfo();if(10===t){const t=Ds(e.restDecoder);yield new Tu(Cl(n,r),t),r+=t}else if(0!==(31&t)){const i=0===(192&t),o=new ju(Cl(n,r),null,(t&Fo)===Fo?e.readLeftID():null,null,(t&Uo)===Uo?e.readRightID():null,i?e.readParentInfo()?e.readString():e.readLeftID():null,i&&32===(32&t)?e.readString():null,Du(e,t));yield o,r+=o.length}else{const t=e.readLen();yield new uu(Cl(n,r),t),r+=t}}}}(e),this.curr=null,this.done=!1,this.filterSkips=t,this.next()}next(){do{this.curr=this.gen.next().value||null}while(this.filterSkips&&null!==this.curr&&this.curr.constructor===Tu);return this.curr}}class ec{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}}const tc=e=>rc(e,nl,sl),nc=(e,t)=>{if(e.constructor===uu){const{client:n,clock:r}=e.id;return new uu(Cl(n,r+t),e.length-t)}if(e.constructor===Tu){const{client:n,clock:r}=e.id;return new Tu(Cl(n,r+t),e.length-t)}{const n=e,{client:r,clock:i}=n.id;return new ju(Cl(r,i+t),null,Cl(r,i+t-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(t))}},rc=(e,t=il,n=ll)=>{if(1===e.length)return e[0];const r=e.map(e=>new t(Ls(e)));let i=r.map(e=>new Ql(e,!0)),o=null;const s=new n,a=new ec(s);for(;i=i.filter(e=>null!==e.curr),i.sort((e,t)=>{if(e.curr.id.client===t.curr.id.client){const n=e.curr.id.clock-t.curr.id.clock;return 0===n?e.curr.constructor===t.curr.constructor?0:e.curr.constructor===Tu?1:-1:n}return t.curr.id.client-e.curr.id.client}),0!==i.length;){const e=i[0],t=e.curr.id.client;if(null!==o){let n=e.curr,r=!1;for(;null!==n&&n.id.clock+n.length<=o.struct.id.clock+o.struct.length&&n.id.client>=o.struct.id.client;)n=e.next(),r=!0;if(null===n||n.id.client!==t||r&&n.id.clock>o.struct.id.clock+o.struct.length)continue;if(t!==o.struct.id.client)sc(a,o.struct,o.offset),o={struct:n,offset:0},e.next();else if(o.struct.id.clock+o.struct.length<n.id.clock)if(o.struct.constructor===Tu)o.struct.length=n.id.clock+n.length-o.struct.id.clock;else{sc(a,o.struct,o.offset);const e=n.id.clock-o.struct.id.clock-o.struct.length;o={struct:new Tu(Cl(t,o.struct.id.clock+o.struct.length),e),offset:0}}else{const t=o.struct.id.clock+o.struct.length-n.id.clock;t>0&&(o.struct.constructor===Tu?o.struct.length-=t:n=nc(n,t)),o.struct.mergeWith(n)||(sc(a,o.struct,o.offset),o={struct:n,offset:0},e.next())}}else o={struct:e.curr,offset:0},e.next();for(let n=e.curr;null!==n&&n.id.client===t&&n.id.clock===o.struct.id.clock+o.struct.length&&n.constructor!==Tu;n=e.next())sc(a,o.struct,o.offset),o={struct:n,offset:0}}null!==o&&(sc(a,o.struct,o.offset),o=null),ac(a);const l=r.map(e=>Ka(e)),c=Ha(l);return Ya(s,c),s.toUint8Array()},ic=(e,t,n=il,r=ll)=>{const i=pl(t),o=new r,s=new ec(o),a=new n(Ls(e)),l=new Ql(a,!1);for(;l.curr;){const e=l.curr,t=e.id.client,n=i.get(t)||0;if(l.curr.constructor!==Tu)if(e.id.clock+e.length>n)for(sc(s,e,Ro(n-e.id.clock,0)),l.next();l.curr&&l.curr.id.client===t;)sc(s,l.curr,0),l.next();else for(;l.curr&&l.curr.id.client===t&&l.curr.id.clock+l.curr.length<=n;)l.next();else l.next()}ac(s);const c=Ka(a);return Ya(o,c),o.toUint8Array()},oc=e=>{e.written>0&&(e.clientStructs.push({written:e.written,restEncoder:rs(e.encoder.restEncoder)}),e.encoder.restEncoder=ts(),e.written=0)},sc=(e,t,n)=>{e.written>0&&e.currClient!==t.id.client&&oc(e),0===e.written&&(e.currClient=t.id.client,e.encoder.writeClient(t.id.client),ss(e.encoder.restEncoder,t.id.clock+n)),t.write(e.encoder,n),e.written++},ac=e=>{oc(e);const t=e.encoder.restEncoder;ss(t,e.clientStructs.length);for(let n=0;n<e.clientStructs.length;n++){const r=e.clientStructs[n];ss(t,r.written),ds(t,r.restEncoder)}},lc=(e,t,n,r)=>{const i=new n(Ls(e)),o=new Ql(i,!1),s=new r,a=new ec(s);for(let c=o.curr;null!==c;c=o.next())sc(a,t(c),0);ac(a);const l=Ka(i);return Ya(s,l),s.toUint8Array()},cc=e=>lc(e,aa,il,sl),uc="You must not compute changes after the event-handler fired.";class dc{constructor(e,t){this.target=e,this.currentTarget=e,this.transaction=t,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=hc(this.currentTarget,this.target))}deletes(e){return Wa(this.transaction.deleteSet,e.id)}get keys(){if(null===this._keys){if(0===this.transaction.doc._transactionCleanups.length)throw xs(uc);const e=new Map,t=this.target;this.transaction.changed.get(t).forEach(n=>{if(null!==n){const r=t._map.get(n);let i,o;if(this.adds(r)){let e=r.left;for(;null!==e&&this.adds(e);)e=e.left;if(this.deletes(r)){if(null===e||!this.deletes(e))return;i="delete",o=Ao(e.content.getContent())}else null!==e&&this.deletes(e)?(i="update",o=Ao(e.content.getContent())):(i="add",o=void 0)}else{if(!this.deletes(r))return;i="delete",o=Ao(r.content.getContent())}e.set(n,{action:i,oldValue:o})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock>=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(null===e){if(0===this.transaction.doc._transactionCleanups.length)throw xs(uc);const t=this.target,n=Lo(),r=Lo(),i=[];e={added:n,deleted:r,delta:i,keys:this.keys};if(this.transaction.changed.get(t).has(null)){let e=null;const o=()=>{e&&i.push(e)};for(let i=t._start;null!==i;i=i.right)i.deleted?this.deletes(i)&&!this.adds(i)&&(null!==e&&void 0!==e.delete||(o(),e={delete:0}),e.delete+=i.length,r.add(i)):this.adds(i)?(null!==e&&void 0!==e.insert||(o(),e={insert:[]}),e.insert=e.insert.concat(i.content.getContent()),n.add(i)):(null!==e&&void 0!==e.retain||(o(),e={retain:0}),e.retain+=i.length);null!==e&&void 0===e.retain&&o()}this._changes=e}return e}}const hc=(e,t)=>{const n=[];for(;null!==t._item&&t!==e;){if(null!==t._item.parentSub)n.unshift(t._item.parentSub);else{let e=0,r=t._item.parent._start;for(;r!==t._item&&null!==r;)!r.deleted&&r.countable&&(e+=r.length),r=r.right;n.unshift(e)}t=t._item.parent}return n},fc=()=>{za("Invalid access: Add Yjs type to a document before reading data.")};let pc=0;class gc{constructor(e,t){e.marker=!0,this.p=e,this.index=t,this.timestamp=pc++}}const mc=(e,t,n)=>{e.p.marker=!1,e.p=t,t.marker=!0,e.index=n,e.timestamp=pc++},bc=(e,t)=>{if(null===e._start||0===t||null===e._searchMarker)return null;const n=0===e._searchMarker.length?null:e._searchMarker.reduce((e,n)=>Po(t-e.index)<Po(t-n.index)?e:n);let r=e._start,i=0;for(null!==n&&(r=n.p,i=n.index,(e=>{e.timestamp=pc++})(n));null!==r.right&&i<t;){if(!r.deleted&&r.countable){if(t<i+r.length)break;i+=r.length}r=r.right}for(;null!==r.left&&i>t;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);for(;null!==r.left&&r.left.id.client===r.id.client&&r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&&r.countable&&(i-=r.length);return null!==n&&Po(n.index-i)<r.parent.length/80?(mc(n,r,i),n):((e,t,n)=>{if(e.length>=80){const r=e.reduce((e,t)=>e.timestamp<t.timestamp?e:t);return mc(r,t,n),r}{const r=new gc(t,n);return e.push(r),r}})(e._searchMarker,r,i)},yc=(e,t,n)=>{for(let r=e.length-1;r>=0;r--){const i=e[r];if(n>0){let t=i.p;for(t.marker=!1;t&&(t.deleted||!t.countable);)t=t.left,t&&!t.deleted&&t.countable&&(i.index-=t.length);if(null===t||!0===t.marker){e.splice(r,1);continue}i.p=t,t.marker=!0}(t<i.index||n>0&&t===i.index)&&(i.index=Ro(t,i.index+n))}},wc=(e,t,n)=>{const r=e,i=t.changedParentTypes;for(;Oo(i,e,()=>[]).push(n),null!==e._item;)e=e._item.parent;kl(r._eH,n,t)};class vc{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=yl(),this._dEH=yl(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,t){this.doc=e,this._item=t}_copy(){throw _s()}clone(){throw _s()}_write(e){}get _first(){let e=this._start;for(;null!==e&&e.deleted;)e=e.right;return e}_callObserver(e,t){!e.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(e){wl(this._eH,e)}observeDeep(e){wl(this._dEH,e)}unobserve(e){vl(this._eH,e)}unobserveDeep(e){vl(this._dEH,e)}toJSON(){}}const kc=(e,t,n)=>{e.doc??fc(),t<0&&(t=e._length+t),n<0&&(n=e._length+n);let r=n-t;const i=[];let o=e._start;for(;null!==o&&r>0;){if(o.countable&&!o.deleted){const e=o.content.getContent();if(e.length<=t)t-=e.length;else{for(let n=t;n<e.length&&r>0;n++)i.push(e[n]),r--;t=0}}o=o.right}return i},xc=e=>{e.doc??fc();const t=[];let n=e._start;for(;null!==n;){if(n.countable&&!n.deleted){const e=n.content.getContent();for(let n=0;n<e.length;n++)t.push(e[n])}n=n.right}return t},_c=(e,t)=>{let n=0,r=e._start;for(e.doc??fc();null!==r;){if(r.countable&&!r.deleted){const i=r.content.getContent();for(let r=0;r<i.length;r++)t(i[r],n++,e)}r=r.right}},Cc=(e,t)=>{const n=[];return _c(e,(r,i)=>{n.push(t(r,i,e))}),n},Ec=e=>{let t=e._start,n=null,r=0;return{[Symbol.iterator](){return this},next:()=>{if(null===n){for(;null!==t&&t.deleted;)t=t.right;if(null===t)return{done:!0,value:void 0};n=t.content.getContent(),r=0,t=t.right}const e=n[r++];return n.length<=r&&(n=null),{done:!1,value:e}}}},Sc=(e,t)=>{e.doc??fc();const n=bc(e,t);let r=e._start;for(null!==n&&(r=n.p,t-=n.index);null!==r;r=r.right)if(!r.deleted&&r.countable){if(t<r.length)return r.content.getContent()[t];t-=r.length}},Oc=(e,t,n,r)=>{let i=n;const o=e.doc,s=o.clientID,a=o.store,l=null===n?t._start:n.right;let c=[];const u=()=>{c.length>0&&(i=new ju(Cl(s,zl(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new wu(c)),i.integrate(e,0),c=[])};r.forEach(n=>{if(null===n)c.push(n);else switch(n.constructor){case Number:case Object:case Boolean:case Array:case String:c.push(n);break;default:switch(u(),n.constructor){case Uint8Array:case ArrayBuffer:i=new ju(Cl(s,zl(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new du(new Uint8Array(n))),i.integrate(e,0);break;case el:i=new ju(Cl(s,zl(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new pu(n)),i.integrate(e,0);break;default:if(!(n instanceof vc))throw new Error("Unexpected content type in insert operation");i=new ju(Cl(s,zl(a,s)),i,i&&i.lastId,l,l&&l.id,t,null,new Au(n)),i.integrate(e,0)}}}),u()},Lc=()=>xs("Length exceeded!"),Ac=(e,t,n,r)=>{if(n>t._length)throw Lc();if(0===n)return t._searchMarker&&yc(t._searchMarker,n,r.length),Oc(e,t,null,r);const i=n,o=bc(t,n);let s=t._start;for(null!==o&&(s=o.p,0===(n-=o.index)&&(s=s.prev,n+=s&&s.countable&&!s.deleted?s.length:0));null!==s;s=s.right)if(!s.deleted&&s.countable){if(n<=s.length){n<s.length&&Fl(e,Cl(s.id.client,s.id.clock+n));break}n-=s.length}return t._searchMarker&&yc(t._searchMarker,i,r.length),Oc(e,t,s,r)},$c=(e,t,n,r)=>{if(0===r)return;const i=n,o=r,s=bc(t,n);let a=t._start;for(null!==s&&(a=s.p,n-=s.index);null!==a&&n>0;a=a.right)!a.deleted&&a.countable&&(n<a.length&&Fl(e,Cl(a.id.client,a.id.clock+n)),n-=a.length);for(;r>0&&null!==a;)a.deleted||(r<a.length&&Fl(e,Cl(a.id.client,a.id.clock+r)),a.delete(e),r-=a.length),a=a.right;if(r>0)throw Lc();t._searchMarker&&yc(t._searchMarker,i,-o+r)},Mc=(e,t,n)=>{const r=t._map.get(n);void 0!==r&&r.delete(e)},jc=(e,t,n,r)=>{const i=t._map.get(n)||null,o=e.doc,s=o.clientID;let a;if(null==r)a=new wu([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:a=new wu([r]);break;case Uint8Array:a=new du(r);break;case el:a=new pu(r);break;default:if(!(r instanceof vc))throw new Error("Unexpected content type");a=new Au(r)}new ju(Cl(s,zl(o.store,s)),i,i&&i.lastId,null,null,t,n,a).integrate(e,0)},Dc=(e,t)=>{e.doc??fc();const n=e._map.get(t);return void 0===n||n.deleted?void 0:n.content.getContent()[n.length-1]},Nc=e=>{const t={};return e.doc??fc(),e._map.forEach((e,n)=>{e.deleted||(t[n]=e.content.getContent()[e.length-1])}),t},Tc=(e,t)=>{e.doc??fc();const n=e._map.get(t);return void 0!==n&&!n.deleted},Pc=e=>{return e.doc??fc(),t=e._map.entries(),n=e=>!e[1].deleted,Ia(()=>{let e;do{e=t.next()}while(!e.done&&!n(e.value));return e});var t,n};class zc extends dc{}class Rc extends vc{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){const t=new Rc;return t.push(e),t}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Rc}clone(){const e=new Rc;return e.insert(0,this.toArray().map(e=>e instanceof vc?e.clone():e)),e}get length(){return this.doc??fc(),this._length}_callObserver(e,t){super._callObserver(e,t),wc(this,e,new zc(this,e))}insert(e,t){null!==this.doc?Gl(this.doc,n=>{Ac(n,this,e,t)}):this._prelimContent.splice(e,0,...t)}push(e){null!==this.doc?Gl(this.doc,t=>{((e,t,n)=>{let r=(t._searchMarker||[]).reduce((e,t)=>t.index>e.index?t:e,{index:0,p:t._start}).p;if(r)for(;r.right;)r=r.right;Oc(e,t,r,n)})(t,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,t=1){null!==this.doc?Gl(this.doc,n=>{$c(n,this,e,t)}):this._prelimContent.splice(e,t)}get(e){return Sc(this,e)}toArray(){return xc(this)}slice(e=0,t=this.length){return kc(this,e,t)}toJSON(){return this.map(e=>e instanceof vc?e.toJSON():e)}map(e){return Cc(this,e)}forEach(e){_c(this,e)}[Symbol.iterator](){return Ec(this)}_write(e){e.writeTypeRef(xu)}}class Ic extends dc{constructor(e,t,n){super(e,t),this.keysChanged=n}}class qc extends vc{constructor(e){super(),this._prelimContent=null,this._prelimContent=void 0===e?new Map:new Map(e)}_integrate(e,t){super._integrate(e,t),this._prelimContent.forEach((e,t)=>{this.set(t,e)}),this._prelimContent=null}_copy(){return new qc}clone(){const e=new qc;return this.forEach((t,n)=>{e.set(n,t instanceof vc?t.clone():t)}),e}_callObserver(e,t){wc(this,e,new Ic(this,e,t))}toJSON(){this.doc??fc();const e={};return this._map.forEach((t,n)=>{if(!t.deleted){const r=t.content.getContent()[t.length-1];e[n]=r instanceof vc?r.toJSON():r}}),e}get size(){return[...Pc(this)].length}keys(){return qa(Pc(this),e=>e[0])}values(){return qa(Pc(this),e=>e[1].content.getContent()[e[1].length-1])}entries(){return qa(Pc(this),e=>[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??fc(),this._map.forEach((t,n)=>{t.deleted||e(t.content.getContent()[t.length-1],n,this)})}[Symbol.iterator](){return this.entries()}delete(e){null!==this.doc?Gl(this.doc,t=>{Mc(t,this,e)}):this._prelimContent.delete(e)}set(e,t){return null!==this.doc?Gl(this.doc,n=>{jc(n,this,e,t)}):this._prelimContent.set(e,t),t}get(e){return Dc(this,e)}has(e){return Tc(this,e)}clear(){null!==this.doc?Gl(this.doc,e=>{this.forEach(function(t,n,r){Mc(e,r,n)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(_u)}}const Uc=(e,t)=>e===t||"object"===typeof e&&"object"===typeof t&&e&&t&&((e,t)=>e===t||ta(e)===ta(t)&&((e,t)=>{for(const n in e)if(!t(e[n],n))return!1;return!0})(e,(e,n)=>(void 0!==e||na(t,n))&&t[n]===e))(e,t);class Fc{constructor(e,t,n,r){this.left=e,this.right=t,this.index=n,this.currentAttributes=r}forward(){if(null===this.right&&Cs(),this.right.content.constructor===mu)this.right.deleted||Hc(this.currentAttributes,this.right.content);else this.right.deleted||(this.index+=this.right.length);this.left=this.right,this.right=this.right.right}}const Vc=(e,t,n)=>{for(;null!==t.right&&n>0;){if(t.right.content.constructor===mu)t.right.deleted||Hc(t.currentAttributes,t.right.content);else t.right.deleted||(n<t.right.length&&Fl(e,Cl(t.right.id.client,t.right.id.clock+n)),t.index+=t.right.length,n-=t.right.length);t.left=t.right,t.right=t.right.right}return t},Wc=(e,t,n,r)=>{const i=new Map,o=r?bc(t,n):null;if(o){const t=new Fc(o.p.left,o.p,o.index,i);return Vc(e,t,n-o.index)}{const r=new Fc(null,t._start,0,i);return Vc(e,r,n)}},Bc=(e,t,n,r)=>{for(;null!==n.right&&(!0===n.right.deleted||n.right.content.constructor===mu&&Uc(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();const i=e.doc,o=i.clientID;r.forEach((r,s)=>{const a=n.left,l=n.right,c=new ju(Cl(o,zl(i.store,o)),a,a&&a.lastId,l,l&&l.id,t,null,new mu(s,r));c.integrate(e,0),n.right=c,n.forward()})},Hc=(e,t)=>{const{key:n,value:r}=t;null===r?e.delete(n):e.set(n,r)},Zc=(e,t)=>{for(;null!==e.right&&(e.right.deleted||e.right.content.constructor===mu&&Uc(t[e.right.content.key]??null,e.right.content.value));)e.forward()},Jc=(e,t,n,r)=>{const i=e.doc,o=i.clientID,s=new Map;for(const a in r){const l=r[a],c=n.currentAttributes.get(a)??null;if(!Uc(c,l)){s.set(a,c);const{left:r,right:u}=n;n.right=new ju(Cl(o,zl(i.store,o)),r,r&&r.lastId,u,u&&u.id,t,null,new mu(a,l)),n.right.integrate(e,0),n.forward()}}return s},Xc=(e,t,n,r,i)=>{n.currentAttributes.forEach((e,t)=>{void 0===i[t]&&(i[t]=null)});const o=e.doc,s=o.clientID;Zc(n,i);const a=Jc(e,t,n,i),l=r.constructor===String?new vu(r):r instanceof vc?new Au(r):new gu(r);let{left:c,right:u,index:d}=n;t._searchMarker&&yc(t._searchMarker,n.index,l.getLength()),u=new ju(Cl(s,zl(o.store,s)),c,c&&c.lastId,u,u&&u.id,t,null,l),u.integrate(e,0),n.right=u,n.index=d,n.forward(),Bc(e,t,n,a)},Yc=(e,t,n,r,i)=>{const o=e.doc,s=o.clientID;Zc(n,i);const a=Jc(e,t,n,i);e:for(;null!==n.right&&(r>0||a.size>0&&(n.right.deleted||n.right.content.constructor===mu));){if(!n.right.deleted)switch(n.right.content.constructor){case mu:{const{key:t,value:o}=n.right.content,s=i[t];if(void 0!==s){if(Uc(s,o))a.delete(t);else{if(0===r)break e;a.set(t,o)}n.right.delete(e)}else n.currentAttributes.set(t,o);break}default:r<n.right.length&&Fl(e,Cl(n.right.id.client,n.right.id.clock+r)),r-=n.right.length}n.forward()}if(r>0){let i="";for(;r>0;r--)i+="\n";n.right=new ju(Cl(s,zl(o.store,s)),n.left,n.left&&n.left.lastId,n.right,n.right&&n.right.id,t,null,new vu(i)),n.right.integrate(e,0),n.forward()}Bc(e,t,n,a)},Kc=(e,t,n,r,i)=>{let o=t;const s=Eo();for(;o&&(!o.countable||o.deleted);){if(!o.deleted&&o.content.constructor===mu){const e=o.content;s.set(e.key,e)}o=o.right}let a=0,l=!1;for(;t!==o;){if(n===t&&(l=!0),!t.deleted){const n=t.content;switch(n.constructor){case mu:{const{key:o,value:c}=n,u=r.get(o)??null;s.get(o)===n&&u!==c||(t.delete(e),a++,l||(i.get(o)??null)!==c||u===c||(null===u?i.delete(o):i.set(o,u))),l||t.deleted||Hc(i,n);break}}}t=t.right}return a},Gc=e=>{let t=0;return Gl(e.doc,n=>{let r=e._start,i=e._start,o=Eo();const s=So(o);for(;i;){if(!1===i.deleted)if(i.content.constructor===mu)Hc(s,i.content);else t+=Kc(n,r,i,o,s),o=So(s),r=i;i=i.right}}),t},Qc=e=>{const t=new Set,n=e.doc;for(const[r,i]of e.afterState.entries()){const o=e.beforeState.get(r)||0;i!==o&&Wl(e,n.store.clients.get(r),o,i,e=>{e.deleted||e.content.constructor!==mu||e.constructor===uu||t.add(e.parent)})}Gl(n,n=>{Va(e,e.deleteSet,e=>{if(e instanceof uu||!e.parent._hasFormatting||t.has(e.parent))return;const r=e.parent;e.content.constructor===mu?t.add(r):((e,t)=>{for(;t&&t.right&&(t.right.deleted||!t.right.countable);)t=t.right;const n=new Set;for(;t&&(t.deleted||!t.countable);){if(!t.deleted&&t.content.constructor===mu){const r=t.content.key;n.has(r)?t.delete(e):n.add(r)}t=t.left}})(n,e)});for(const e of t)Gc(e)})},eu=(e,t,n)=>{const r=n,i=So(t.currentAttributes),o=t.right;for(;n>0&&null!==t.right;){if(!1===t.right.deleted)switch(t.right.content.constructor){case Au:case gu:case vu:n<t.right.length&&Fl(e,Cl(t.right.id.client,t.right.id.clock+n)),n-=t.right.length,t.right.delete(e)}t.forward()}o&&Kc(e,o,t.right,i,t.currentAttributes);const s=(t.left||t.right).parent;return s._searchMarker&&yc(s._searchMarker,t.index,-r+n),t};class tu extends dc{constructor(e,t,n){super(e,t),this.childListChanged=!1,this.keysChanged=new Set,n.forEach(e=>{null===e?this.childListChanged=!0:this.keysChanged.add(e)})}get changes(){if(null===this._changes){const e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(null===this._delta){const e=this.target.doc,t=[];Gl(e,e=>{const n=new Map,r=new Map;let i=this.target._start,o=null;const s={};let a="",l=0,c=0;const u=()=>{if(null!==o){let e=null;switch(o){case"delete":c>0&&(e={delete:c}),c=0;break;case"insert":("object"===typeof a||a.length>0)&&(e={insert:a},n.size>0&&(e.attributes={},n.forEach((t,n)=>{null!==t&&(e.attributes[n]=t)}))),a="";break;case"retain":l>0&&(e={retain:l},(e=>{for(const t in e)return!1;return!0})(s)||(e.attributes=Gs({},s))),l=0}e&&t.push(e),o=null}};for(;null!==i;){switch(i.content.constructor){case Au:case gu:this.adds(i)?this.deletes(i)||(u(),o="insert",a=i.content.getContent()[0],u()):this.deletes(i)?("delete"!==o&&(u(),o="delete"),c+=1):i.deleted||("retain"!==o&&(u(),o="retain"),l+=1);break;case vu:this.adds(i)?this.deletes(i)||("insert"!==o&&(u(),o="insert"),a+=i.content.str):this.deletes(i)?("delete"!==o&&(u(),o="delete"),c+=i.length):i.deleted||("retain"!==o&&(u(),o="retain"),l+=i.length);break;case mu:{const{key:t,value:a}=i.content;if(this.adds(i)){if(!this.deletes(i)){const l=n.get(t)??null;Uc(l,a)?null!==a&&i.delete(e):("retain"===o&&u(),Uc(a,r.get(t)??null)?delete s[t]:s[t]=a)}}else if(this.deletes(i)){r.set(t,a);const e=n.get(t)??null;Uc(e,a)||("retain"===o&&u(),s[t]=e)}else if(!i.deleted){r.set(t,a);const n=s[t];void 0!==n&&(Uc(n,a)?null!==n&&i.delete(e):("retain"===o&&u(),null===a?delete s[t]:s[t]=a))}i.deleted||("insert"===o&&u(),Hc(n,i.content));break}}i=i.right}for(u();t.length>0;){const e=t[t.length-1];if(void 0===e.retain||void 0!==e.attributes)break;t.pop()}}),this._delta=t}return this._delta}}class nu extends vc{constructor(e){super(),this._pending=void 0!==e?[()=>this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??fc(),this._length}_integrate(e,t){super._integrate(e,t);try{this._pending.forEach(e=>e())}catch(O){}this._pending=null}_copy(){return new nu}clone(){const e=new nu;return e.applyDelta(this.toDelta()),e}_callObserver(e,t){super._callObserver(e,t);const n=new tu(this,e,t);wc(this,e,n),!e.local&&this._hasFormatting&&(e._needFormattingCleanup=!0)}toString(){this.doc??fc();let e="",t=this._start;for(;null!==t;)!t.deleted&&t.countable&&t.content.constructor===vu&&(e+=t.content.str),t=t.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:t=!0}={}){null!==this.doc?Gl(this.doc,n=>{const r=new Fc(null,this._start,0,new Map);for(let i=0;i<e.length;i++){const o=e[i];if(void 0!==o.insert){const s=t||"string"!==typeof o.insert||i!==e.length-1||null!==r.right||"\n"!==o.insert.slice(-1)?o.insert:o.insert.slice(0,-1);("string"!==typeof s||s.length>0)&&Xc(n,this,r,s,o.attributes||{})}else void 0!==o.retain?Yc(n,this,r,o.retain,o.attributes||{}):void 0!==o.delete&&eu(n,r,o.delete)}}):this._pending.push(()=>this.applyDelta(e))}toDelta(e,t,n){this.doc??fc();const r=[],i=new Map,o=this.doc;let s="",a=this._start;function l(){if(s.length>0){const e={};let t=!1;i.forEach((n,r)=>{t=!0,e[r]=n});const n={insert:s};t&&(n.attributes=e),r.push(n),s=""}}const c=()=>{for(;null!==a;){if(Dl(a,e)||void 0!==t&&Dl(a,t))switch(a.content.constructor){case vu:{const r=i.get("ychange");void 0===e||Dl(a,e)?void 0===t||Dl(a,t)?void 0!==r&&(l(),i.delete("ychange")):void 0!==r&&r.user===a.id.client&&"added"===r.type||(l(),i.set("ychange",n?n("added",a.id):{type:"added"})):void 0!==r&&r.user===a.id.client&&"removed"===r.type||(l(),i.set("ychange",n?n("removed",a.id):{type:"removed"})),s+=a.content.str;break}case Au:case gu:{l();const e={insert:a.content.getContent()[0]};if(i.size>0){const t={};e.attributes=t,i.forEach((e,n)=>{t[n]=e})}r.push(e);break}case mu:Dl(a,e)&&(l(),Hc(i,a.content))}a=a.right}l()};return e||t?Gl(o,n=>{e&&Nl(n,e),t&&Nl(n,t),c()},"cleanup"):c(),r}insert(e,t,n){if(t.length<=0)return;const r=this.doc;null!==r?Gl(r,r=>{const i=Wc(r,this,e,!n);n||(n={},i.currentAttributes.forEach((e,t)=>{n[t]=e})),Xc(r,this,i,t,n)}):this._pending.push(()=>this.insert(e,t,n))}insertEmbed(e,t,n){const r=this.doc;null!==r?Gl(r,r=>{const i=Wc(r,this,e,!n);Xc(r,this,i,t,n||{})}):this._pending.push(()=>this.insertEmbed(e,t,n||{}))}delete(e,t){if(0===t)return;const n=this.doc;null!==n?Gl(n,n=>{eu(n,Wc(n,this,e,!0),t)}):this._pending.push(()=>this.delete(e,t))}format(e,t,n){if(0===t)return;const r=this.doc;null!==r?Gl(r,r=>{const i=Wc(r,this,e,!1);null!==i.right&&Yc(r,this,i,t,n)}):this._pending.push(()=>this.format(e,t,n))}removeAttribute(e){null!==this.doc?Gl(this.doc,t=>{Mc(t,this,e)}):this._pending.push(()=>this.removeAttribute(e))}setAttribute(e,t){null!==this.doc?Gl(this.doc,n=>{jc(n,this,e,t)}):this._pending.push(()=>this.setAttribute(e,t))}getAttribute(e){return Dc(this,e)}getAttributes(){return Nc(this)}_write(e){e.writeTypeRef(Cu)}}class ru{constructor(e,t=()=>!0){this._filter=t,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??fc()}[Symbol.iterator](){return this}next(){let e=this._currentNode,t=e&&e.content&&e.content.type;if(null!==e&&(!this._firstCall||e.deleted||!this._filter(t)))do{if(t=e.content.type,e.deleted||t.constructor!==ou&&t.constructor!==iu||null===t._start)for(;null!==e;){const t=e.next;if(null!==t){e=t;break}e=e.parent===this._root?null:e.parent._item}else e=t._start}while(null!==e&&(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,null===e?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}}class iu extends vc{constructor(){super(),this._prelimContent=[]}get firstChild(){const e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,t){super._integrate(e,t),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new iu}clone(){const e=new iu;return e.insert(0,this.toArray().map(e=>e instanceof vc?e.clone():e)),e}get length(){return this.doc??fc(),null===this._prelimContent?this._length:this._prelimContent.length}createTreeWalker(e){return new ru(this,e)}querySelector(e){e=e.toUpperCase();const t=new ru(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e).next();return t.done?null:t.value}querySelectorAll(e){return e=e.toUpperCase(),Mo(new ru(this,t=>t.nodeName&&t.nodeName.toUpperCase()===e))}_callObserver(e,t){wc(this,e,new su(this,t,e))}toString(){return Cc(this,e=>e.toString()).join("")}toJSON(){return this.toString()}toDOM(e=document,t={},n){const r=e.createDocumentFragment();return void 0!==n&&n._createAssociation(r,this),_c(this,i=>{r.insertBefore(i.toDOM(e,t,n),null)}),r}insert(e,t){null!==this.doc?Gl(this.doc,n=>{Ac(n,this,e,t)}):this._prelimContent.splice(e,0,...t)}insertAfter(e,t){if(null!==this.doc)Gl(this.doc,n=>{const r=e&&e instanceof vc?e._item:e;Oc(n,this,r,t)});else{const n=this._prelimContent,r=null===e?0:n.findIndex(t=>t===e)+1;if(0===r&&null!==e)throw xs("Reference item not found");n.splice(r,0,...t)}}delete(e,t=1){null!==this.doc?Gl(this.doc,n=>{$c(n,this,e,t)}):this._prelimContent.splice(e,t)}toArray(){return xc(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return Sc(this,e)}slice(e=0,t=this.length){return kc(this,e,t)}forEach(e){_c(this,e)}_write(e){e.writeTypeRef(Su)}}class ou extends iu{constructor(e="UNDEFINED"){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,t){super._integrate(e,t),this._prelimAttrs.forEach((e,t)=>{this.setAttribute(t,e)}),this._prelimAttrs=null}_copy(){return new ou(this.nodeName)}clone(){const e=new ou(this.nodeName);return((e,t)=>{for(const n in e)t(e[n],n)})(this.getAttributes(),(t,n)=>{"string"===typeof t&&e.setAttribute(n,t)}),e.insert(0,this.toArray().map(e=>e instanceof vc?e.clone():e)),e}toString(){const e=this.getAttributes(),t=[],n=[];for(const o in e)n.push(o);n.sort();const r=n.length;for(let o=0;o<r;o++){const r=n[o];t.push(r+'="'+e[r]+'"')}const i=this.nodeName.toLocaleLowerCase();return`<${i}${t.length>0?" "+t.join(" "):""}>${super.toString()}</${i}>`}removeAttribute(e){null!==this.doc?Gl(this.doc,t=>{Mc(t,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,t){null!==this.doc?Gl(this.doc,n=>{jc(n,this,e,t)}):this._prelimAttrs.set(e,t)}getAttribute(e){return Dc(this,e)}hasAttribute(e){return Tc(this,e)}getAttributes(e){return e?((e,t)=>{const n={};return e._map.forEach((e,r)=>{let i=e;for(;null!==i&&(!t.sv.has(i.id.client)||i.id.clock>=(t.sv.get(i.id.client)||0));)i=i.left;null!==i&&Dl(i,t)&&(n[r]=i.content.getContent()[i.length-1])}),n})(this,e):Nc(this)}toDOM(e=document,t={},n){const r=e.createElement(this.nodeName),i=this.getAttributes();for(const o in i){const e=i[o];"string"===typeof e&&r.setAttribute(o,e)}return _c(this,i=>{r.appendChild(i.toDOM(e,t,n))}),void 0!==n&&n._createAssociation(r,this),r}_write(e){e.writeTypeRef(Eu),e.writeKey(this.nodeName)}}class su extends dc{constructor(e,t,n){super(e,n),this.childListChanged=!1,this.attributesChanged=new Set,t.forEach(e=>{null===e?this.childListChanged=!0:this.attributesChanged.add(e)})}}class au extends qc{constructor(e){super(),this.hookName=e}_copy(){return new au(this.hookName)}clone(){const e=new au(this.hookName);return this.forEach((t,n)=>{e.set(n,t)}),e}toDOM(e=document,t={},n){const r=t[this.hookName];let i;return i=void 0!==r?r.createDom(this):document.createElement(this.hookName),i.setAttribute("data-yjs-hook",this.hookName),void 0!==n&&n._createAssociation(i,this),i}_write(e){e.writeTypeRef(Ou),e.writeKey(this.hookName)}}class lu extends nu{get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new lu}clone(){const e=new lu;return e.applyDelta(this.toDelta()),e}toDOM(e=document,t,n){const r=e.createTextNode(this.toString());return void 0!==n&&n._createAssociation(r,this),r}toString(){return this.toDelta().map(e=>{const t=[];for(const r in e.attributes){const n=[];for(const t in e.attributes[r])n.push({key:t,value:e.attributes[r][t]});n.sort((e,t)=>e.key<t.key?-1:1),t.push({nodeName:r,attrs:n})}t.sort((e,t)=>e.nodeName<t.nodeName?-1:1);let n="";for(let r=0;r<t.length;r++){const e=t[r];n+=`<${e.nodeName}`;for(let t=0;t<e.attrs.length;t++){const r=e.attrs[t];n+=` ${r.key}="${r.value}"`}n+=">"}n+=e.insert;for(let r=t.length-1;r>=0;r--)n+=`</${t[r].nodeName}>`;return n}).join("")}toJSON(){return this.toString()}_write(e){e.writeTypeRef(Lu)}}class cu{constructor(e,t){this.id=e,this.length=t}get deleted(){throw _s()}mergeWith(e){return!1}write(e,t,n){throw _s()}integrate(e,t){throw _s()}}class uu extends cu{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor&&(this.length+=e.length,!0)}integrate(e,t){t>0&&(this.id.clock+=t,this.length-=t),Rl(e.doc.store,this)}write(e,t){e.writeInfo(0),e.writeLen(this.length-t)}getMissing(e,t){return null}}class du{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new du(this.content)}splice(e){throw _s()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeBuf(this.content)}getRef(){return 3}}class hu{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new hu(this.len)}splice(e){const t=new hu(this.len-e);return this.len=e,t}mergeWith(e){return this.len+=e.len,!0}integrate(e,t){Za(e.deleteSet,t.id.client,t.id.clock,this.len),t.markDeleted()}delete(e){}gc(e){}write(e,t){e.writeLen(this.len-t)}getRef(){return 1}}const fu=(e,t)=>new el({guid:e,...t,shouldLoad:t.shouldLoad||t.autoLoad||!1});class pu{constructor(e){e._item,this.doc=e;const t={};this.opts=t,e.gc||(t.gc=!1),e.autoLoad&&(t.autoLoad=!0),null!==e.meta&&(t.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new pu(fu(this.doc.guid,this.opts))}splice(e){throw _s()}mergeWith(e){return!1}integrate(e,t){this.doc._item=t,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&&e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,t){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}}class gu{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new gu(this.embed)}splice(e){throw _s()}mergeWith(e){return!1}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeJSON(this.embed)}getRef(){return 5}}class mu{constructor(e,t){this.key=e,this.value=t}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new mu(this.key,this.value)}splice(e){throw _s()}mergeWith(e){return!1}integrate(e,t){const n=t.parent;n._searchMarker=null,n._hasFormatting=!0}delete(e){}gc(e){}write(e,t){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}}class bu{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new bu(this.arr)}splice(e){const t=new bu(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){const n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){const t=this.arr[r];e.writeString(void 0===t?"undefined":JSON.stringify(t))}}getRef(){return 2}}const yu="development"===ma("node_env");class wu{constructor(e){this.arr=e,yu&&ia(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new wu(this.arr)}splice(e){const t=new wu(this.arr.slice(e));return this.arr=this.arr.slice(0,e),t}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){const n=this.arr.length;e.writeLen(n-t);for(let r=t;r<n;r++){const t=this.arr[r];e.writeAny(t)}}getRef(){return 8}}class vu{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split("")}isCountable(){return!0}copy(){return new vu(this.str)}splice(e){const t=new vu(this.str.slice(e));this.str=this.str.slice(0,e);const n=this.str.charCodeAt(e-1);return n>=55296&&n<=56319&&(this.str=this.str.slice(0,e-1)+"\ufffd",t.str="\ufffd"+t.str.slice(1)),t}mergeWith(e){return this.str+=e.str,!0}integrate(e,t){}delete(e){}gc(e){}write(e,t){e.writeString(0===t?this.str:this.str.slice(t))}getRef(){return 4}}const ku=[e=>new Rc,e=>new qc,e=>new nu,e=>new ou(e.readKey()),e=>new iu,e=>new au(e.readKey()),e=>new lu],xu=0,_u=1,Cu=2,Eu=3,Su=4,Ou=5,Lu=6;class Au{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Au(this.type._copy())}splice(e){throw _s()}mergeWith(e){return!1}integrate(e,t){this.type._integrate(e.doc,t)}delete(e){let t=this.type._start;for(;null!==t;)t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e),t=t.right;this.type._map.forEach(t=>{t.deleted?t.id.clock<(e.beforeState.get(t.id.client)||0)&&e._mergeStructs.push(t):t.delete(e)}),e.changed.delete(this.type)}gc(e){let t=this.type._start;for(;null!==t;)t.gc(e,!0),t=t.right;this.type._start=null,this.type._map.forEach(t=>{for(;null!==t;)t.gc(e,!0),t=t.left}),this.type._map=new Map}write(e,t){this.type._write(e)}getRef(){return 7}}const $u=(e,t)=>{let n,r=t,i=0;do{i>0&&(r=Cl(r.client,r.clock+i)),n=ql(e,r),i=r.clock-n.id.clock,r=n.redone}while(null!==r&&n instanceof ju);return{item:n,diff:i}},Mu=(e,t,n)=>{const{client:r,clock:i}=t.id,o=new ju(Cl(r,i+n),t,Cl(r,i+n-1),t.right,t.rightOrigin,t.parent,t.parentSub,t.content.splice(n));return t.deleted&&o.markDeleted(),t.keep&&(o.keep=!0),null!==t.redone&&(o.redone=Cl(t.redone.client,t.redone.clock+n)),t.right=o,null!==o.right&&(o.right.left=o),e._mergeStructs.push(o),null!==o.parentSub&&null===o.right&&o.parent._map.set(o.parentSub,o),t.length=n,o};class ju extends cu{constructor(e,t,n,r,i,o,s,a){super(e,a.getLength()),this.origin=n,this.left=t,this.right=r,this.rightOrigin=i,this.parent=o,this.parentSub=s,this.redone=null,this.content=a,this.info=this.content.isCountable()?2:0}set marker(e){(8&this.info)>0!==e&&(this.info^=8)}get marker(){return(8&this.info)>0}get keep(){return(1&this.info)>0}set keep(e){this.keep!==e&&(this.info^=1)}get countable(){return(2&this.info)>0}get deleted(){return(4&this.info)>0}set deleted(e){this.deleted!==e&&(this.info^=4)}markDeleted(){this.info|=4}getMissing(e,t){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=zl(t,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=zl(t,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===xl&&this.id.client!==this.parent.client&&this.parent.clock>=zl(t,this.parent.client))return this.parent.client;if(this.origin&&(this.left=Vl(e,t,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=Fl(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===uu||this.right&&this.right.constructor===uu)this.parent=null;else if(this.parent){if(this.parent.constructor===xl){const e=ql(t,this.parent);e.constructor===uu?this.parent=null:this.parent=e.content.type}}else this.left&&this.left.constructor===ju?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&&this.right.constructor===ju&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);return null}integrate(e,t){if(t>0&&(this.id.clock+=t,this.left=Vl(e,e.doc.store,Cl(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(t),this.length-=t),this.parent){if(!this.left&&(!this.right||null!==this.right.left)||this.left&&this.left.right!==this.right){let t,n=this.left;if(null!==n)t=n.right;else if(null!==this.parentSub)for(t=this.parent._map.get(this.parentSub)||null;null!==t&&null!==t.left;)t=t.left;else t=this.parent._start;const r=new Set,i=new Set;for(;null!==t&&t!==this.right;){if(i.add(t),r.add(t),_l(this.origin,t.origin)){if(t.id.client<this.id.client)n=t,r.clear();else if(_l(this.rightOrigin,t.rightOrigin))break}else{if(null===t.origin||!i.has(ql(e.doc.store,t.origin)))break;r.has(ql(e.doc.store,t.origin))||(n=t,r.clear())}t=t.right}this.left=n}if(null!==this.left){const e=this.left.right;this.right=e,this.left.right=this}else{let e;if(null!==this.parentSub)for(e=this.parent._map.get(this.parentSub)||null;null!==e&&null!==e.left;)e=e.left;else e=this.parent._start,this.parent._start=this;this.right=e}null!==this.right?this.right.left=this:null!==this.parentSub&&(this.parent._map.set(this.parentSub,this),null!==this.left&&this.left.delete(e)),null===this.parentSub&&this.countable&&!this.deleted&&(this.parent._length+=this.length),Rl(e.doc.store,this),this.content.integrate(e,this),Zl(e,this.parent,this.parentSub),(null!==this.parent._item&&this.parent._item.deleted||null!==this.parentSub&&null!==this.right)&&this.delete(e)}else new uu(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;null!==e&&e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;null!==e&&e.deleted;)e=e.left;return e}get lastId(){return 1===this.length?this.id:Cl(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&&_l(e.origin,this.lastId)&&this.right===e&&_l(this.rightOrigin,e.rightOrigin)&&this.id.client===e.id.client&&this.id.clock+this.length===e.id.clock&&this.deleted===e.deleted&&null===this.redone&&null===e.redone&&this.content.constructor===e.content.constructor&&this.content.mergeWith(e.content)){const t=this.parent._searchMarker;return t&&t.forEach(t=>{t.p===e&&(t.p=this,!this.deleted&&this.countable&&(t.index-=this.length))}),e.keep&&(this.keep=!0),this.right=e.right,null!==this.right&&(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){const t=this.parent;this.countable&&null===this.parentSub&&(t._length-=this.length),this.markDeleted(),Za(e.deleteSet,this.id.client,this.id.clock,this.length),Zl(e,t,this.parentSub),this.content.delete(e)}}gc(e,t){if(!this.deleted)throw Cs();this.content.gc(e),t?((e,t,n)=>{const r=e.clients.get(t.id.client);r[Il(r,t.id.clock)]=n})(e,this,new uu(this.id,this.length)):this.content=new hu(this.length)}write(e,t){const n=t>0?Cl(this.id.client,this.id.clock+t-1):this.origin,r=this.rightOrigin,i=this.parentSub,o=31&this.content.getRef()|(null===n?0:Fo)|(null===r?0:Uo)|(null===i?0:32);if(e.writeInfo(o),null!==n&&e.writeLeftID(n),null!==r&&e.writeRightID(r),null===n&&null===r){const t=this.parent;if(void 0!==t._item){const n=t._item;if(null===n){const n=El(t);e.writeParentInfo(!0),e.writeString(n)}else e.writeParentInfo(!1),e.writeLeftID(n.id)}else t.constructor===String?(e.writeParentInfo(!0),e.writeString(t)):t.constructor===xl?(e.writeParentInfo(!1),e.writeLeftID(t)):Cs();null!==i&&e.writeString(i)}this.content.write(e,t)}}const Du=(e,t)=>Nu[31&t](e),Nu=[()=>{Cs()},e=>new hu(e.readLen()),e=>{const t=e.readLen(),n=[];for(let r=0;r<t;r++){const t=e.readString();"undefined"===t?n.push(void 0):n.push(JSON.parse(t))}return new bu(n)},e=>new du(e.readBuf()),e=>new vu(e.readString()),e=>new gu(e.readJSON()),e=>new mu(e.readKey(),e.readJSON()),e=>new Au(ku[e.readTypeRef()](e)),e=>{const t=e.readLen(),n=[];for(let r=0;r<t;r++)n.push(e.readAny());return new wu(n)},e=>new pu(fu(e.readString(),e.readAny())),()=>{Cs()}];class Tu extends cu{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor===e.constructor&&(this.length+=e.length,!0)}integrate(e,t){Cs()}write(e,t){e.writeInfo(10),ss(e.restEncoder,this.length-t)}getMissing(e,t){return null}}const Pu="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:{},zu="__ $YJS$ __";Pu[zu],Pu[zu]=!0;const Ru=new Map;const Iu="undefined"===typeof BroadcastChannel?class{constructor(e){var t;this.room=e,this.onmessage=null,this._onChange=t=>t.key===e&&null!==this.onmessage&&this.onmessage({data:ka(t.newValue||"")}),t=this._onChange,Ys||addEventListener("storage",t)}postMessage(e){Ks.setItem(this.room,va(new Uint8Array(e)))}close(){var e;e=this._onChange,Ys||removeEventListener("storage",e)}}:BroadcastChannel,qu=e=>Oo(Ru,e,()=>{const t=Lo(),n=new Iu(e);return n.onmessage=e=>t.forEach(t=>t(e.data,"broadcastchannel")),{bc:n,subs:t}}),Uu=(e,t,n=null)=>{const r=qu(e);r.bc.postMessage(t),r.subs.forEach(e=>e(t,n))},Fu=(e,t)=>{ss(e,0);const n=(e=>ml(e,new ol))(t);hs(e,n)},Vu=(e,t,n)=>{ss(e,1),hs(e,((e,t)=>hl(e,t,new sl))(t,n))},Wu=(e,t,n)=>{try{((e,t,n)=>{dl(e,t,n,nl)})(t,Ms(e),n)}catch(r){}},Bu=Wu,Hu=(e,t,n,r)=>{const i=Ds(e);switch(i){case 0:((e,t,n)=>{Vu(t,n,Ms(e))})(e,t,n);break;case 1:Wu(e,n,r);break;case 2:Bu(e,n,r);break;default:throw new Error("Unknown message type")}return i},Zu=3e4;class Ju extends No{constructor(e){super(),this.doc=e,this.clientID=e.clientID,this.states=new Map,this.meta=new Map,this._checkInterval=setInterval(()=>{const e=Sa();null!==this.getLocalState()&&15e3<=e-this.meta.get(this.clientID).lastUpdated&&this.setLocalState(this.getLocalState());const t=[];this.meta.forEach((n,r)=>{r!==this.clientID&&Zu<=e-n.lastUpdated&&this.states.has(r)&&t.push(r)}),t.length>0&&Xu(this,t,"timeout")},To(3e3)),e.on("destroy",()=>{this.destroy()}),this.setLocalState({})}destroy(){this.emit("destroy",[this]),this.setLocalState(null),super.destroy(),clearInterval(this._checkInterval)}getLocalState(){return this.states.get(this.clientID)||null}setLocalState(e){const t=this.clientID,n=this.meta.get(t),r=void 0===n?0:n.clock+1,i=this.states.get(t);null===e?this.states.delete(t):this.states.set(t,e),this.meta.set(t,{clock:r,lastUpdated:Sa()});const o=[],s=[],a=[],l=[];null===e?l.push(t):null==i?null!=e&&o.push(t):(s.push(t),la(i,e)||a.push(t)),(o.length>0||a.length>0||l.length>0)&&this.emit("change",[{added:o,updated:a,removed:l},"local"]),this.emit("update",[{added:o,updated:s,removed:l},"local"])}setLocalStateField(e,t){const n=this.getLocalState();null!==n&&this.setLocalState({...n,[e]:t})}getStates(){return this.states}}const Xu=(e,t,n)=>{const r=[];for(let i=0;i<t.length;i++){const n=t[i];if(e.states.has(n)){if(e.states.delete(n),n===e.clientID){const t=e.meta.get(n);e.meta.set(n,{clock:t.clock+1,lastUpdated:Sa()})}r.push(n)}}r.length>0&&(e.emit("change",[{added:[],updated:[],removed:r},n]),e.emit("update",[{added:[],updated:[],removed:r},n]))},Yu=(e,t,n=e.states)=>{const r=t.length,i=ts();ss(i,r);for(let o=0;o<r;o++){const r=t[o],s=n.get(r)||null,a=e.meta.get(r).clock;ss(i,r),ss(i,a),us(i,JSON.stringify(s))}return rs(i)};var Ku=n(88295);const Gu=[];Gu[0]=(e,t,n,r,i)=>{ss(e,0);const o=Hu(t,e,n.doc,n);r&&1===o&&!n.synced&&(n.synced=!0)},Gu[3]=(e,t,n,r,i)=>{ss(e,1),hs(e,Yu(n.awareness,Array.from(n.awareness.getStates().keys())))},Gu[1]=(e,t,n,r,i)=>{((e,t,n)=>{const r=Ls(t),i=Sa(),o=[],s=[],a=[],l=[],c=Ds(r);for(let u=0;u<c;u++){const t=Ds(r);let n=Ds(r);const c=JSON.parse(Ts(r)),u=e.meta.get(t),d=e.states.get(t),h=void 0===u?0:u.clock;(h<n||h===n&&null===c&&e.states.has(t))&&(null===c?t===e.clientID&&null!=e.getLocalState()?n++:e.states.delete(t):e.states.set(t,c),e.meta.set(t,{clock:n,lastUpdated:i}),void 0===u&&null!==c?o.push(t):void 0!==u&&null===c?l.push(t):null!==c&&(la(c,d)||a.push(t),s.push(t)))}(o.length>0||a.length>0||l.length>0)&&e.emit("change",[{added:o,updated:a,removed:l},n]),(o.length>0||s.length>0||l.length>0)&&e.emit("update",[{added:o,updated:s,removed:l},n])})(n.awareness,Ms(t),n)},Gu[2]=(e,t,n,r,i)=>{((e,t,n)=>{0===Ds(e)&&n(t,Ts(e))})(t,n.doc,(e,t)=>Qu(n,t))};const Qu=(e,t)=>{},ed=(e,t,n)=>{const r=Ls(t),i=ts(),o=Ds(r),s=e.messageHandlers[o];return s&&s(i,r,e,n,o),i},td=(e,t,n)=>{t===e.ws&&(e.emit("connection-close",[n,e]),e.ws=null,t.close(),e.wsconnecting=!1,e.wsconnected?(e.wsconnected=!1,e.synced=!1,Xu(e.awareness,Array.from(e.awareness.getStates().keys()).filter(t=>t!==e.doc.clientID),e),e.emit("status",[{status:"disconnected"}])):e.wsUnsuccessfulReconnects++,setTimeout(nd,zo(100*Io(2,e.wsUnsuccessfulReconnects),e.maxBackoffTime),e))},nd=e=>{if(e.shouldConnect&&null===e.ws){const t=new e._WS(e.url,e.protocols);t.binaryType="arraybuffer",e.ws=t,e.wsconnecting=!0,e.wsconnected=!1,e.synced=!1,t.onmessage=n=>{e.wsLastMessageReceived=Sa();const r=ed(e,new Uint8Array(n.data),!0);ns(r)>1&&t.send(rs(r))},t.onerror=t=>{e.emit("connection-error",[t,e])},t.onclose=n=>{td(e,t,n)},t.onopen=()=>{e.wsLastMessageReceived=Sa(),e.wsconnecting=!1,e.wsconnected=!0,e.wsUnsuccessfulReconnects=0,e.emit("status",[{status:"connected"}]);const n=ts();if(ss(n,0),Fu(n,e.doc),t.send(rs(n)),null!==e.awareness.getLocalState()){const n=ts();ss(n,1),hs(n,Yu(e.awareness,[e.doc.clientID])),t.send(rs(n))}},e.emit("status",[{status:"connecting"}])}},rd=(e,t)=>{const n=e.ws;e.wsconnected&&n&&n.readyState===n.OPEN&&n.send(t),e.bcconnected&&Uu(e.bcChannel,t,e)};class id extends Do{constructor(e,t,n,{connect:r=!0,awareness:i=new Ju(n),params:o={},protocols:s=[],WebSocketPolyfill:a=WebSocket,resyncInterval:l=-1,maxBackoffTime:c=2500,disableBc:u=!1}={}){for(super();"/"===e[e.length-1];)e=e.slice(0,e.length-1);this.serverUrl=e,this.bcChannel=e+"/"+t,this.maxBackoffTime=c,this.params=o,this.protocols=s,this.roomname=t,this.doc=n,this._WS=a,this.awareness=i,this.wsconnected=!1,this.wsconnecting=!1,this.bcconnected=!1,this.disableBc=u,this.wsUnsuccessfulReconnects=0,this.messageHandlers=Gu.slice(),this._synced=!1,this.ws=null,this.wsLastMessageReceived=0,this.shouldConnect=r,this._resyncInterval=0,l>0&&(this._resyncInterval=setInterval(()=>{if(this.ws&&this.ws.readyState===WebSocket.OPEN){const e=ts();ss(e,0),Fu(e,n),this.ws.send(rs(e))}},l)),this._bcSubscriber=(e,t)=>{if(t!==this){const t=ed(this,new Uint8Array(e),!1);ns(t)>1&&Uu(this.bcChannel,rs(t),this)}},this._updateHandler=(e,t)=>{if(t!==this){const t=ts();ss(t,0),((e,t)=>{ss(e,2),hs(e,t)})(t,e),rd(this,rs(t))}},this.doc.on("update",this._updateHandler),this._awarenessUpdateHandler=({added:e,updated:t,removed:n},r)=>{const o=e.concat(t).concat(n),s=ts();ss(s,1),hs(s,Yu(i,o)),rd(this,rs(s))},this._exitHandler=()=>{Xu(this.awareness,[n.clientID],"app closed")},ua&&"undefined"!==typeof Ku&&Ku.on("exit",this._exitHandler),i.on("update",this._awarenessUpdateHandler),this._checkInterval=setInterval(()=>{this.wsconnected&&3e4<Sa()-this.wsLastMessageReceived&&td(this,this.ws,null)},3e3),r&&this.connect()}get url(){const e=(e=>((e,t)=>{const n=[];for(const r in e)n.push(t(e[r],r));return n})(e,(e,t)=>`${encodeURIComponent(t)}=${encodeURIComponent(e)}`).join("&"))(this.params);return this.serverUrl+"/"+this.roomname+(0===e.length?"":"?"+e)}get synced(){return this._synced}set synced(e){this._synced!==e&&(this._synced=e,this.emit("synced",[e]),this.emit("sync",[e]))}destroy(){0!==this._resyncInterval&&clearInterval(this._resyncInterval),clearInterval(this._checkInterval),this.disconnect(),ua&&"undefined"!==typeof Ku&&Ku.off("exit",this._exitHandler),this.awareness.off("update",this._awarenessUpdateHandler),this.doc.off("update",this._updateHandler),super.destroy()}connectBc(){if(this.disableBc)return;this.bcconnected||(((e,t)=>{qu(e).subs.add(t)})(this.bcChannel,this._bcSubscriber),this.bcconnected=!0);const e=ts();ss(e,0),Fu(e,this.doc),Uu(this.bcChannel,rs(e),this);const t=ts();ss(t,0),Vu(t,this.doc),Uu(this.bcChannel,rs(t),this);const n=ts();ss(n,3),Uu(this.bcChannel,rs(n),this);const r=ts();ss(r,1),hs(r,Yu(this.awareness,[this.doc.clientID])),Uu(this.bcChannel,rs(r),this)}disconnectBc(){const e=ts();ss(e,1),hs(e,Yu(this.awareness,[this.doc.clientID],new Map)),rd(this,rs(e)),this.bcconnected&&(((e,t)=>{const n=qu(e),r=n.subs.delete(t);r&&0===n.subs.size&&(n.bc.close(),Ru.delete(e))})(this.bcChannel,this._bcSubscriber),this.bcconnected=!1)}disconnect(){this.shouldConnect=!1,this.disconnectBc(),null!==this.ws&&td(this,this.ws,null)}connect(){this.shouldConnect=!0,this.wsconnected||null!==this.ws||(nd(this),this.connectBc())}}class od{constructor(e,t,n){this.start=e,this.end=t,this.direction=n}}class sd{constructor(e,t,n=new Set,r=null){this.doc=e.doc,this.ytext=e,this.monacoModel=t,this.editors=n,this.mux=(()=>{let e=!0;return(t,n)=>{if(e){e=!1;try{t()}finally{e=!0}}else void 0!==n&&n()}})(),this._savedSelections=new Map,this._beforeTransaction=()=>{this.mux(()=>{this._savedSelections=new Map,n.forEach(n=>{if(n.getModel()===t){const r=((e,t,n)=>{const r=e.getSelection();if(null!==r){const e=r.getStartPosition(),i=r.getEndPosition(),o=Al(n,t.getOffsetAt(e)),s=Al(n,t.getOffsetAt(i));return new od(o,s,r.getDirection())}return null})(n,t,e);null!==r&&this._savedSelections.set(n,r)}})})},this.doc.on("beforeAllTransactions",this._beforeTransaction),this._decorations=new Map,this._rerenderDecorations=()=>{n.forEach(n=>{if(r&&n.getModel()===t){const i=this._decorations.get(n)||[],o=[];r.getStates().forEach((n,r)=>{if(r!==this.doc.clientID&&null!=n.selection&&null!=n.selection.anchor&&null!=n.selection.head){const i=$l(n.selection.anchor,this.doc),s=$l(n.selection.head,this.doc);if(null!==i&&null!==s&&i.type===e&&s.type===e){let e,n,a,l;i.index<s.index?(e=t.getPositionAt(i.index),n=t.getPositionAt(s.index),a="yRemoteSelectionHead yRemoteSelectionHead-"+r,l=null):(e=t.getPositionAt(s.index),n=t.getPositionAt(i.index),a=null,l="yRemoteSelectionHead yRemoteSelectionHead-"+r),o.push({range:new fe.Range(e.lineNumber,e.column,n.lineNumber,n.column),options:{className:"yRemoteSelection yRemoteSelection-"+r,afterContentClassName:a,beforeContentClassName:l}})}}}),this._decorations.set(n,n.deltaDecorations(i,o))}else this._decorations.delete(n)})},this._ytextObserver=n=>{this.mux(()=>{let r=0;n.delta.forEach(e=>{if(void 0!==e.retain)r+=e.retain;else if(void 0!==e.insert){const n=t.getPositionAt(r),i=new fe.Selection(n.lineNumber,n.column,n.lineNumber,n.column),o=e.insert;t.applyEdits([{range:i,text:o}]),r+=o.length}else{if(void 0===e.delete)throw Cs();{const n=t.getPositionAt(r),i=t.getPositionAt(r+e.delete),o=new fe.Selection(n.lineNumber,n.column,i.lineNumber,i.column);t.applyEdits([{range:o,text:""}])}}}),this._savedSelections.forEach((t,n)=>{const r=((e,t,n,r)=>{const i=$l(n.start,r),o=$l(n.end,r);if(null!==i&&null!==o&&i.type===t&&o.type===t){const t=e.getModel(),r=t.getPositionAt(i.index),s=t.getPositionAt(o.index);return fe.Selection.createWithDirection(r.lineNumber,r.column,s.lineNumber,s.column,n.direction)}return null})(n,e,t,this.doc);null!==r&&n.setSelection(r)})}),this._rerenderDecorations()},e.observe(this._ytextObserver);{const n=e.toString();t.getValue()!==n&&t.setValue(n)}this._monacoChangeHandler=t.onDidChangeContent(t=>{this.mux(()=>{this.doc.transact(()=>{t.changes.sort((e,t)=>t.rangeOffset-e.rangeOffset).forEach(t=>{e.delete(t.rangeOffset,t.rangeLength),e.insert(t.rangeOffset,t.text)})},this)})}),this._monacoDisposeHandler=t.onWillDispose(()=>{this.destroy()}),r&&(n.forEach(n=>{n.onDidChangeCursorSelection(()=>{if(n.getModel()===t){const i=n.getSelection();if(null===i)return;let o=t.getOffsetAt(i.getStartPosition()),s=t.getOffsetAt(i.getEndPosition());if(i.getDirection()===fe.SelectionDirection.RTL){const e=o;o=s,s=e}r.setLocalStateField("selection",{anchor:Al(e,o),head:Al(e,s)})}}),r.on("change",this._rerenderDecorations)}),this.awareness=r)}destroy(){this._monacoChangeHandler.dispose(),this._monacoDisposeHandler.dispose(),this.ytext.unobserve(this._ytextObserver),this.doc.off("beforeAllTransactions",this._beforeTransaction),this.awareness&&this.awareness.off("change",this._rerenderDecorations)}}var ad=n(98845);var ld=n(55835);const cd=({email:e,editorRef:t,setIsSpin:n,newEmailAiGeneratorRef:i})=>{const o=(0,r.useMemo)(()=>new el,[]),s=(0,po.fn)(),a=(0,r.useRef)([]),l=(0,r.useRef)([]),c=(0,r.useRef)(!1),u=(0,r.useRef)(0),d=(0,r.useRef)(""),[h,f]=(0,r.useState)(null),[p,g]=(0,r.useState)(null),[m,b]=(0,r.useState)(!1),[y,w]=(0,r.useState)([]),[v,k]=(0,r.useState)(!1),[x,_]=(0,r.useState)(!1),C=(0,po.aD)(s),E=(0,te.d4)(le.C1),{saveEmailFromEditor:S}=function(e,t){const[n]=(0,ad.LX)(),i=(0,r.useCallback)(()=>{const r=(new Date).toISOString().slice(0,19).replace("T"," "),i={parent:null===e||void 0===e?void 0:e.id,title:e.title,author:e.author,project:e.project,html:(null===t||void 0===t?void 0:t.getValue())||"",excerpt:r,subject:e.subject,preheader:e.preheader,common_styles:e.common_styles,parent_email:e.parent_email};n({emailId:null===e||void 0===e?void 0:e.id,body:i}).catch(e=>{})},[t,e]);return{saveEmailFromEditor:i}}(e,h),O=(0,r.useRef)(null),[L,A]=(0,r.useState)(!1),[$]=(0,ad.dN)(),M=null===e||void 0===e?void 0:e.id,j=!(M!==ld.LA&&!pe.EW.isPlugin),D=(0,r.useMemo)(()=>({name:{first_name:j?null===E||void 0===E?void 0:E.username:null===E||void 0===E?void 0:E.first_name,last_name:j?"":null===E||void 0===E?void 0:E.last_name,email:null===E||void 0===E?void 0:E.email},color:Co()}),[E,j]),N=(0,r.useMemo)(()=>((e,t)=>e.filter(e=>e.user.color!==t.color))(y,D),[D,y]),T=(0,r.useCallback)(()=>{p&&(null===p||void 0===p||p.destroy(),g(null))},[p]),P=(0,r.useCallback)(()=>{try{S()}catch(e){}},[S]),z=(0,r.useCallback)(async e=>{try{const t={emailId:M,source:"editor",html:e};return await $(t).unwrap(),!0}catch(t){return!1}},[M,$]),R=(0,r.useCallback)(async e=>{if(await z(e)&&L){const e=setTimeout(()=>{A(!1)},0);return()=>clearTimeout(e)}},[z,A,L]);(0,r.useEffect)(()=>{M&&pe._P.isEditor&&(1===y.length&&u.current>1&&p&&P(),u.current=y.length)},[y.length,p,P]),(0,r.useEffect)(()=>{if(!M||!pe._P.isEditor||L)return;const e=j?`${M}-plugin`:`${M}-collaborate`,t=new id(ld.ZW,e,o);return g(t),t.awareness.setLocalStateField("user",D),()=>{null===t||void 0===t||t.destroy(),null===o||void 0===o||o.destroy()}},[o,D,j,M,L]);const I=(0,r.useCallback)(e=>{if(!c.current){c.current=!0;try{const t=l.current,n=Array.from(e.getStates().values());(n.length>1||n.length!==t.length)&&(w(n),requestAnimationFrame(()=>{_o(n,h,a,m,b,D)})),l.current=n}finally{c.current=!1}}},[h,a,m,b,D]);if((0,r.useEffect)(()=>{if(!p||!h||!pe._P.isEditor||!t.current||!h.getModel()||L)return;let e=null;const r=p.awareness,i=o.getText("monaco"),s=async o=>{const s=Array.from(r.getStates().values());if(o){if(i._length>0&&s.length>1&&!O.current){var a,l;const e=e=>e.replace(/\s+/g," ").trim();e((null===h||void 0===h||null===(a=h.getModel())||void 0===a||null===(l=a.getValue())||void 0===l?void 0:l.toString())||"")!==e(i.toString())&&(await async function(e,t){await new Promise(n=>{const r=()=>{var i,o,s;null===t||void 0===t||t(!0);((null===(i=e.current)||void 0===i||null===(o=i.getModel())||void 0===o||null===(s=o.getValue())||void 0===s?void 0:s.length)||0)>0?n():setTimeout(r,100)};r()})}(t,n),null===n||void 0===n||n(!1),h.executeEdits("collaboration",[{range:h.getModel().getFullModelRange(),text:i.toString(),forceMoveMarkers:!0}]))}var c,u;if(i._length>0&&1===s.length&&!O.current)i.applyDelta([{delete:i._length},{insert:null===(c=t.current)||void 0===c?void 0:c.getModel().getValue()}]);if(0===i._length)i.insert(0,null===(u=t.current)||void 0===u?void 0:u.getModel().getValue());O.current&&i.applyDelta([{delete:i._length},{insert:O.current}]),e=new sd(i,null===h||void 0===h?void 0:h.getModel(),new Set([h]),r),null===h||void 0===h||h.onDidChangeCursorPosition(e=>((e,t)=>{t.setLocalStateField("cursor",e.position)})(e,r)),null===h||void 0===h||h.onDidChangeCursorSelection(e=>((e,t)=>{const n=e.selection;t.setLocalStateField("selection",{startLineNumber:n.startLineNumber,startColumn:n.startColumn,endLineNumber:n.endLineNumber,endColumn:n.endColumn})})(e,r)),r.on("change",()=>I(r)),O.current=null}};return p.on("sync",s),()=>{e&&e.destroy(),p.off("sync",s)}},[h,p,o,t,I,n,L]),(0,r.useEffect)(()=>{if(!p||!h||!pe._P.isEditor||!t.current||L)return;const e=null===p||void 0===p?void 0:p.awareness,n=setInterval(()=>{I(e)},ld.pX);return()=>clearInterval(n)},[p,h,m,t,v,I,T,L]),(0,r.useEffect)(()=>{if(!M||!pe._P.isEditor)return;if(v)return;const e=(({CHECK_INTERVAL:e,SLEEP_THRESHOLD:t,provider:n,handleOfflineCollaboration:r,isNewEmailGeneration:i,saveEmailFromEditor:o})=>{let s=Date.now();return setInterval(()=>{const e=Date.now(),r=e-s;r>t&&n&&(o(),window.location.reload(),window.location.reload()),r<t&&!n&&document.visibilityState,s=e},e)})({CHECK_INTERVAL:ld.Pp,SLEEP_THRESHOLD:ld.Q9,provider:p,handleOfflineCollaboration:T,isNewEmailGeneration:L,saveEmailFromEditor:S});return()=>{clearInterval(e)}},[M,p,v,T,k,L]),h&&N.length>0){var q,U;const e=(null===h||void 0===h||null===(q=h.getModel())||void 0===q||null===(U=q.getValue())||void 0===U?void 0:U.toString())||"";d.current!==e&&"clear"in C&&C.clear(),d.current=e}const F=(()=>{const[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const e=navigator.platform.toUpperCase().includes("MAC"),n=n=>{const r=(e?n.metaKey:n.ctrlKey)&&"KeyZ"===n.code,i=r&&n.shiftKey;(r||i)&&(t(!0),n.preventDefault())},r=()=>{t(!1)},i=e=>{var n;"application_action"===(null===(n=e.data)||void 0===n?void 0:n.operation)&&("undo"!==e.data.action&&"redo"!==e.data.action||(t(!0),setTimeout(()=>t(!1),500)))};return document.addEventListener("keydown",n,!0),document.addEventListener("keyup",r,!0),window.addEventListener("message",i),()=>{document.removeEventListener("keydown",n,!0),document.removeEventListener("keyup",r,!0),window.removeEventListener("message",i)}},[]),e})()&&N.length>0;return(0,r.useEffect)(()=>{if(!M||!pe._P.isEditor)return;const e=setInterval(()=>{if(null!==i&&void 0!==i&&i.current&&!L&&(T(),A(!0)),(null===i||void 0===i||!i.current)&&L){const e=null===s||void 0===s?void 0:s.getValue();O.current=e,R(e)}},300);return()=>clearInterval(e)},[L,p,M,pe._P.isEditor]),(0,r.useEffect)(()=>{if(!M||!pe._P.isEditor)return;const e=()=>{"hidden"===document.visibilityState&&S()};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[e,M,pe._P.isEditor]),[h,N,f,v,F]};n(37507);var ud=n(40120),dd=n(56605),hd=n(5558),fd=n(12543);!function(){const e={editorWorkerService:"editor.worker.js",html:"html.worker.js",css:"css.worker.js",typescript:"ts.worker.js",json:"json.worker.js",javascript:"ts.worker.js",less:"css.worker.js",scss:"css.worker.js",handlebars:"html.worker.js",razor:"html.worker.js"};function t(e,t){/^(\/\/)/.test(e)&&(e=window.location.protocol+e);const n=new Blob(["/*"+t+'*/importScripts("'+e+'");'],{type:"application/javascript"});return URL.createObjectURL(n)}emailmakerMonacoEnvironment.getWorkerUrl=(r,i)=>{const o=n.p,s=(o?o.replace(/\/$/,"")+"/":"")+e[i];const a=new URL(s,window.location.origin),l=a.protocol;if("http:"===l||"https:"===l){if(a.protocol!==window.location.protocol||a.hostname!==window.location.hostname)return t(s,i);if("localhost"===a.hostname&&(a.port||"80")!==(window.location.port||"80"))return t(s,i)}else if("file:"===l)return t(s,i);return s}}(),(0,po.Xb)(),fe.languages.html.htmlDefaults.options.format.wrapLineLength=0,R.config({monaco:fe}),function(e,t){const n=oe.dS.getEditorContributions().find(t=>t.id===e);if(!n)throw new Error(`No contribution ${e}`);n.ctor=t(n)}(ae.ID,()=>ae),function(e,t){void 0===e&&(e=window.monaco),void 0===t&&(t=["html"]),fo(e,t,"html")}(fe),function(e,t){void 0===e&&(e=window.monaco),void 0===t&&(t=["css"]),fo(e,t,"css")}(fe,["html"]);const{useToken:pd}=ud.A,gd=({email:e,readOnly:t,setOtherUsers:n,newEmailAiGeneratorRef:i})=>{const o=(0,po.fn)();"html"!==o.getLanguageId()&&fe.editor.setModelLanguage(o,"html");const s=(0,mo.ml)(bo.AZ.ON_CODE_VALIDATE_ID),a=(0,re.XW)(),l=(0,te.d4)(ce.Up),c=(0,te.d4)(ue.Up),u=(0,te.d4)(ce.VZ),d=null!==e&&void 0!==e&&e.hasOwnProperty("type")?c:l,h=(0,te.d4)(le.hZ),f=(0,te.wA)(),p=(0,r.useRef)(null),g=(0,r.useRef)(null),m=(0,r.useRef)(null),b=(0,r.useRef)([]),y=(0,go.rD)(),w=(0,r.useCallback)(()=>{f((0,le.ku)(!1))},[f]),[v,k]=(0,r.useState)(!1),x=(0,hd.hN)(),{__:_}=(0,fd.s9)(),{token:C}=pd(),[,E,S,O,L]=cd({email:e,editorRef:g,setIsSpin:k,newEmailAiGeneratorRef:i});b.current=E,(0,r.useEffect)(()=>{t||n(b.current)},[null===E||void 0===E?void 0:E.length,n,t]);const A=(0,r.useMemo)(()=>()=>{x.error({message:_(ld.k0)})},[_,x]),$=(0,r.useMemo)(()=>()=>{x.warning({message:_(ld.LJ)})},[_,x]);(0,r.useEffect)(()=>{O&&A()},[O,A]),(0,r.useEffect)(()=>{L&&$()},[L,$]),(0,r.useEffect)(()=>w(),[w]),(0,r.useEffect)(()=>{if(u){const{current:e}=p;e&&(e.revealRangeInCenterIfOutsideViewport(u),e.setSelection(u))}},[u]);const M=(0,r.useCallback)(()=>{if(h.fontFamily&&p.current){const e=p.current.getDomNode();if(e){e.style.setProperty("--monaco-editor-font-family",h.fontFamily,"important");e.querySelectorAll("*").forEach(e=>{e.style.setProperty("font-family",h.fontFamily,"important")}),e.style.setProperty("font-family",h.fontFamily,"important")}}},[h.fontFamily]);(0,r.useEffect)(()=>{if(M(),p.current){const e=p.current.getDomNode();if(e){const t=new MutationObserver(()=>{M()});return t.observe(e,{childList:!0,subtree:!0}),()=>{t.disconnect()}}}},[h.fontFamily,M]);(0,r.useEffect)(()=>{matchMedia(pe.F3).addEventListener("change",t=>{const n=window.localStorage.getItem(pe.V0.em_color_scheme),r=t.matches?pe.nd:pe.T;e.hasOwnProperty("type")?f(n?(0,ue.eX)(n===pe.nd?`vs-${n}`:pe.T):(0,ue.eX)(r===pe.nd?`vs-${r}`:pe.T)):f(n?(0,ce.eX)(n===pe.nd?`vs-${n}`:pe.T):(0,ce.eX)(r===pe.nd?`vs-${r}`:pe.T))})},[f,e]),(0,r.useEffect)(()=>{const t=window.localStorage.getItem(pe.V0.em_color_scheme),n=matchMedia(pe.F3).matches?pe.nd:pe.T;null!==e&&void 0!==e&&e.hasOwnProperty("type")?f(t?(0,ue.eX)(t===pe.nd?`vs-${t}`:pe.T):(0,ue.eX)(n===pe.nd?`vs-${n}`:pe.T)):f(t?(0,ce.eX)(t===pe.nd?`vs-${t}`:pe.T):(0,ce.eX)(n===pe.nd?`vs-${n}`:pe.T))},[f,e]);(0,he.A)(e=>{const t=e.data.operation,n=e.data;m.current=t,t===pe.Ru.UPDATE_EDITOR_POSITION_FROM_IFRAME&&(e=>{const{current:t}=p;if(t&&!t.hasTextFocus()){const n=t.getModel(),r=n.getPositionAt(e.start),i=n.getPositionAt(e.end),o={startColumn:r.column,startLineNumber:r.lineNumber,endColumn:i.column,endLineNumber:i.lineNumber};t.revealRangeInCenterIfOutsideViewport(o),t.setSelection(o)}})(n.data)});const j=(0,r.useMemo)(()=>document.createElement("div"),[]),D=(0,r.useMemo)(()=>({...h,domReadOnly:t,readOnly:t,unusualLineTerminators:"off",mouseWheelZoom:!0,wordWrap:y.onlyCodeModeInMobile?"off":h.wordWrap,ariaContainerElement:j}),[h,y.onlyCodeModeInMobile,t,j]);return(null===o||void 0===o?void 0:o.uri)&&r.createElement(r.Fragment,null,v&&r.createElement(dd.A,{wrap:!0,style:{position:"fixed",width:"100%",height:"100%",top:0,left:0,zIndex:null===C||void 0===C?void 0:C.zIndexPopupBase,background:null===C||void 0===C?void 0:C.colorBgLayout}}),r.createElement(ee,{theme:d,className:"monaco-editor",defaultLanguage:"html",onMount:(e,t)=>{p.current=e,g.current=e;const n=e.getContribution("editor.linkDetector").openerService,r=n.open.bind(n),i=document.createElement("div"),o=new ne.Ay(e,fe,{"doctype-html5":!1,"html-lang-require":!1,"head-script-disabled":!1,"style-disabled":!1,"script-disabled":!1,"attr-lowercase":!1,"attr-value-single-quotes":!1,"attr-value-not-empty":!1,"attr-sorted":!1,"attr-whitespace":!1,"input-requires-label":!1,"tag-self-close":!1,"tagname-lowercase":!1,"href-abs-or-rel":!1,"inline-style-disabled":!1,"space-tab-mixed-disabled":!1,"attr-no-unnecessary-whitespace":!0,"tags-check":{img:{selfclosing:!1,attrsRequired:["src","alt"]},a:{selfclosing:!1,attrsRequired:["href"]}},"empty-tag-not-self-closed":!1,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0,"alt-require":!0,"inline-script-disabled":!0,"id-class-value":!1,"id-class-ad-disabled":!0,"attr-unsafe-chars":!0,csslint:{"display-property-grouping":!0,"known-properties":!0}});pe._P.isEditor&&g.current&&S(g.current),o.watch(),e.getContribution("editor.linkDetector").openerService.open=e=>(i.innerHTML=e,r(i.textContent)),f((0,le.ku)(!0)),e.onMouseUp(()=>{const t=e.getSelection();t.startColumn===t.endColumn&&t.startLineNumber===t.endLineNumber&&(async e=>{const{current:t}=p;if(t){const n=t.getModel();a({operation:pe.Ru.UPDATE_EDITOR_POSITION_FROM_EDITOR,data:n.getOffsetAt(e)})}})(e.getPosition())}),e.onDidBlurEditorWidget(()=>{a({operation:pe.Ru.EDITOR_CHANGE_FOCUS,data:!1}),f((0,de.YT)(!1))}),e.onDidFocusEditorWidget(()=>{a({operation:pe.Ru.EDITOR_CHANGE_FOCUS,data:!0}),f((0,de.YT)(!0))}),e.onDidChangeModelContent(()=>{setTimeout(()=>{M()},0)}),setTimeout(()=>{M()},100)},options:D,keepCurrentModel:!0,path:o.uri.toString(),onValidate:function(e){var t;"Doctype must be declared first."!==(null===(t=e[0])||void 0===t?void 0:t.message)&&(pe.EW.isPlugin&&s.fire(e),f((0,ce.Bj)(e)))}}))}},48527:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-no-duplication",description:"Class attributes should not contain duplicate values. Other attributes can be checked via configuration.",init(e,t,n){const r=Array.isArray(n)?n:["class"];e.addListener("tagstart",e=>{const n=e.attrs;let i;const o=e.col+e.tagName.length+1;for(let s=0,a=n.length;s<a;s++){i=n[s];const a=i.name.toLowerCase();if(!r.includes(a))continue;if(!i.value||!/\s/.test(i.value))continue;const l=i.value.trim().split(/\s+/),c={};for(const n of l){if(n&&!0===c[n]){t.error(`Duplicate value [ ${n} ] was found in attribute [ ${i.name} ].`,e.line,o+i.index,this,i.raw);break}c[n]=!0}}})}}},52979:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"title-require",description:"<title> must be present in <head> tag.",init(e,t){let n=!1,r=!1;const i=e=>{const t=e.tagName.toLowerCase();"head"===t?n=!0:"title"===t&&n&&(r=!0)},o=n=>{const s=n.tagName.toLowerCase();if(r&&"title"===s){const e=n.lastEvent;("text"!==e.type||"text"===e.type&&!0===/^\s*$/.test(e.raw))&&t.error("<title></title> must not be empty.",n.line,n.col,this,n.raw)}else"head"===s&&(!1===r&&t.error("<title> must be present in <head> tag.",n.line,n.col,this,n.raw),e.removeListener("tagstart",i),e.removeListener("tagend",o))};e.addListener("tagstart",i),e.addListener("tagend",o)}}},58212:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-html5",description:'Invalid doctype. Use: "<!DOCTYPE html>"',init(e,t){const n=e=>{!1===e.long&&"doctype html"!==e.content.toLowerCase()&&t.warn('Invalid doctype. Use: "<!DOCTYPE html>"',e.line,e.col,this,e.raw)},r=()=>{e.removeListener("comment",n),e.removeListener("tagstart",r)};e.addListener("all",n),e.addListener("tagstart",r)}}},59e3:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"id-unique",description:"The value of id attributes must be unique.",init(e,t){const n={};e.addListener("tagstart",e=>{const r=e.attrs;let i,o;const s=e.col+e.tagName.length+1;for(let a=0,l=r.length;a<l;a++)if(i=r[a],"id"===i.name.toLowerCase()){o=i.value,o&&(void 0===n[o]?n[o]=1:n[o]++,n[o]>1&&t.error(`The id value [ ${o} ] must be unique.`,e.line,s+i.index,this,i.raw));break}})}}},59168:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLMonacoLinter=void 0;const r=n(94266);t.HTMLMonacoLinter=class{constructor(e,t,n){this.editor=e,this.monaco=t,this.ruleset=n}lint(){var e;const t=this.editor.getValue();if("html"===(null===(e=this.editor.getModel())||void 0===e?void 0:e.getLanguageId())){const e=new r.HTMLMonacoMarks(t,this.ruleset,this.editor.getModel()||void 0).getEditorMarks(this.monaco),n=this.editor.getModel();if(null===n)throw new Error("Your model still does't exist.");this.monaco.editor.setModelMarkers(n,"owner",e)}}watch(){this.lint(),this.editor.onDidChangeModelContent(e=>{this.lint()})}}},60761:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"spec-char-escape",description:"Special characters must be escaped.",init(e,t){e.addListener("text",n=>{const r=n.raw,i=/([<>])/g;let o;for(;o=i.exec(r);){const r=e.fixPos(n,o.index);t.error(`Special characters must be escaped : [ ${o[0]} ].`,r.line,r.col,this,n.raw)}})}}},61452:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-not-empty",description:"All attributes must have values.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;for(let o=0,s=n.length;o<s;o++)r=n[o],""===r.quote&&""===r.value&&t.warn(`The attribute [ ${r.name} ] must have a value.`,e.line,i+r.index,this,r.raw)})}}},61730:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"doctype-first",description:"Doctype must be declared first (comments and whitespace allowed before DOCTYPE).",init(e,t){let n=!1,r=!1;const i=o=>{if(!("start"===o.type||"text"===o.type&&/^\s*$/.test(o.raw))&&!n)return"comment"===o.type&&!1===o.long&&/^DOCTYPE\s+/i.test(o.content)?(n=!0,void(r&&t.error("Doctype must be declared before any non-comment content.",o.line,o.col,this,o.raw))):void("comment"!==o.type&&(r=!0,t.error("Doctype must be declared before any non-comment content.",o.line,o.col,this,o.raw),e.removeListener("all",i)))};e.addListener("all",i)}}},62433:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"src-not-empty",description:"The src attribute of an img(script,link) must have a value.",init(e,t){e.addListener("tagstart",e=>{const n=e.tagName,r=e.attrs;let i;const o=e.col+n.length+1;for(let s=0,a=r.length;s<a;s++)i=r[s],(!0===/^(img|script|embed|bgsound|iframe)$/.test(n)&&"src"===i.name||"link"===n&&"href"===i.name||"object"===n&&"data"===i.name)&&""===i.value&&t.error(`The attribute [ ${i.name} ] of the tag [ ${n} ] must have a value.`,e.line,o+i.index,this,i.raw)})}}},66583:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"input-requires-label",description:"All [ input ] tags must have a corresponding [ label ] tag. ",init(e,t){const n=[],r=[];e.addListener("tagstart",t=>{const i=t.tagName.toLowerCase(),o=e.getMapAttrs(t.attrs),s=t.col+i.length+1;"input"===i&&"hidden"!==o.type&&r.push({event:t,col:s,id:o.id}),"label"===i&&"for"in o&&""!==o.for&&n.push({event:t,col:s,forValue:o.for})}),e.addListener("end",()=>{r.forEach(e=>{(function(e){let t=!1;return n.forEach(n=>{e.id&&e.id===n.forValue&&(t=!0)}),t})(e)||t.warn("No matching [ label ] tag found.",e.event.line,e.col,this,e.event.raw)})})}}},66746:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"button-type-require",description:'The type attribute of a <button> element must be present with a valid value: "button", "submit", or "reset".',init(e,t){e.addListener("tagstart",n=>{const r=n.tagName.toLowerCase();if("button"===r){const i=e.getMapAttrs(n.attrs),o=n.col+r.length+1;if(void 0===i.type)t.warn("The type attribute must be present on <button> elements.",n.line,o,this,n.raw);else{const e=i.type.toLowerCase();"button"!==e&&"submit"!==e&&"reset"!==e&&t.warn('The type attribute of <button> must have a valid value: "button", "submit", or "reset".',n.line,o,this,n.raw)}}})}}},73343:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});let n={a:{selfclosing:!1,attrsRequired:["href","title"],redundantAttrs:["alt"]},div:{selfclosing:!1},main:{selfclosing:!1,redundantAttrs:["role"]},nav:{selfclosing:!1,redundantAttrs:["role"]},script:{attrsOptional:[["async","async"],["defer","defer"]]},img:{selfclosing:!0,attrsRequired:["src","alt","title"]}};t.default={id:"tags-check",description:"Checks html tags.",init(e,t,r){n={...n,...r},e.addListener("tagstart",e=>{const r=e.attrs,i=e.col+e.tagName.length+1,o=e.tagName.toLowerCase();if(n[o]){const s=n[o];if(!0!==s.selfclosing||e.close?!1===s.selfclosing&&e.close&&t.warn(`The <${o}> tag must not be selfclosing.`,e.line,e.col,this,e.raw):t.warn(`The <${o}> tag must be selfclosing.`,e.line,e.col,this,e.raw),Array.isArray(s.attrsRequired)){s.attrsRequired.forEach(n=>{if(Array.isArray(n)){const s=n.map(e=>e),a=s.shift(),l=s;r.some(e=>e.name===a)?r.forEach(n=>{n.name===a&&-1===l.indexOf(n.value)&&t.error(`The <${o}> tag must have attr '${a}' with one value of '${l.join("' or '")}'.`,e.line,i,this,e.raw)}):t.error(`The <${o}> tag must have attr '${a}'.`,e.line,i,this,e.raw)}else r.some(e=>-1!==n.split("|").indexOf(e.name))||t.error(`The <${o}> tag must have attr '${n}'.`,e.line,i,this,e.raw)})}if(Array.isArray(s.attrsOptional)){s.attrsOptional.forEach(n=>{if(Array.isArray(n)){const s=n.map(e=>e),a=s.shift(),l=s;r.some(e=>e.name===a)&&r.forEach(n=>{n.name===a&&-1===l.indexOf(n.value)&&t.error(`The <${o}> tag must have optional attr '${a}' with one value of '${l.join("' or '")}'.`,e.line,i,this,e.raw)})}})}if(Array.isArray(s.redundantAttrs)){s.redundantAttrs.forEach(n=>{r.some(e=>e.name===n)&&t.error(`The attr '${n}' is redundant for <${o}> and should be omitted.`,e.line,i,this,e.raw)})}}})}}},76735:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-single-quotes",description:"Attribute values must be in single quotes.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;for(let o=0,s=n.length;o<s;o++)r=n[o],(""!==r.value&&"'"!==r.quote||""===r.value&&'"'===r.quote)&&t.error(`The value of attribute [ ${r.name} ] must be in single quotes.`,e.line,i+r.index,this,r.raw)})}}},78028:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-value-double-quotes",description:"Attribute values must be in double quotes.",init(e,t){e.addListener("tagstart",e=>{const n=e.attrs;let r;const i=e.col+e.tagName.length+1;for(let o=0,s=n.length;o<s;o++)r=n[o],(""!==r.value&&'"'!==r.quote||""===r.value&&"'"===r.quote)&&t.error(`The value of attribute [ ${r.name} ] must be in double quotes.`,e.line,i+r.index,this,r.raw)})}}},78815:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=["applet","acronym","bgsound","dir","frame","frameset","noframes","isindex","keygen","listing","menuitem","nextid","noembed","plaintext","rb","rtc","strike","xmp","basefont","big","blink","center","font","marquee","multicol","nobr","spacer","tt"];t.default={id:"tag-no-obsolete",description:"Disallows the use of obsolete HTML tags.",init(e,t,r){e.addListener("tagstart,tagend",e=>{const r=e.tagName.toLowerCase();n.includes(r)&&t.error(`The tag [ ${e.tagName} ] is obsolete in HTML5 and should not be used.`,e.line,e.col,this,e.raw)})}}},79960:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"tag-pair",description:"Tag must be paired.",init(e,t){const n=[],r=e.makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",e=>{const t=e.tagName.toLowerCase();void 0!==r[t]||e.close||n.push({tagName:t,line:e.line,col:e.col,raw:e.raw})}),e.addListener("tagend",e=>{const r=e.tagName.toLowerCase();let i;for(i=n.length-1;i>=0&&n[i].tagName!==r;i--);if(i>=0){const r=[];for(let e=n.length-1;e>i;e--)r.push(`</${n[e].tagName}>`);if(r.length>0){const i=n[n.length-1];t.error(`Tag must be paired, missing: [ ${r.join("")} ], start tag match failed [ ${i.raw} ] on line ${i.line}.`,i.line||e.line,i.col||e.col,this,e.raw)}n.length=i}else t.error(`Tag must be paired, no start tag: [ ${e.raw} ]`,e.line,e.col,this,e.raw)}),e.addListener("end",e=>{const r=[];for(let t=n.length-1;t>=0;t--)r.push(`</${n[t].tagName}>`);if(r.length>0){const i=n[n.length-1];t.error(`Tag must be paired, missing: [ ${r.join("")} ], open tag match failed [ ${i.raw} ] on line ${i.line}.`,e.line,e.col,this,"")}})}}},81544:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"empty-tag-not-self-closed",description:"Empty tags must not use self closed syntax.",init(e,t){const n=e.makeMap("area,base,basefont,bgsound,br,col,frame,hr,img,input,isindex,link,meta,param,embed,track,command,source,keygen,wbr");e.addListener("tagstart",e=>{const r=e.tagName.toLowerCase();void 0!==n[r]&&e.close&&t.error(`The empty tag : [ ${r} ] must not use self closed syntax.`,e.line,e.col,this,e.raw)})}}},84744:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"main-require",description:"<main> must be present in <body> tag.",init(e,t){let n=0,r=!1,i=null;e.addListener("tagstart",e=>{const t=e.tagName.toLowerCase();"body"===t?(n++,1===n&&(r=!1,i=e)):"main"===t&&n>0&&(r=!0)}),e.addListener("tagend",e=>{"body"===e.tagName.toLowerCase()&&(1===n&&!r&&i&&t.warn("<main> must be present in <body> tag.",i.line,i.col,this,i.raw),n--,n<0&&(n=0))}),e.addListener("end",()=>{n>0&&!r&&i&&t.warn("<main> must be present in <body> tag.",i.line,i.col,this,i.raw)})}}},88020:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"attr-sorted",description:"Attribute tags must be in proper order.",init(e,t){const n={},r=["class","id","name","src","for","type","rel","href","value","title","alt","role"];for(let i=0;i<r.length;i++)n[r[i]]=i;e.addListener("tagstart",e=>{const r=e.attrs,i=[];for(let t=0;t<r.length;t++)i.push(r[t].name);const o=JSON.stringify(i);i.sort((e,t)=>void 0!==n[e]?void 0!==n[t]?n[e]-n[t]:-1:e.startsWith("data-")?t.startsWith("data-")?e.localeCompare(t):1:void 0!==n[t]?1:t.startsWith("data-")?-1:e.localeCompare(t)),o!==JSON.stringify(i)&&t.error(`Inaccurate order ${o} should be in hierarchy ${JSON.stringify(i)} `,e.line,e.col,this,e.raw)})}}},88578:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"h1-require",description:"<h1> must be present in <body> tag and not be empty.",init(e,t){let n=0,r=!1,i=null,o=null,s=!1;e.addListener("tagstart",e=>{const t=e.tagName.toLowerCase();"body"===t?(n++,1===n&&(r=!1,i=e)):"h1"===t&&n>0&&(r=!0,o=e,s=!0)}),e.addListener("tagend",e=>{const a=e.tagName.toLowerCase();"h1"===a&&o?(s&&t.warn("<h1> tag must not be empty.",o.line,o.col,this,o.raw),o=null):"body"===a&&(1===n&&!r&&i&&t.warn("<h1> must be present in <body> tag.",i.line,i.col,this,i.raw),n--,n<0&&(n=0))}),e.addListener("text",e=>{o&&s&&e.raw&&!/^\s*$/.test(e.raw)&&(s=!1)}),e.addListener("end",()=>{n>0&&!r&&i&&t.warn("<h1> must be present in <body> tag.",i.line,i.col,this,i.raw)})}}},94266:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HTMLMonacoMarks=void 0;const r=n(15688),i=n(23495),o={"tagname-lowercase":!0,"attr-lowercase":!0,"attr-value-double-quotes":!0,"doctype-first":!0,"tag-pair":!0,"spec-char-escape":!0,"id-unique":!0,"src-not-empty":!0,"attr-no-duplication":!0,"title-require":!0};t.HTMLMonacoMarks=class{constructor(e,t=o,n){this.html=e,this.ruleset=t,this.linterResponse=this.lint(),this.model=n}lint(){return r.HTMLHint.verify(this.html,this.ruleset)}getEditorMarks(e){return this.linterResponse.map(t=>({startLineNumber:t.line,startColumn:t.col,endLineNumber:t.line,endColumn:""!==t.evidence?t.col+t.evidence.length:void 0!==this.model?this.model.getLineLength(t.line):t.col+1,message:t.message,severity:e.MarkerSeverity[(0,i.capitalize)(t.type)]}))}getLinterResponse(){return this.linterResponse}}},94999:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default={id:"meta-description-require",description:'<meta name="description"> with non-blank content must be present in <head> tag.',init(e,t){let n=!1,r=!1,i="",o=null;e.addListener("tagstart",t=>{const s=t.tagName.toLowerCase();if("head"===s)n=!0,o=t;else if("meta"===s){const n=e.getMapAttrs(t.attrs);n.name&&"description"===n.name.toLowerCase()&&(r=!0,i=n.content||"")}}),e.addListener("end",()=>{n&&o&&(r?""===i.trim()&&t.error('<meta name="description"> content attribute must not be empty.',o.line,o.col,this,o.raw):t.error('<meta name="description"> must be present in <head> tag.',o.line,o.col,this,o.raw))})}}}}]);