@solidxai/solidctl 0.1.1 → 0.1.3

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 (157) hide show
  1. package/dist/commands/create-app/create-app.command.js +14 -13
  2. package/dist/commands/create-app/create-app.command.js.map +1 -1
  3. package/dist/commands/create-app/helpers.d.ts +7 -14
  4. package/dist/commands/create-app/helpers.js +9 -17
  5. package/dist/commands/create-app/helpers.js.map +1 -1
  6. package/dist/tsconfig.build.tsbuildinfo +1 -1
  7. package/package.json +1 -1
  8. package/templates/api-template/dot-templates/dot.gitignore.template +82 -0
  9. package/templates/{nest-template → api-template}/package.json +3 -3
  10. package/templates/{nest-template → api-template}/test/app.e2e-spec.ts +1 -1
  11. package/templates/ui-template/README.md +73 -0
  12. package/templates/ui-template/dist/assets/Footerbg-8Co6YRm2.png +0 -0
  13. package/templates/ui-template/dist/assets/SF-Pro-Display-Black-85SZiFK-.otf +0 -0
  14. package/templates/ui-template/dist/assets/SF-Pro-Display-Bold-CkqE-6tD.otf +0 -0
  15. package/templates/ui-template/dist/assets/SF-Pro-Display-Heavy-Cj-4znqf.otf +0 -0
  16. package/templates/ui-template/dist/assets/SF-Pro-Display-Light-aDlMluiV.otf +0 -0
  17. package/templates/ui-template/dist/assets/SF-Pro-Display-Medium-DSttQARu.otf +0 -0
  18. package/templates/ui-template/dist/assets/SF-Pro-Display-Regular-DF_3XEGl.otf +0 -0
  19. package/templates/ui-template/dist/assets/SF-Pro-Display-Semibold-Dg2-djaL.otf +0 -0
  20. package/templates/ui-template/dist/assets/SF-Pro-Display-Thin-Dlj_0ZL0.otf +0 -0
  21. package/templates/ui-template/dist/assets/SF-Pro-Display-Ultralight-Dvb4Y4p6.otf +0 -0
  22. package/templates/ui-template/dist/assets/index-ByqcKjdb.js +3912 -0
  23. package/templates/ui-template/dist/assets/index-wnEWlFcj.css +1 -0
  24. package/templates/ui-template/dist/assets/primeicons-C6QP2o4f.woff2 +0 -0
  25. package/templates/ui-template/dist/assets/primeicons-DMOk5skT.eot +0 -0
  26. package/templates/ui-template/dist/assets/primeicons-Dr5RGzOO.svg +345 -0
  27. package/templates/ui-template/dist/assets/primeicons-MpK4pl85.ttf +0 -0
  28. package/templates/ui-template/dist/assets/primeicons-WjwUDZjB.woff +0 -0
  29. package/templates/ui-template/dist/assets/quill-DooZuM6F.js +49 -0
  30. package/templates/ui-template/dist/assets/solid-left-layout-bg-CTFSpGKh.png +0 -0
  31. package/templates/ui-template/dist/assets/solid-right-layout-bg-HyBzctm7.png +0 -0
  32. package/templates/ui-template/dist/index.html +19 -0
  33. package/templates/{next-template/public → ui-template/dist}/themes/solid-dark-purple/theme.css +7 -2
  34. package/templates/ui-template/dist/themes/solid-light-purple/solid-login-light.png +0 -0
  35. package/templates/{next-template/public → ui-template/dist}/themes/solid-light-purple/theme.css +10 -3
  36. package/templates/ui-template/dist/vite.svg +1 -0
  37. package/templates/ui-template/dot-templates/dot.gitignore.template +83 -0
  38. package/templates/ui-template/eslint.config.js +23 -0
  39. package/templates/ui-template/index.html +18 -0
  40. package/templates/ui-template/package-lock.json +11931 -0
  41. package/templates/ui-template/package.json +42 -0
  42. package/templates/ui-template/public/themes/solid-dark-purple/theme.css +6208 -0
  43. package/templates/ui-template/public/themes/solid-light-purple/solid-login-light.png +0 -0
  44. package/templates/ui-template/public/themes/solid-light-purple/theme.css +6263 -0
  45. package/templates/ui-template/public/vite.svg +1 -0
  46. package/templates/ui-template/src/App.css +42 -0
  47. package/templates/ui-template/src/App.tsx +44 -0
  48. package/templates/ui-template/src/assets/react.svg +1 -0
  49. package/templates/ui-template/src/extensions/solid-extensions.ts +82 -0
  50. package/templates/ui-template/src/extensions/venue/call-log/custom-widgets/.gitkeep +0 -0
  51. package/templates/ui-template/src/extensions/venue/call-log/form-buttons/.gitkeep +0 -0
  52. package/templates/ui-template/src/extensions/venue/call-log/form-event-listeners/.gitkeep +0 -0
  53. package/templates/ui-template/src/extensions/venue/call-log/form-event-listeners/callLogsDispositionHandler.ts +47 -0
  54. package/templates/ui-template/src/extensions/venue/call-log/list-buttons/.gitkeep +0 -0
  55. package/templates/ui-template/src/extensions/venue/call-log/list-event-listeners/.gitkeep +0 -0
  56. package/templates/ui-template/src/extensions/venue/call-log/row-buttons/.gitkeep +0 -0
  57. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/custom-widgets/.gitkeep +0 -0
  58. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-buttons/.gitkeep +0 -0
  59. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-buttons/ImportHierarchyComponent.tsx +377 -0
  60. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-buttons/SolidCustomImportHeader.tsx +14 -0
  61. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-event-listeners/.gitkeep +0 -0
  62. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-event-listeners/CallLogsDispositionHandler.ts +47 -0
  63. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/form-event-listeners/onHierarchyImportFormLoadHandler.ts +45 -0
  64. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/list-buttons/.gitkeep +0 -0
  65. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/list-event-listeners/.gitkeep +0 -0
  66. package/templates/ui-template/src/extensions/venue/hierarchy-import-transaction/row-buttons/.gitkeep +0 -0
  67. package/templates/ui-template/src/extensions/venue/venue-master/custom-widgets/.gitkeep +0 -0
  68. package/templates/ui-template/src/extensions/venue/venue-master/form-buttons/.gitkeep +0 -0
  69. package/templates/ui-template/src/extensions/venue/venue-master/form-event-listeners/.gitkeep +0 -0
  70. package/templates/ui-template/src/extensions/venue/venue-master/form-event-listeners/venueMasterFormViewLoadHandler.ts +57 -0
  71. package/templates/ui-template/src/extensions/venue/venue-master/list-buttons/.gitkeep +0 -0
  72. package/templates/ui-template/src/extensions/venue/venue-master/list-event-listeners/.gitkeep +0 -0
  73. package/templates/ui-template/src/extensions/venue/venue-master/row-buttons/.gitkeep +0 -0
  74. package/templates/ui-template/src/extensions/venue/venue-user/custom-widgets/.gitkeep +0 -0
  75. package/templates/ui-template/src/extensions/venue/venue-user/form-buttons/.gitkeep +0 -0
  76. package/templates/ui-template/src/extensions/venue/venue-user/form-event-listeners/.gitkeep +0 -0
  77. package/templates/ui-template/src/extensions/venue/venue-user/form-event-listeners/venueUserFormViewChangeHandler.ts +21 -0
  78. package/templates/ui-template/src/extensions/venue/venue-user/form-event-listeners/venueUserFormViewLoadHandler.ts +97 -0
  79. package/templates/ui-template/src/extensions/venue/venue-user/list-buttons/.gitkeep +0 -0
  80. package/templates/ui-template/src/extensions/venue/venue-user/list-event-listeners/.gitkeep +0 -0
  81. package/templates/ui-template/src/extensions/venue/venue-user/row-buttons/.gitkeep +0 -0
  82. package/templates/ui-template/src/index.css +10 -0
  83. package/templates/ui-template/src/main.tsx +10 -0
  84. package/templates/ui-template/src/pages/admin/AdminInfoPage.tsx +15 -0
  85. package/templates/ui-template/src/pages/auth/HelloAuthPage.tsx +15 -0
  86. package/templates/ui-template/src/pages/auth/VenueAppLoginPage.tsx +10 -0
  87. package/templates/ui-template/src/pages/static/AboutPage.tsx +17 -0
  88. package/templates/ui-template/src/redux/hierarchyImportTransactionApi.tsx +28 -0
  89. package/templates/ui-template/src/routes/AppRoutes.tsx +34 -0
  90. package/templates/ui-template/tsconfig.app.json +29 -0
  91. package/templates/ui-template/tsconfig.json +7 -0
  92. package/templates/ui-template/tsconfig.node.json +26 -0
  93. package/templates/ui-template/venue-admin.logicloop.io.conf +81 -0
  94. package/templates/ui-template/vite.config.ts +15 -0
  95. package/templates/nest-template/bin/solid +0 -2
  96. package/templates/nest-template/dot-templates/dot.gitignore.template +0 -56
  97. package/templates/next-template/README.md +0 -36
  98. package/templates/next-template/app/GlobalProvider.tsx +0 -23
  99. package/templates/next-template/app/admin/core/[moduleName]/[modelName]/form/[id]/page.tsx +0 -19
  100. package/templates/next-template/app/admin/core/[moduleName]/[modelName]/kanban/page.tsx +0 -18
  101. package/templates/next-template/app/admin/core/[moduleName]/[modelName]/list/page.tsx +0 -18
  102. package/templates/next-template/app/admin/core/[moduleName]/home/page.tsx +0 -15
  103. package/templates/next-template/app/admin/core/[moduleName]/settings/[settings]/page.tsx +0 -11
  104. package/templates/next-template/app/admin/layout.tsx +0 -11
  105. package/templates/next-template/app/admin/loading.tsx +0 -8
  106. package/templates/next-template/app/admin/page.tsx +0 -10
  107. package/templates/next-template/app/api/auth/[...nextauth]/route.ts +0 -6
  108. package/templates/next-template/app/auth/confirm-forgot-password/page.tsx +0 -12
  109. package/templates/next-template/app/auth/forgot-password/page.tsx +0 -11
  110. package/templates/next-template/app/auth/initiate-forgot-password/page.tsx +0 -11
  111. package/templates/next-template/app/auth/initiate-forgot-password-thank-you/page.tsx +0 -11
  112. package/templates/next-template/app/auth/initiate-google-oauth/page.tsx +0 -9
  113. package/templates/next-template/app/auth/initiate-login/page.tsx +0 -13
  114. package/templates/next-template/app/auth/initiate-register/page.tsx +0 -14
  115. package/templates/next-template/app/auth/layout.tsx +0 -10
  116. package/templates/next-template/app/auth/login/page.tsx +0 -12
  117. package/templates/next-template/app/auth/otp-verify/page.tsx +0 -12
  118. package/templates/next-template/app/auth/register/page.tsx +0 -12
  119. package/templates/next-template/app/auth/reset-password/page.tsx +0 -13
  120. package/templates/next-template/app/auth/sso/page.tsx +0 -80
  121. package/templates/next-template/app/layout.tsx +0 -56
  122. package/templates/next-template/app/solid-extensions.ts +0 -8
  123. package/templates/next-template/dot-templates/dot.gitignore.template +0 -44
  124. package/templates/next-template/eslint.config.mjs +0 -16
  125. package/templates/next-template/middleware.ts +0 -23
  126. package/templates/next-template/next-env.d.ts +0 -5
  127. package/templates/next-template/next-solidx-run.js +0 -18
  128. package/templates/next-template/next.config.js +0 -47
  129. package/templates/next-template/package.json +0 -79
  130. package/templates/next-template/public/favicon.ico +0 -0
  131. package/templates/next-template/public/file.svg +0 -1
  132. package/templates/next-template/public/globe.svg +0 -1
  133. package/templates/next-template/public/next.svg +0 -1
  134. package/templates/next-template/public/vercel.svg +0 -1
  135. package/templates/next-template/public/window.svg +0 -1
  136. package/templates/next-template/redux/store.ts +0 -52
  137. package/templates/next-template/tsconfig.json +0 -33
  138. package/templates/next-template/types/index.d.ts +0 -7
  139. package/templates/next-template/types/layout.d.ts +0 -94
  140. package/templates/next-template/types/next.d.ts +0 -46
  141. /package/templates/{nest-template → api-template}/README.md +0 -0
  142. /package/templates/{nest-template → api-template}/dot-templates/dot.dockerignore.template +0 -0
  143. /package/templates/{nest-template → api-template}/dot-templates/dot.eslintrc.template.js +0 -0
  144. /package/templates/{nest-template → api-template}/dot-templates/dot.prettierrc.template +0 -0
  145. /package/templates/{nest-template → api-template}/nest-cli.json +0 -0
  146. /package/templates/{nest-template → api-template}/nodemon.json +0 -0
  147. /package/templates/{nest-template → api-template}/src/app-default-database.module.ts +0 -0
  148. /package/templates/{nest-template → api-template}/src/app.controller.spec.ts +0 -0
  149. /package/templates/{nest-template → api-template}/src/app.module.ts +0 -0
  150. /package/templates/{nest-template → api-template}/src/app.service.ts +0 -0
  151. /package/templates/{nest-template → api-template}/src/database.utils.ts +0 -0
  152. /package/templates/{nest-template → api-template}/src/main-cli.ts +0 -0
  153. /package/templates/{nest-template → api-template}/src/main.ts +0 -0
  154. /package/templates/{nest-template → api-template}/test/jest-e2e.json +0 -0
  155. /package/templates/{nest-template → api-template}/tsconfig.build.json +0 -0
  156. /package/templates/{nest-template → api-template}/tsconfig.json +0 -0
  157. /package/templates/{next-template/public/themes/solid-light-purple/solid-login-light.png → ui-template/dist/assets/solid-login-light-C-F0ch5x.png} +0 -0
@@ -0,0 +1,49 @@
1
+ import{d as Or,i as fr,a as yi,b as rl,e as dr,M as il,S as Cr,U as _r,g as kr,c as Ir,f as tr,h as $s,j as vi,k as zs,l as er,m as ll,n as ol,o as Ei,p as al,q as cl,r as ul,s as hl,t as Rr,u as fl,v as dl,w as se,x as Ni,y as Be}from"./index-ByqcKjdb.js";function Ai(r){return r}function gl(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}var pl=800,ml=16,bl=Date.now;function yl(r){var t=0,e=0;return function(){var s=bl(),n=ml-(s-e);if(e=s,n>0){if(++t>=pl)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}function vl(r){return function(){return r}}var El=Or?function(r,t){return Or(r,"toString",{configurable:!0,enumerable:!1,value:vl(t),writable:!0})}:Ai,Nl=yl(El),Br=Math.max;function Al(r,t,e){return t=Br(t===void 0?r.length-1:t,0),function(){for(var s=arguments,n=-1,l=Br(s.length-t,0),o=Array(l);++n<l;)o[n]=s[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=s[n];return a[t]=e(o),gl(r,this,a)}}function wl(r,t){return Nl(Al(r,t,Ai),r+"")}function xl(r,t,e){if(!fr(e))return!1;var s=typeof t;return(s=="number"?yi(e)&&rl(t,e.length):s=="string"&&t in e)?dr(e[t],r):!1}function Tl(r){return wl(function(t,e){var s=-1,n=e.length,l=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(l=r.length>3&&typeof l=="function"?(n--,l):void 0,o&&xl(e[0],e[1],o)&&(l=n<3?void 0:l,n=1),t=Object(t);++s<n;){var a=e[s];a&&r(t,a,s,l)}return t})}var Ll="__lodash_hash_undefined__";function ql(r){return this.__data__.set(r,Ll),this}function Sl(r){return this.__data__.has(r)}function Ks(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new il;++t<e;)this.add(r[t])}Ks.prototype.add=Ks.prototype.push=ql;Ks.prototype.has=Sl;function Ol(r,t){for(var e=-1,s=r==null?0:r.length;++e<s;)if(t(r[e],e,r))return!0;return!1}function Cl(r,t){return r.has(t)}var _l=1,kl=2;function wi(r,t,e,s,n,l){var o=e&_l,a=r.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var h=l.get(r),p=l.get(t);if(h&&p)return h==t&&p==r;var y=-1,d=!0,m=e&kl?new Ks:void 0;for(l.set(r,t),l.set(t,r);++y<a;){var v=r[y],A=t[y];if(s)var w=o?s(A,v,y,t,r,l):s(v,A,y,r,t,l);if(w!==void 0){if(w)continue;d=!1;break}if(m){if(!Ol(t,function(T,C){if(!Cl(m,C)&&(v===T||n(v,T,e,s,l)))return m.push(C)})){d=!1;break}}else if(!(v===A||n(v,A,e,s,l))){d=!1;break}}return l.delete(r),l.delete(t),d}function Il(r){var t=-1,e=Array(r.size);return r.forEach(function(s,n){e[++t]=[n,s]}),e}function Rl(r){var t=-1,e=Array(r.size);return r.forEach(function(s){e[++t]=s}),e}var Bl=1,Ml=2,Dl="[object Boolean]",Ul="[object Date]",Pl="[object Error]",Hl="[object Map]",jl="[object Number]",Fl="[object RegExp]",$l="[object Set]",zl="[object String]",Kl="[object Symbol]",Vl="[object ArrayBuffer]",Gl="[object DataView]",Mr=Cr?Cr.prototype:void 0,Fn=Mr?Mr.valueOf:void 0;function Zl(r,t,e,s,n,l,o){switch(e){case Gl:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Vl:return!(r.byteLength!=t.byteLength||!l(new _r(r),new _r(t)));case Dl:case Ul:case jl:return dr(+r,+t);case Pl:return r.name==t.name&&r.message==t.message;case Fl:case zl:return r==t+"";case Hl:var a=Il;case $l:var u=s&Bl;if(a||(a=Rl),r.size!=t.size&&!u)return!1;var h=o.get(r);if(h)return h==t;s|=Ml,o.set(r,t);var p=wi(a(r),a(t),s,n,l,o);return o.delete(r),p;case Kl:if(Fn)return Fn.call(r)==Fn.call(t)}return!1}var Wl=1,Xl=Object.prototype,Yl=Xl.hasOwnProperty;function Ql(r,t,e,s,n,l){var o=e&Wl,a=kr(r),u=a.length,h=kr(t),p=h.length;if(u!=p&&!o)return!1;for(var y=u;y--;){var d=a[y];if(!(o?d in t:Yl.call(t,d)))return!1}var m=l.get(r),v=l.get(t);if(m&&v)return m==t&&v==r;var A=!0;l.set(r,t),l.set(t,r);for(var w=o;++y<u;){d=a[y];var T=r[d],C=t[d];if(s)var B=o?s(C,T,d,t,r,l):s(T,C,d,r,t,l);if(!(B===void 0?T===C||n(T,C,e,s,l):B)){A=!1;break}w||(w=d=="constructor")}if(A&&!w){var $=r.constructor,H=t.constructor;$!=H&&"constructor"in r&&"constructor"in t&&!(typeof $=="function"&&$ instanceof $&&typeof H=="function"&&H instanceof H)&&(A=!1)}return l.delete(r),l.delete(t),A}var Jl=1,Dr="[object Arguments]",Ur="[object Array]",Is="[object Object]",to=Object.prototype,Pr=to.hasOwnProperty;function eo(r,t,e,s,n,l){var o=zs(r),a=zs(t),u=o?Ur:Ir(r),h=a?Ur:Ir(t);u=u==Dr?Is:u,h=h==Dr?Is:h;var p=u==Is,y=h==Is,d=u==h;if(d&&tr(r)){if(!tr(t))return!1;o=!0,p=!1}if(d&&!p)return l||(l=new $s),o||vi(r)?wi(r,t,e,s,n,l):Zl(r,t,u,e,s,n,l);if(!(e&Jl)){var m=p&&Pr.call(r,"__wrapped__"),v=y&&Pr.call(t,"__wrapped__");if(m||v){var A=m?r.value():r,w=v?t.value():t;return l||(l=new $s),n(A,w,e,s,l)}}return d?(l||(l=new $s),Ql(r,t,e,s,n,l)):!1}function xi(r,t,e,s,n){return r===t?!0:r==null||t==null||!er(r)&&!er(t)?r!==r&&t!==t:eo(r,t,e,s,xi,n)}function so(r){return function(t,e,s){for(var n=-1,l=Object(t),o=s(t),a=o.length;a--;){var u=o[++n];if(e(l[u],u,l)===!1)break}return t}}var no=so();function sr(r,t,e){(e!==void 0&&!dr(r[t],e)||e===void 0&&!(t in r))&&ll(r,t,e)}function ro(r){return er(r)&&yi(r)}function nr(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}function io(r){return ol(r,Ei(r))}function lo(r,t,e,s,n,l,o){var a=nr(r,e),u=nr(t,e),h=o.get(u);if(h){sr(r,e,h);return}var p=l?l(a,u,e+"",r,t,o):void 0,y=p===void 0;if(y){var d=zs(u),m=!d&&tr(u),v=!d&&!m&&vi(u);p=u,d||m||v?zs(a)?p=a:ro(a)?p=al(a):m?(y=!1,p=cl(u,!0)):v?(y=!1,p=ul(u,!0)):p=[]:hl(u)||Rr(u)?(p=a,Rr(a)?p=io(a):(!fr(a)||fl(a))&&(p=dl(u))):y=!1}y&&(o.set(u,p),n(p,u,s,l,o),o.delete(u)),sr(r,e,p)}function Ti(r,t,e,s,n){r!==t&&no(t,function(l,o){if(n||(n=new $s),fr(l))lo(r,t,o,e,Ti,s,n);else{var a=s?s(nr(r,o),l,o+"",r,t,n):void 0;a===void 0&&(a=l),sr(r,o,a)}},Ei)}function gr(r,t){return xi(r,t)}var re=Tl(function(r,t,e){Ti(r,t,e)}),M=(r=>(r[r.TYPE=3]="TYPE",r[r.LEVEL=12]="LEVEL",r[r.ATTRIBUTE=13]="ATTRIBUTE",r[r.BLOT=14]="BLOT",r[r.INLINE=7]="INLINE",r[r.BLOCK=11]="BLOCK",r[r.BLOCK_BLOT=10]="BLOCK_BLOT",r[r.INLINE_BLOT=6]="INLINE_BLOT",r[r.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",r[r.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",r[r.ANY=15]="ANY",r))(M||{});class zt{constructor(t,e,s={}){this.attrName=t,this.keyName=e;const n=M.TYPE&M.ATTRIBUTE;this.scope=s.scope!=null?s.scope&M.LEVEL|n:M.ATTRIBUTE,s.whitelist!=null&&(this.whitelist=s.whitelist)}static keys(t){return Array.from(t.attributes).map(e=>e.name)}add(t,e){return this.canAdd(t,e)?(t.setAttribute(this.keyName,e),!0):!1}canAdd(t,e){return this.whitelist==null?!0:typeof e=="string"?this.whitelist.indexOf(e.replace(/["']/g,""))>-1:this.whitelist.indexOf(e)>-1}remove(t){t.removeAttribute(this.keyName)}value(t){const e=t.getAttribute(this.keyName);return this.canAdd(t,e)&&e?e:""}}class Me extends Error{constructor(t){t="[Parchment] "+t,super(t),this.message=t,this.name=this.constructor.name}}const Li=class rr{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(t,e=!1){if(t==null)return null;if(this.blots.has(t))return this.blots.get(t)||null;if(e){let s=null;try{s=t.parentNode}catch{return null}return this.find(s,e)}return null}create(t,e,s){const n=this.query(e);if(n==null)throw new Me(`Unable to create ${e} blot`);const l=n,o=e instanceof Node||e.nodeType===Node.TEXT_NODE?e:l.create(s),a=new l(t,o,s);return rr.blots.set(a.domNode,a),a}find(t,e=!1){return rr.find(t,e)}query(t,e=M.ANY){let s;return typeof t=="string"?s=this.types[t]||this.attributes[t]:t instanceof Text||t.nodeType===Node.TEXT_NODE?s=this.types.text:typeof t=="number"?t&M.LEVEL&M.BLOCK?s=this.types.block:t&M.LEVEL&M.INLINE&&(s=this.types.inline):t instanceof Element&&((t.getAttribute("class")||"").split(/\s+/).some(n=>(s=this.classes[n],!!s)),s=s||this.tags[t.tagName]),s==null?null:"scope"in s&&e&M.LEVEL&s.scope&&e&M.TYPE&s.scope?s:null}register(...t){return t.map(e=>{const s="blotName"in e,n="attrName"in e;if(!s&&!n)throw new Me("Invalid definition");if(s&&e.blotName==="abstract")throw new Me("Cannot register abstract class");const l=s?e.blotName:n?e.attrName:void 0;return this.types[l]=e,n?typeof e.keyName=="string"&&(this.attributes[e.keyName]=e):s&&(e.className&&(this.classes[e.className]=e),e.tagName&&(Array.isArray(e.tagName)?e.tagName=e.tagName.map(o=>o.toUpperCase()):e.tagName=e.tagName.toUpperCase(),(Array.isArray(e.tagName)?e.tagName:[e.tagName]).forEach(o=>{(this.tags[o]==null||e.className==null)&&(this.tags[o]=e)}))),e})}};Li.blots=new WeakMap;let Ue=Li;function Hr(r,t){return(r.getAttribute("class")||"").split(/\s+/).filter(e=>e.indexOf(`${t}-`)===0)}class oo extends zt{static keys(t){return(t.getAttribute("class")||"").split(/\s+/).map(e=>e.split("-").slice(0,-1).join("-"))}add(t,e){return this.canAdd(t,e)?(this.remove(t),t.classList.add(`${this.keyName}-${e}`),!0):!1}remove(t){Hr(t,this.keyName).forEach(e=>{t.classList.remove(e)}),t.classList.length===0&&t.removeAttribute("class")}value(t){const e=(Hr(t,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(t,e)?e:""}}const Ut=oo;function $n(r){const t=r.split("-"),e=t.slice(1).map(s=>s[0].toUpperCase()+s.slice(1)).join("");return t[0]+e}class ao extends zt{static keys(t){return(t.getAttribute("style")||"").split(";").map(e=>e.split(":")[0].trim())}add(t,e){return this.canAdd(t,e)?(t.style[$n(this.keyName)]=e,!0):!1}remove(t){t.style[$n(this.keyName)]="",t.getAttribute("style")||t.removeAttribute("style")}value(t){const e=t.style[$n(this.keyName)];return this.canAdd(t,e)?e:""}}const le=ao;class co{constructor(t){this.attributes={},this.domNode=t,this.build()}attribute(t,e){e?t.add(this.domNode,e)&&(t.value(this.domNode)!=null?this.attributes[t.attrName]=t:delete this.attributes[t.attrName]):(t.remove(this.domNode),delete this.attributes[t.attrName])}build(){this.attributes={};const t=Ue.find(this.domNode);if(t==null)return;const e=zt.keys(this.domNode),s=Ut.keys(this.domNode),n=le.keys(this.domNode);e.concat(s).concat(n).forEach(l=>{const o=t.scroll.query(l,M.ATTRIBUTE);o instanceof zt&&(this.attributes[o.attrName]=o)})}copy(t){Object.keys(this.attributes).forEach(e=>{const s=this.attributes[e].value(this.domNode);t.format(e,s)})}move(t){this.copy(t),Object.keys(this.attributes).forEach(e=>{this.attributes[e].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((t,e)=>(t[e]=this.attributes[e].value(this.domNode),t),{})}}const Ws=co,qi=class{constructor(t,e){this.scroll=t,this.domNode=e,Ue.blots.set(e,this),this.prev=null,this.next=null}static create(t){if(this.tagName==null)throw new Me("Blot definition missing tagName");let e,s;return Array.isArray(this.tagName)?(typeof t=="string"?(s=t.toUpperCase(),parseInt(s,10).toString()===s&&(s=parseInt(s,10))):typeof t=="number"&&(s=t),typeof s=="number"?e=document.createElement(this.tagName[s-1]):s&&this.tagName.indexOf(s)>-1?e=document.createElement(s):e=document.createElement(this.tagName[0])):e=document.createElement(this.tagName),this.className&&e.classList.add(this.className),e}get statics(){return this.constructor}attach(){}clone(){const t=this.domNode.cloneNode(!1);return this.scroll.create(t)}detach(){this.parent!=null&&this.parent.removeChild(this),Ue.blots.delete(this.domNode)}deleteAt(t,e){this.isolate(t,e).remove()}formatAt(t,e,s,n){const l=this.isolate(t,e);if(this.scroll.query(s,M.BLOT)!=null&&n)l.wrap(s,n);else if(this.scroll.query(s,M.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);l.wrap(o),o.format(s,n)}}insertAt(t,e,s){const n=s==null?this.scroll.create("text",e):this.scroll.create(e,s),l=this.split(t);this.parent.insertBefore(n,l||void 0)}isolate(t,e){const s=this.split(t);if(s==null)throw new Error("Attempt to isolate at end");return s.split(e),s}length(){return 1}offset(t=this.parent){return this.parent==null||this===t?0:this.parent.children.offset(this)+this.parent.offset(t)}optimize(t){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(t,e){const s=typeof t=="string"?this.scroll.create(t,e):t;return this.parent!=null&&(this.parent.insertBefore(s,this.next||void 0),this.remove()),s}split(t,e){return t===0?this:this.next}update(t,e){}wrap(t,e){const s=typeof t=="string"?this.scroll.create(t,e):t;if(this.parent!=null&&this.parent.insertBefore(s,this.next||void 0),typeof s.appendChild!="function")throw new Me(`Cannot wrap ${t}`);return s.appendChild(this),s}};qi.blotName="abstract";let Si=qi;const Oi=class extends Si{static value(t){return!0}index(t,e){return this.domNode===t||this.domNode.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(t,e){let s=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return t>0&&(s+=1),[this.parent.domNode,s]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Oi.scope=M.INLINE_BLOT;let uo=Oi;const bt=uo;class ho{constructor(){this.head=null,this.tail=null,this.length=0}append(...t){if(this.insertBefore(t[0],null),t.length>1){const e=t.slice(1);this.append(...e)}}at(t){const e=this.iterator();let s=e();for(;s&&t>0;)t-=1,s=e();return s}contains(t){const e=this.iterator();let s=e();for(;s;){if(s===t)return!0;s=e()}return!1}indexOf(t){const e=this.iterator();let s=e(),n=0;for(;s;){if(s===t)return n;n+=1,s=e()}return-1}insertBefore(t,e){t!=null&&(this.remove(t),t.next=e,e!=null?(t.prev=e.prev,e.prev!=null&&(e.prev.next=t),e.prev=t,e===this.head&&(this.head=t)):this.tail!=null?(this.tail.next=t,t.prev=this.tail,this.tail=t):(t.prev=null,this.head=this.tail=t),this.length+=1)}offset(t){let e=0,s=this.head;for(;s!=null;){if(s===t)return e;e+=s.length(),s=s.next}return-1}remove(t){this.contains(t)&&(t.prev!=null&&(t.prev.next=t.next),t.next!=null&&(t.next.prev=t.prev),t===this.head&&(this.head=t.next),t===this.tail&&(this.tail=t.prev),this.length-=1)}iterator(t=this.head){return()=>{const e=t;return t!=null&&(t=t.next),e}}find(t,e=!1){const s=this.iterator();let n=s();for(;n;){const l=n.length();if(t<l||e&&t===l&&(n.next==null||n.next.length()!==0))return[n,t];t-=l,n=s()}return[null,0]}forEach(t){const e=this.iterator();let s=e();for(;s;)t(s),s=e()}forEachAt(t,e,s){if(e<=0)return;const[n,l]=this.find(t);let o=t-l;const a=this.iterator(n);let u=a();for(;u&&o<t+e;){const h=u.length();t>o?s(u,t-o,Math.min(e,o+h-t)):s(u,0,Math.min(h,t+e-o)),o+=h,u=a()}}map(t){return this.reduce((e,s)=>(e.push(t(s)),e),[])}reduce(t,e){const s=this.iterator();let n=s();for(;n;)e=t(e,n),n=s();return e}}function jr(r,t){const e=t.find(r);if(e)return e;try{return t.create(r)}catch{const s=t.create(M.INLINE);return Array.from(r.childNodes).forEach(n=>{s.domNode.appendChild(n)}),r.parentNode&&r.parentNode.replaceChild(s.domNode,r),s.attach(),s}}const Ci=class ee extends Si{constructor(t,e){super(t,e),this.uiNode=null,this.build()}appendChild(t){this.insertBefore(t)}attach(){super.attach(),this.children.forEach(t=>{t.attach()})}attachUI(t){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=t,ee.uiClass&&this.uiNode.classList.add(ee.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new ho,Array.from(this.domNode.childNodes).filter(t=>t!==this.uiNode).reverse().forEach(t=>{try{const e=jr(t,this.scroll);this.insertBefore(e,this.children.head||void 0)}catch(e){if(e instanceof Me)return;throw e}})}deleteAt(t,e){if(t===0&&e===this.length())return this.remove();this.children.forEachAt(t,e,(s,n,l)=>{s.deleteAt(n,l)})}descendant(t,e=0){const[s,n]=this.children.find(e);return t.blotName==null&&t(s)||t.blotName!=null&&s instanceof t?[s,n]:s instanceof ee?s.descendant(t,n):[null,-1]}descendants(t,e=0,s=Number.MAX_VALUE){let n=[],l=s;return this.children.forEachAt(e,s,(o,a,u)=>{(t.blotName==null&&t(o)||t.blotName!=null&&o instanceof t)&&n.push(o),o instanceof ee&&(n=n.concat(o.descendants(t,a,l))),l-=u}),n}detach(){this.children.forEach(t=>{t.detach()}),super.detach()}enforceAllowedChildren(){let t=!1;this.children.forEach(e=>{t||this.statics.allowedChildren.some(s=>e instanceof s)||(e.statics.scope===M.BLOCK_BLOT?(e.next!=null&&this.splitAfter(e),e.prev!=null&&this.splitAfter(e.prev),e.parent.unwrap(),t=!0):e instanceof ee?e.unwrap():e.remove())})}formatAt(t,e,s,n){this.children.forEachAt(t,e,(l,o,a)=>{l.formatAt(o,a,s,n)})}insertAt(t,e,s){const[n,l]=this.children.find(t);if(n)n.insertAt(l,e,s);else{const o=s==null?this.scroll.create("text",e):this.scroll.create(e,s);this.appendChild(o)}}insertBefore(t,e){t.parent!=null&&t.parent.children.remove(t);let s=null;this.children.insertBefore(t,e||null),t.parent=this,e!=null&&(s=e.domNode),(this.domNode.parentNode!==t.domNode||this.domNode.nextSibling!==s)&&this.domNode.insertBefore(t.domNode,s),t.attach()}length(){return this.children.reduce((t,e)=>t+e.length(),0)}moveChildren(t,e){this.children.forEach(s=>{t.insertBefore(s,e)})}optimize(t){if(super.optimize(t),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const e=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(e)}else this.remove()}path(t,e=!1){const[s,n]=this.children.find(t,e),l=[[this,t]];return s instanceof ee?l.concat(s.path(n,e)):(s!=null&&l.push([s,n]),l)}removeChild(t){this.children.remove(t)}replaceWith(t,e){const s=typeof t=="string"?this.scroll.create(t,e):t;return s instanceof ee&&this.moveChildren(s),super.replaceWith(s)}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const s=this.clone();return this.parent&&this.parent.insertBefore(s,this.next||void 0),this.children.forEachAt(t,this.length(),(n,l,o)=>{const a=n.split(l,e);a!=null&&s.appendChild(a)}),s}splitAfter(t){const e=this.clone();for(;t.next!=null;)e.appendChild(t.next);return this.parent&&this.parent.insertBefore(e,this.next||void 0),e}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(t,e){const s=[],n=[];t.forEach(l=>{l.target===this.domNode&&l.type==="childList"&&(s.push(...l.addedNodes),n.push(...l.removedNodes))}),n.forEach(l=>{if(l.parentNode!=null&&l.tagName!=="IFRAME"&&document.body.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const o=this.scroll.find(l);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),s.filter(l=>l.parentNode===this.domNode&&l!==this.uiNode).sort((l,o)=>l===o?0:l.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(l=>{let o=null;l.nextSibling!=null&&(o=this.scroll.find(l.nextSibling));const a=jr(l,this.scroll);(a.next!==o||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,o||void 0))}),this.enforceAllowedChildren()}};Ci.uiClass="";let fo=Ci;const Mt=fo;function go(r,t){if(Object.keys(r).length!==Object.keys(t).length)return!1;for(const e in r)if(r[e]!==t[e])return!1;return!0}const Ce=class _e extends Mt{static create(t){return super.create(t)}static formats(t,e){const s=e.query(_e.blotName);if(!(s!=null&&t.tagName===s.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new Ws(this.domNode)}format(t,e){if(t===this.statics.blotName&&!e)this.children.forEach(s=>{s instanceof _e||(s=s.wrap(_e.blotName,!0)),this.attributes.copy(s)}),this.unwrap();else{const s=this.scroll.query(t,M.INLINE);if(s==null)return;s instanceof zt?this.attributes.attribute(s,e):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e)}}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,s,n){this.formats()[s]!=null||this.scroll.query(s,M.ATTRIBUTE)?this.isolate(t,e).format(s,n):super.formatAt(t,e,s,n)}optimize(t){super.optimize(t);const e=this.formats();if(Object.keys(e).length===0)return this.unwrap();const s=this.next;s instanceof _e&&s.prev===this&&go(e,s.formats())&&(s.moveChildren(this),s.remove())}replaceWith(t,e){const s=super.replaceWith(t,e);return this.attributes.copy(s),s}update(t,e){super.update(t,e),t.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}wrap(t,e){const s=super.wrap(t,e);return s instanceof _e&&this.attributes.move(s),s}};Ce.allowedChildren=[Ce,bt],Ce.blotName="inline",Ce.scope=M.INLINE_BLOT,Ce.tagName="SPAN";let po=Ce;const pr=po,ke=class ir extends Mt{static create(t){return super.create(t)}static formats(t,e){const s=e.query(ir.blotName);if(!(s!=null&&t.tagName===s.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return t.tagName.toLowerCase()}}constructor(t,e){super(t,e),this.attributes=new Ws(this.domNode)}format(t,e){const s=this.scroll.query(t,M.BLOCK);s!=null&&(s instanceof zt?this.attributes.attribute(s,e):t===this.statics.blotName&&!e?this.replaceWith(ir.blotName):e&&(t!==this.statics.blotName||this.formats()[t]!==e)&&this.replaceWith(t,e))}formats(){const t=this.attributes.values(),e=this.statics.formats(this.domNode,this.scroll);return e!=null&&(t[this.statics.blotName]=e),t}formatAt(t,e,s,n){this.scroll.query(s,M.BLOCK)!=null?this.format(s,n):super.formatAt(t,e,s,n)}insertAt(t,e,s){if(s==null||this.scroll.query(e,M.INLINE)!=null)super.insertAt(t,e,s);else{const n=this.split(t);if(n!=null){const l=this.scroll.create(e,s);n.parent.insertBefore(l,n)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(t,e){const s=super.replaceWith(t,e);return this.attributes.copy(s),s}update(t,e){super.update(t,e),t.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}};ke.blotName="block",ke.scope=M.BLOCK_BLOT,ke.tagName="P",ke.allowedChildren=[pr,ke,bt];let mo=ke;const os=mo,lr=class extends Mt{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(t,e){super.deleteAt(t,e),this.enforceAllowedChildren()}formatAt(t,e,s,n){super.formatAt(t,e,s,n),this.enforceAllowedChildren()}insertAt(t,e,s){super.insertAt(t,e,s),this.enforceAllowedChildren()}optimize(t){super.optimize(t),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};lr.blotName="container",lr.scope=M.BLOCK_BLOT;let bo=lr;const Xs=bo;class yo extends bt{static formats(t,e){}format(t,e){super.formatAt(0,this.length(),t,e)}formatAt(t,e,s,n){t===0&&e===this.length()?this.format(s,n):super.formatAt(t,e,s,n)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Tt=yo,vo={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Eo=100,Ie=class extends Mt{constructor(t,e){super(null,e),this.registry=t,this.scroll=this,this.build(),this.observer=new MutationObserver(s=>{this.update(s)}),this.observer.observe(this.domNode,vo),this.attach()}create(t,e){return this.registry.create(this,t,e)}find(t,e=!1){const s=this.registry.find(t,e);return s?s.scroll===this?s:e?this.find(s.scroll.domNode.parentNode,!0):null:null}query(t,e=M.ANY){return this.registry.query(t,e)}register(...t){return this.registry.register(...t)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(t,e){this.update(),t===0&&e===this.length()?this.children.forEach(s=>{s.remove()}):super.deleteAt(t,e)}formatAt(t,e,s,n){this.update(),super.formatAt(t,e,s,n)}insertAt(t,e,s){this.update(),super.insertAt(t,e,s)}optimize(t=[],e={}){super.optimize(e);const s=e.mutationsMap||new WeakMap;let n=Array.from(this.observer.takeRecords());for(;n.length>0;)t.push(n.pop());const l=(u,h=!0)=>{u==null||u===this||u.domNode.parentNode!=null&&(s.has(u.domNode)||s.set(u.domNode,[]),h&&l(u.parent))},o=u=>{s.has(u.domNode)&&(u instanceof Mt&&u.children.forEach(o),s.delete(u.domNode),u.optimize(e))};let a=t;for(let u=0;a.length>0;u+=1){if(u>=Eo)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(h=>{const p=this.find(h.target,!0);p!=null&&(p.domNode===h.target&&(h.type==="childList"?(l(this.find(h.previousSibling,!1)),Array.from(h.addedNodes).forEach(y=>{const d=this.find(y,!1);l(d,!1),d instanceof Mt&&d.children.forEach(m=>{l(m,!1)})})):h.type==="attributes"&&l(p.prev)),l(p))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),n=a.slice();n.length>0;)t.push(n.pop())}}update(t,e={}){t=t||this.observer.takeRecords();const s=new WeakMap;t.map(n=>{const l=this.find(n.target,!0);return l==null?null:s.has(l.domNode)?(s.get(l.domNode).push(n),null):(s.set(l.domNode,[n]),l)}).forEach(n=>{n!=null&&n!==this&&s.has(n.domNode)&&n.update(s.get(n.domNode)||[],e)}),e.mutationsMap=s,s.has(this.domNode)&&super.update(s.get(this.domNode),e),this.optimize(t,e)}};Ie.blotName="scroll",Ie.defaultChild=os,Ie.allowedChildren=[os,Xs],Ie.scope=M.BLOCK_BLOT,Ie.tagName="DIV";let No=Ie;const mr=No,or=class _i extends bt{static create(t){return document.createTextNode(t)}static value(t){return t.data}constructor(t,e){super(t,e),this.text=this.statics.value(this.domNode)}deleteAt(t,e){this.domNode.data=this.text=this.text.slice(0,t)+this.text.slice(t+e)}index(t,e){return this.domNode===t?e:-1}insertAt(t,e,s){s==null?(this.text=this.text.slice(0,t)+e+this.text.slice(t),this.domNode.data=this.text):super.insertAt(t,e,s)}length(){return this.text.length}optimize(t){super.optimize(t),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof _i&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(t,e=!1){return[this.domNode,t]}split(t,e=!1){if(!e){if(t===0)return this;if(t===this.length())return this.next}const s=this.scroll.create(this.domNode.splitText(t));return this.parent.insertBefore(s,this.next||void 0),this.text=this.statics.value(this.domNode),s}update(t,e){t.some(s=>s.type==="characterData"&&s.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};or.blotName="text",or.scope=M.INLINE_BLOT;let Ao=or;const Vs=Ao,wo=Object.freeze(Object.defineProperty({__proto__:null,Attributor:zt,AttributorStore:Ws,BlockBlot:os,ClassAttributor:Ut,ContainerBlot:Xs,EmbedBlot:Tt,InlineBlot:pr,LeafBlot:bt,ParentBlot:Mt,Registry:Ue,Scope:M,ScrollBlot:mr,StyleAttributor:le,TextBlot:Vs},Symbol.toStringTag,{value:"Module"}));var Rs={exports:{}},zn,Fr;function xo(){if(Fr)return zn;Fr=1;var r=-1,t=1,e=0;function s(g,L,b,O,q){if(g===L)return g?[[e,g]]:[];if(b!=null){var x=Ct(g,L,b);if(x)return x}var S=a(g,L),I=g.substring(0,S);g=g.substring(S),L=L.substring(S),S=h(g,L);var D=g.substring(g.length-S);g=g.substring(0,g.length-S),L=L.substring(0,L.length-S);var _=n(g,L);return I&&_.unshift([e,I]),D&&_.push([e,D]),C(_,q),O&&y(_),_}function n(g,L){var b;if(!g)return[[t,L]];if(!L)return[[r,g]];var O=g.length>L.length?g:L,q=g.length>L.length?L:g,x=O.indexOf(q);if(x!==-1)return b=[[t,O.substring(0,x)],[e,q],[t,O.substring(x+q.length)]],g.length>L.length&&(b[0][0]=b[2][0]=r),b;if(q.length===1)return[[r,g],[t,L]];var S=p(g,L);if(S){var I=S[0],D=S[1],_=S[2],z=S[3],j=S[4],V=s(I,_),G=s(D,z);return V.concat([[e,j]],G)}return l(g,L)}function l(g,L){for(var b=g.length,O=L.length,q=Math.ceil((b+O)/2),x=q,S=2*q,I=new Array(S),D=new Array(S),_=0;_<S;_++)I[_]=-1,D[_]=-1;I[x+1]=0,D[x+1]=0;for(var z=b-O,j=z%2!==0,V=0,G=0,P=0,nt=0,rt=0;rt<q;rt++){for(var K=-rt+V;K<=rt-G;K+=2){var Y=x+K,X;K===-rt||K!==rt&&I[Y-1]<I[Y+1]?X=I[Y+1]:X=I[Y-1]+1;for(var Q=X-K;X<b&&Q<O&&g.charAt(X)===L.charAt(Q);)X++,Q++;if(I[Y]=X,X>b)G+=2;else if(Q>O)V+=2;else if(j){var tt=x+z-K;if(tt>=0&&tt<S&&D[tt]!==-1){var et=b-D[tt];if(X>=et)return o(g,L,X,Q)}}}for(var lt=-rt+P;lt<=rt-nt;lt+=2){var tt=x+lt,et;lt===-rt||lt!==rt&&D[tt-1]<D[tt+1]?et=D[tt+1]:et=D[tt-1]+1;for(var dt=et-lt;et<b&&dt<O&&g.charAt(b-et-1)===L.charAt(O-dt-1);)et++,dt++;if(D[tt]=et,et>b)nt+=2;else if(dt>O)P+=2;else if(!j){var Y=x+z-lt;if(Y>=0&&Y<S&&I[Y]!==-1){var X=I[Y],Q=x+X-Y;if(et=b-et,X>=et)return o(g,L,X,Q)}}}}return[[r,g],[t,L]]}function o(g,L,b,O){var q=g.substring(0,b),x=L.substring(0,O),S=g.substring(b),I=L.substring(O),D=s(q,x),_=s(S,I);return D.concat(_)}function a(g,L){if(!g||!L||g.charAt(0)!==L.charAt(0))return 0;for(var b=0,O=Math.min(g.length,L.length),q=O,x=0;b<q;)g.substring(x,q)==L.substring(x,q)?(b=q,x=b):O=q,q=Math.floor((O-b)/2+b);return B(g.charCodeAt(q-1))&&q--,q}function u(g,L){var b=g.length,O=L.length;if(b==0||O==0)return 0;b>O?g=g.substring(b-O):b<O&&(L=L.substring(0,b));var q=Math.min(b,O);if(g==L)return q;for(var x=0,S=1;;){var I=g.substring(q-S),D=L.indexOf(I);if(D==-1)return x;S+=D,(D==0||g.substring(q-S)==L.substring(0,S))&&(x=S,S++)}}function h(g,L){if(!g||!L||g.slice(-1)!==L.slice(-1))return 0;for(var b=0,O=Math.min(g.length,L.length),q=O,x=0;b<q;)g.substring(g.length-q,g.length-x)==L.substring(L.length-q,L.length-x)?(b=q,x=b):O=q,q=Math.floor((O-b)/2+b);return $(g.charCodeAt(g.length-q))&&q--,q}function p(g,L){var b=g.length>L.length?g:L,O=g.length>L.length?L:g;if(b.length<4||O.length*2<b.length)return null;function q(G,P,nt){for(var rt=G.substring(nt,nt+Math.floor(G.length/4)),K=-1,Y="",X,Q,tt,et;(K=P.indexOf(rt,K+1))!==-1;){var lt=a(G.substring(nt),P.substring(K)),dt=h(G.substring(0,nt),P.substring(0,K));Y.length<dt+lt&&(Y=P.substring(K-dt,K)+P.substring(K,K+lt),X=G.substring(0,nt-dt),Q=G.substring(nt+lt),tt=P.substring(0,K-dt),et=P.substring(K+lt))}return Y.length*2>=G.length?[X,Q,tt,et,Y]:null}var x=q(b,O,Math.ceil(b.length/4)),S=q(b,O,Math.ceil(b.length/2)),I;if(!x&&!S)return null;S?x?I=x[4].length>S[4].length?x:S:I=S:I=x;var D,_,z,j;g.length>L.length?(D=I[0],_=I[1],z=I[2],j=I[3]):(z=I[0],j=I[1],D=I[2],_=I[3]);var V=I[4];return[D,_,z,j,V]}function y(g){for(var L=!1,b=[],O=0,q=null,x=0,S=0,I=0,D=0,_=0;x<g.length;)g[x][0]==e?(b[O++]=x,S=D,I=_,D=0,_=0,q=g[x][1]):(g[x][0]==t?D+=g[x][1].length:_+=g[x][1].length,q&&q.length<=Math.max(S,I)&&q.length<=Math.max(D,_)&&(g.splice(b[O-1],0,[r,q]),g[b[O-1]+1][0]=t,O--,O--,x=O>0?b[O-1]:-1,S=0,I=0,D=0,_=0,q=null,L=!0)),x++;for(L&&C(g),T(g),x=1;x<g.length;){if(g[x-1][0]==r&&g[x][0]==t){var z=g[x-1][1],j=g[x][1],V=u(z,j),G=u(j,z);V>=G?(V>=z.length/2||V>=j.length/2)&&(g.splice(x,0,[e,j.substring(0,V)]),g[x-1][1]=z.substring(0,z.length-V),g[x+1][1]=j.substring(V),x++):(G>=z.length/2||G>=j.length/2)&&(g.splice(x,0,[e,z.substring(0,G)]),g[x-1][0]=t,g[x-1][1]=j.substring(0,j.length-G),g[x+1][0]=r,g[x+1][1]=z.substring(G),x++),x++}x++}}var d=/[^a-zA-Z0-9]/,m=/\s/,v=/[\r\n]/,A=/\n\r?\n$/,w=/^\r?\n\r?\n/;function T(g){function L(G,P){if(!G||!P)return 6;var nt=G.charAt(G.length-1),rt=P.charAt(0),K=nt.match(d),Y=rt.match(d),X=K&&nt.match(m),Q=Y&&rt.match(m),tt=X&&nt.match(v),et=Q&&rt.match(v),lt=tt&&G.match(A),dt=et&&P.match(w);return lt||dt?5:tt||et?4:K&&!X&&Q?3:X||Q?2:K||Y?1:0}for(var b=1;b<g.length-1;){if(g[b-1][0]==e&&g[b+1][0]==e){var O=g[b-1][1],q=g[b][1],x=g[b+1][1],S=h(O,q);if(S){var I=q.substring(q.length-S);O=O.substring(0,O.length-S),q=I+q.substring(0,q.length-S),x=I+x}for(var D=O,_=q,z=x,j=L(O,q)+L(q,x);q.charAt(0)===x.charAt(0);){O+=q.charAt(0),q=q.substring(1)+x.charAt(0),x=x.substring(1);var V=L(O,q)+L(q,x);V>=j&&(j=V,D=O,_=q,z=x)}g[b-1][1]!=D&&(D?g[b-1][1]=D:(g.splice(b-1,1),b--),g[b][1]=_,z?g[b+1][1]=z:(g.splice(b+1,1),b--))}b++}}function C(g,L){g.push([e,""]);for(var b=0,O=0,q=0,x="",S="",I;b<g.length;){if(b<g.length-1&&!g[b][1]){g.splice(b,1);continue}switch(g[b][0]){case t:q++,S+=g[b][1],b++;break;case r:O++,x+=g[b][1],b++;break;case e:var D=b-q-O-1;if(L){if(D>=0&&st(g[D][1])){var _=g[D][1].slice(-1);if(g[D][1]=g[D][1].slice(0,-1),x=_+x,S=_+S,!g[D][1]){g.splice(D,1),b--;var z=D-1;g[z]&&g[z][0]===t&&(q++,S=g[z][1]+S,z--),g[z]&&g[z][0]===r&&(O++,x=g[z][1]+x,z--),D=z}}if(H(g[b][1])){var _=g[b][1].charAt(0);g[b][1]=g[b][1].slice(1),x+=_,S+=_}}if(b<g.length-1&&!g[b][1]){g.splice(b,1);break}if(x.length>0||S.length>0){x.length>0&&S.length>0&&(I=a(S,x),I!==0&&(D>=0?g[D][1]+=S.substring(0,I):(g.splice(0,0,[e,S.substring(0,I)]),b++),S=S.substring(I),x=x.substring(I)),I=h(S,x),I!==0&&(g[b][1]=S.substring(S.length-I)+g[b][1],S=S.substring(0,S.length-I),x=x.substring(0,x.length-I)));var j=q+O;x.length===0&&S.length===0?(g.splice(b-j,j),b=b-j):x.length===0?(g.splice(b-j,j,[t,S]),b=b-j+1):S.length===0?(g.splice(b-j,j,[r,x]),b=b-j+1):(g.splice(b-j,j,[r,x],[t,S]),b=b-j+2)}b!==0&&g[b-1][0]===e?(g[b-1][1]+=g[b][1],g.splice(b,1)):b++,q=0,O=0,x="",S="";break}}g[g.length-1][1]===""&&g.pop();var V=!1;for(b=1;b<g.length-1;)g[b-1][0]===e&&g[b+1][0]===e&&(g[b][1].substring(g[b][1].length-g[b-1][1].length)===g[b-1][1]?(g[b][1]=g[b-1][1]+g[b][1].substring(0,g[b][1].length-g[b-1][1].length),g[b+1][1]=g[b-1][1]+g[b+1][1],g.splice(b-1,1),V=!0):g[b][1].substring(0,g[b+1][1].length)==g[b+1][1]&&(g[b-1][1]+=g[b+1][1],g[b][1]=g[b][1].substring(g[b+1][1].length)+g[b+1][1],g.splice(b+1,1),V=!0)),b++;V&&C(g,L)}function B(g){return g>=55296&&g<=56319}function $(g){return g>=56320&&g<=57343}function H(g){return $(g.charCodeAt(0))}function st(g){return B(g.charCodeAt(g.length-1))}function it(g){for(var L=[],b=0;b<g.length;b++)g[b][1].length>0&&L.push(g[b]);return L}function ct(g,L,b,O){return st(g)||H(O)?null:it([[e,g],[r,L],[t,b],[e,O]])}function Ct(g,L,b){var O=typeof b=="number"?{index:b,length:0}:b.oldRange,q=typeof b=="number"?null:b.newRange,x=g.length,S=L.length;if(O.length===0&&(q===null||q.length===0)){var I=O.index,D=g.slice(0,I),_=g.slice(I),z=q?q.index:null;t:{var j=I+S-x;if(z!==null&&z!==j||j<0||j>S)break t;var V=L.slice(0,j),G=L.slice(j);if(G!==_)break t;var P=Math.min(I,j),nt=D.slice(0,P),rt=V.slice(0,P);if(nt!==rt)break t;var K=D.slice(P),Y=V.slice(P);return ct(nt,K,Y,_)}t:{if(z!==null&&z!==I)break t;var X=I,V=L.slice(0,X),G=L.slice(X);if(V!==D)break t;var Q=Math.min(x-X,S-X),tt=_.slice(_.length-Q),et=G.slice(G.length-Q);if(tt!==et)break t;var K=_.slice(0,_.length-Q),Y=G.slice(0,G.length-Q);return ct(D,K,Y,tt)}}if(O.length>0&&q&&q.length===0)t:{var nt=g.slice(0,O.index),tt=g.slice(O.index+O.length),P=nt.length,Q=tt.length;if(S<P+Q)break t;var rt=L.slice(0,P),et=L.slice(S-Q);if(nt!==rt||tt!==et)break t;var K=g.slice(P,x-Q),Y=L.slice(P,S-Q);return ct(nt,K,Y,tt)}return null}function xt(g,L,b,O){return s(g,L,b,O,!0)}return xt.INSERT=t,xt.DELETE=r,xt.EQUAL=e,zn=xt,zn}var ns={exports:{}};ns.exports;var $r;function ki(){return $r||($r=1,(function(r,t){var e=200,s="__lodash_hash_undefined__",n=9007199254740991,l="[object Arguments]",o="[object Array]",a="[object Boolean]",u="[object Date]",h="[object Error]",p="[object Function]",y="[object GeneratorFunction]",d="[object Map]",m="[object Number]",v="[object Object]",A="[object Promise]",w="[object RegExp]",T="[object Set]",C="[object String]",B="[object Symbol]",$="[object WeakMap]",H="[object ArrayBuffer]",st="[object DataView]",it="[object Float32Array]",ct="[object Float64Array]",Ct="[object Int8Array]",xt="[object Int16Array]",g="[object Int32Array]",L="[object Uint8Array]",b="[object Uint8ClampedArray]",O="[object Uint16Array]",q="[object Uint32Array]",x=/[\\^$.*+?()[\]{}|]/g,S=/\w*$/,I=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,_={};_[l]=_[o]=_[H]=_[st]=_[a]=_[u]=_[it]=_[ct]=_[Ct]=_[xt]=_[g]=_[d]=_[m]=_[v]=_[w]=_[T]=_[C]=_[B]=_[L]=_[b]=_[O]=_[q]=!0,_[h]=_[p]=_[$]=!1;var z=typeof se=="object"&&se&&se.Object===Object&&se,j=typeof self=="object"&&self&&self.Object===Object&&self,V=z||j||Function("return this")(),G=t&&!t.nodeType&&t,P=G&&!0&&r&&!r.nodeType&&r,nt=P&&P.exports===G;function rt(i,c){return i.set(c[0],c[1]),i}function K(i,c){return i.add(c),i}function Y(i,c){for(var f=-1,E=i?i.length:0;++f<E&&c(i[f],f,i)!==!1;);return i}function X(i,c){for(var f=-1,E=c.length,F=i.length;++f<E;)i[F+f]=c[f];return i}function Q(i,c,f,E){for(var F=-1,U=i?i.length:0;++F<U;)f=c(f,i[F],F,i);return f}function tt(i,c){for(var f=-1,E=Array(i);++f<i;)E[f]=c(f);return E}function et(i,c){return i?.[c]}function lt(i){var c=!1;if(i!=null&&typeof i.toString!="function")try{c=!!(i+"")}catch{}return c}function dt(i){var c=-1,f=Array(i.size);return i.forEach(function(E,F){f[++c]=[F,E]}),f}function He(i,c){return function(f){return i(c(f))}}function gs(i){var c=-1,f=Array(i.size);return i.forEach(function(E){f[++c]=E}),f}var tn=Array.prototype,en=Function.prototype,ve=Object.prototype,je=V["__core-js_shared__"],ps=(function(){var i=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),ms=en.toString,Ht=ve.hasOwnProperty,Ee=ve.toString,sn=RegExp("^"+ms.call(Ht).replace(x,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),oe=nt?V.Buffer:void 0,Ne=V.Symbol,Fe=V.Uint8Array,Lt=He(Object.getPrototypeOf,Object),bs=Object.create,ys=ve.propertyIsEnumerable,nn=tn.splice,$e=Object.getOwnPropertySymbols,Ae=oe?oe.isBuffer:void 0,vs=He(Object.keys,Object),we=kt(V,"DataView"),ae=kt(V,"Map"),_t=kt(V,"Promise"),xe=kt(V,"Set"),ze=kt(V,"WeakMap"),ce=kt(Object,"create"),Ke=yt(we),ue=yt(ae),Ve=yt(_t),Ge=yt(xe),Ze=yt(ze),Jt=Ne?Ne.prototype:void 0,Es=Jt?Jt.valueOf:void 0;function Vt(i){var c=-1,f=i?i.length:0;for(this.clear();++c<f;){var E=i[c];this.set(E[0],E[1])}}function rn(){this.__data__=ce?ce(null):{}}function ln(i){return this.has(i)&&delete this.__data__[i]}function on(i){var c=this.__data__;if(ce){var f=c[i];return f===s?void 0:f}return Ht.call(c,i)?c[i]:void 0}function Ns(i){var c=this.__data__;return ce?c[i]!==void 0:Ht.call(c,i)}function We(i,c){var f=this.__data__;return f[i]=ce&&c===void 0?s:c,this}Vt.prototype.clear=rn,Vt.prototype.delete=ln,Vt.prototype.get=on,Vt.prototype.has=Ns,Vt.prototype.set=We;function ut(i){var c=-1,f=i?i.length:0;for(this.clear();++c<f;){var E=i[c];this.set(E[0],E[1])}}function an(){this.__data__=[]}function cn(i){var c=this.__data__,f=Le(c,i);if(f<0)return!1;var E=c.length-1;return f==E?c.pop():nn.call(c,f,1),!0}function un(i){var c=this.__data__,f=Le(c,i);return f<0?void 0:c[f][1]}function hn(i){return Le(this.__data__,i)>-1}function fn(i,c){var f=this.__data__,E=Le(f,i);return E<0?f.push([i,c]):f[E][1]=c,this}ut.prototype.clear=an,ut.prototype.delete=cn,ut.prototype.get=un,ut.prototype.has=hn,ut.prototype.set=fn;function gt(i){var c=-1,f=i?i.length:0;for(this.clear();++c<f;){var E=i[c];this.set(E[0],E[1])}}function dn(){this.__data__={hash:new Vt,map:new(ae||ut),string:new Vt}}function gn(i){return fe(this,i).delete(i)}function pn(i){return fe(this,i).get(i)}function mn(i){return fe(this,i).has(i)}function bn(i,c){return fe(this,i).set(i,c),this}gt.prototype.clear=dn,gt.prototype.delete=gn,gt.prototype.get=pn,gt.prototype.has=mn,gt.prototype.set=bn;function At(i){this.__data__=new ut(i)}function yn(){this.__data__=new ut}function vn(i){return this.__data__.delete(i)}function En(i){return this.__data__.get(i)}function Nn(i){return this.__data__.has(i)}function An(i,c){var f=this.__data__;if(f instanceof ut){var E=f.__data__;if(!ae||E.length<e-1)return E.push([i,c]),this;f=this.__data__=new gt(E)}return f.set(i,c),this}At.prototype.clear=yn,At.prototype.delete=vn,At.prototype.get=En,At.prototype.has=Nn,At.prototype.set=An;function Te(i,c){var f=Je(i)||Se(i)?tt(i.length,String):[],E=f.length,F=!!E;for(var U in i)Ht.call(i,U)&&!(F&&(U=="length"||Mn(U,E)))&&f.push(U);return f}function As(i,c,f){var E=i[c];(!(Ht.call(i,c)&&qs(E,f))||f===void 0&&!(c in i))&&(i[c]=f)}function Le(i,c){for(var f=i.length;f--;)if(qs(i[f][0],c))return f;return-1}function jt(i,c){return i&&Qe(c,es(c),i)}function Xe(i,c,f,E,F,U,W){var Z;if(E&&(Z=U?E(i,F,U,W):E(i)),Z!==void 0)return Z;if(!$t(i))return i;var ot=Je(i);if(ot){if(Z=Rn(i),!c)return _n(i,Z)}else{var J=Zt(i),pt=J==p||J==y;if(Ss(i))return qe(i,c);if(J==v||J==l||pt&&!U){if(lt(i))return U?i:{};if(Z=Ft(pt?{}:i),!c)return kn(i,jt(Z,i))}else{if(!_[J])return U?i:{};Z=Bn(i,J,Xe,c)}}W||(W=new At);var wt=W.get(i);if(wt)return wt;if(W.set(i,Z),!ot)var at=f?In(i):es(i);return Y(at||i,function(mt,ht){at&&(ht=mt,mt=i[ht]),As(Z,ht,Xe(mt,c,f,E,ht,i,W))}),Z}function wn(i){return $t(i)?bs(i):{}}function xn(i,c,f){var E=c(i);return Je(i)?E:X(E,f(i))}function Tn(i){return Ee.call(i)}function Ln(i){if(!$t(i)||Un(i))return!1;var c=ts(i)||lt(i)?sn:I;return c.test(yt(i))}function qn(i){if(!Ts(i))return vs(i);var c=[];for(var f in Object(i))Ht.call(i,f)&&f!="constructor"&&c.push(f);return c}function qe(i,c){if(c)return i.slice();var f=new i.constructor(i.length);return i.copy(f),f}function Ye(i){var c=new i.constructor(i.byteLength);return new Fe(c).set(new Fe(i)),c}function he(i,c){var f=c?Ye(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}function ws(i,c,f){var E=c?f(dt(i),!0):dt(i);return Q(E,rt,new i.constructor)}function xs(i){var c=new i.constructor(i.source,S.exec(i));return c.lastIndex=i.lastIndex,c}function Sn(i,c,f){var E=c?f(gs(i),!0):gs(i);return Q(E,K,new i.constructor)}function On(i){return Es?Object(Es.call(i)):{}}function Cn(i,c){var f=c?Ye(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}function _n(i,c){var f=-1,E=i.length;for(c||(c=Array(E));++f<E;)c[f]=i[f];return c}function Qe(i,c,f,E){f||(f={});for(var F=-1,U=c.length;++F<U;){var W=c[F],Z=void 0;As(f,W,Z===void 0?i[W]:Z)}return f}function kn(i,c){return Qe(i,Gt(i),c)}function In(i){return xn(i,es,Gt)}function fe(i,c){var f=i.__data__;return Dn(c)?f[typeof c=="string"?"string":"hash"]:f.map}function kt(i,c){var f=et(i,c);return Ln(f)?f:void 0}var Gt=$e?He($e,Object):Hn,Zt=Tn;(we&&Zt(new we(new ArrayBuffer(1)))!=st||ae&&Zt(new ae)!=d||_t&&Zt(_t.resolve())!=A||xe&&Zt(new xe)!=T||ze&&Zt(new ze)!=$)&&(Zt=function(i){var c=Ee.call(i),f=c==v?i.constructor:void 0,E=f?yt(f):void 0;if(E)switch(E){case Ke:return st;case ue:return d;case Ve:return A;case Ge:return T;case Ze:return $}return c});function Rn(i){var c=i.length,f=i.constructor(c);return c&&typeof i[0]=="string"&&Ht.call(i,"index")&&(f.index=i.index,f.input=i.input),f}function Ft(i){return typeof i.constructor=="function"&&!Ts(i)?wn(Lt(i)):{}}function Bn(i,c,f,E){var F=i.constructor;switch(c){case H:return Ye(i);case a:case u:return new F(+i);case st:return he(i,E);case it:case ct:case Ct:case xt:case g:case L:case b:case O:case q:return Cn(i,E);case d:return ws(i,E,f);case m:case C:return new F(i);case w:return xs(i);case T:return Sn(i,E,f);case B:return On(i)}}function Mn(i,c){return c=c??n,!!c&&(typeof i=="number"||D.test(i))&&i>-1&&i%1==0&&i<c}function Dn(i){var c=typeof i;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?i!=="__proto__":i===null}function Un(i){return!!ps&&ps in i}function Ts(i){var c=i&&i.constructor,f=typeof c=="function"&&c.prototype||ve;return i===f}function yt(i){if(i!=null){try{return ms.call(i)}catch{}try{return i+""}catch{}}return""}function Ls(i){return Xe(i,!0,!0)}function qs(i,c){return i===c||i!==i&&c!==c}function Se(i){return Pn(i)&&Ht.call(i,"callee")&&(!ys.call(i,"callee")||Ee.call(i)==l)}var Je=Array.isArray;function Oe(i){return i!=null&&Os(i.length)&&!ts(i)}function Pn(i){return Cs(i)&&Oe(i)}var Ss=Ae||jn;function ts(i){var c=$t(i)?Ee.call(i):"";return c==p||c==y}function Os(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=n}function $t(i){var c=typeof i;return!!i&&(c=="object"||c=="function")}function Cs(i){return!!i&&typeof i=="object"}function es(i){return Oe(i)?Te(i):qn(i)}function Hn(){return[]}function jn(){return!1}r.exports=Ls})(ns,ns.exports)),ns.exports}var rs={exports:{}};rs.exports;var zr;function Ii(){return zr||(zr=1,(function(r,t){var e=200,s="__lodash_hash_undefined__",n=1,l=2,o=9007199254740991,a="[object Arguments]",u="[object Array]",h="[object AsyncFunction]",p="[object Boolean]",y="[object Date]",d="[object Error]",m="[object Function]",v="[object GeneratorFunction]",A="[object Map]",w="[object Number]",T="[object Null]",C="[object Object]",B="[object Promise]",$="[object Proxy]",H="[object RegExp]",st="[object Set]",it="[object String]",ct="[object Symbol]",Ct="[object Undefined]",xt="[object WeakMap]",g="[object ArrayBuffer]",L="[object DataView]",b="[object Float32Array]",O="[object Float64Array]",q="[object Int8Array]",x="[object Int16Array]",S="[object Int32Array]",I="[object Uint8Array]",D="[object Uint8ClampedArray]",_="[object Uint16Array]",z="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,V=/^\[object .+?Constructor\]$/,G=/^(?:0|[1-9]\d*)$/,P={};P[b]=P[O]=P[q]=P[x]=P[S]=P[I]=P[D]=P[_]=P[z]=!0,P[a]=P[u]=P[g]=P[p]=P[L]=P[y]=P[d]=P[m]=P[A]=P[w]=P[C]=P[H]=P[st]=P[it]=P[xt]=!1;var nt=typeof se=="object"&&se&&se.Object===Object&&se,rt=typeof self=="object"&&self&&self.Object===Object&&self,K=nt||rt||Function("return this")(),Y=t&&!t.nodeType&&t,X=Y&&!0&&r&&!r.nodeType&&r,Q=X&&X.exports===Y,tt=Q&&nt.process,et=(function(){try{return tt&&tt.binding&&tt.binding("util")}catch{}})(),lt=et&&et.isTypedArray;function dt(i,c){for(var f=-1,E=i==null?0:i.length,F=0,U=[];++f<E;){var W=i[f];c(W,f,i)&&(U[F++]=W)}return U}function He(i,c){for(var f=-1,E=c.length,F=i.length;++f<E;)i[F+f]=c[f];return i}function gs(i,c){for(var f=-1,E=i==null?0:i.length;++f<E;)if(c(i[f],f,i))return!0;return!1}function tn(i,c){for(var f=-1,E=Array(i);++f<i;)E[f]=c(f);return E}function en(i){return function(c){return i(c)}}function ve(i,c){return i.has(c)}function je(i,c){return i?.[c]}function ps(i){var c=-1,f=Array(i.size);return i.forEach(function(E,F){f[++c]=[F,E]}),f}function ms(i,c){return function(f){return i(c(f))}}function Ht(i){var c=-1,f=Array(i.size);return i.forEach(function(E){f[++c]=E}),f}var Ee=Array.prototype,sn=Function.prototype,oe=Object.prototype,Ne=K["__core-js_shared__"],Fe=sn.toString,Lt=oe.hasOwnProperty,bs=(function(){var i=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),ys=oe.toString,nn=RegExp("^"+Fe.call(Lt).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=Q?K.Buffer:void 0,Ae=K.Symbol,vs=K.Uint8Array,we=oe.propertyIsEnumerable,ae=Ee.splice,_t=Ae?Ae.toStringTag:void 0,xe=Object.getOwnPropertySymbols,ze=$e?$e.isBuffer:void 0,ce=ms(Object.keys,Object),Ke=Gt(K,"DataView"),ue=Gt(K,"Map"),Ve=Gt(K,"Promise"),Ge=Gt(K,"Set"),Ze=Gt(K,"WeakMap"),Jt=Gt(Object,"create"),Es=yt(Ke),Vt=yt(ue),rn=yt(Ve),ln=yt(Ge),on=yt(Ze),Ns=Ae?Ae.prototype:void 0,We=Ns?Ns.valueOf:void 0;function ut(i){var c=-1,f=i==null?0:i.length;for(this.clear();++c<f;){var E=i[c];this.set(E[0],E[1])}}function an(){this.__data__=Jt?Jt(null):{},this.size=0}function cn(i){var c=this.has(i)&&delete this.__data__[i];return this.size-=c?1:0,c}function un(i){var c=this.__data__;if(Jt){var f=c[i];return f===s?void 0:f}return Lt.call(c,i)?c[i]:void 0}function hn(i){var c=this.__data__;return Jt?c[i]!==void 0:Lt.call(c,i)}function fn(i,c){var f=this.__data__;return this.size+=this.has(i)?0:1,f[i]=Jt&&c===void 0?s:c,this}ut.prototype.clear=an,ut.prototype.delete=cn,ut.prototype.get=un,ut.prototype.has=hn,ut.prototype.set=fn;function gt(i){var c=-1,f=i==null?0:i.length;for(this.clear();++c<f;){var E=i[c];this.set(E[0],E[1])}}function dn(){this.__data__=[],this.size=0}function gn(i){var c=this.__data__,f=qe(c,i);if(f<0)return!1;var E=c.length-1;return f==E?c.pop():ae.call(c,f,1),--this.size,!0}function pn(i){var c=this.__data__,f=qe(c,i);return f<0?void 0:c[f][1]}function mn(i){return qe(this.__data__,i)>-1}function bn(i,c){var f=this.__data__,E=qe(f,i);return E<0?(++this.size,f.push([i,c])):f[E][1]=c,this}gt.prototype.clear=dn,gt.prototype.delete=gn,gt.prototype.get=pn,gt.prototype.has=mn,gt.prototype.set=bn;function At(i){var c=-1,f=i==null?0:i.length;for(this.clear();++c<f;){var E=i[c];this.set(E[0],E[1])}}function yn(){this.size=0,this.__data__={hash:new ut,map:new(ue||gt),string:new ut}}function vn(i){var c=kt(this,i).delete(i);return this.size-=c?1:0,c}function En(i){return kt(this,i).get(i)}function Nn(i){return kt(this,i).has(i)}function An(i,c){var f=kt(this,i),E=f.size;return f.set(i,c),this.size+=f.size==E?0:1,this}At.prototype.clear=yn,At.prototype.delete=vn,At.prototype.get=En,At.prototype.has=Nn,At.prototype.set=An;function Te(i){var c=-1,f=i==null?0:i.length;for(this.__data__=new At;++c<f;)this.add(i[c])}function As(i){return this.__data__.set(i,s),this}function Le(i){return this.__data__.has(i)}Te.prototype.add=Te.prototype.push=As,Te.prototype.has=Le;function jt(i){var c=this.__data__=new gt(i);this.size=c.size}function Xe(){this.__data__=new gt,this.size=0}function wn(i){var c=this.__data__,f=c.delete(i);return this.size=c.size,f}function xn(i){return this.__data__.get(i)}function Tn(i){return this.__data__.has(i)}function Ln(i,c){var f=this.__data__;if(f instanceof gt){var E=f.__data__;if(!ue||E.length<e-1)return E.push([i,c]),this.size=++f.size,this;f=this.__data__=new At(E)}return f.set(i,c),this.size=f.size,this}jt.prototype.clear=Xe,jt.prototype.delete=wn,jt.prototype.get=xn,jt.prototype.has=Tn,jt.prototype.set=Ln;function qn(i,c){var f=Se(i),E=!f&&qs(i),F=!f&&!E&&Oe(i),U=!f&&!E&&!F&&Cs(i),W=f||E||F||U,Z=W?tn(i.length,String):[],ot=Z.length;for(var J in i)Lt.call(i,J)&&!(W&&(J=="length"||F&&(J=="offset"||J=="parent")||U&&(J=="buffer"||J=="byteLength"||J=="byteOffset")||Bn(J,ot)))&&Z.push(J);return Z}function qe(i,c){for(var f=i.length;f--;)if(Ls(i[f][0],c))return f;return-1}function Ye(i,c,f){var E=c(i);return Se(i)?E:He(E,f(i))}function he(i){return i==null?i===void 0?Ct:T:_t&&_t in Object(i)?Zt(i):Ts(i)}function ws(i){return $t(i)&&he(i)==a}function xs(i,c,f,E,F){return i===c?!0:i==null||c==null||!$t(i)&&!$t(c)?i!==i&&c!==c:Sn(i,c,f,E,xs,F)}function Sn(i,c,f,E,F,U){var W=Se(i),Z=Se(c),ot=W?u:Ft(i),J=Z?u:Ft(c);ot=ot==a?C:ot,J=J==a?C:J;var pt=ot==C,wt=J==C,at=ot==J;if(at&&Oe(i)){if(!Oe(c))return!1;W=!0,pt=!1}if(at&&!pt)return U||(U=new jt),W||Cs(i)?Qe(i,c,f,E,F,U):kn(i,c,ot,f,E,F,U);if(!(f&n)){var mt=pt&&Lt.call(i,"__wrapped__"),ht=wt&&Lt.call(c,"__wrapped__");if(mt||ht){var te=mt?i.value():i,Wt=ht?c.value():c;return U||(U=new jt),F(te,Wt,f,E,U)}}return at?(U||(U=new jt),In(i,c,f,E,F,U)):!1}function On(i){if(!Os(i)||Dn(i))return!1;var c=Ss(i)?nn:V;return c.test(yt(i))}function Cn(i){return $t(i)&&ts(i.length)&&!!P[he(i)]}function _n(i){if(!Un(i))return ce(i);var c=[];for(var f in Object(i))Lt.call(i,f)&&f!="constructor"&&c.push(f);return c}function Qe(i,c,f,E,F,U){var W=f&n,Z=i.length,ot=c.length;if(Z!=ot&&!(W&&ot>Z))return!1;var J=U.get(i);if(J&&U.get(c))return J==c;var pt=-1,wt=!0,at=f&l?new Te:void 0;for(U.set(i,c),U.set(c,i);++pt<Z;){var mt=i[pt],ht=c[pt];if(E)var te=W?E(ht,mt,pt,c,i,U):E(mt,ht,pt,i,c,U);if(te!==void 0){if(te)continue;wt=!1;break}if(at){if(!gs(c,function(Wt,de){if(!ve(at,de)&&(mt===Wt||F(mt,Wt,f,E,U)))return at.push(de)})){wt=!1;break}}else if(!(mt===ht||F(mt,ht,f,E,U))){wt=!1;break}}return U.delete(i),U.delete(c),wt}function kn(i,c,f,E,F,U,W){switch(f){case L:if(i.byteLength!=c.byteLength||i.byteOffset!=c.byteOffset)return!1;i=i.buffer,c=c.buffer;case g:return!(i.byteLength!=c.byteLength||!U(new vs(i),new vs(c)));case p:case y:case w:return Ls(+i,+c);case d:return i.name==c.name&&i.message==c.message;case H:case it:return i==c+"";case A:var Z=ps;case st:var ot=E&n;if(Z||(Z=Ht),i.size!=c.size&&!ot)return!1;var J=W.get(i);if(J)return J==c;E|=l,W.set(i,c);var pt=Qe(Z(i),Z(c),E,F,U,W);return W.delete(i),pt;case ct:if(We)return We.call(i)==We.call(c)}return!1}function In(i,c,f,E,F,U){var W=f&n,Z=fe(i),ot=Z.length,J=fe(c),pt=J.length;if(ot!=pt&&!W)return!1;for(var wt=ot;wt--;){var at=Z[wt];if(!(W?at in c:Lt.call(c,at)))return!1}var mt=U.get(i);if(mt&&U.get(c))return mt==c;var ht=!0;U.set(i,c),U.set(c,i);for(var te=W;++wt<ot;){at=Z[wt];var Wt=i[at],de=c[at];if(E)var Sr=W?E(de,Wt,at,c,i,U):E(Wt,de,at,i,c,U);if(!(Sr===void 0?Wt===de||F(Wt,de,f,E,U):Sr)){ht=!1;break}te||(te=at=="constructor")}if(ht&&!te){var _s=i.constructor,ks=c.constructor;_s!=ks&&"constructor"in i&&"constructor"in c&&!(typeof _s=="function"&&_s instanceof _s&&typeof ks=="function"&&ks instanceof ks)&&(ht=!1)}return U.delete(i),U.delete(c),ht}function fe(i){return Ye(i,es,Rn)}function kt(i,c){var f=i.__data__;return Mn(c)?f[typeof c=="string"?"string":"hash"]:f.map}function Gt(i,c){var f=je(i,c);return On(f)?f:void 0}function Zt(i){var c=Lt.call(i,_t),f=i[_t];try{i[_t]=void 0;var E=!0}catch{}var F=ys.call(i);return E&&(c?i[_t]=f:delete i[_t]),F}var Rn=xe?function(i){return i==null?[]:(i=Object(i),dt(xe(i),function(c){return we.call(i,c)}))}:Hn,Ft=he;(Ke&&Ft(new Ke(new ArrayBuffer(1)))!=L||ue&&Ft(new ue)!=A||Ve&&Ft(Ve.resolve())!=B||Ge&&Ft(new Ge)!=st||Ze&&Ft(new Ze)!=xt)&&(Ft=function(i){var c=he(i),f=c==C?i.constructor:void 0,E=f?yt(f):"";if(E)switch(E){case Es:return L;case Vt:return A;case rn:return B;case ln:return st;case on:return xt}return c});function Bn(i,c){return c=c??o,!!c&&(typeof i=="number"||G.test(i))&&i>-1&&i%1==0&&i<c}function Mn(i){var c=typeof i;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?i!=="__proto__":i===null}function Dn(i){return!!bs&&bs in i}function Un(i){var c=i&&i.constructor,f=typeof c=="function"&&c.prototype||oe;return i===f}function Ts(i){return ys.call(i)}function yt(i){if(i!=null){try{return Fe.call(i)}catch{}try{return i+""}catch{}}return""}function Ls(i,c){return i===c||i!==i&&c!==c}var qs=ws((function(){return arguments})())?ws:function(i){return $t(i)&&Lt.call(i,"callee")&&!we.call(i,"callee")},Se=Array.isArray;function Je(i){return i!=null&&ts(i.length)&&!Ss(i)}var Oe=ze||jn;function Pn(i,c){return xs(i,c)}function Ss(i){if(!Os(i))return!1;var c=he(i);return c==m||c==v||c==h||c==$}function ts(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=o}function Os(i){var c=typeof i;return i!=null&&(c=="object"||c=="function")}function $t(i){return i!=null&&typeof i=="object"}var Cs=lt?en(lt):Cn;function es(i){return Je(i)?qn(i):_n(i)}function Hn(){return[]}function jn(){return!1}r.exports=Pn})(rs,rs.exports)),rs.exports}var Bs={},Kr;function To(){if(Kr)return Bs;Kr=1,Object.defineProperty(Bs,"__esModule",{value:!0});const r=ki(),t=Ii();var e;return(function(s){function n(u={},h={},p=!1){typeof u!="object"&&(u={}),typeof h!="object"&&(h={});let y=r(h);p||(y=Object.keys(y).reduce((d,m)=>(y[m]!=null&&(d[m]=y[m]),d),{}));for(const d in u)u[d]!==void 0&&h[d]===void 0&&(y[d]=u[d]);return Object.keys(y).length>0?y:void 0}s.compose=n;function l(u={},h={}){typeof u!="object"&&(u={}),typeof h!="object"&&(h={});const p=Object.keys(u).concat(Object.keys(h)).reduce((y,d)=>(t(u[d],h[d])||(y[d]=h[d]===void 0?null:h[d]),y),{});return Object.keys(p).length>0?p:void 0}s.diff=l;function o(u={},h={}){u=u||{};const p=Object.keys(h).reduce((y,d)=>(h[d]!==u[d]&&u[d]!==void 0&&(y[d]=h[d]),y),{});return Object.keys(u).reduce((y,d)=>(u[d]!==h[d]&&h[d]===void 0&&(y[d]=null),y),p)}s.invert=o;function a(u,h,p=!1){if(typeof u!="object")return h;if(typeof h!="object")return;if(!p)return h;const y=Object.keys(h).reduce((d,m)=>(u[m]===void 0&&(d[m]=h[m]),d),{});return Object.keys(y).length>0?y:void 0}s.transform=a})(e||(e={})),Bs.default=e,Bs}var Ms={},Vr;function Ri(){if(Vr)return Ms;Vr=1,Object.defineProperty(Ms,"__esModule",{value:!0});var r;return(function(t){function e(s){return typeof s.delete=="number"?s.delete:typeof s.retain=="number"?s.retain:typeof s.retain=="object"&&s.retain!==null?1:typeof s.insert=="string"?s.insert.length:1}t.length=e})(r||(r={})),Ms.default=r,Ms}var Ds={},Gr;function Lo(){if(Gr)return Ds;Gr=1,Object.defineProperty(Ds,"__esModule",{value:!0});const r=Ri();class t{constructor(s){this.ops=s,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(s){s||(s=1/0);const n=this.ops[this.index];if(n){const l=this.offset,o=r.default.length(n);if(s>=o-l?(s=o-l,this.index+=1,this.offset=0):this.offset+=s,typeof n.delete=="number")return{delete:s};{const a={};return n.attributes&&(a.attributes=n.attributes),typeof n.retain=="number"?a.retain=s:typeof n.retain=="object"&&n.retain!==null?a.retain=n.retain:typeof n.insert=="string"?a.insert=n.insert.substr(l,s):a.insert=n.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const s=this.ops[this.index];return s?typeof s.delete=="number"?"delete":typeof s.retain=="number"||typeof s.retain=="object"&&s.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const s=this.offset,n=this.index,l=this.next(),o=this.ops.slice(this.index);return this.offset=s,this.index=n,[l].concat(o)}}else return[]}}return Ds.default=t,Ds}var Zr;function qo(){return Zr||(Zr=1,(function(r,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeMap=t.OpIterator=t.Op=void 0;const e=xo(),s=ki(),n=Ii(),l=To();t.AttributeMap=l.default;const o=Ri();t.Op=o.default;const a=Lo();t.OpIterator=a.default;const u="\0",h=(y,d)=>{if(typeof y!="object"||y===null)throw new Error(`cannot retain a ${typeof y}`);if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);const m=Object.keys(y)[0];if(!m||m!==Object.keys(d)[0])throw new Error(`embed types not matched: ${m} != ${Object.keys(d)[0]}`);return[m,y[m],d[m]]};class p{constructor(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]}static registerEmbed(d,m){this.handlers[d]=m}static unregisterEmbed(d){delete this.handlers[d]}static getHandler(d){const m=this.handlers[d];if(!m)throw new Error(`no handlers for embed type "${d}"`);return m}insert(d,m){const v={};return typeof d=="string"&&d.length===0?this:(v.insert=d,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(v.attributes=m),this.push(v))}delete(d){return d<=0?this:this.push({delete:d})}retain(d,m){if(typeof d=="number"&&d<=0)return this;const v={retain:d};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(v.attributes=m),this.push(v)}push(d){let m=this.ops.length,v=this.ops[m-1];if(d=s(d),typeof v=="object"){if(typeof d.delete=="number"&&typeof v.delete=="number")return this.ops[m-1]={delete:v.delete+d.delete},this;if(typeof v.delete=="number"&&d.insert!=null&&(m-=1,v=this.ops[m-1],typeof v!="object"))return this.ops.unshift(d),this;if(n(d.attributes,v.attributes)){if(typeof d.insert=="string"&&typeof v.insert=="string")return this.ops[m-1]={insert:v.insert+d.insert},typeof d.attributes=="object"&&(this.ops[m-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof v.retain=="number")return this.ops[m-1]={retain:v.retain+d.retain},typeof d.attributes=="object"&&(this.ops[m-1].attributes=d.attributes),this}}return m===this.ops.length?this.ops.push(d):this.ops.splice(m,0,d),this}chop(){const d=this.ops[this.ops.length-1];return d&&typeof d.retain=="number"&&!d.attributes&&this.ops.pop(),this}filter(d){return this.ops.filter(d)}forEach(d){this.ops.forEach(d)}map(d){return this.ops.map(d)}partition(d){const m=[],v=[];return this.forEach(A=>{(d(A)?m:v).push(A)}),[m,v]}reduce(d,m){return this.ops.reduce(d,m)}changeLength(){return this.reduce((d,m)=>m.insert?d+o.default.length(m):m.delete?d-m.delete:d,0)}length(){return this.reduce((d,m)=>d+o.default.length(m),0)}slice(d=0,m=1/0){const v=[],A=new a.default(this.ops);let w=0;for(;w<m&&A.hasNext();){let T;w<d?T=A.next(d-w):(T=A.next(m-w),v.push(T)),w+=o.default.length(T)}return new p(v)}compose(d){const m=new a.default(this.ops),v=new a.default(d.ops),A=[],w=v.peek();if(w!=null&&typeof w.retain=="number"&&w.attributes==null){let C=w.retain;for(;m.peekType()==="insert"&&m.peekLength()<=C;)C-=m.peekLength(),A.push(m.next());w.retain-C>0&&v.next(w.retain-C)}const T=new p(A);for(;m.hasNext()||v.hasNext();)if(v.peekType()==="insert")T.push(v.next());else if(m.peekType()==="delete")T.push(m.next());else{const C=Math.min(m.peekLength(),v.peekLength()),B=m.next(C),$=v.next(C);if($.retain){const H={};if(typeof B.retain=="number")H.retain=typeof $.retain=="number"?C:$.retain;else if(typeof $.retain=="number")B.retain==null?H.insert=B.insert:H.retain=B.retain;else{const it=B.retain==null?"insert":"retain",[ct,Ct,xt]=h(B[it],$.retain),g=p.getHandler(ct);H[it]={[ct]:g.compose(Ct,xt,it==="retain")}}const st=l.default.compose(B.attributes,$.attributes,typeof B.retain=="number");if(st&&(H.attributes=st),T.push(H),!v.hasNext()&&n(T.ops[T.ops.length-1],H)){const it=new p(m.rest());return T.concat(it).chop()}}else typeof $.delete=="number"&&(typeof B.retain=="number"||typeof B.retain=="object"&&B.retain!==null)&&T.push($)}return T.chop()}concat(d){const m=new p(this.ops.slice());return d.ops.length>0&&(m.push(d.ops[0]),m.ops=m.ops.concat(d.ops.slice(1))),m}diff(d,m){if(this.ops===d.ops)return new p;const v=[this,d].map(B=>B.map($=>{if($.insert!=null)return typeof $.insert=="string"?$.insert:u;const H=B===d?"on":"with";throw new Error("diff() called "+H+" non-document")}).join("")),A=new p,w=e(v[0],v[1],m,!0),T=new a.default(this.ops),C=new a.default(d.ops);return w.forEach(B=>{let $=B[1].length;for(;$>0;){let H=0;switch(B[0]){case e.INSERT:H=Math.min(C.peekLength(),$),A.push(C.next(H));break;case e.DELETE:H=Math.min($,T.peekLength()),T.next(H),A.delete(H);break;case e.EQUAL:H=Math.min(T.peekLength(),C.peekLength(),$);const st=T.next(H),it=C.next(H);n(st.insert,it.insert)?A.retain(H,l.default.diff(st.attributes,it.attributes)):A.push(it).delete(H);break}$-=H}}),A.chop()}eachLine(d,m=`
2
+ `){const v=new a.default(this.ops);let A=new p,w=0;for(;v.hasNext();){if(v.peekType()!=="insert")return;const T=v.peek(),C=o.default.length(T)-v.peekLength(),B=typeof T.insert=="string"?T.insert.indexOf(m,C)-C:-1;if(B<0)A.push(v.next());else if(B>0)A.push(v.next(B));else{if(d(A,v.next(1).attributes||{},w)===!1)return;w+=1,A=new p}}A.length()>0&&d(A,{},w)}invert(d){const m=new p;return this.reduce((v,A)=>{if(A.insert)m.delete(o.default.length(A));else{if(typeof A.retain=="number"&&A.attributes==null)return m.retain(A.retain),v+A.retain;if(A.delete||typeof A.retain=="number"){const w=A.delete||A.retain;return d.slice(v,v+w).forEach(C=>{A.delete?m.push(C):A.retain&&A.attributes&&m.retain(o.default.length(C),l.default.invert(A.attributes,C.attributes))}),v+w}else if(typeof A.retain=="object"&&A.retain!==null){const w=d.slice(v,v+1),T=new a.default(w.ops).next(),[C,B,$]=h(A.retain,T.insert),H=p.getHandler(C);return m.retain({[C]:H.invert(B,$)},l.default.invert(A.attributes,T.attributes)),v+1}}return v},0),m.chop()}transform(d,m=!1){if(m=!!m,typeof d=="number")return this.transformPosition(d,m);const v=d,A=new a.default(this.ops),w=new a.default(v.ops),T=new p;for(;A.hasNext()||w.hasNext();)if(A.peekType()==="insert"&&(m||w.peekType()!=="insert"))T.retain(o.default.length(A.next()));else if(w.peekType()==="insert")T.push(w.next());else{const C=Math.min(A.peekLength(),w.peekLength()),B=A.next(C),$=w.next(C);if(B.delete)continue;if($.delete)T.push($);else{const H=B.retain,st=$.retain;let it=typeof st=="object"&&st!==null?st:C;if(typeof H=="object"&&H!==null&&typeof st=="object"&&st!==null){const ct=Object.keys(H)[0];if(ct===Object.keys(st)[0]){const Ct=p.getHandler(ct);Ct&&(it={[ct]:Ct.transform(H[ct],st[ct],m)})}}T.retain(it,l.default.transform(B.attributes,$.attributes,m))}}return T.chop()}transformPosition(d,m=!1){m=!!m;const v=new a.default(this.ops);let A=0;for(;v.hasNext()&&A<=d;){const w=v.peekLength(),T=v.peekType();if(v.next(),T==="delete"){d-=Math.min(w,d-A);continue}else T==="insert"&&(A<d||!m)&&(d+=w);A+=w}return d}}p.Op=o.default,p.OpIterator=a.default,p.AttributeMap=l.default,p.handlers={},t.default=p,r.exports=p,r.exports.default=p})(Rs,Rs.exports)),Rs.exports}var Et=qo();const R=Ni(Et);class Pt extends Tt{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}Pt.blotName="break";Pt.tagName="BR";let Dt=class extends Vs{};const So={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Ys(r){return r.replace(/[&<>"']/g,t=>So[t])}class vt extends pr{static allowedChildren=[vt,Pt,Tt,Dt];static order=["cursor","inline","link","underline","strike","italic","bold","script","code"];static compare(t,e){const s=vt.order.indexOf(t),n=vt.order.indexOf(e);return s>=0||n>=0?s-n:t===e?0:t<e?-1:1}formatAt(t,e,s,n){if(vt.compare(this.statics.blotName,s)<0&&this.scroll.query(s,M.BLOT)){const l=this.isolate(t,e);n&&l.wrap(s,n)}else super.formatAt(t,e,s,n)}optimize(t){if(super.optimize(t),this.parent instanceof vt&&vt.compare(this.statics.blotName,this.parent.statics.blotName)>0){const e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}}const Wr=1;class ft extends os{cache={};delta(){return this.cache.delta==null&&(this.cache.delta=Bi(this)),this.cache.delta}deleteAt(t,e){super.deleteAt(t,e),this.cache={}}formatAt(t,e,s,n){e<=0||(this.scroll.query(s,M.BLOCK)?t+e===this.length()&&this.format(s,n):super.formatAt(t,Math.min(e,this.length()-t-1),s,n),this.cache={})}insertAt(t,e,s){if(s!=null){super.insertAt(t,e,s),this.cache={};return}if(e.length===0)return;const n=e.split(`
3
+ `),l=n.shift();l.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),l):this.children.tail.insertAt(this.children.tail.length(),l),this.cache={});let o=this;n.reduce((a,u)=>(o=o.split(a,!0),o.insertAt(0,u),u.length),t+l.length)}insertBefore(t,e){const{head:s}=this.children;super.insertBefore(t,e),s instanceof Pt&&s.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Wr),this.cache.length}moveChildren(t,e){super.moveChildren(t,e),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e&&(t===0||t>=this.length()-Wr)){const n=this.clone();return t===0?(this.parent.insertBefore(n,this),this):(this.parent.insertBefore(n,this.next),n)}const s=super.split(t,e);return this.cache={},s}}ft.blotName="block";ft.tagName="P";ft.defaultChild=Pt;ft.allowedChildren=[Pt,vt,Tt,Dt];class Ot extends Tt{attach(){super.attach(),this.attributes=new Ws(this.domNode)}delta(){return new R().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(t,e){const s=this.scroll.query(t,M.BLOCK_ATTRIBUTE);s!=null&&this.attributes.attribute(s,e)}formatAt(t,e,s,n){this.format(s,n)}insertAt(t,e,s){if(s!=null){super.insertAt(t,e,s);return}const n=e.split(`
4
+ `),l=n.pop(),o=n.map(u=>{const h=this.scroll.create(ft.blotName);return h.insertAt(0,u),h}),a=this.split(t);o.forEach(u=>{this.parent.insertBefore(u,a)}),l&&this.parent.insertBefore(this.scroll.create("text",l),a)}}Ot.scope=M.BLOCK_BLOT;function Bi(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return r.descendants(bt).reduce((e,s)=>s.length()===0?e:e.insert(s.value(),qt(s,{},t)),new R).insert(`
5
+ `,qt(r))}function qt(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return r==null||("formats"in r&&typeof r.formats=="function"&&(t={...t,...r.formats()},e&&delete t["code-token"]),r.parent==null||r.parent.statics.blotName==="scroll"||r.parent.statics.scope!==r.statics.scope)?t:qt(r.parent,t,e)}class Rt extends Tt{static blotName="cursor";static className="ql-cursor";static tagName="span";static CONTENTS="\uFEFF";static value(){}constructor(t,e,s){super(t,e),this.selection=s,this.textNode=document.createTextNode(Rt.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(t,e){if(this.savedLength!==0){super.format(t,e);return}let s=this,n=0;for(;s!=null&&s.statics.scope!==M.BLOCK_BLOT;)n+=s.offset(s.parent),s=s.parent;s!=null&&(this.savedLength=Rt.CONTENTS.length,s.optimize(),s.formatAt(n,Rt.CONTENTS.length,t,e),this.savedLength=0)}index(t,e){return t===this.textNode?0:super.index(t,e)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const t=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const e=this.prev instanceof Dt?this.prev:null,s=e?e.length():0,n=this.next instanceof Dt?this.next:null,l=n?n.text:"",{textNode:o}=this,a=o.data.split(Rt.CONTENTS).join("");o.data=Rt.CONTENTS;let u;if(e)u=e,(a||n)&&(e.insertAt(e.length(),a+l),n&&n.remove());else if(n)u=n,n.insertAt(0,a);else{const h=document.createTextNode(a);u=this.scroll.create(h),this.parent.insertBefore(u,this)}if(this.remove(),t){const h=(d,m)=>e&&d===e.domNode?m:d===o?s+m-1:n&&d===n.domNode?s+a.length+m:null,p=h(t.start.node,t.start.offset),y=h(t.end.node,t.end.offset);if(p!==null&&y!==null)return{startNode:u.domNode,startOffset:p,endNode:u.domNode,endOffset:y}}return null}update(t,e){if(t.some(s=>s.type==="characterData"&&s.target===this.textNode)){const s=this.restore();s&&(e.range=s)}}optimize(t){super.optimize(t);let{parent:e}=this;for(;e;){if(e.domNode.tagName==="A"){this.savedLength=Rt.CONTENTS.length,e.isolate(this.offset(e),this.length()).unwrap(),this.savedLength=0;break}e=e.parent}}value(){return""}}var Kn={exports:{}},Xr;function Oo(){return Xr||(Xr=1,(function(r){var t=Object.prototype.hasOwnProperty,e="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(e=!1));function n(u,h,p){this.fn=u,this.context=h,this.once=p||!1}function l(u,h,p,y,d){if(typeof p!="function")throw new TypeError("The listener must be a function");var m=new n(p,y||u,d),v=e?e+h:h;return u._events[v]?u._events[v].fn?u._events[v]=[u._events[v],m]:u._events[v].push(m):(u._events[v]=m,u._eventsCount++),u}function o(u,h){--u._eventsCount===0?u._events=new s:delete u._events[h]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var h=[],p,y;if(this._eventsCount===0)return h;for(y in p=this._events)t.call(p,y)&&h.push(e?y.slice(1):y);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},a.prototype.listeners=function(h){var p=e?e+h:h,y=this._events[p];if(!y)return[];if(y.fn)return[y.fn];for(var d=0,m=y.length,v=new Array(m);d<m;d++)v[d]=y[d].fn;return v},a.prototype.listenerCount=function(h){var p=e?e+h:h,y=this._events[p];return y?y.fn?1:y.length:0},a.prototype.emit=function(h,p,y,d,m,v){var A=e?e+h:h;if(!this._events[A])return!1;var w=this._events[A],T=arguments.length,C,B;if(w.fn){switch(w.once&&this.removeListener(h,w.fn,void 0,!0),T){case 1:return w.fn.call(w.context),!0;case 2:return w.fn.call(w.context,p),!0;case 3:return w.fn.call(w.context,p,y),!0;case 4:return w.fn.call(w.context,p,y,d),!0;case 5:return w.fn.call(w.context,p,y,d,m),!0;case 6:return w.fn.call(w.context,p,y,d,m,v),!0}for(B=1,C=new Array(T-1);B<T;B++)C[B-1]=arguments[B];w.fn.apply(w.context,C)}else{var $=w.length,H;for(B=0;B<$;B++)switch(w[B].once&&this.removeListener(h,w[B].fn,void 0,!0),T){case 1:w[B].fn.call(w[B].context);break;case 2:w[B].fn.call(w[B].context,p);break;case 3:w[B].fn.call(w[B].context,p,y);break;case 4:w[B].fn.call(w[B].context,p,y,d);break;default:if(!C)for(H=1,C=new Array(T-1);H<T;H++)C[H-1]=arguments[H];w[B].fn.apply(w[B].context,C)}}return!0},a.prototype.on=function(h,p,y){return l(this,h,p,y,!1)},a.prototype.once=function(h,p,y){return l(this,h,p,y,!0)},a.prototype.removeListener=function(h,p,y,d){var m=e?e+h:h;if(!this._events[m])return this;if(!p)return o(this,m),this;var v=this._events[m];if(v.fn)v.fn===p&&(!d||v.once)&&(!y||v.context===y)&&o(this,m);else{for(var A=0,w=[],T=v.length;A<T;A++)(v[A].fn!==p||d&&!v[A].once||y&&v[A].context!==y)&&w.push(v[A]);w.length?this._events[m]=w.length===1?w[0]:w:o(this,m)}return this},a.prototype.removeAllListeners=function(h){var p;return h?(p=e?e+h:h,this._events[p]&&o(this,p)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=e,a.EventEmitter=a,r.exports=a})(Kn)),Kn.exports}var Co=Oo();const _o=Ni(Co),ar=new WeakMap,cr=["error","warn","log","info"];let ur="warn";function Mi(r){if(ur&&cr.indexOf(r)<=cr.indexOf(ur)){for(var t=arguments.length,e=new Array(t>1?t-1:0),s=1;s<t;s++)e[s-1]=arguments[s];console[r](...e)}}function Qt(r){return cr.reduce((t,e)=>(t[e]=Mi.bind(console,e,r),t),{})}Qt.level=r=>{ur=r};Mi.level=Qt.level;const Vn=Qt("quill:events"),ko=["selectionchange","mousedown","mouseup","click"];ko.forEach(r=>{document.addEventListener(r,function(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];Array.from(document.querySelectorAll(".ql-container")).forEach(n=>{const l=ar.get(n);l&&l.emitter&&l.emitter.handleDOM(...e)})})});class k extends _o{static events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"};static sources={API:"api",SILENT:"silent",USER:"user"};constructor(){super(),this.domListeners={},this.on("error",Vn.error)}emit(){for(var t=arguments.length,e=new Array(t),s=0;s<t;s++)e[s]=arguments[s];return Vn.log.call(Vn,...e),super.emit(...e)}handleDOM(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];(this.domListeners[t.type]||[]).forEach(l=>{let{node:o,handler:a}=l;(t.target===o||o.contains(t.target))&&a(t,...s)})}listenDOM(t,e,s){this.domListeners[t]||(this.domListeners[t]=[]),this.domListeners[t].push({node:e,handler:s})}}const Gn=Qt("quill:selection");class ge{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=t,this.length=e}}class Io{constructor(t,e){this.emitter=e,this.scroll=t,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new ge(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,k.sources.USER),1)}),this.emitter.on(k.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const s=this.getNativeRange();s!=null&&s.start.node!==this.cursor.textNode&&this.emitter.once(k.events.SCROLL_UPDATE,(n,l)=>{try{this.root.contains(s.start.node)&&this.root.contains(s.end.node)&&this.setNativeRange(s.start.node,s.start.offset,s.end.node,s.end.offset);const o=l.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?k.sources.SILENT:n)}catch{}})}),this.emitter.on(k.events.SCROLL_OPTIMIZE,(s,n)=>{if(n.range){const{startNode:l,startOffset:o,endNode:a,endOffset:u}=n.range;this.setNativeRange(l,o,a,u),this.update(k.sources.SILENT)}}),this.update(k.sources.SILENT)}handleComposition(){this.emitter.on(k.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(k.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const t=this.cursor.restore();if(!t)return;setTimeout(()=>{this.setNativeRange(t.startNode,t.startOffset,t.endNode,t.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(k.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(t,e){this.scroll.update();const s=this.getNativeRange();if(!(s==null||!s.native.collapsed||this.scroll.query(t,M.BLOCK))){if(s.start.node!==this.cursor.textNode){const n=this.scroll.find(s.start.node,!1);if(n==null)return;if(n instanceof bt){const l=n.split(s.start.offset);n.parent.insertBefore(this.cursor,l)}else n.insertBefore(this.cursor,s.start.node);this.cursor.attach()}this.cursor.format(t,e),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const s=this.scroll.length();t=Math.min(t,s-1),e=Math.min(t+e,s-1)-t;let n,[l,o]=this.scroll.leaf(t);if(l==null)return null;if(e>0&&o===l.length()){const[p]=this.scroll.leaf(t+1);if(p){const[y]=this.scroll.line(t),[d]=this.scroll.line(t+1);y===d&&(l=p,o=0)}}[n,o]=l.position(o,!0);const a=document.createRange();if(e>0)return a.setStart(n,o),[l,o]=this.scroll.leaf(t+e),l==null?null:([n,o]=l.position(o,!0),a.setEnd(n,o),a.getBoundingClientRect());let u="left",h;if(n instanceof Text){if(!n.data.length)return null;o<n.data.length?(a.setStart(n,o),a.setEnd(n,o+1)):(a.setStart(n,o-1),a.setEnd(n,o),u="right"),h=a.getBoundingClientRect()}else{if(!(l.domNode instanceof Element))return null;h=l.domNode.getBoundingClientRect(),o>0&&(u="right")}return{bottom:h.top+h.height,height:h.height,left:h[u],right:h[u],top:h.top,width:0}}getNativeRange(){const t=document.getSelection();if(t==null||t.rangeCount<=0)return null;const e=t.getRangeAt(0);if(e==null)return null;const s=this.normalizeNative(e);return Gn.info("getNativeRange",s),s}getRange(){const t=this.scroll.domNode;if("isConnected"in t&&!t.isConnected)return[null,null];const e=this.getNativeRange();return e==null?[null,null]:[this.normalizedToRange(e),e]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&Zn(this.root,document.activeElement)}normalizedToRange(t){const e=[[t.start.node,t.start.offset]];t.native.collapsed||e.push([t.end.node,t.end.offset]);const s=e.map(o=>{const[a,u]=o,h=this.scroll.find(a,!0),p=h.offset(this.scroll);return u===0?p:h instanceof bt?p+h.index(a,u):p+h.length()}),n=Math.min(Math.max(...s),this.scroll.length()-1),l=Math.min(n,...s);return new ge(l,n-l)}normalizeNative(t){if(!Zn(this.root,t.startContainer)||!t.collapsed&&!Zn(this.root,t.endContainer))return null;const e={start:{node:t.startContainer,offset:t.startOffset},end:{node:t.endContainer,offset:t.endOffset},native:t};return[e.start,e.end].forEach(s=>{let{node:n,offset:l}=s;for(;!(n instanceof Text)&&n.childNodes.length>0;)if(n.childNodes.length>l)n=n.childNodes[l],l=0;else if(n.childNodes.length===l)n=n.lastChild,n instanceof Text?l=n.data.length:n.childNodes.length>0?l=n.childNodes.length:l=n.childNodes.length+1;else break;s.node=n,s.offset=l}),e}rangeToNative(t){const e=this.scroll.length(),s=(n,l)=>{n=Math.min(e-1,n);const[o,a]=this.scroll.leaf(n);return o?o.position(a,l):[null,-1]};return[...s(t.index,!1),...s(t.index+t.length,!0)]}setNativeRange(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e,l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Gn.info("setNativeRange",t,e,s,n),t!=null&&(this.root.parentNode==null||t.parentNode==null||s.parentNode==null))return;const o=document.getSelection();if(o!=null)if(t!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||l||t!==a.startContainer||e!==a.startOffset||s!==a.endContainer||n!==a.endOffset){t instanceof Element&&t.tagName==="BR"&&(e=Array.from(t.parentNode.childNodes).indexOf(t),t=t.parentNode),s instanceof Element&&s.tagName==="BR"&&(n=Array.from(s.parentNode.childNodes).indexOf(s),s=s.parentNode);const u=document.createRange();u.setStart(t,e),u.setEnd(s,n),o.removeAllRanges(),o.addRange(u)}}else o.removeAllRanges(),this.root.blur()}setRange(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k.sources.API;if(typeof e=="string"&&(s=e,e=!1),Gn.info("setRange",t),t!=null){const n=this.rangeToNative(t);this.setNativeRange(...n,e)}else this.setNativeRange(null);this.update(s)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k.sources.USER;const e=this.lastRange,[s,n]=this.getRange();if(this.lastRange=s,this.lastNative=n,this.lastRange!=null&&(this.savedRange=this.lastRange),!gr(e,this.lastRange)){if(!this.composing&&n!=null&&n.native.collapsed&&n.start.node!==this.cursor.textNode){const o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}const l=[k.events.SELECTION_CHANGE,Be(this.lastRange),Be(e),t];this.emitter.emit(k.events.EDITOR_CHANGE,...l),t!==k.sources.SILENT&&this.emitter.emit(...l)}}}function Zn(r,t){try{t.parentNode}catch{return!1}return r.contains(t)}const Ro=/^[ -~]*$/;class Bo{constructor(t){this.scroll=t,this.delta=this.getDelta()}applyDelta(t){this.scroll.update();let e=this.scroll.length();this.scroll.batchStart();const s=Yr(t),n=new R;return Do(s.ops.slice()).reduce((o,a)=>{const u=Et.Op.length(a);let h=a.attributes||{},p=!1,y=!1;if(a.insert!=null){if(n.retain(u),typeof a.insert=="string"){const v=a.insert;y=!v.endsWith(`
6
+ `)&&(e<=o||!!this.scroll.descendant(Ot,o)[0]),this.scroll.insertAt(o,v);const[A,w]=this.scroll.line(o);let T=re({},qt(A));if(A instanceof ft){const[C]=A.descendant(bt,w);C&&(T=re(T,qt(C)))}h=Et.AttributeMap.diff(T,h)||{}}else if(typeof a.insert=="object"){const v=Object.keys(a.insert)[0];if(v==null)return o;const A=this.scroll.query(v,M.INLINE)!=null;if(A)(e<=o||this.scroll.descendant(Ot,o)[0])&&(y=!0);else if(o>0){const[w,T]=this.scroll.descendant(bt,o-1);w instanceof Dt?w.value()[T]!==`
7
+ `&&(p=!0):w instanceof Tt&&w.statics.scope===M.INLINE_BLOT&&(p=!0)}if(this.scroll.insertAt(o,v,a.insert[v]),A){const[w]=this.scroll.descendant(bt,o);if(w){const T=re({},qt(w));h=Et.AttributeMap.diff(T,h)||{}}}}e+=u}else if(n.push(a),a.retain!==null&&typeof a.retain=="object"){const v=Object.keys(a.retain)[0];if(v==null)return o;this.scroll.updateEmbedAt(o,v,a.retain[v])}Object.keys(h).forEach(v=>{this.scroll.formatAt(o,u,v,h[v])});const d=p?1:0,m=y?1:0;return e+=d+m,n.retain(d),n.delete(m),o+u+d+m},0),n.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+Et.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(s)}deleteText(t,e){return this.scroll.deleteAt(t,e),this.update(new R().retain(t).delete(e))}formatLine(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(s).forEach(l=>{this.scroll.lines(t,Math.max(e,1)).forEach(o=>{o.format(l,s[l])})}),this.scroll.optimize();const n=new R().retain(t).retain(e,Be(s));return this.update(n)}formatText(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(s).forEach(l=>{this.scroll.formatAt(t,e,l,s[l])});const n=new R().retain(t).retain(e,Be(s));return this.update(n)}getContents(t,e){return this.delta.slice(t,t+e)}getDelta(){return this.scroll.lines().reduce((t,e)=>t.concat(e.delta()),new R)}getFormat(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=[],n=[];e===0?this.scroll.path(t).forEach(a=>{const[u]=a;u instanceof ft?s.push(u):u instanceof bt&&n.push(u)}):(s=this.scroll.lines(t,e),n=this.scroll.descendants(bt,t,e));const[l,o]=[s,n].map(a=>{const u=a.shift();if(u==null)return{};let h=qt(u);for(;Object.keys(h).length>0;){const p=a.shift();if(p==null)return h;h=Mo(qt(p),h)}return h});return{...l,...o}}getHTML(t,e){const[s,n]=this.scroll.line(t);if(s){const l=s.length();return s.length()>=n+e&&!(n===0&&e===l)?as(s,n,e,!0):as(this.scroll,t,e,!0)}return""}getText(t,e){return this.getContents(t,e).filter(s=>typeof s.insert=="string").map(s=>s.insert).join("")}insertContents(t,e){const s=Yr(e),n=new R().retain(t).concat(s);return this.scroll.insertContents(t,s),this.update(n)}insertEmbed(t,e,s){return this.scroll.insertAt(t,e,s),this.update(new R().retain(t).insert({[e]:s}))}insertText(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e=e.replace(/\r\n/g,`
8
+ `).replace(/\r/g,`
9
+ `),this.scroll.insertAt(t,e),Object.keys(s).forEach(n=>{this.scroll.formatAt(t,e.length,n,s[n])}),this.update(new R().retain(t).insert(e,Be(s)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const t=this.scroll.children.head;if(t?.statics.blotName!==ft.blotName)return!1;const e=t;return e.children.length>1?!1:e.children.head instanceof Pt}removeFormat(t,e){const s=this.getText(t,e),[n,l]=this.scroll.line(t+e);let o=0,a=new R;n!=null&&(o=n.length()-l,a=n.delta().slice(l,l+o-1).insert(`
10
+ `));const h=this.getContents(t,e+o).diff(new R().insert(s).concat(a)),p=new R().retain(t).concat(h);return this.applyDelta(p)}update(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const n=this.delta;if(e.length===1&&e[0].type==="characterData"&&e[0].target.data.match(Ro)&&this.scroll.find(e[0].target)){const l=this.scroll.find(e[0].target),o=qt(l),a=l.offset(this.scroll),u=e[0].oldValue.replace(Rt.CONTENTS,""),h=new R().insert(u),p=new R().insert(l.value()),y=s&&{oldRange:Qr(s.oldRange,-a),newRange:Qr(s.newRange,-a)};t=new R().retain(a).concat(h.diff(p,y)).reduce((m,v)=>v.insert?m.insert(v.insert,o):m.push(v),new R),this.delta=n.compose(t)}else this.delta=this.getDelta(),(!t||!gr(n.compose(t),this.delta))&&(t=n.diff(this.delta,s));return t}}function Re(r,t,e){if(r.length===0){const[m]=Wn(e.pop());return t<=0?`</li></${m}>`:`</li></${m}>${Re([],t-1,e)}`}const[{child:s,offset:n,length:l,indent:o,type:a},...u]=r,[h,p]=Wn(a);if(o>t)return e.push(a),o===t+1?`<${h}><li${p}>${as(s,n,l)}${Re(u,o,e)}`:`<${h}><li>${Re(r,t+1,e)}`;const y=e[e.length-1];if(o===t&&a===y)return`</li><li${p}>${as(s,n,l)}${Re(u,o,e)}`;const[d]=Wn(e.pop());return`</li></${d}>${Re(r,t-1,e)}`}function as(r,t,e){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in r&&typeof r.html=="function")return r.html(t,e);if(r instanceof Dt)return Ys(r.value().slice(t,t+e)).replaceAll(" ","&nbsp;");if(r instanceof Mt){if(r.statics.blotName==="list-container"){const h=[];return r.children.forEachAt(t,e,(p,y,d)=>{const m="formats"in p&&typeof p.formats=="function"?p.formats():{};h.push({child:p,offset:y,length:d,indent:m.indent||0,type:m.list})}),Re(h,-1,[])}const n=[];if(r.children.forEachAt(t,e,(h,p,y)=>{n.push(as(h,p,y))}),s||r.statics.blotName==="list")return n.join("");const{outerHTML:l,innerHTML:o}=r.domNode,[a,u]=l.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${n.join("")}<${u}`:`${a}>${n.join("")}<${u}`}return r.domNode instanceof Element?r.domNode.outerHTML:""}function Mo(r,t){return Object.keys(t).reduce((e,s)=>{if(r[s]==null)return e;const n=t[s];return n===r[s]?e[s]=n:Array.isArray(n)?n.indexOf(r[s])<0?e[s]=n.concat([r[s]]):e[s]=n:e[s]=[n,r[s]],e},{})}function Wn(r){const t=r==="ordered"?"ol":"ul";switch(r){case"checked":return[t,' data-list="checked"'];case"unchecked":return[t,' data-list="unchecked"'];default:return[t,""]}}function Yr(r){return r.reduce((t,e)=>{if(typeof e.insert=="string"){const s=e.insert.replace(/\r\n/g,`
11
+ `).replace(/\r/g,`
12
+ `);return t.insert(s,e.attributes)}return t.push(e)},new R)}function Qr(r,t){let{index:e,length:s}=r;return new ge(e+t,s)}function Do(r){const t=[];return r.forEach(e=>{typeof e.insert=="string"?e.insert.split(`
13
+ `).forEach((n,l)=>{l&&t.push({insert:`
14
+ `,attributes:e.attributes}),n&&t.push({insert:n,attributes:e.attributes})}):t.push(e)}),t}class Kt{static DEFAULTS={};constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=t,this.options=e}}const Us="\uFEFF";class br extends Tt{constructor(t,e){super(t,e),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(s=>{this.contentNode.appendChild(s)}),this.leftGuard=document.createTextNode(Us),this.rightGuard=document.createTextNode(Us),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(t,e){return t===this.leftGuard?0:t===this.rightGuard?1:super.index(t,e)}restore(t){let e=null,s;const n=t.data.split(Us).join("");if(t===this.leftGuard)if(this.prev instanceof Dt){const l=this.prev.length();this.prev.insertAt(l,n),e={startNode:this.prev.domNode,startOffset:l+n.length}}else s=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(s),this),e={startNode:s,startOffset:n.length};else t===this.rightGuard&&(this.next instanceof Dt?(this.next.insertAt(0,n),e={startNode:this.next.domNode,startOffset:n.length}):(s=document.createTextNode(n),this.parent.insertBefore(this.scroll.create(s),this.next),e={startNode:s,startOffset:n.length}));return t.data=Us,e}update(t,e){t.forEach(s=>{if(s.type==="characterData"&&(s.target===this.leftGuard||s.target===this.rightGuard)){const n=this.restore(s.target);n&&(e.range=n)}})}}class Uo{isComposing=!1;constructor(t,e){this.scroll=t,this.emitter=e,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",t=>{this.isComposing||this.handleCompositionStart(t)}),this.scroll.domNode.addEventListener("compositionend",t=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(t)})})}handleCompositionStart(t){const e=t.target instanceof Node?this.scroll.find(t.target,!0):null;e&&!(e instanceof br)&&(this.emitter.emit(k.events.COMPOSITION_BEFORE_START,t),this.scroll.batchStart(),this.emitter.emit(k.events.COMPOSITION_START,t),this.isComposing=!0)}handleCompositionEnd(t){this.emitter.emit(k.events.COMPOSITION_BEFORE_END,t),this.scroll.batchEnd(),this.emitter.emit(k.events.COMPOSITION_END,t),this.isComposing=!1}}class Pe{static DEFAULTS={modules:{}};static themes={default:Pe};modules={};constructor(t,e){this.quill=t,this.options=e}init(){Object.keys(this.options.modules).forEach(t=>{this.modules[t]==null&&this.addModule(t)})}addModule(t){const e=this.quill.constructor.import(`modules/${t}`);return this.modules[t]=new e(this.quill,this.options.modules[t]||{}),this.modules[t]}}const Po=r=>r.parentElement||r.getRootNode().host||null,Ho=r=>{const t=r.getBoundingClientRect(),e="offsetWidth"in r&&Math.abs(t.width)/r.offsetWidth||1,s="offsetHeight"in r&&Math.abs(t.height)/r.offsetHeight||1;return{top:t.top,right:t.left+r.clientWidth*e,bottom:t.top+r.clientHeight*s,left:t.left}},Ps=r=>{const t=parseInt(r,10);return Number.isNaN(t)?0:t},Jr=(r,t,e,s,n,l)=>r<e&&t>s?0:r<e?-(e-r+n):t>s?t-r>s-e?r+n-e:t-s+l:0,jo=(r,t)=>{const e=r.ownerDocument;let s=t,n=r;for(;n;){const l=n===e.body,o=l?{top:0,right:window.visualViewport?.width??e.documentElement.clientWidth,bottom:window.visualViewport?.height??e.documentElement.clientHeight,left:0}:Ho(n),a=getComputedStyle(n),u=Jr(s.left,s.right,o.left,o.right,Ps(a.scrollPaddingLeft),Ps(a.scrollPaddingRight)),h=Jr(s.top,s.bottom,o.top,o.bottom,Ps(a.scrollPaddingTop),Ps(a.scrollPaddingBottom));if(u||h)if(l)e.defaultView?.scrollBy(u,h);else{const{scrollLeft:p,scrollTop:y}=n;h&&(n.scrollTop+=h),u&&(n.scrollLeft+=u);const d=n.scrollLeft-p,m=n.scrollTop-y;s={left:s.left-d,top:s.top-m,right:s.right-d,bottom:s.bottom-m}}n=l||a.position==="fixed"?null:Po(n)}},Fo=100,$o=["block","break","cursor","inline","scroll","text"],zo=(r,t,e)=>{const s=new Ue;return $o.forEach(n=>{const l=t.query(n);l&&s.register(l)}),r.forEach(n=>{let l=t.query(n);l||e.error(`Cannot register "${n}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;l;)if(s.register(l),l="blotName"in l?l.requiredContainer??null:null,o+=1,o>Fo){e.error(`Cycle detected in registering blot requiredContainer: "${n}"`);break}}),s},De=Qt("quill"),Hs=new Ue;Mt.uiClass="ql-ui";class N{static DEFAULTS={bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Hs,theme:"default"};static events=k.events;static sources=k.sources;static version="2.0.3";static imports={delta:R,parchment:wo,"core/module":Kt,"core/theme":Pe};static debug(t){t===!0&&(t="log"),Qt.level(t)}static find(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return ar.get(t)||Hs.find(t,e)}static import(t){return this.imports[t]==null&&De.error(`Cannot import ${t}. Are you sure it was registered?`),this.imports[t]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const t=arguments.length<=0?void 0:arguments[0],e=!!(!(arguments.length<=1)&&arguments[1]),s="attrName"in t?t.attrName:t.blotName;typeof s=="string"?this.register(`formats/${s}`,t,e):Object.keys(t).forEach(n=>{this.register(n,t[n],e)})}else{const t=arguments.length<=0?void 0:arguments[0],e=arguments.length<=1?void 0:arguments[1],s=!!(!(arguments.length<=2)&&arguments[2]);this.imports[t]!=null&&!s&&De.warn(`Overwriting ${t} with`,e),this.imports[t]=e,(t.startsWith("blots/")||t.startsWith("formats/"))&&e&&typeof e!="boolean"&&e.blotName!=="abstract"&&Hs.register(e),typeof e.register=="function"&&e.register(Hs)}}constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=Ko(t,e),this.container=this.options.container,this.container==null){De.error("Invalid Quill container",t);return}this.options.debug&&N.debug(this.options.debug);const s=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",ar.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new k;const n=mr.blotName,l=this.options.registry.query(n);if(!l||!("blotName"in l))throw new Error(`Cannot initialize Quill without "${n}" blot`);if(this.scroll=new l(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new Bo(this.scroll),this.selection=new Io(this.scroll,this.emitter),this.composition=new Uo(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on(k.events.EDITOR_CHANGE,o=>{o===k.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(k.events.SCROLL_UPDATE,(o,a)=>{const u=this.selection.lastRange,[h]=this.selection.getRange(),p=u&&h?{oldRange:u,newRange:h}:void 0;It.call(this,()=>this.editor.update(null,a,p),o)}),this.emitter.on(k.events.SCROLL_EMBED_UPDATE,(o,a)=>{const u=this.selection.lastRange,[h]=this.selection.getRange(),p=u&&h?{oldRange:u,newRange:h}:void 0;It.call(this,()=>{const y=new R().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(y,[],p)},N.sources.USER)}),s){const o=this.clipboard.convert({html:`${s}<p><br></p>`,text:`
15
+ `});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof t=="string"){const s=t;t=document.createElement("div"),t.classList.add(s)}return this.container.insertBefore(t,e),t}blur(){this.selection.setRange(null)}deleteText(t,e,s){return[t,e,,s]=Xt(t,e,s),It.call(this,()=>this.editor.deleteText(t,e),s,t,-1*e)}disable(){this.enable(!1)}editReadOnly(t){this.allowReadOnlyEdits=!0;const e=t();return this.allowReadOnlyEdits=!1,e}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(t),this.container.classList.toggle("ql-disabled",!t)}focus(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),t.preventScroll||this.scrollSelectionIntoView()}format(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k.sources.API;return It.call(this,()=>{const n=this.getSelection(!0);let l=new R;if(n==null)return l;if(this.scroll.query(t,M.BLOCK))l=this.editor.formatLine(n.index,n.length,{[t]:e});else{if(n.length===0)return this.selection.format(t,e),l;l=this.editor.formatText(n.index,n.length,{[t]:e})}return this.setSelection(n,k.sources.SILENT),l},s)}formatLine(t,e,s,n,l){let o;return[t,e,o,l]=Xt(t,e,s,n,l),It.call(this,()=>this.editor.formatLine(t,e,o),l,t,0)}formatText(t,e,s,n,l){let o;return[t,e,o,l]=Xt(t,e,s,n,l),It.call(this,()=>this.editor.formatText(t,e,o),l,t,0)}getBounds(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=null;if(typeof t=="number"?s=this.selection.getBounds(t,e):s=this.selection.getBounds(t.index,t.length),!s)return null;const n=this.container.getBoundingClientRect();return{bottom:s.bottom-n.top,height:s.height,left:s.left-n.left,right:s.right-n.left,top:s.top-n.top,width:s.width}}getContents(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-t;return[t,e]=Xt(t,e),this.editor.getContents(t,e)}getFormat(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof t=="number"?this.editor.getFormat(t,e):this.editor.getFormat(t.index,t.length)}getIndex(t){return t.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(t){return this.scroll.leaf(t)}getLine(t){return this.scroll.line(t)}getLines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof t!="number"?this.scroll.lines(t.index,t.length):this.scroll.lines(t,e)}getModule(t){return this.theme.modules[t]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=Xt(t,e),this.editor.getHTML(t,e)}getText(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return typeof t=="number"&&(e=e??this.getLength()-t),[t,e]=Xt(t,e),this.editor.getText(t,e)}hasFocus(){return this.selection.hasFocus()}insertEmbed(t,e,s){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:N.sources.API;return It.call(this,()=>this.editor.insertEmbed(t,e,s),n,t)}insertText(t,e,s,n,l){let o;return[t,,o,l]=Xt(t,0,s,n,l),It.call(this,()=>this.editor.insertText(t,e,o),l,t,e.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(t,e,s){return[t,e,,s]=Xt(t,e,s),It.call(this,()=>this.editor.removeFormat(t,e),s,t)}scrollRectIntoView(t){jo(this.root,t)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const t=this.selection.lastRange,e=t&&this.selection.getBounds(t.index,t.length);e&&this.scrollRectIntoView(e)}setContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k.sources.API;return It.call(this,()=>{t=new R(t);const s=this.getLength(),n=this.editor.deleteText(0,s),l=this.editor.insertContents(0,t),o=this.editor.deleteText(this.getLength()-1,1);return n.compose(l).compose(o)},e)}setSelection(t,e,s){t==null?this.selection.setRange(null,e||N.sources.API):([t,e,,s]=Xt(t,e,s),this.selection.setRange(new ge(Math.max(0,t),e),s),s!==k.sources.SILENT&&this.scrollSelectionIntoView())}setText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k.sources.API;const s=new R().insert(t);return this.setContents(s,e)}update(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:k.sources.USER;const e=this.scroll.update(t);return this.selection.update(t),e}updateContents(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k.sources.API;return It.call(this,()=>(t=new R(t),this.editor.applyDelta(t)),e,!0)}}function ti(r){return typeof r=="string"?document.querySelector(r):r}function Xn(r){return Object.entries(r??{}).reduce((t,e)=>{let[s,n]=e;return{...t,[s]:n===!0?{}:n}},{})}function ei(r){return Object.fromEntries(Object.entries(r).filter(t=>t[1]!==void 0))}function Ko(r,t){const e=ti(r);if(!e)throw new Error("Invalid Quill container");const n=!t.theme||t.theme===N.DEFAULTS.theme?Pe:N.import(`themes/${t.theme}`);if(!n)throw new Error(`Invalid theme ${t.theme}. Did you register it?`);const{modules:l,...o}=N.DEFAULTS,{modules:a,...u}=n.DEFAULTS;let h=Xn(t.modules);h!=null&&h.toolbar&&h.toolbar.constructor!==Object&&(h={...h,toolbar:{container:h.toolbar}});const p=re({},Xn(l),Xn(a),h),y={...o,...ei(u),...ei(t)};let d=t.registry;return d?t.formats&&De.warn('Ignoring "formats" option because "registry" is specified'):d=t.formats?zo(t.formats,y.registry,De):y.registry,{...y,registry:d,container:e,theme:n,modules:Object.entries(p).reduce((m,v)=>{let[A,w]=v;if(!w)return m;const T=N.import(`modules/${A}`);return T==null?(De.error(`Cannot load ${A} module. Are you sure you registered it?`),m):{...m,[A]:re({},T.DEFAULTS||{},w)}},{}),bounds:ti(y.bounds)}}function It(r,t,e,s){if(!this.isEnabled()&&t===k.sources.USER&&!this.allowReadOnlyEdits)return new R;let n=e==null?null:this.getSelection();const l=this.editor.delta,o=r();if(n!=null&&(e===!0&&(e=n.index),s==null?n=si(n,o,t):s!==0&&(n=si(n,e,s,t)),this.setSelection(n,k.sources.SILENT)),o.length()>0){const a=[k.events.TEXT_CHANGE,o,l,t];this.emitter.emit(k.events.EDITOR_CHANGE,...a),t!==k.sources.SILENT&&this.emitter.emit(...a)}return o}function Xt(r,t,e,s,n){let l={};return typeof r.index=="number"&&typeof r.length=="number"?typeof t!="number"?(n=s,s=e,e=t,t=r.length,r=r.index):(t=r.length,r=r.index):typeof t!="number"&&(n=s,s=e,e=t,t=0),typeof e=="object"?(l=e,n=s):typeof e=="string"&&(s!=null?l[e]=s:n=e),n=n||k.sources.API,[r,t,l,n]}function si(r,t,e,s){const n=typeof e=="number"?e:0;if(r==null)return null;let l,o;return t&&typeof t.transformPosition=="function"?[l,o]=[r.index,r.index+r.length].map(a=>t.transformPosition(a,s!==k.sources.USER)):[l,o]=[r.index,r.index+r.length].map(a=>a<t||a===t&&s===k.sources.USER?a:n>=0?a+n:Math.max(t,a+n)),new ge(l,o-l)}class me extends Xs{}function ni(r){return r instanceof ft||r instanceof Ot}function ri(r){return typeof r.updateContent=="function"}class Vo extends mr{static blotName="scroll";static className="ql-editor";static tagName="DIV";static defaultChild=ft;static allowedChildren=[ft,Ot,me];constructor(t,e,s){let{emitter:n}=s;super(t,e),this.emitter=n,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",l=>this.handleDragStart(l))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const t=this.batch;this.batch=!1,this.update(t)}emitMount(t){this.emitter.emit(k.events.SCROLL_BLOT_MOUNT,t)}emitUnmount(t){this.emitter.emit(k.events.SCROLL_BLOT_UNMOUNT,t)}emitEmbedUpdate(t,e){this.emitter.emit(k.events.SCROLL_EMBED_UPDATE,t,e)}deleteAt(t,e){const[s,n]=this.line(t),[l]=this.line(t+e);if(super.deleteAt(t,e),l!=null&&s!==l&&n>0){if(s instanceof Ot||l instanceof Ot){this.optimize();return}const o=l.children.head instanceof Pt?null:l.children.head;s.moveChildren(l,o),s.remove()}this.optimize()}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",t?"true":"false")}formatAt(t,e,s,n){super.formatAt(t,e,s,n),this.optimize()}insertAt(t,e,s){if(t>=this.length())if(s==null||this.scroll.query(e,M.BLOCK)==null){const n=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(n),s==null&&e.endsWith(`
16
+ `)?n.insertAt(0,e.slice(0,-1),s):n.insertAt(0,e,s)}else{const n=this.scroll.create(e,s);this.appendChild(n)}else super.insertAt(t,e,s);this.optimize()}insertBefore(t,e){if(t.statics.scope===M.INLINE_BLOT){const s=this.scroll.create(this.statics.defaultChild.blotName);s.appendChild(t),super.insertBefore(s,e)}else super.insertBefore(t,e)}insertContents(t,e){const s=this.deltaToRenderBlocks(e.concat(new R().insert(`
17
+ `))),n=s.pop();if(n==null)return;this.batchStart();const l=s.shift();if(l){const u=l.type==="block"&&(l.delta.length()===0||!this.descendant(Ot,t)[0]&&t<this.length()),h=l.type==="block"?l.delta:new R().insert({[l.key]:l.value});Yn(this,t,h);const p=l.type==="block"?1:0,y=t+h.length()+p;u&&this.insertAt(y-1,`
18
+ `);const d=qt(this.line(t)[0]),m=Et.AttributeMap.diff(d,l.attributes)||{};Object.keys(m).forEach(v=>{this.formatAt(y-1,1,v,m[v])}),t=y}let[o,a]=this.children.find(t);if(s.length&&(o&&(o=o.split(a),a=0),s.forEach(u=>{if(u.type==="block"){const h=this.createBlock(u.attributes,o||void 0);Yn(h,0,u.delta)}else{const h=this.create(u.key,u.value);this.insertBefore(h,o||void 0),Object.keys(u.attributes).forEach(p=>{h.format(p,u.attributes[p])})}})),n.type==="block"&&n.delta.length()){const u=o?o.offset(o.scroll)+a:this.length();Yn(this,u,n.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(t){const e=this.path(t).pop();if(!e)return[null,-1];const[s,n]=e;return s instanceof bt?[s,n]:[null,-1]}line(t){return t===this.length()?this.line(t-1):this.descendant(ni,t)}lines(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const s=(n,l,o)=>{let a=[],u=o;return n.children.forEachAt(l,o,(h,p,y)=>{ni(h)?a.push(h):h instanceof Xs&&(a=a.concat(s(h,p,u))),u-=y}),a};return s(this,t,e)}optimize(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(t,e),t.length>0&&this.emitter.emit(k.events.SCROLL_OPTIMIZE,t,e))}path(t){return super.path(t).slice(1)}remove(){}update(t){if(this.batch){Array.isArray(t)&&(this.batch=this.batch.concat(t));return}let e=k.sources.USER;typeof t=="string"&&(e=t),Array.isArray(t)||(t=this.observer.takeRecords()),t=t.filter(s=>{let{target:n}=s;const l=this.find(n,!0);return l&&!ri(l)}),t.length>0&&this.emitter.emit(k.events.SCROLL_BEFORE_UPDATE,e,t),super.update(t.concat([])),t.length>0&&this.emitter.emit(k.events.SCROLL_UPDATE,e,t)}updateEmbedAt(t,e,s){const[n]=this.descendant(l=>l instanceof Ot,t);n&&n.statics.blotName===e&&ri(n)&&n.updateContent(s)}handleDragStart(t){t.preventDefault()}deltaToRenderBlocks(t){const e=[];let s=new R;return t.forEach(n=>{const l=n?.insert;if(l)if(typeof l=="string"){const o=l.split(`
19
+ `);o.slice(0,-1).forEach(u=>{s.insert(u,n.attributes),e.push({type:"block",delta:s,attributes:n.attributes??{}}),s=new R});const a=o[o.length-1];a&&s.insert(a,n.attributes)}else{const o=Object.keys(l)[0];if(!o)return;this.query(o,M.INLINE)?s.push(n):(s.length()&&e.push({type:"block",delta:s,attributes:{}}),s=new R,e.push({type:"blockEmbed",key:o,value:l[o],attributes:n.attributes??{}}))}}),s.length()&&e.push({type:"block",delta:s,attributes:{}}),e}createBlock(t,e){let s;const n={};Object.entries(t).forEach(a=>{let[u,h]=a;this.query(u,M.BLOCK&M.BLOT)!=null?s=u:n[u]=h});const l=this.create(s||this.statics.defaultChild.blotName,s?t[s]:void 0);this.insertBefore(l,e||void 0);const o=l.length();return Object.entries(n).forEach(a=>{let[u,h]=a;l.formatAt(0,o,u,h)}),l}}function Yn(r,t,e){e.reduce((s,n)=>{const l=Et.Op.length(n);let o=n.attributes||{};if(n.insert!=null){if(typeof n.insert=="string"){const a=n.insert;r.insertAt(s,a);const[u]=r.descendant(bt,s),h=qt(u);o=Et.AttributeMap.diff(h,o)||{}}else if(typeof n.insert=="object"){const a=Object.keys(n.insert)[0];if(a==null)return s;if(r.insertAt(s,a,n.insert[a]),r.scroll.query(a,M.INLINE)!=null){const[h]=r.descendant(bt,s),p=qt(h);o=Et.AttributeMap.diff(p,o)||{}}}}return Object.keys(o).forEach(a=>{r.formatAt(s,l,a,o[a])}),s+l},t)}const yr={scope:M.BLOCK,whitelist:["right","center","justify"]},Go=new zt("align","align",yr),Di=new Ut("align","ql-align",yr),Ui=new le("align","text-align",yr);class Pi extends le{value(t){let e=super.value(t);return e.startsWith("rgb(")?(e=e.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${e.split(",").map(n=>`00${parseInt(n,10).toString(16)}`.slice(-2)).join("")}`):e}}const Zo=new Ut("color","ql-color",{scope:M.INLINE}),vr=new Pi("color","color",{scope:M.INLINE}),Wo=new Ut("background","ql-bg",{scope:M.INLINE}),Er=new Pi("background","background-color",{scope:M.INLINE});class be extends me{static create(t){const e=super.create(t);return e.setAttribute("spellcheck","false"),e}code(t,e){return this.children.map(s=>s.length()<=1?"":s.domNode.innerText).join(`
20
+ `).slice(t,t+e)}html(t,e){return`<pre>
21
+ ${Ys(this.code(t,e))}
22
+ </pre>`}}class Nt extends ft{static TAB=" ";static register(){N.register(be)}}class Nr extends vt{}Nr.blotName="code";Nr.tagName="CODE";Nt.blotName="code-block";Nt.className="ql-code-block";Nt.tagName="DIV";be.blotName="code-block-container";be.className="ql-code-block-container";be.tagName="DIV";be.allowedChildren=[Nt];Nt.allowedChildren=[Dt,Pt,Rt];Nt.requiredContainer=be;const Ar={scope:M.BLOCK,whitelist:["rtl"]},Hi=new zt("direction","dir",Ar),ji=new Ut("direction","ql-direction",Ar),Fi=new le("direction","direction",Ar),$i={scope:M.INLINE,whitelist:["serif","monospace"]},zi=new Ut("font","ql-font",$i);class Xo extends le{value(t){return super.value(t).replace(/["']/g,"")}}const Ki=new Xo("font","font-family",$i),Vi=new Ut("size","ql-size",{scope:M.INLINE,whitelist:["small","large","huge"]}),Gi=new le("size","font-size",{scope:M.INLINE,whitelist:["10px","18px","32px"]}),Yo=Qt("quill:keyboard"),Qo=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Qs extends Kt{static match(t,e){return["altKey","ctrlKey","metaKey","shiftKey"].some(s=>!!e[s]!==t[s]&&e[s]!==null)?!1:e.key===t.key||e.key===t.which}constructor(t,e){super(t,e),this.bindings={},Object.keys(this.options.bindings).forEach(s=>{this.options.bindings[s]&&this.addBinding(this.options.bindings[s])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ta(t);if(n==null){Yo.warn("Attempted to add invalid keyboard binding",n);return}typeof e=="function"&&(e={handler:e}),typeof s=="function"&&(s={handler:s}),(Array.isArray(n.key)?n.key:[n.key]).forEach(o=>{const a={...n,key:o,...e,...s};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",t=>{if(t.defaultPrevented||t.isComposing||t.keyCode===229&&(t.key==="Enter"||t.key==="Backspace"))return;const n=(this.bindings[t.key]||[]).concat(this.bindings[t.which]||[]).filter(T=>Qs.match(t,T));if(n.length===0)return;const l=N.find(t.target,!0);if(l&&l.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[a,u]=this.quill.getLine(o.index),[h,p]=this.quill.getLeaf(o.index),[y,d]=o.length===0?[h,p]:this.quill.getLeaf(o.index+o.length),m=h instanceof Vs?h.value().slice(0,p):"",v=y instanceof Vs?y.value().slice(d):"",A={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:u,prefix:m,suffix:v,event:t};n.some(T=>{if(T.collapsed!=null&&T.collapsed!==A.collapsed||T.empty!=null&&T.empty!==A.empty||T.offset!=null&&T.offset!==A.offset)return!1;if(Array.isArray(T.format)){if(T.format.every(C=>A.format[C]==null))return!1}else if(typeof T.format=="object"&&!Object.keys(T.format).every(C=>T.format[C]===!0?A.format[C]!=null:T.format[C]===!1?A.format[C]==null:gr(T.format[C],A.format[C])))return!1;return T.prefix!=null&&!T.prefix.test(A.prefix)||T.suffix!=null&&!T.suffix.test(A.suffix)?!1:T.handler.call(this,o,A,T)!==!0})&&t.preventDefault()})}handleBackspace(t,e){const s=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(e.prefix)?2:1;if(t.index===0||this.quill.getLength()<=1)return;let n={};const[l]=this.quill.getLine(t.index);let o=new R().retain(t.index-s).delete(s);if(e.offset===0){const[a]=this.quill.getLine(t.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const h=l.formats(),p=this.quill.getFormat(t.index-1,1);if(n=Et.AttributeMap.diff(h,p)||{},Object.keys(n).length>0){const y=new R().retain(t.index+l.length()-2).retain(1,n);o=o.compose(y)}}}this.quill.updateContents(o,N.sources.USER),this.quill.focus()}handleDelete(t,e){const s=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(e.suffix)?2:1;if(t.index>=this.quill.getLength()-s)return;let n={};const[l]=this.quill.getLine(t.index);let o=new R().retain(t.index).delete(s);if(e.offset>=l.length()-1){const[a]=this.quill.getLine(t.index+1);if(a){const u=l.formats(),h=this.quill.getFormat(t.index,1);n=Et.AttributeMap.diff(u,h)||{},Object.keys(n).length>0&&(o=o.retain(a.length()-1).retain(1,n))}}this.quill.updateContents(o,N.sources.USER),this.quill.focus()}handleDeleteRange(t){wr({range:t,quill:this.quill}),this.quill.focus()}handleEnter(t,e){const s=Object.keys(e.format).reduce((l,o)=>(this.quill.scroll.query(o,M.BLOCK)&&!Array.isArray(e.format[o])&&(l[o]=e.format[o]),l),{}),n=new R().retain(t.index).delete(t.length).insert(`
23
+ `,s);this.quill.updateContents(n,N.sources.USER),this.quill.setSelection(t.index+1,N.sources.SILENT),this.quill.focus()}}const Jo={bindings:{bold:Qn("bold"),italic:Qn("italic"),underline:Qn("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(r,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","+1",N.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(r,t){return t.collapsed&&t.offset!==0?!0:(this.quill.format("indent","-1",N.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(r,t){t.format.indent!=null?this.quill.format("indent","-1",N.sources.USER):t.format.list!=null&&this.quill.format("list",!1,N.sources.USER)}},"indent code-block":ii(!0),"outdent code-block":ii(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(r){this.quill.deleteText(r.index-1,1,N.sources.USER)}},tab:{key:"Tab",handler(r,t){if(t.format.table)return!0;this.quill.history.cutoff();const e=new R().retain(r.index).delete(r.length).insert(" ");return this.quill.updateContents(e,N.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index+1,N.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,N.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(r,t){const e={list:!1};t.format.indent&&(e.indent=!1),this.quill.formatLine(r.index,r.length,e,N.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(r){const[t,e]=this.quill.getLine(r.index),s={...t.formats(),list:"checked"},n=new R().retain(r.index).insert(`
24
+ `,s).retain(t.length()-e-1).retain(1,{list:"unchecked"});this.quill.updateContents(n,N.sources.USER),this.quill.setSelection(r.index+1,N.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(r,t){const[e,s]=this.quill.getLine(r.index),n=new R().retain(r.index).insert(`
25
+ `,t.format).retain(e.length()-s-1).retain(1,{header:null});this.quill.updateContents(n,N.sources.USER),this.quill.setSelection(r.index+1,N.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(r){const t=this.quill.getModule("table");if(t){const[e,s,n,l]=t.getTable(r),o=ea(e,s,n,l);if(o==null)return;let a=e.offset();if(o<0){const u=new R().retain(a).insert(`
26
+ `);this.quill.updateContents(u,N.sources.USER),this.quill.setSelection(r.index+1,r.length,N.sources.SILENT)}else if(o>0){a+=e.length();const u=new R().retain(a).insert(`
27
+ `);this.quill.updateContents(u,N.sources.USER),this.quill.setSelection(a,N.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(r,t){const{event:e,line:s}=t,n=s.offset(this.quill.scroll);e.shiftKey?this.quill.setSelection(n-1,N.sources.USER):this.quill.setSelection(n+s.length(),N.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(r,t){if(this.quill.scroll.query("list")==null)return!0;const{length:e}=t.prefix,[s,n]=this.quill.getLine(r.index);if(n>e)return!0;let l;switch(t.prefix.trim()){case"[]":case"[ ]":l="unchecked";break;case"[x]":l="checked";break;case"-":case"*":l="bullet";break;default:l="ordered"}this.quill.insertText(r.index," ",N.sources.USER),this.quill.history.cutoff();const o=new R().retain(r.index-n).delete(e+1).retain(s.length()-2-n).retain(1,{list:l});return this.quill.updateContents(o,N.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(r.index-e,N.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(r){const[t,e]=this.quill.getLine(r.index);let s=2,n=t;for(;n!=null&&n.length()<=1&&n.formats()["code-block"];)if(n=n.prev,s-=1,s<=0){const l=new R().retain(r.index+t.length()-e-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(l,N.sources.USER),this.quill.setSelection(r.index-1,N.sources.SILENT),!1}return!0}},"embed left":js("ArrowLeft",!1),"embed left shift":js("ArrowLeft",!0),"embed right":js("ArrowRight",!1),"embed right shift":js("ArrowRight",!0),"table down":li(!1),"table up":li(!0)}};Qs.DEFAULTS=Jo;function ii(r){return{key:"Tab",shiftKey:!r,format:{"code-block":!0},handler(t,e){let{event:s}=e;const n=this.quill.scroll.query("code-block"),{TAB:l}=n;if(t.length===0&&!s.shiftKey){this.quill.insertText(t.index,l,N.sources.USER),this.quill.setSelection(t.index+l.length,N.sources.SILENT);return}const o=t.length===0?this.quill.getLines(t.index,1):this.quill.getLines(t);let{index:a,length:u}=t;o.forEach((h,p)=>{r?(h.insertAt(0,l),p===0?a+=l.length:u+=l.length):h.domNode.textContent.startsWith(l)&&(h.deleteAt(0,l.length),p===0?a-=l.length:u-=l.length)}),this.quill.update(N.sources.USER),this.quill.setSelection(a,u,N.sources.SILENT)}}}function js(r,t){return{key:r,shiftKey:t,altKey:null,[r==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(s){let{index:n}=s;r==="ArrowRight"&&(n+=s.length+1);const[l]=this.quill.getLeaf(n);return l instanceof Tt?(r==="ArrowLeft"?t?this.quill.setSelection(s.index-1,s.length+1,N.sources.USER):this.quill.setSelection(s.index-1,N.sources.USER):t?this.quill.setSelection(s.index,s.length+1,N.sources.USER):this.quill.setSelection(s.index+s.length+1,N.sources.USER),!1):!0}}}function Qn(r){return{key:r[0],shortKey:!0,handler(t,e){this.quill.format(r,!e.format[r],N.sources.USER)}}}function li(r){return{key:r?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(t,e){const s=r?"prev":"next",n=e.line,l=n.parent[s];if(l!=null){if(l.statics.blotName==="table-row"){let o=l.children.head,a=n;for(;a.prev!=null;)a=a.prev,o=o.next;const u=o.offset(this.quill.scroll)+Math.min(e.offset,o.length()-1);this.quill.setSelection(u,0,N.sources.USER)}}else{const o=n.table()[s];o!=null&&(r?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,N.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,N.sources.USER))}return!1}}}function ta(r){if(typeof r=="string"||typeof r=="number")r={key:r};else if(typeof r=="object")r=Be(r);else return null;return r.shortKey&&(r[Qo]=r.shortKey,delete r.shortKey),r}function wr(r){let{quill:t,range:e}=r;const s=t.getLines(e);let n={};if(s.length>1){const l=s[0].formats(),o=s[s.length-1].formats();n=Et.AttributeMap.diff(o,l)||{}}t.deleteText(e,N.sources.USER),Object.keys(n).length>0&&t.formatLine(e.index,1,n,N.sources.USER),t.setSelection(e.index,N.sources.SILENT)}function ea(r,t,e,s){return t.prev==null&&t.next==null?e.prev==null&&e.next==null?s===0?-1:1:e.prev==null?-1:1:t.prev==null?-1:t.next==null?1:null}const sa=/font-weight:\s*normal/,na=["P","OL","UL"],oi=r=>r&&na.includes(r.tagName),ra=r=>{Array.from(r.querySelectorAll("br")).filter(t=>oi(t.previousElementSibling)&&oi(t.nextElementSibling)).forEach(t=>{t.parentNode?.removeChild(t)})},ia=r=>{Array.from(r.querySelectorAll('b[style*="font-weight"]')).filter(t=>t.getAttribute("style")?.match(sa)).forEach(t=>{const e=r.createDocumentFragment();e.append(...t.childNodes),t.parentNode?.replaceChild(e,t)})};function la(r){r.querySelector('[id^="docs-internal-guid-"]')&&(ia(r),ra(r))}const oa=/\bmso-list:[^;]*ignore/i,aa=/\bmso-list:[^;]*\bl(\d+)/i,ca=/\bmso-list:[^;]*\blevel(\d+)/i,ua=(r,t)=>{const e=r.getAttribute("style"),s=e?.match(aa);if(!s)return null;const n=Number(s[1]),l=e?.match(ca),o=l?Number(l[1]):1,a=new RegExp(`@list l${n}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),u=t.match(a),h=u&&u[1]==="bullet"?"bullet":"ordered";return{id:n,indent:o,type:h,element:r}},ha=r=>{const t=Array.from(r.querySelectorAll("[style*=mso-list]")),e=[],s=[];t.forEach(o=>{(o.getAttribute("style")||"").match(oa)?e.push(o):s.push(o)}),e.forEach(o=>o.parentNode?.removeChild(o));const n=r.documentElement.innerHTML,l=s.map(o=>ua(o,n)).filter(o=>o);for(;l.length;){const o=[];let a=l.shift();for(;a;)o.push(a),a=l.length&&l[0]?.element===a.element.nextElementSibling&&l[0].id===a.id?l.shift():null;const u=document.createElement("ul");o.forEach(y=>{const d=document.createElement("li");d.setAttribute("data-list",y.type),y.indent>1&&d.setAttribute("class",`ql-indent-${y.indent-1}`),d.innerHTML=y.element.innerHTML,u.appendChild(d)});const h=o[0]?.element,{parentNode:p}=h??{};h&&p?.replaceChild(u,h),o.slice(1).forEach(y=>{let{element:d}=y;p?.removeChild(d)})}};function fa(r){r.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&ha(r)}const da=[fa,la],ga=r=>{r.documentElement&&da.forEach(t=>{t(r)})},pa=Qt("quill:clipboard"),ma=[[Node.TEXT_NODE,Oa],[Node.TEXT_NODE,ci],["br",Aa],[Node.ELEMENT_NODE,ci],[Node.ELEMENT_NODE,Na],[Node.ELEMENT_NODE,Ea],[Node.ELEMENT_NODE,qa],["li",Ta],["ol, ul",La],["pre",wa],["tr",Sa],["b",Jn("bold")],["i",Jn("italic")],["strike",Jn("strike")],["style",xa]],ba=[Go,Hi].reduce((r,t)=>(r[t.keyName]=t,r),{}),ai=[Ui,Er,vr,Fi,Ki,Gi].reduce((r,t)=>(r[t.keyName]=t,r),{});class ya extends Kt{static DEFAULTS={matchers:[]};constructor(t,e){super(t,e),this.quill.root.addEventListener("copy",s=>this.onCaptureCopy(s,!1)),this.quill.root.addEventListener("cut",s=>this.onCaptureCopy(s,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],ma.concat(this.options.matchers??[]).forEach(s=>{let[n,l]=s;this.addMatcher(n,l)})}addMatcher(t,e){this.matchers.push([t,e])}convert(t){let{html:e,text:s}=t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n[Nt.blotName])return new R().insert(s||"",{[Nt.blotName]:n[Nt.blotName]});if(!e)return new R().insert(s||"",n);const l=this.convertHTML(e);return us(l,`
28
+ `)&&(l.ops[l.ops.length-1].attributes==null||n.table)?l.compose(new R().retain(l.length()-1).delete(1)):l}normalizeHTML(t){ga(t)}convertHTML(t){const e=new DOMParser().parseFromString(t,"text/html");this.normalizeHTML(e);const s=e.body,n=new WeakMap,[l,o]=this.prepareMatching(s,n);return xr(this.quill.scroll,s,l,o,n)}dangerouslyPasteHTML(t,e){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:N.sources.API;if(typeof t=="string"){const n=this.convert({html:t,text:""});this.quill.setContents(n,e),this.quill.setSelection(0,N.sources.SILENT)}else{const n=this.convert({html:e,text:""});this.quill.updateContents(new R().retain(t).concat(n),s),this.quill.setSelection(t+n.length(),N.sources.SILENT)}}onCaptureCopy(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.defaultPrevented)return;t.preventDefault();const[s]=this.quill.selection.getRange();if(s==null)return;const{html:n,text:l}=this.onCopy(s,e);t.clipboardData?.setData("text/plain",l),t.clipboardData?.setData("text/html",n),e&&wr({range:s,quill:this.quill})}normalizeURIList(t){return t.split(/\r?\n/).filter(e=>e[0]!=="#").join(`
29
+ `)}onCapturePaste(t){if(t.defaultPrevented||!this.quill.isEnabled())return;t.preventDefault();const e=this.quill.getSelection(!0);if(e==null)return;const s=t.clipboardData?.getData("text/html");let n=t.clipboardData?.getData("text/plain");if(!s&&!n){const o=t.clipboardData?.getData("text/uri-list");o&&(n=this.normalizeURIList(o))}const l=Array.from(t.clipboardData?.files||[]);if(!s&&l.length>0){this.quill.uploader.upload(e,l);return}if(s&&l.length>0){const o=new DOMParser().parseFromString(s,"text/html");if(o.body.childElementCount===1&&o.body.firstElementChild?.tagName==="IMG"){this.quill.uploader.upload(e,l);return}}this.onPaste(e,{html:s,text:n})}onCopy(t){const e=this.quill.getText(t);return{html:this.quill.getSemanticHTML(t),text:e}}onPaste(t,e){let{text:s,html:n}=e;const l=this.quill.getFormat(t.index),o=this.convert({text:s,html:n},l);pa.log("onPaste",o,{text:s,html:n});const a=new R().retain(t.index).delete(t.length).concat(o);this.quill.updateContents(a,N.sources.USER),this.quill.setSelection(a.length()-t.length,N.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(t,e){const s=[],n=[];return this.matchers.forEach(l=>{const[o,a]=l;switch(o){case Node.TEXT_NODE:n.push(a);break;case Node.ELEMENT_NODE:s.push(a);break;default:Array.from(t.querySelectorAll(o)).forEach(u=>{e.has(u)?e.get(u)?.push(a):e.set(u,[a])});break}}),[s,n]}}function ye(r,t,e,s){return s.query(t)?r.reduce((n,l)=>{if(!l.insert)return n;if(l.attributes&&l.attributes[t])return n.push(l);const o=e?{[t]:e}:{};return n.insert(l.insert,{...o,...l.attributes})},new R):r}function us(r,t){let e="";for(let s=r.ops.length-1;s>=0&&e.length<t.length;--s){const n=r.ops[s];if(typeof n.insert!="string")break;e=n.insert+e}return e.slice(-1*t.length)===t}function ne(r,t){if(!(r instanceof Element))return!1;const e=t.query(r);return e&&e.prototype instanceof Tt?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(r.tagName.toLowerCase())}function va(r,t){return r.previousElementSibling&&r.nextElementSibling&&!ne(r.previousElementSibling,t)&&!ne(r.nextElementSibling,t)}const Fs=new WeakMap;function Zi(r){return r==null?!1:(Fs.has(r)||(r.tagName==="PRE"?Fs.set(r,!0):Fs.set(r,Zi(r.parentNode))),Fs.get(r))}function xr(r,t,e,s,n){return t.nodeType===t.TEXT_NODE?s.reduce((l,o)=>o(t,l,r),new R):t.nodeType===t.ELEMENT_NODE?Array.from(t.childNodes||[]).reduce((l,o)=>{let a=xr(r,o,e,s,n);return o.nodeType===t.ELEMENT_NODE&&(a=e.reduce((u,h)=>h(o,u,r),a),a=(n.get(o)||[]).reduce((u,h)=>h(o,u,r),a)),l.concat(a)},new R):new R}function Jn(r){return(t,e,s)=>ye(e,r,!0,s)}function Ea(r,t,e){const s=zt.keys(r),n=Ut.keys(r),l=le.keys(r),o={};return s.concat(n).concat(l).forEach(a=>{let u=e.query(a,M.ATTRIBUTE);u!=null&&(o[u.attrName]=u.value(r),o[u.attrName])||(u=ba[a],u!=null&&(u.attrName===a||u.keyName===a)&&(o[u.attrName]=u.value(r)||void 0),u=ai[a],u!=null&&(u.attrName===a||u.keyName===a)&&(u=ai[a],o[u.attrName]=u.value(r)||void 0))}),Object.entries(o).reduce((a,u)=>{let[h,p]=u;return ye(a,h,p,e)},t)}function Na(r,t,e){const s=e.query(r);if(s==null)return t;if(s.prototype instanceof Tt){const n={},l=s.value(r);if(l!=null)return n[s.blotName]=l,new R().insert(n,s.formats(r,e))}else if(s.prototype instanceof os&&!us(t,`
30
+ `)&&t.insert(`
31
+ `),"blotName"in s&&"formats"in s&&typeof s.formats=="function")return ye(t,s.blotName,s.formats(r,e),e);return t}function Aa(r,t){return us(t,`
32
+ `)||t.insert(`
33
+ `),t}function wa(r,t,e){const s=e.query("code-block"),n=s&&"formats"in s&&typeof s.formats=="function"?s.formats(r,e):!0;return ye(t,"code-block",n,e)}function xa(){return new R}function Ta(r,t,e){const s=e.query(r);if(s==null||s.blotName!=="list"||!us(t,`
34
+ `))return t;let n=-1,l=r.parentNode;for(;l!=null;)["OL","UL"].includes(l.tagName)&&(n+=1),l=l.parentNode;return n<=0?t:t.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,{indent:n,...a.attributes||{}}):o,new R)}function La(r,t,e){const s=r;let n=s.tagName==="OL"?"ordered":"bullet";const l=s.getAttribute("data-checked");return l&&(n=l==="true"?"checked":"unchecked"),ye(t,"list",n,e)}function ci(r,t,e){if(!us(t,`
35
+ `)){if(ne(r,e)&&(r.childNodes.length>0||r instanceof HTMLParagraphElement))return t.insert(`
36
+ `);if(t.length()>0&&r.nextSibling){let s=r.nextSibling;for(;s!=null;){if(ne(s,e))return t.insert(`
37
+ `);const n=e.query(s);if(n&&n.prototype instanceof Ot)return t.insert(`
38
+ `);s=s.firstChild}}}return t}function qa(r,t,e){const s={},n=r.style||{};return n.fontStyle==="italic"&&(s.italic=!0),n.textDecoration==="underline"&&(s.underline=!0),n.textDecoration==="line-through"&&(s.strike=!0),(n.fontWeight?.startsWith("bold")||parseInt(n.fontWeight,10)>=700)&&(s.bold=!0),t=Object.entries(s).reduce((l,o)=>{let[a,u]=o;return ye(l,a,u,e)},t),parseFloat(n.textIndent||0)>0?new R().insert(" ").concat(t):t}function Sa(r,t,e){const s=r.parentElement?.tagName==="TABLE"?r.parentElement:r.parentElement?.parentElement;if(s!=null){const l=Array.from(s.querySelectorAll("tr")).indexOf(r)+1;return ye(t,"table",l,e)}return t}function Oa(r,t,e){let s=r.data;if(r.parentElement?.tagName==="O:P")return t.insert(s.trim());if(!Zi(r)){if(s.trim().length===0&&s.includes(`
39
+ `)&&!va(r,e))return t;s=s.replace(/[^\S\u00a0]/g," "),s=s.replace(/ {2,}/g," "),(r.previousSibling==null&&r.parentElement!=null&&ne(r.parentElement,e)||r.previousSibling instanceof Element&&ne(r.previousSibling,e))&&(s=s.replace(/^ /,"")),(r.nextSibling==null&&r.parentElement!=null&&ne(r.parentElement,e)||r.nextSibling instanceof Element&&ne(r.nextSibling,e))&&(s=s.replace(/ $/,"")),s=s.replaceAll(" "," ")}return t.insert(s)}class Ca extends Kt{static DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};lastRecorded=0;ignoreChange=!1;stack={undo:[],redo:[]};currentRange=null;constructor(t,e){super(t,e),this.quill.on(N.events.EDITOR_CHANGE,(s,n,l,o)=>{s===N.events.SELECTION_CHANGE?n&&o!==N.sources.SILENT&&(this.currentRange=n):s===N.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||o===N.sources.USER?this.record(n,l):this.transform(n)),this.currentRange=hr(this.currentRange,n))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(t,e){if(this.stack[t].length===0)return;const s=this.stack[t].pop();if(!s)return;const n=this.quill.getContents(),l=s.delta.invert(n);this.stack[e].push({delta:l,range:hr(s.range,l)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,N.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,e){if(t.ops.length===0)return;this.stack.redo=[];let s=t.invert(e),n=this.currentRange;const l=Date.now();if(this.lastRecorded+this.options.delay>l&&this.stack.undo.length>0){const o=this.stack.undo.pop();o&&(s=s.compose(o.delta),n=o.range)}else this.lastRecorded=l;s.length()!==0&&(this.stack.undo.push({delta:s,range:n}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){ui(this.stack.undo,t),ui(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,N.sources.USER);else{const e=ka(this.quill.scroll,t.delta);this.quill.setSelection(e,N.sources.USER)}}}function ui(r,t){let e=t;for(let s=r.length-1;s>=0;s-=1){const n=r[s];r[s]={delta:e.transform(n.delta,!0),range:n.range&&hr(n.range,e)},e=n.delta.transform(e),r[s].delta.length()===0&&r.splice(s,1)}}function _a(r,t){const e=t.ops[t.ops.length-1];return e==null?!1:e.insert!=null?typeof e.insert=="string"&&e.insert.endsWith(`
40
+ `):e.attributes!=null?Object.keys(e.attributes).some(s=>r.query(s,M.BLOCK)!=null):!1}function ka(r,t){const e=t.reduce((n,l)=>n+(l.delete||0),0);let s=t.length()-e;return _a(r,t)&&(s-=1),s}function hr(r,t){if(!r)return r;const e=t.transformPosition(r.index),s=t.transformPosition(r.index+r.length);return{index:e,length:s-e}}class Wi extends Kt{constructor(t,e){super(t,e),t.root.addEventListener("drop",s=>{s.preventDefault();let n=null;if(document.caretRangeFromPoint)n=document.caretRangeFromPoint(s.clientX,s.clientY);else if(document.caretPositionFromPoint){const o=document.caretPositionFromPoint(s.clientX,s.clientY);n=document.createRange(),n.setStart(o.offsetNode,o.offset),n.setEnd(o.offsetNode,o.offset)}const l=n&&t.selection.normalizeNative(n);if(l){const o=t.selection.normalizedToRange(l);s.dataTransfer?.files&&this.upload(o,s.dataTransfer.files)}})}upload(t,e){const s=[];Array.from(e).forEach(n=>{n&&this.options.mimetypes?.includes(n.type)&&s.push(n)}),s.length>0&&this.options.handler.call(this,t,s)}}Wi.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(r,t){if(!this.quill.scroll.query("image"))return;const e=t.map(s=>new Promise(n=>{const l=new FileReader;l.onload=()=>{n(l.result)},l.readAsDataURL(s)}));Promise.all(e).then(s=>{const n=s.reduce((l,o)=>l.insert({image:o}),new R().retain(r.index).delete(r.length));this.quill.updateContents(n,k.sources.USER),this.quill.setSelection(r.index+s.length,k.sources.SILENT)})}};const Ia=["insertText","insertReplacementText"];class Ra extends Kt{constructor(t,e){super(t,e),t.root.addEventListener("beforeinput",s=>{this.handleBeforeInput(s)}),/Android/i.test(navigator.userAgent)||t.on(N.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(t){wr({range:t,quill:this.quill})}replaceText(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(t.length===0)return!1;if(e){const s=this.quill.getFormat(t.index,1);this.deleteRange(t),this.quill.updateContents(new R().retain(t.index).insert(e,s),N.sources.USER)}else this.deleteRange(t);return this.quill.setSelection(t.index+e.length,0,N.sources.SILENT),!0}handleBeforeInput(t){if(this.quill.composition.isComposing||t.defaultPrevented||!Ia.includes(t.inputType))return;const e=t.getTargetRanges?t.getTargetRanges()[0]:null;if(!e||e.collapsed===!0)return;const s=Ba(t);if(s==null)return;const n=this.quill.selection.normalizeNative(e),l=n?this.quill.selection.normalizedToRange(n):null;l&&this.replaceText(l,s)&&t.preventDefault()}handleCompositionStart(){const t=this.quill.getSelection();t&&this.replaceText(t)}}function Ba(r){return typeof r.data=="string"?r.data:r.dataTransfer?.types.includes("text/plain")?r.dataTransfer.getData("text/plain"):null}const Ma=/Mac/i.test(navigator.platform),Da=100,Ua=r=>!!(r.key==="ArrowLeft"||r.key==="ArrowRight"||r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="Home"||Ma&&r.key==="a"&&r.ctrlKey===!0);class Pa extends Kt{isListening=!1;selectionChangeDeadline=0;constructor(t,e){super(t,e),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,e){let{line:s,event:n}=e;if(!(s instanceof Mt)||!s.uiNode)return!0;const l=getComputedStyle(s.domNode).direction==="rtl";return l&&n.key!=="ArrowRight"||!l&&n.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(n.shiftKey?1:0),N.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&Ua(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+Da,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const e=t.getRangeAt(0);if(e.collapsed!==!0||e.startOffset!==0)return;const s=this.quill.scroll.find(e.startContainer);if(!(s instanceof Mt)||!s.uiNode)return;const n=document.createRange();n.setStartAfter(s.uiNode),n.setEndAfter(s.uiNode),t.removeAllRanges(),t.addRange(n)}}N.register({"blots/block":ft,"blots/block/embed":Ot,"blots/break":Pt,"blots/container":me,"blots/cursor":Rt,"blots/embed":br,"blots/inline":vt,"blots/scroll":Vo,"blots/text":Dt,"modules/clipboard":ya,"modules/history":Ca,"modules/keyboard":Qs,"modules/uploader":Wi,"modules/input":Ra,"modules/uiNode":Pa});class Ha extends Ut{add(t,e){let s=0;if(e==="+1"||e==="-1"){const n=this.value(t)||0;s=e==="+1"?n+1:n-1}else typeof e=="number"&&(s=e);return s===0?(this.remove(t),!0):super.add(t,s.toString())}canAdd(t,e){return super.canAdd(t,e)||super.canAdd(t,parseInt(e,10))}value(t){return parseInt(super.value(t),10)||void 0}}const ja=new Ha("indent","ql-indent",{scope:M.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class Fa extends ft{static blotName="blockquote";static tagName="blockquote"}class $a extends ft{static blotName="header";static tagName=["H1","H2","H3","H4","H5","H6"];static formats(t){return this.tagName.indexOf(t.tagName)+1}}class hs extends me{}hs.blotName="list-container";hs.tagName="OL";class fs extends ft{static create(t){const e=super.create();return e.setAttribute("data-list",t),e}static formats(t){return t.getAttribute("data-list")||void 0}static register(){N.register(hs)}constructor(t,e){super(t,e);const s=e.ownerDocument.createElement("span"),n=l=>{if(!t.isEnabled())return;const o=this.statics.formats(e,t);o==="checked"?(this.format("list","unchecked"),l.preventDefault()):o==="unchecked"&&(this.format("list","checked"),l.preventDefault())};s.addEventListener("mousedown",n),s.addEventListener("touchstart",n),this.attachUI(s)}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-list",e):super.format(t,e)}}fs.blotName="list";fs.tagName="LI";hs.allowedChildren=[fs];fs.requiredContainer=hs;class Tr extends vt{static blotName="bold";static tagName=["STRONG","B"];static create(){return super.create()}static formats(){return!0}optimize(t){super.optimize(t),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}class za extends Tr{static blotName="italic";static tagName=["EM","I"]}class Gs extends vt{static blotName="link";static tagName="A";static SANITIZED_URL="about:blank";static PROTOCOL_WHITELIST=["http","https","mailto","tel","sms"];static create(t){const e=super.create(t);return e.setAttribute("href",this.sanitize(t)),e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"),e}static formats(t){return t.getAttribute("href")}static sanitize(t){return Xi(t,this.PROTOCOL_WHITELIST)?t:this.SANITIZED_URL}format(t,e){t!==this.statics.blotName||!e?super.format(t,e):this.domNode.setAttribute("href",this.constructor.sanitize(e))}}function Xi(r,t){const e=document.createElement("a");e.href=r;const s=e.href.slice(0,e.href.indexOf(":"));return t.indexOf(s)>-1}class Ka extends vt{static blotName="script";static tagName=["SUB","SUP"];static create(t){return t==="super"?document.createElement("sup"):t==="sub"?document.createElement("sub"):super.create(t)}static formats(t){if(t.tagName==="SUB")return"sub";if(t.tagName==="SUP")return"super"}}class Va extends Tr{static blotName="strike";static tagName=["S","STRIKE"]}class Ga extends vt{static blotName="underline";static tagName="U"}class Za extends br{static blotName="formula";static className="ql-formula";static tagName="SPAN";static create(t){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const e=super.create(t);return typeof t=="string"&&(window.katex.render(t,e,{throwOnError:!1,errorColor:"#f00"}),e.setAttribute("data-value",t)),e}static value(t){return t.getAttribute("data-value")}html(){const{formula:t}=this.value();return`<span>${t}</span>`}}const hi=["alt","height","width"];class Wa extends Tt{static blotName="image";static tagName="IMG";static create(t){const e=super.create(t);return typeof t=="string"&&e.setAttribute("src",this.sanitize(t)),e}static formats(t){return hi.reduce((e,s)=>(t.hasAttribute(s)&&(e[s]=t.getAttribute(s)),e),{})}static match(t){return/\.(jpe?g|gif|png)$/.test(t)||/^data:image\/.+;base64/.test(t)}static sanitize(t){return Xi(t,["http","https","data"])?t:"//:0"}static value(t){return t.getAttribute("src")}format(t,e){hi.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}}const fi=["height","width"];class Xa extends Ot{static blotName="video";static className="ql-video";static tagName="IFRAME";static create(t){const e=super.create(t);return e.setAttribute("frameborder","0"),e.setAttribute("allowfullscreen","true"),e.setAttribute("src",this.sanitize(t)),e}static formats(t){return fi.reduce((e,s)=>(t.hasAttribute(s)&&(e[s]=t.getAttribute(s)),e),{})}static sanitize(t){return Gs.sanitize(t)}static value(t){return t.getAttribute("src")}format(t,e){fi.indexOf(t)>-1?e?this.domNode.setAttribute(t,e):this.domNode.removeAttribute(t):super.format(t,e)}html(){const{video:t}=this.value();return`<a href="${t}">${t}</a>`}}const is=new Ut("code-token","hljs",{scope:M.INLINE});class Yt extends vt{static formats(t,e){for(;t!=null&&t!==e.domNode;){if(t.classList&&t.classList.contains(Nt.className))return super.formats(t,e);t=t.parentNode}}constructor(t,e,s){super(t,e,s),is.add(this.domNode,s)}format(t,e){t!==Yt.blotName?super.format(t,e):e?is.add(this.domNode,e):(is.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),is.value(this.domNode)||this.unwrap()}}Yt.blotName="code-token";Yt.className="ql-token";class St extends Nt{static create(t){const e=super.create(t);return typeof t=="string"&&e.setAttribute("data-language",t),e}static formats(t){return t.getAttribute("data-language")||"plain"}static register(){}format(t,e){t===this.statics.blotName&&e?this.domNode.setAttribute("data-language",e):super.format(t,e)}replaceWith(t,e){return this.formatAt(0,this.length(),Yt.blotName,!1),super.replaceWith(t,e)}}class ls extends be{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(t,e){t===St.blotName&&(this.forceNext=!0,this.children.forEach(s=>{s.format(t,e)}))}formatAt(t,e,s,n){s===St.blotName&&(this.forceNext=!0),super.formatAt(t,e,s,n)}highlight(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const n=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
41
+ `)}
42
+ `,l=St.formats(this.children.head.domNode);if(e||this.forceNext||this.cachedText!==n){if(n.trim().length>0||this.cachedText==null){const o=this.children.reduce((u,h)=>u.concat(Bi(h,!1)),new R),a=t(n,l);o.diff(a).reduce((u,h)=>{let{retain:p,attributes:y}=h;return p?(y&&Object.keys(y).forEach(d=>{[St.blotName,Yt.blotName].includes(d)&&this.formatAt(u,p,d,y[d])}),u+p):u},0)}this.cachedText=n,this.forceNext=!1}}html(t,e){const[s]=this.children.find(t);return`<pre data-language="${s?St.formats(s.domNode):"plain"}">
43
+ ${Ys(this.code(t,e))}
44
+ </pre>`}optimize(t){if(super.optimize(t),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const e=St.formats(this.children.head.domNode);e!==this.uiNode.value&&(this.uiNode.value=e)}}}ls.allowedChildren=[St];St.requiredContainer=ls;St.allowedChildren=[Yt,Rt,Dt,Pt];const Ya=(r,t,e)=>{if(typeof r.versionString=="string"){const s=r.versionString.split(".")[0];if(parseInt(s,10)>=11)return r.highlight(e,{language:t}).value}return r.highlight(t,e).value};class Yi extends Kt{static register(){N.register(Yt,!0),N.register(St,!0),N.register(ls,!0)}constructor(t,e){if(super(t,e),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((s,n)=>{let{key:l}=n;return s[l]=!0,s},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(N.events.SCROLL_BLOT_MOUNT,t=>{if(!(t instanceof ls))return;const e=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(s=>{let{key:n,label:l}=s;const o=e.ownerDocument.createElement("option");o.textContent=l,o.setAttribute("value",n),e.appendChild(o)}),e.addEventListener("change",()=>{t.format(St.blotName,e.value),this.quill.root.focus(),this.highlight(t,!0)}),t.uiNode==null&&(t.attachUI(e),t.children.head&&(e.value=St.formats(t.children.head.domNode)))})}initTimer(){let t=null;this.quill.on(N.events.SCROLL_OPTIMIZE,()=>{t&&clearTimeout(t),t=setTimeout(()=>{this.highlight(),t=null},this.options.interval)})}highlight(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(N.sources.USER);const s=this.quill.getSelection();(t==null?this.quill.scroll.descendants(ls):[t]).forEach(l=>{l.highlight(this.highlightBlot,e)}),this.quill.update(N.sources.SILENT),s!=null&&this.quill.setSelection(s,N.sources.SILENT)}highlightBlot(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(e=this.languages[e]?e:"plain",e==="plain")return Ys(t).split(`
45
+ `).reduce((n,l,o)=>(o!==0&&n.insert(`
46
+ `,{[Nt.blotName]:e}),n.insert(l)),new R);const s=this.quill.root.ownerDocument.createElement("div");return s.classList.add(Nt.className),s.innerHTML=Ya(this.options.hljs,e,t),xr(this.quill.scroll,s,[(n,l)=>{const o=is.value(n);return o?l.compose(new R().retain(l.length(),{[Yt.blotName]:o})):l}],[(n,l)=>n.data.split(`
47
+ `).reduce((o,a,u)=>(u!==0&&o.insert(`
48
+ `,{[Nt.blotName]:e}),o.insert(a)),l)],new WeakMap)}}Yi.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};class Bt extends ft{static blotName="table";static tagName="TD";static create(t){const e=super.create();return t?e.setAttribute("data-row",t):e.setAttribute("data-row",Lr()),e}static formats(t){if(t.hasAttribute("data-row"))return t.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(t,e){t===Bt.blotName&&e?this.domNode.setAttribute("data-row",e):super.format(t,e)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}}class pe extends me{static blotName="table-row";static tagName="TR";checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const t=this.children.head.formats(),e=this.children.tail.formats(),s=this.next.children.head.formats(),n=this.next.children.tail.formats();return t.table===e.table&&t.table===s.table&&t.table===n.table}return!1}optimize(t){super.optimize(t),this.children.forEach(e=>{if(e.next==null)return;const s=e.formats(),n=e.next.formats();if(s.table!==n.table){const l=this.splitAfter(e);l&&l.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}class ie extends me{static blotName="table-body";static tagName="TBODY"}class Zs extends me{static blotName="table-container";static tagName="TABLE";balanceCells(){const t=this.descendants(pe),e=t.reduce((s,n)=>Math.max(n.children.length,s),0);t.forEach(s=>{new Array(e-s.children.length).fill(0).forEach(()=>{let n;s.children.head!=null&&(n=Bt.formats(s.children.head.domNode));const l=this.scroll.create(Bt.blotName,n);s.appendChild(l),l.optimize()})})}cells(t){return this.rows().map(e=>e.children.at(t))}deleteColumn(t){const[e]=this.descendant(ie);e==null||e.children.head==null||e.children.forEach(s=>{const n=s.children.at(t);n?.remove()})}insertColumn(t){const[e]=this.descendant(ie);e==null||e.children.head==null||e.children.forEach(s=>{const n=s.children.at(t),l=Bt.formats(s.children.head.domNode),o=this.scroll.create(Bt.blotName,l);s.insertBefore(o,n)})}insertRow(t){const[e]=this.descendant(ie);if(e==null||e.children.head==null)return;const s=Lr(),n=this.scroll.create(pe.blotName);e.children.head.children.forEach(()=>{const o=this.scroll.create(Bt.blotName,s);n.appendChild(o)});const l=e.children.at(t);e.insertBefore(n,l)}rows(){const t=this.children.head;return t==null?[]:t.children.map(e=>e)}}Zs.allowedChildren=[ie];ie.requiredContainer=Zs;ie.allowedChildren=[pe];pe.requiredContainer=ie;pe.allowedChildren=[Bt];Bt.requiredContainer=pe;function Lr(){return`row-${Math.random().toString(36).slice(2,6)}`}class Qa extends Kt{static register(){N.register(Bt),N.register(pe),N.register(ie),N.register(Zs)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Zs).forEach(t=>{t.balanceCells()})}deleteColumn(){const[t,,e]=this.getTable();e!=null&&(t.deleteColumn(e.cellOffset()),this.quill.update(N.sources.USER))}deleteRow(){const[,t]=this.getTable();t!=null&&(t.remove(),this.quill.update(N.sources.USER))}deleteTable(){const[t]=this.getTable();if(t==null)return;const e=t.offset();t.remove(),this.quill.update(N.sources.USER),this.quill.setSelection(e,N.sources.SILENT)}getTable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(t==null)return[null,null,null,-1];const[e,s]=this.quill.getLine(t.index);if(e==null||e.statics.blotName!==Bt.blotName)return[null,null,null,-1];const n=e.parent;return[n.parent.parent,n,e,s]}insertColumn(t){const e=this.quill.getSelection();if(!e)return;const[s,n,l]=this.getTable(e);if(l==null)return;const o=l.cellOffset();s.insertColumn(o+t),this.quill.update(N.sources.USER);let a=n.rowOffset();t===0&&(a+=1),this.quill.setSelection(e.index+a,e.length,N.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(t){const e=this.quill.getSelection();if(!e)return;const[s,n,l]=this.getTable(e);if(l==null)return;const o=n.rowOffset();s.insertRow(o+t),this.quill.update(N.sources.USER),t>0?this.quill.setSelection(e,N.sources.SILENT):this.quill.setSelection(e.index+n.children.length,e.length,N.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(t,e){const s=this.quill.getSelection();if(s==null)return;const n=new Array(t).fill(0).reduce(l=>{const o=new Array(e).fill(`
49
+ `).join("");return l.insert(o,{table:Lr()})},new R().retain(s.index));this.quill.updateContents(n,N.sources.USER),this.quill.setSelection(s.index,N.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(N.events.SCROLL_OPTIMIZE,t=>{t.some(e=>["TD","TR","TBODY","TABLE"].includes(e.target.tagName)?(this.quill.once(N.events.TEXT_CHANGE,(s,n,l)=>{l===N.sources.USER&&this.balanceTables()}),!0):!1)})}}const di=Qt("quill:toolbar");class qr extends Kt{constructor(t,e){if(super(t,e),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),Ja(s,this.options.container),t.container?.parentNode?.insertBefore(s,t.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){di.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{const n=this.options.handlers?.[s];n&&this.addHandler(s,n)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(N.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(t,e){this.handlers[t]=e}attach(t){let e=Array.from(t.classList).find(n=>n.indexOf("ql-")===0);if(!e)return;if(e=e.slice(3),t.tagName==="BUTTON"&&t.setAttribute("type","button"),this.handlers[e]==null&&this.quill.scroll.query(e)==null){di.warn("ignoring attaching to nonexistent format",e,t);return}const s=t.tagName==="SELECT"?"change":"click";t.addEventListener(s,n=>{let l;if(t.tagName==="SELECT"){if(t.selectedIndex<0)return;const a=t.options[t.selectedIndex];a.hasAttribute("selected")?l=!1:l=a.value||!1}else t.classList.contains("ql-active")?l=!1:l=t.value||!t.hasAttribute("value"),n.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[e]!=null)this.handlers[e].call(this,l);else if(this.quill.scroll.query(e).prototype instanceof Tt){if(l=prompt(`Enter ${e}`),!l)return;this.quill.updateContents(new R().retain(o.index).delete(o.length).insert({[e]:l}),N.sources.USER)}else this.quill.format(e,l,N.sources.USER);this.update(o)}),this.controls.push([e,t])}update(t){const e=t==null?{}:this.quill.getFormat(t);this.controls.forEach(s=>{const[n,l]=s;if(l.tagName==="SELECT"){let o=null;if(t==null)o=null;else if(e[n]==null)o=l.querySelector("option[selected]");else if(!Array.isArray(e[n])){let a=e[n];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=l.querySelector(`option[value="${a}"]`)}o==null?(l.value="",l.selectedIndex=-1):o.selected=!0}else if(t==null)l.classList.remove("ql-active"),l.setAttribute("aria-pressed","false");else if(l.hasAttribute("value")){const o=e[n],a=o===l.getAttribute("value")||o!=null&&o.toString()===l.getAttribute("value")||o==null&&!l.getAttribute("value");l.classList.toggle("ql-active",a),l.setAttribute("aria-pressed",a.toString())}else{const o=e[n]!=null;l.classList.toggle("ql-active",o),l.setAttribute("aria-pressed",o.toString())}})}}qr.DEFAULTS={};function gi(r,t,e){const s=document.createElement("button");s.setAttribute("type","button"),s.classList.add(`ql-${t}`),s.setAttribute("aria-pressed","false"),e!=null?(s.value=e,s.setAttribute("aria-label",`${t}: ${e}`)):s.setAttribute("aria-label",t),r.appendChild(s)}function Ja(r,t){Array.isArray(t[0])||(t=[t]),t.forEach(e=>{const s=document.createElement("span");s.classList.add("ql-formats"),e.forEach(n=>{if(typeof n=="string")gi(s,n);else{const l=Object.keys(n)[0],o=n[l];Array.isArray(o)?tc(s,l,o):gi(s,l,o)}}),r.appendChild(s)})}function tc(r,t,e){const s=document.createElement("select");s.classList.add(`ql-${t}`),e.forEach(n=>{const l=document.createElement("option");n!==!1?l.setAttribute("value",String(n)):l.setAttribute("selected","selected"),s.appendChild(l)}),r.appendChild(s)}qr.DEFAULTS={container:null,handlers:{clean(){const r=this.quill.getSelection();if(r!=null)if(r.length===0){const t=this.quill.getFormat();Object.keys(t).forEach(e=>{this.quill.scroll.query(e,M.INLINE)!=null&&this.quill.format(e,!1,N.sources.USER)})}else this.quill.removeFormat(r.index,r.length,N.sources.USER)},direction(r){const{align:t}=this.quill.getFormat();r==="rtl"&&t==null?this.quill.format("align","right",N.sources.USER):!r&&t==="right"&&this.quill.format("align",!1,N.sources.USER),this.quill.format("direction",r,N.sources.USER)},indent(r){const t=this.quill.getSelection(),e=this.quill.getFormat(t),s=parseInt(e.indent||0,10);if(r==="+1"||r==="-1"){let n=r==="+1"?1:-1;e.direction==="rtl"&&(n*=-1),this.quill.format("indent",s+n,N.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,N.sources.USER)},list(r){const t=this.quill.getSelection(),e=this.quill.getFormat(t);r==="check"?e.list==="checked"||e.list==="unchecked"?this.quill.format("list",!1,N.sources.USER):this.quill.format("list","unchecked",N.sources.USER):this.quill.format("list",r,N.sources.USER)}}};const ec='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',sc='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',nc='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',rc='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',ic='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',lc='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',oc='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',ac='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',pi='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',cc='<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',uc='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',hc='<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>',fc='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',dc='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',gc='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',pc='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',mc='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',bc='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',yc='<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>',vc='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',Ec='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',Nc='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',Ac='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>',wc='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',xc='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',Tc='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',Lc='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>',qc='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',Sc='<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>',Oc='<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',Cc='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',_c='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',kc='<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>',cs={align:{"":ec,center:sc,right:nc,justify:rc},background:ic,blockquote:lc,bold:oc,clean:ac,code:pi,"code-block":pi,color:cc,direction:{"":uc,rtl:hc},formula:fc,header:{1:dc,2:gc,3:pc,4:mc,5:bc,6:yc},italic:vc,image:Ec,indent:{"+1":Nc,"-1":Ac},link:wc,list:{bullet:xc,check:Tc,ordered:Lc},script:{sub:qc,super:Sc},strike:Oc,table:Cc,underline:_c,video:kc},Ic='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let mi=0;function bi(r,t){r.setAttribute(t,`${r.getAttribute(t)!=="true"}`)}class Js{constructor(t){this.select=t,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",e=>{switch(e.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),e.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),bi(this.label,"aria-expanded"),bi(this.options,"aria-hidden")}buildItem(t){const e=document.createElement("span");e.tabIndex="0",e.setAttribute("role","button"),e.classList.add("ql-picker-item");const s=t.getAttribute("value");return s&&e.setAttribute("data-value",s),t.textContent&&e.setAttribute("data-label",t.textContent),e.addEventListener("click",()=>{this.selectItem(e,!0)}),e.addEventListener("keydown",n=>{switch(n.key){case"Enter":this.selectItem(e,!0),n.preventDefault();break;case"Escape":this.escape(),n.preventDefault();break}}),e}buildLabel(){const t=document.createElement("span");return t.classList.add("ql-picker-label"),t.innerHTML=Ic,t.tabIndex="0",t.setAttribute("role","button"),t.setAttribute("aria-expanded","false"),this.container.appendChild(t),t}buildOptions(){const t=document.createElement("span");t.classList.add("ql-picker-options"),t.setAttribute("aria-hidden","true"),t.tabIndex="-1",t.id=`ql-picker-options-${mi}`,mi+=1,this.label.setAttribute("aria-controls",t.id),this.options=t,Array.from(this.select.options).forEach(e=>{const s=this.buildItem(e);t.appendChild(s),e.selected===!0&&this.selectItem(s)}),this.container.appendChild(t)}buildPicker(){Array.from(this.select.attributes).forEach(t=>{this.container.setAttribute(t.name,t.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const s=this.container.querySelector(".ql-selected");t!==s&&(s?.classList.remove("ql-selected"),t!=null&&(t.classList.add("ql-selected"),this.select.selectedIndex=Array.from(t.parentNode.children).indexOf(t),t.hasAttribute("data-value")?this.label.setAttribute("data-value",t.getAttribute("data-value")):this.label.removeAttribute("data-value"),t.hasAttribute("data-label")?this.label.setAttribute("data-label",t.getAttribute("data-label")):this.label.removeAttribute("data-label"),e&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let t;if(this.select.selectedIndex>-1){const s=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];t=this.select.options[this.select.selectedIndex],this.selectItem(s)}else this.selectItem(null);const e=t!=null&&t!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",e)}}class Qi extends Js{constructor(t,e){super(t),this.label.innerHTML=e,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(s=>{s.classList.add("ql-primary")})}buildItem(t){const e=super.buildItem(t);return e.style.backgroundColor=t.getAttribute("value")||"",e}selectItem(t,e){super.selectItem(t,e);const s=this.label.querySelector(".ql-color-label"),n=t&&t.getAttribute("data-value")||"";s&&(s.tagName==="line"?s.style.stroke=n:s.style.fill=n)}}class Ji extends Js{constructor(t,e){super(t),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(s=>{s.innerHTML=e[s.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(t,e){super.selectItem(t,e);const s=t||this.defaultItem;if(s!=null){if(this.label.innerHTML===s.innerHTML)return;this.label.innerHTML=s.innerHTML}}}const Rc=r=>{const{overflowY:t}=getComputedStyle(r,null);return t!=="visible"&&t!=="clip"};class tl{constructor(t,e){this.quill=t,this.boundsContainer=e||document.body,this.root=t.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,Rc(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(t){const e=t.left+t.width/2-this.root.offsetWidth/2,s=t.bottom+this.quill.root.scrollTop;this.root.style.left=`${e}px`,this.root.style.top=`${s}px`,this.root.classList.remove("ql-flip");const n=this.boundsContainer.getBoundingClientRect(),l=this.root.getBoundingClientRect();let o=0;if(l.right>n.right&&(o=n.right-l.right,this.root.style.left=`${e+o}px`),l.left<n.left&&(o=n.left-l.left,this.root.style.left=`${e+o}px`),l.bottom>n.bottom){const a=l.bottom-l.top,u=t.bottom-t.top+a;this.root.style.top=`${s-u}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const Bc=[!1,"center","right","justify"],Mc=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Dc=[!1,"serif","monospace"],Uc=["1","2","3",!1],Pc=["small",!1,"large","huge"];class ds extends Pe{constructor(t,e){super(t,e);const s=n=>{if(!document.body.contains(t.root)){document.body.removeEventListener("click",s);return}this.tooltip!=null&&!this.tooltip.root.contains(n.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(l=>{l.container.contains(n.target)||l.close()})};t.emitter.listenDOM("click",document.body,s)}addModule(t){const e=super.addModule(t);return t==="toolbar"&&this.extendToolbar(e),e}buildButtons(t,e){Array.from(t).forEach(s=>{(s.getAttribute("class")||"").split(/\s+/).forEach(l=>{if(l.startsWith("ql-")&&(l=l.slice(3),e[l]!=null))if(l==="direction")s.innerHTML=e[l][""]+e[l].rtl;else if(typeof e[l]=="string")s.innerHTML=e[l];else{const o=s.value||"";o!=null&&e[l][o]&&(s.innerHTML=e[l][o])}})})}buildPickers(t,e){this.pickers=Array.from(t).map(n=>{if(n.classList.contains("ql-align")&&(n.querySelector("option")==null&&ss(n,Bc),typeof e.align=="object"))return new Ji(n,e.align);if(n.classList.contains("ql-background")||n.classList.contains("ql-color")){const l=n.classList.contains("ql-background")?"background":"color";return n.querySelector("option")==null&&ss(n,Mc,l==="background"?"#ffffff":"#000000"),new Qi(n,e[l])}return n.querySelector("option")==null&&(n.classList.contains("ql-font")?ss(n,Dc):n.classList.contains("ql-header")?ss(n,Uc):n.classList.contains("ql-size")&&ss(n,Pc)),new Js(n)});const s=()=>{this.pickers.forEach(n=>{n.update()})};this.quill.on(k.events.EDITOR_CHANGE,s)}}ds.DEFAULTS=re({},Pe.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{const t=this.quill.getSelection(!0);this.quill.uploader.upload(t,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class el extends tl{constructor(t,e){super(t,e),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",t=>{t.key==="Enter"?(this.save(),t.preventDefault()):t.key==="Escape"&&(this.cancel(),t.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;e!=null?this.textbox.value=e:t!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const s=this.quill.getBounds(this.quill.selection.savedRange);s!=null&&this.position(s),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${t}`)||""),this.root.setAttribute("data-mode",t)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:t}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:e}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",t,k.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",t,k.sources.USER)),this.quill.root.scrollTop=e;break}case"video":t=Hc(t);case"formula":{if(!t)break;const e=this.quill.getSelection(!0);if(e!=null){const s=e.index+e.length;this.quill.insertEmbed(s,this.root.getAttribute("data-mode"),t,k.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(s+1," ",k.sources.USER),this.quill.setSelection(s+2,k.sources.USER)}break}}this.textbox.value="",this.hide()}}function Hc(r){let t=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return t?`${t[1]||"https"}://www.youtube.com/embed/${t[2]}?showinfo=0`:(t=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${t[1]||"https"}://player.vimeo.com/video/${t[2]}/`:r}function ss(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;t.forEach(s=>{const n=document.createElement("option");s===e?n.setAttribute("selected","selected"):n.setAttribute("value",String(s)),r.appendChild(n)})}const jc=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Fc extends el{static TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join("");constructor(t,e){super(t,e),this.quill.on(k.events.EDITOR_CHANGE,(s,n,l,o)=>{if(s===k.events.SELECTION_CHANGE)if(n!=null&&n.length>0&&o===k.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(n.index,n.length);if(a.length===1){const u=this.quill.getBounds(n);u!=null&&this.position(u)}else{const u=a[a.length-1],h=this.quill.getIndex(u),p=Math.min(u.length()-1,n.index+n.length-h),y=this.quill.getBounds(new ge(h,p));y!=null&&this.position(y)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(k.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const t=this.quill.getSelection();if(t!=null){const e=this.quill.getBounds(t);e!=null&&this.position(e)}},1)})}cancel(){this.show()}position(t){const e=super.position(t),s=this.root.querySelector(".ql-tooltip-arrow");return s.style.marginLeft="",e!==0&&(s.style.marginLeft=`${-1*e-s.offsetWidth/2}px`),e}}class sl extends ds{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=jc),super(t,e),this.quill.container.classList.add("ql-bubble")}extendToolbar(t){this.tooltip=new Fc(this.quill,this.options.bounds),t.container!=null&&(this.tooltip.root.appendChild(t.container),this.buildButtons(t.container.querySelectorAll("button"),cs),this.buildPickers(t.container.querySelectorAll("select"),cs))}}sl.DEFAULTS=re({},ds.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,N.sources.USER)}}}}});const $c=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class zc extends el{static TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join("");preview=this.root.querySelector("a.ql-preview");listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const e=this.linkRange;this.restoreFocus(),this.quill.formatText(e,"link",!1,k.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(k.events.SELECTION_CHANGE,(t,e,s)=>{if(t!=null){if(t.length===0&&s===k.sources.USER){const[n,l]=this.quill.scroll.descendant(Gs,t.index);if(n!=null){this.linkRange=new ge(t.index-l,n.length());const o=Gs.formats(n.domNode);this.preview.textContent=o,this.preview.setAttribute("href",o),this.show();const a=this.quill.getBounds(this.linkRange);a!=null&&this.position(a);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}class nl extends ds{constructor(t,e){e.modules.toolbar!=null&&e.modules.toolbar.container==null&&(e.modules.toolbar.container=$c),super(t,e),this.quill.container.classList.add("ql-snow")}extendToolbar(t){t.container!=null&&(t.container.classList.add("ql-snow"),this.buildButtons(t.container.querySelectorAll("button"),cs),this.buildPickers(t.container.querySelectorAll("select"),cs),this.tooltip=new zc(this.quill,this.options.bounds),t.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(e,s)=>{t.handlers.link.call(t,!s.format.link)}))}}nl.DEFAULTS=re({},ds.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){const t=this.quill.getSelection();if(t==null||t.length===0)return;let e=this.quill.getText(t);/^\S+@\S+\.\S+$/.test(e)&&e.indexOf("mailto:")!==0&&(e=`mailto:${e}`);const{tooltip:s}=this.quill.theme;s.edit("link",e)}else this.quill.format("link",!1,N.sources.USER)}}}}});N.register({"attributors/attribute/direction":Hi,"attributors/class/align":Di,"attributors/class/background":Wo,"attributors/class/color":Zo,"attributors/class/direction":ji,"attributors/class/font":zi,"attributors/class/size":Vi,"attributors/style/align":Ui,"attributors/style/background":Er,"attributors/style/color":vr,"attributors/style/direction":Fi,"attributors/style/font":Ki,"attributors/style/size":Gi},!0);N.register({"formats/align":Di,"formats/direction":ji,"formats/indent":ja,"formats/background":Er,"formats/color":vr,"formats/font":zi,"formats/size":Vi,"formats/blockquote":Fa,"formats/code-block":Nt,"formats/header":$a,"formats/list":fs,"formats/bold":Tr,"formats/code":Nr,"formats/italic":za,"formats/link":Gs,"formats/script":Ka,"formats/strike":Va,"formats/underline":Ga,"formats/formula":Za,"formats/image":Wa,"formats/video":Xa,"modules/syntax":Yi,"modules/table":Qa,"modules/toolbar":qr,"themes/bubble":sl,"themes/snow":nl,"ui/icons":cs,"ui/picker":Js,"ui/icon-picker":Ji,"ui/color-picker":Qi,"ui/tooltip":tl},!0);const Yc=Et.AttributeMap,Qc=Et.Op,Jc=Et.OpIterator;export{Yc as AttributeMap,R as Delta,Kt as Module,Qc as Op,Jc as OpIterator,wo as Parchment,ge as Range,N as default};
@@ -0,0 +1,19 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta content="width=device-width, initial-scale=1" name="viewport" />
6
+ <meta name="description" content="Solid UI Vite App" />
7
+ <link rel="icon" href="/favicon.ico" />
8
+ <link id="theme-css" href="/themes/solid-light-purple/theme.css" rel="stylesheet" />
9
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined" rel="stylesheet" />
10
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded" rel="stylesheet" />
11
+ <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp" rel="stylesheet" />
12
+ <title>new-solid-ui</title>
13
+ <script type="module" crossorigin src="/assets/index-ByqcKjdb.js"></script>
14
+ <link rel="stylesheet" crossorigin href="/assets/index-wnEWlFcj.css">
15
+ </head>
16
+ <body>
17
+ <div id="root"></div>
18
+ </body>
19
+ </html>
@@ -6142,8 +6142,13 @@
6142
6142
  color: #FFF;
6143
6143
  }
6144
6144
 
6145
- .solid-standard-autocomplete .p-inputtext:focus+.p-button {
6146
- border-color: var(--primary-light-color) !important;
6145
+ .solid-standard-autocomplete .p-inputtext:focus {
6146
+ border-color: var(--primary-color) !important;
6147
+ }
6148
+
6149
+
6150
+ .solid-standard-autocomplete.p-inputwrapper-focus .p-autocomplete-dropdown.p-button {
6151
+ border-color: var(--primary-color) !important;
6147
6152
  }
6148
6153
 
6149
6154
  .solid-custom-editor .ql-toolbar.ql-snow {