dgz-ui-shared 1.1.19 → 1.1.21

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 (82) hide show
  1. package/dist/{Actions-1AyyAnYT.js → Actions-CKVu3P3q.js} +6 -6
  2. package/dist/Actions-uGf1oq7E.cjs +1 -0
  3. package/dist/{DateRangePicker-kaBfJaKY.cjs → DateRangePicker-C1c1mofH.cjs} +3 -3
  4. package/dist/{DateRangePicker-D57HSCpq.js → DateRangePicker-DFsQ10c7.js} +5 -5
  5. package/dist/{ExportData-dSwR1N1v.js → ExportData-1xS2UAoq.js} +6 -6
  6. package/dist/ExportData-ApStkEWC.cjs +1 -0
  7. package/dist/{FilterWrapper-DeQRSTAc.js → FilterWrapper-Dk18nVPy.js} +31 -31
  8. package/dist/{FilterWrapper-B6p9fJWb.cjs → FilterWrapper-DvNjUQih.cjs} +5 -5
  9. package/dist/{MyInput-BzXWiSVj.cjs → MyInput-9MnlVZ4h.cjs} +1 -1
  10. package/dist/{MyInput-CkiPA3UG.js → MyInput-B-QCpehg.js} +57 -57
  11. package/dist/{MyLimitSelect-DHyIJawN.cjs → MyLimitSelect-BU1FClXt.cjs} +2 -2
  12. package/dist/{MyLimitSelect-XMVeSEqs.js → MyLimitSelect-D5ZWDY-s.js} +13 -13
  13. package/dist/{MySelect-Bmw1Krye.js → MySelect-C5uWRVJh.js} +7 -7
  14. package/dist/MySelect-DNK997Bi.cjs +1 -0
  15. package/dist/{button-2punbuN6-BBVynxVj.cjs → button-CdZDBhmr-3yMPCRDo.cjs} +1 -1
  16. package/dist/{button-2punbuN6-Bxlf8sMg.js → button-CdZDBhmr-BT_j3ig5.js} +7 -7
  17. package/dist/{chevron-right-HWBijj-I-Bdcofm_0.cjs → chevron-right-HWBijj-I-CZBu0GKg.cjs} +1 -1
  18. package/dist/{chevron-right-HWBijj-I-Bkp_tbGM.js → chevron-right-HWBijj-I-DsFUufdU.js} +1 -1
  19. package/dist/components/actions/index.cjs.js +1 -1
  20. package/dist/components/actions/index.es.js +1 -1
  21. package/dist/components/confirm/index.cjs.js +1 -1
  22. package/dist/components/confirm/index.es.js +1 -1
  23. package/dist/components/datatable/index.cjs.js +5 -5
  24. package/dist/components/datatable/index.es.js +204 -201
  25. package/dist/components/datepicker/index.cjs.js +1 -1
  26. package/dist/components/datepicker/index.es.js +1 -1
  27. package/dist/components/export/index.cjs.js +1 -1
  28. package/dist/components/export/index.es.js +1 -1
  29. package/dist/components/filters/index.cjs.js +1 -1
  30. package/dist/components/filters/index.es.js +6 -6
  31. package/dist/components/form/index.cjs.js +2 -2
  32. package/dist/components/form/index.es.js +33 -33
  33. package/dist/components/modal/index.cjs.js +2 -2
  34. package/dist/components/modal/index.es.js +7 -7
  35. package/dist/components/pagination/index.cjs.js +1 -1
  36. package/dist/components/pagination/index.es.js +1 -1
  37. package/dist/components/theme/index.cjs.js +3 -3
  38. package/dist/components/theme/index.es.js +4 -4
  39. package/dist/components/tooltip/index.cjs.js +1 -1
  40. package/dist/components/tooltip/index.es.js +44 -44
  41. package/dist/{createLucideIcon-B950nf2d-Brk4LIHH.js → createLucideIcon-B950nf2d-9wLYOF5y.js} +1 -1
  42. package/dist/{createLucideIcon-B950nf2d-BaIaB_Fz.cjs → createLucideIcon-B950nf2d-DrrWmvZU.cjs} +4 -4
  43. package/dist/dropdown-menu-TWRSm6RK-DQ03CnVw.cjs +1 -0
  44. package/dist/{dropdown-menu-lArmcWbC-jIg7CHSO.js → dropdown-menu-TWRSm6RK-D_FJpI4C.js} +83 -83
  45. package/dist/hooks/index.cjs.js +1 -1
  46. package/dist/hooks/index.es.js +2 -2
  47. package/dist/{index-CiR6yUKf-BEMUeikM.js → index-BL59b1Bz-C9bJE_xn.js} +90 -90
  48. package/dist/{index-CiR6yUKf-B1h5S0LB.cjs → index-BL59b1Bz-COeLljOH.cjs} +4 -4
  49. package/dist/{index-DUK8Bn0m-Clp83x2_.js → index-C4qYhCZt-BZQduTld.js} +29 -29
  50. package/dist/index-C4qYhCZt-DWBiWQ93.cjs +5 -0
  51. package/dist/index-CbK6da4c-QXbo5Vgb.cjs +1 -0
  52. package/dist/{index-Dp0y0FJw-B42jTfO0.js → index-CbK6da4c-d_6FdYZH.js} +1 -1
  53. package/dist/{index-GjjxAtgk-Dl4JPPHK.js → index-Cths1nBq-BUfZy21E.js} +71 -71
  54. package/dist/index-Cths1nBq-DzDn15YE.cjs +11 -0
  55. package/dist/{index-CMHo7s91-D6S6dZoG.cjs → index-ZsCkaYy6-Bjyf2SZs.cjs} +1 -1
  56. package/dist/{index-CMHo7s91-BRFfxKgJ.js → index-ZsCkaYy6-Cw9HUeiu.js} +1 -1
  57. package/dist/index.esm-CQEA7FC8.js +1007 -0
  58. package/dist/index.esm-TI7V1a5F.cjs +1 -0
  59. package/dist/{input-mask-Chc-UIWX-Br4gXX2T.js → input-mask-DBLFIvhN-BBxoZxnd.js} +3738 -3687
  60. package/dist/input-mask-DBLFIvhN-C_0RAR2l.cjs +190 -0
  61. package/dist/{popover-Dvg-QyCn-CJ3lAD8Q.js → popover-OZcfKDD9-C2PVWPLS.js} +17 -17
  62. package/dist/popover-OZcfKDD9-KUWOsIOs.cjs +1 -0
  63. package/dist/{react-select-CKazfTiF-1EhjhhlL.js → react-select-DVPHHTAP-D2u3DqGr.js} +2 -2
  64. package/dist/{react-select-CKazfTiF-Bb-Uf4tM.cjs → react-select-DVPHHTAP-DKDInFsM.cjs} +9 -9
  65. package/dist/types/components/datatable/DataTable.d.ts +1 -1
  66. package/dist/types/components/datatable/DataTable.d.ts.map +1 -1
  67. package/dist/{unstyled-4GbbDand.cjs → unstyled-BFCMBSGZ.cjs} +2 -2
  68. package/dist/{unstyled-Cmnf9U5U.js → unstyled-BMbrfzye.js} +42 -42
  69. package/dist/{useFilter-CiORTEHP.cjs → useFilter-Cwz8oftI.cjs} +1 -1
  70. package/dist/{useFilter-DMpxv27U.js → useFilter-DJunNBm2.js} +1 -1
  71. package/package.json +2 -2
  72. package/dist/Actions-Dg5LYo56.cjs +0 -1
  73. package/dist/ExportData-DUuHYzA-.cjs +0 -1
  74. package/dist/MySelect-lSICw49W.cjs +0 -1
  75. package/dist/dropdown-menu-lArmcWbC-DCwGoXng.cjs +0 -1
  76. package/dist/index-DUK8Bn0m-BIulOZIQ.cjs +0 -5
  77. package/dist/index-Dp0y0FJw-DVwS4FcV.cjs +0 -1
  78. package/dist/index-GjjxAtgk-DaxZek3n.cjs +0 -11
  79. package/dist/index.esm-CpcLzfLZ.cjs +0 -1
  80. package/dist/index.esm-lbl2HgR1.js +0 -970
  81. package/dist/input-mask-Chc-UIWX-DimBl_dd.cjs +0 -190
  82. package/dist/popover-Dvg-QyCn-Dr2o9oAG.cjs +0 -1
@@ -1,190 +0,0 @@
1
- "use strict";const x=require("./index-CiR6yUKf-B1h5S0LB.cjs"),se=require("react"),Mt=require("./index-CMHo7s91-D6S6dZoG.cjs"),Te=require("./react-select-CKazfTiF-Bb-Uf4tM.cjs"),Se=require("./utils-B6fNqzRf-BNysSCt9.cjs"),ti=require("./button-2punbuN6-BBVynxVj.cjs"),qf=require("react-dom"),Rt=require("./index-GjjxAtgk-DaxZek3n.cjs"),hn=require("./createLucideIcon-B950nf2d-BaIaB_Fz.cjs"),jf=require("./index-Dp0y0FJw-DVwS4FcV.cjs");function ac(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,s.get?s:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const T=ac(se),lc=ac(qf);function gl(n,[e,t]){return Math.min(t,Math.max(e,n))}/**
2
- * @license lucide-react v0.511.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Mf=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],uc=hn.k("chevron-down",Mf);var Df=Object.defineProperty,Ff=(n,e,t)=>e in n?Df(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Q=(n,e,t)=>Ff(n,typeof e!="symbol"?e+"":e,t);/**
7
- * @license lucide-react v0.511.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const Bf=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Pf=hn.k("chevron-up",Bf);function ni(n){const e=T.useRef({value:n,previous:n});return T.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}var si="Checkbox",[Vf,Dk]=x.j(si),[Uf,La]=Vf(si);function $f(n){const{__scopeCheckbox:e,checked:t,children:s,defaultChecked:r,disabled:i,form:o,name:a,onCheckedChange:l,required:c,value:f="on",internal_do_not_use_render:v}=n,[d,h]=x.y({prop:t,defaultProp:r??!1,onChange:l,caller:si}),[m,g]=T.useState(null),[b,E]=T.useState(null),w=T.useRef(!1),S=m?!!o||!!m.closest("form"):!0,C={checked:d,disabled:i,setChecked:h,control:m,setControl:g,name:a,form:o,value:f,hasConsumerStoppedPropagationRef:w,required:c,defaultChecked:Kt(r)?!1:r,isFormControl:S,bubbleInput:b,setBubbleInput:E};return x.ae.jsx(Uf,{scope:e,...C,children:zf(v)?v(C):s})}var cc="CheckboxTrigger",hc=T.forwardRef(({__scopeCheckbox:n,onKeyDown:e,onClick:t,...s},r)=>{const{control:i,value:o,disabled:a,checked:l,required:c,setControl:f,setChecked:v,hasConsumerStoppedPropagationRef:d,isFormControl:h,bubbleInput:m}=La(cc,n),g=x.x(r,f),b=T.useRef(l);return T.useEffect(()=>{const E=i==null?void 0:i.form;if(E){const w=()=>v(b.current);return E.addEventListener("reset",w),()=>E.removeEventListener("reset",w)}},[i,v]),x.ae.jsx(x.h.button,{type:"button",role:"checkbox","aria-checked":Kt(l)?"mixed":l,"aria-required":c,"data-state":gc(l),"data-disabled":a?"":void 0,disabled:a,value:o,...s,ref:g,onKeyDown:x.y$1(e,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:x.y$1(t,E=>{v(w=>Kt(w)?!0:!w),m&&h&&(d.current=E.isPropagationStopped(),d.current||E.stopPropagation())})})});hc.displayName=cc;var qa=T.forwardRef((n,e)=>{const{__scopeCheckbox:t,name:s,checked:r,defaultChecked:i,required:o,disabled:a,value:l,onCheckedChange:c,form:f,...v}=n;return x.ae.jsx($f,{__scopeCheckbox:t,checked:r,defaultChecked:i,disabled:a,required:o,onCheckedChange:c,name:s,form:f,value:l,internal_do_not_use_render:({isFormControl:d})=>x.ae.jsxs(x.ae.Fragment,{children:[x.ae.jsx(hc,{...v,ref:e,__scopeCheckbox:t}),d&&x.ae.jsx(mc,{__scopeCheckbox:t})]})})});qa.displayName=si;var dc="CheckboxIndicator",fc=T.forwardRef((n,e)=>{const{__scopeCheckbox:t,forceMount:s,...r}=n,i=La(dc,t);return x.ae.jsx(x.R,{present:s||Kt(i.checked)||i.checked===!0,children:x.ae.jsx(x.h.span,{"data-state":gc(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:e,style:{pointerEvents:"none",...n.style}})})});fc.displayName=dc;var pc="CheckboxBubbleInput",mc=T.forwardRef(({__scopeCheckbox:n,...e},t)=>{const{control:s,hasConsumerStoppedPropagationRef:r,checked:i,defaultChecked:o,required:a,disabled:l,name:c,value:f,form:v,bubbleInput:d,setBubbleInput:h}=La(pc,n),m=x.x(t,h),g=ni(i),b=Mt.In(s);T.useEffect(()=>{const w=d;if(!w)return;const S=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(S,"checked").set,A=!r.current;if(g!==i&&C){const z=new Event("click",{bubbles:A});w.indeterminate=Kt(i),C.call(w,Kt(i)?!1:i),w.dispatchEvent(z)}},[d,g,i,r]);const E=T.useRef(Kt(i)?!1:i);return x.ae.jsx(x.h.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??E.current,required:a,disabled:l,name:c,value:f,form:v,...e,tabIndex:-1,ref:m,style:{...e.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});mc.displayName=pc;function zf(n){return typeof n=="function"}function Kt(n){return n==="indeterminate"}function gc(n){return Kt(n)?"indeterminate":n?"checked":"unchecked"}const vc=T.forwardRef(({className:n,...e},t)=>x.ae.jsx(qa,{ref:t,className:Se.mo("peer border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:text-primary size-4 shrink-0 rounded-sm border focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",n),...e,children:x.ae.jsx(fc,{className:Se.mo("flex size-4 items-center justify-center text-current"),children:e.checked==="indeterminate"?x.ae.jsx(Te.C,{className:"text-primary mr-0.5 mb-0.5 size-3.5"}):x.ae.jsx(Te.i,{className:"text-primary mr-0.5 mb-0.5 size-3.5"})})}));vc.displayName=qa.displayName;const ri=ti.j("flex h-10 w-full rounded-lg border border-border-alpha-strong px-3 py-2 dark:bg-transparent file:border-0 placeholder:text-secondary placeholder:text-body-sm-regular focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-bg focus-visible:ring-offset-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"focus-visible:ring-item-primary",failure:"focus-visible:ring-item-destructive bg-item-destructive-focus placeholder:text-item-destructive border-item-destructive text-destructive",success:"focus-visible:ring-success bg-success/20 placeholder:text-success/80 border-success text-success"}},defaultVariants:{variant:"default"}}),yc=T.forwardRef(({className:n,type:e,variant:t,...s},r)=>{const[i,o]=se.useState(!1),[a,l]=se.useState(!1);return se.useEffect(()=>{o(e==="password")},[e]),x.ae.jsxs("div",{className:"relative",children:[x.ae.jsx("input",{type:a?"text":e,className:Se.mo(ri({variant:t}),n,i&&"pr-10"),ref:r,...s}),i&&x.ae.jsx(ti.u,{type:"button",size:"icon",variant:"tertiary",className:"absolute top-1 right-1 size-8 cursor-pointer rounded-md p-2 !ring-0 !ring-offset-0",onClick:()=>{l(!a)},children:a?x.ae.jsx(Te.w,{}):x.ae.jsx(Te.m,{})})]})});yc.displayName="Input";var Ke=function(){return Ke=Object.assign||function(n){for(var e,t=1,s=arguments.length;t<s;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},Ke.apply(this,arguments)};function Jn(n,e,t){if(t||arguments.length===2)for(var s=0,r=e.length,i;s<r;s++)(i||!(s in e))&&(i||(i=Array.prototype.slice.call(e,0,s)),i[s]=e[s]);return n.concat(i||Array.prototype.slice.call(e))}function Hf(n){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=n(t)),e[t]}}var Kf=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Wf=Hf(function(n){return Kf.test(n)||n.charCodeAt(0)===111&&n.charCodeAt(1)===110&&n.charCodeAt(2)<91}),Ee="-ms-",Ls="-moz-",be="-webkit-",bc="comm",ii="rule",ja="decl",Gf="@import",xc="@keyframes",Zf="@layer",kc=Math.abs,Ma=String.fromCharCode,Go=Object.assign;function Yf(n,e){return Re(n,0)^45?(((e<<2^Re(n,0))<<2^Re(n,1))<<2^Re(n,2))<<2^Re(n,3):0}function wc(n){return n.trim()}function Ct(n,e){return(n=e.exec(n))?n[0]:n}function he(n,e,t){return n.replace(e,t)}function Or(n,e,t){return n.indexOf(e,t)}function Re(n,e){return n.charCodeAt(e)|0}function Qn(n,e,t){return n.slice(e,t)}function gt(n){return n.length}function Ec(n){return n.length}function Cs(n,e){return e.push(n),n}function Xf(n,e){return n.map(e).join("")}function vl(n,e){return n.filter(function(t){return!Ct(t,e)})}var oi=1,es=1,_c=0,et=0,Ce=0,as="";function ai(n,e,t,s,r,i,o,a){return{value:n,root:e,parent:t,type:s,props:r,children:i,line:oi,column:es,length:o,return:"",siblings:a}}function Vt(n,e){return Go(ai("",null,null,"",null,null,0,n.siblings),n,{length:-n.length},e)}function Bn(n){for(;n.root;)n=Vt(n.root,{children:[n]});Cs(n,n.siblings)}function Jf(){return Ce}function Qf(){return Ce=et>0?Re(as,--et):0,es--,Ce===10&&(es=1,oi--),Ce}function ot(){return Ce=et<_c?Re(as,et++):0,es++,Ce===10&&(es=1,oi++),Ce}function pn(){return Re(as,et)}function Tr(){return et}function li(n,e){return Qn(as,n,e)}function Zo(n){switch(n){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ep(n){return oi=es=1,_c=gt(as=n),et=0,[]}function tp(n){return as="",n}function xo(n){return wc(li(et-1,Yo(n===91?n+2:n===40?n+1:n)))}function np(n){for(;(Ce=pn())&&Ce<33;)ot();return Zo(n)>2||Zo(Ce)>3?"":" "}function sp(n,e){for(;--e&&ot()&&!(Ce<48||Ce>102||Ce>57&&Ce<65||Ce>70&&Ce<97););return li(n,Tr()+(e<6&&pn()==32&&ot()==32))}function Yo(n){for(;ot();)switch(Ce){case n:return et;case 34:case 39:n!==34&&n!==39&&Yo(Ce);break;case 40:n===41&&Yo(n);break;case 92:ot();break}return et}function rp(n,e){for(;ot()&&n+Ce!==57&&!(n+Ce===84&&pn()===47););return"/*"+li(e,et-1)+"*"+Ma(n===47?n:ot())}function ip(n){for(;!Zo(pn());)ot();return li(n,et)}function op(n){return tp(Rr("",null,null,null,[""],n=ep(n),0,[0],n))}function Rr(n,e,t,s,r,i,o,a,l){for(var c=0,f=0,v=o,d=0,h=0,m=0,g=1,b=1,E=1,w=0,S="",C=r,A=i,z=s,W=S;b;)switch(m=w,w=ot()){case 40:if(m!=108&&Re(W,v-1)==58){Or(W+=he(xo(w),"&","&\f"),"&\f",kc(c?a[c-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:W+=xo(w);break;case 9:case 10:case 13:case 32:W+=np(m);break;case 92:W+=sp(Tr()-1,7);continue;case 47:switch(pn()){case 42:case 47:Cs(ap(rp(ot(),Tr()),e,t,l),l);break;default:W+="/"}break;case 123*g:a[c++]=gt(W)*E;case 125*g:case 59:case 0:switch(w){case 0:case 125:b=0;case 59+f:E==-1&&(W=he(W,/\f/g,"")),h>0&&gt(W)-v&&Cs(h>32?bl(W+";",s,t,v-1,l):bl(he(W," ","")+";",s,t,v-2,l),l);break;case 59:W+=";";default:if(Cs(z=yl(W,e,t,c,f,r,a,S,C=[],A=[],v,i),i),w===123)if(f===0)Rr(W,e,z,z,C,i,v,a,A);else switch(d===99&&Re(W,3)===110?100:d){case 100:case 108:case 109:case 115:Rr(n,z,z,s&&Cs(yl(n,z,z,0,0,r,a,S,r,C=[],v,A),A),r,A,v,a,s?C:A);break;default:Rr(W,z,z,z,[""],A,0,a,A)}}c=f=h=0,g=E=1,S=W="",v=o;break;case 58:v=1+gt(W),h=m;default:if(g<1){if(w==123)--g;else if(w==125&&g++==0&&Qf()==125)continue}switch(W+=Ma(w),w*g){case 38:E=f>0?1:(W+="\f",-1);break;case 44:a[c++]=(gt(W)-1)*E,E=1;break;case 64:pn()===45&&(W+=xo(ot())),d=pn(),f=v=gt(S=W+=ip(Tr())),w++;break;case 45:m===45&&gt(W)==2&&(g=0)}}return i}function yl(n,e,t,s,r,i,o,a,l,c,f,v){for(var d=r-1,h=r===0?i:[""],m=Ec(h),g=0,b=0,E=0;g<s;++g)for(var w=0,S=Qn(n,d+1,d=kc(b=o[g])),C=n;w<m;++w)(C=wc(b>0?h[w]+" "+S:he(S,/&\f/g,h[w])))&&(l[E++]=C);return ai(n,e,t,r===0?ii:a,l,c,f,v)}function ap(n,e,t,s){return ai(n,e,t,bc,Ma(Jf()),Qn(n,2,-2),0,s)}function bl(n,e,t,s,r){return ai(n,e,t,ja,Qn(n,0,s),Qn(n,s+1,-1),s,r)}function Nc(n,e,t){switch(Yf(n,e)){case 5103:return be+"print-"+n+n;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return be+n+n;case 4789:return Ls+n+n;case 5349:case 4246:case 4810:case 6968:case 2756:return be+n+Ls+n+Ee+n+n;case 5936:switch(Re(n,e+11)){case 114:return be+n+Ee+he(n,/[svh]\w+-[tblr]{2}/,"tb")+n;case 108:return be+n+Ee+he(n,/[svh]\w+-[tblr]{2}/,"tb-rl")+n;case 45:return be+n+Ee+he(n,/[svh]\w+-[tblr]{2}/,"lr")+n}case 6828:case 4268:case 2903:return be+n+Ee+n+n;case 6165:return be+n+Ee+"flex-"+n+n;case 5187:return be+n+he(n,/(\w+).+(:[^]+)/,be+"box-$1$2"+Ee+"flex-$1$2")+n;case 5443:return be+n+Ee+"flex-item-"+he(n,/flex-|-self/g,"")+(Ct(n,/flex-|baseline/)?"":Ee+"grid-row-"+he(n,/flex-|-self/g,""))+n;case 4675:return be+n+Ee+"flex-line-pack"+he(n,/align-content|flex-|-self/g,"")+n;case 5548:return be+n+Ee+he(n,"shrink","negative")+n;case 5292:return be+n+Ee+he(n,"basis","preferred-size")+n;case 6060:return be+"box-"+he(n,"-grow","")+be+n+Ee+he(n,"grow","positive")+n;case 4554:return be+he(n,/([^-])(transform)/g,"$1"+be+"$2")+n;case 6187:return he(he(he(n,/(zoom-|grab)/,be+"$1"),/(image-set)/,be+"$1"),n,"")+n;case 5495:case 3959:return he(n,/(image-set\([^]*)/,be+"$1$`$1");case 4968:return he(he(n,/(.+:)(flex-)?(.*)/,be+"box-pack:$3"+Ee+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+be+n+n;case 4200:if(!Ct(n,/flex-|baseline/))return Ee+"grid-column-align"+Qn(n,e)+n;break;case 2592:case 3360:return Ee+he(n,"template-","")+n;case 4384:case 3616:return t&&t.some(function(s,r){return e=r,Ct(s.props,/grid-\w+-end/)})?~Or(n+(t=t[e].value),"span",0)?n:Ee+he(n,"-start","")+n+Ee+"grid-row-span:"+(~Or(t,"span",0)?Ct(t,/\d+/):+Ct(t,/\d+/)-+Ct(n,/\d+/))+";":Ee+he(n,"-start","")+n;case 4896:case 4128:return t&&t.some(function(s){return Ct(s.props,/grid-\w+-start/)})?n:Ee+he(he(n,"-end","-span"),"span ","")+n;case 4095:case 3583:case 4068:case 2532:return he(n,/(.+)-inline(.+)/,be+"$1$2")+n;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(gt(n)-1-e>6)switch(Re(n,e+1)){case 109:if(Re(n,e+4)!==45)break;case 102:return he(n,/(.+:)(.+)-([^]+)/,"$1"+be+"$2-$3$1"+Ls+(Re(n,e+3)==108?"$3":"$2-$3"))+n;case 115:return~Or(n,"stretch",0)?Nc(he(n,"stretch","fill-available"),e,t)+n:n}break;case 5152:case 5920:return he(n,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(s,r,i,o,a,l,c){return Ee+r+":"+i+c+(o?Ee+r+"-span:"+(a?l:+l-+i)+c:"")+n});case 4949:if(Re(n,e+6)===121)return he(n,":",":"+be)+n;break;case 6444:switch(Re(n,Re(n,14)===45?18:11)){case 120:return he(n,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+be+(Re(n,14)===45?"inline-":"")+"box$3$1"+be+"$2$3$1"+Ee+"$2box$3")+n;case 100:return he(n,":",":"+Ee)+n}break;case 5719:case 2647:case 2135:case 3927:case 2391:return he(n,"scroll-","scroll-snap-")+n}return n}function Hr(n,e){for(var t="",s=0;s<n.length;s++)t+=e(n[s],s,n,e)||"";return t}function lp(n,e,t,s){switch(n.type){case Zf:if(n.children.length)break;case Gf:case ja:return n.return=n.return||n.value;case bc:return"";case xc:return n.return=n.value+"{"+Hr(n.children,s)+"}";case ii:if(!gt(n.value=n.props.join(",")))return""}return gt(t=Hr(n.children,s))?n.return=n.value+"{"+t+"}":""}function up(n){var e=Ec(n);return function(t,s,r,i){for(var o="",a=0;a<e;a++)o+=n[a](t,s,r,i)||"";return o}}function cp(n){return function(e){e.root||(e=e.return)&&n(e)}}function hp(n,e,t,s){if(n.length>-1&&!n.return)switch(n.type){case ja:n.return=Nc(n.value,n.length,t);return;case xc:return Hr([Vt(n,{value:he(n.value,"@","@"+be)})],s);case ii:if(n.length)return Xf(t=n.props,function(r){switch(Ct(r,s=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Bn(Vt(n,{props:[he(r,/:(read-\w+)/,":"+Ls+"$1")]})),Bn(Vt(n,{props:[r]})),Go(n,{props:vl(t,s)});break;case"::placeholder":Bn(Vt(n,{props:[he(r,/:(plac\w+)/,":"+be+"input-$1")]})),Bn(Vt(n,{props:[he(r,/:(plac\w+)/,":"+Ls+"$1")]})),Bn(Vt(n,{props:[he(r,/:(plac\w+)/,Ee+"input-$1")]})),Bn(Vt(n,{props:[r]})),Go(n,{props:vl(t,s)});break}return""})}}var dp={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},gn=typeof process<"u"&&process.env!==void 0&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Sc="active",Ac="data-styled-version",ui="6.1.19",Da=`/*!sc*/
12
- `,Kr=typeof window<"u"&&typeof document<"u",fp=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),xl=/invalid hook call/i,gr=new Set,pp=function(n,e){if(process.env.NODE_ENV!=="production"){var t=e?' with the id of "'.concat(e,'"'):"",s="The component ".concat(n).concat(t,` has been created dynamically.
13
- `)+`You may see this warning because you've called styled inside another component.
14
- To resolve this only create new StyledComponents outside of any render method and function component.
15
- See https://styled-components.com/docs/basics#define-styled-components-outside-of-the-render-method for more info.
16
- `,r=console.error;try{var i=!0;console.error=function(o){for(var a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];xl.test(o)?(i=!1,gr.delete(s)):r.apply(void 0,Jn([o],a,!1))},se.useRef(),i&&!gr.has(s)&&(console.warn(s),gr.add(s))}catch(o){xl.test(o.message)&&gr.delete(s)}finally{console.error=r}}},ci=Object.freeze([]),ts=Object.freeze({});function mp(n,e,t){return t===void 0&&(t=ts),n.theme!==t.theme&&n.theme||e||t.theme}var Xo=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),gp=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,vp=/(^-|-$)/g;function kl(n){return n.replace(gp,"-").replace(vp,"")}var yp=/(a)(d)/gi,vr=52,wl=function(n){return String.fromCharCode(n+(n>25?39:97))};function Jo(n){var e,t="";for(e=Math.abs(n);e>vr;e=e/vr|0)t=wl(e%vr)+t;return(wl(e%vr)+t).replace(yp,"$1-$2")}var ko,Cc=5381,cn=function(n,e){for(var t=e.length;t;)n=33*n^e.charCodeAt(--t);return n},Oc=function(n){return cn(Cc,n)};function bp(n){return Jo(Oc(n)>>>0)}function Tc(n){return process.env.NODE_ENV!=="production"&&typeof n=="string"&&n||n.displayName||n.name||"Component"}function wo(n){return typeof n=="string"&&(process.env.NODE_ENV==="production"||n.charAt(0)===n.charAt(0).toLowerCase())}var Rc=typeof Symbol=="function"&&Symbol.for,Ic=Rc?Symbol.for("react.memo"):60115,xp=Rc?Symbol.for("react.forward_ref"):60112,kp={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},wp={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Lc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ep=((ko={})[xp]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ko[Ic]=Lc,ko);function El(n){return("type"in(e=n)&&e.type.$$typeof)===Ic?Lc:"$$typeof"in n?Ep[n.$$typeof]:kp;var e}var _p=Object.defineProperty,Np=Object.getOwnPropertyNames,_l=Object.getOwnPropertySymbols,Sp=Object.getOwnPropertyDescriptor,Ap=Object.getPrototypeOf,Nl=Object.prototype;function qc(n,e,t){if(typeof e!="string"){if(Nl){var s=Ap(e);s&&s!==Nl&&qc(n,s,t)}var r=Np(e);_l&&(r=r.concat(_l(e)));for(var i=El(n),o=El(e),a=0;a<r.length;++a){var l=r[a];if(!(l in wp||t&&t[l]||o&&l in o||i&&l in i)){var c=Sp(e,l);try{_p(n,l,c)}catch{}}}}return n}function ns(n){return typeof n=="function"}function Fa(n){return typeof n=="object"&&"styledComponentId"in n}function dn(n,e){return n&&e?"".concat(n," ").concat(e):n||e||""}function Sl(n,e){if(n.length===0)return"";for(var t=n[0],s=1;s<n.length;s++)t+=n[s];return t}function ss(n){return n!==null&&typeof n=="object"&&n.constructor.name===Object.name&&!("props"in n&&n.$$typeof)}function Qo(n,e,t){if(t===void 0&&(t=!1),!t&&!ss(n)&&!Array.isArray(n))return e;if(Array.isArray(e))for(var s=0;s<e.length;s++)n[s]=Qo(n[s],e[s]);else if(ss(e))for(var s in e)n[s]=Qo(n[s],e[s]);return n}function Ba(n,e){Object.defineProperty(n,"toString",{value:e})}var Cp=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
17
-
18
- `,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
19
-
20
- - Are you trying to reuse it across renders?
21
- - Are you accidentally calling collectStyles twice?
22
-
23
- `,3:`Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.
24
-
25
- `,4:`The \`StyleSheetManager\` expects a valid target or sheet prop!
26
-
27
- - Does this error occur on the client and is your target falsy?
28
- - Does this error occur on the server and is the sheet falsy?
29
-
30
- `,5:`The clone method cannot be used on the client!
31
-
32
- - Are you running in a client-like environment on the server?
33
- - Are you trying to run SSR on the client?
34
-
35
- `,6:`Trying to insert a new style tag, but the given Node is unmounted!
36
-
37
- - Are you using a custom target that isn't mounted?
38
- - Does your document not have a valid head element?
39
- - Have you accidentally removed a style tag manually?
40
-
41
- `,7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:`ThemeProvider: Please make your "theme" prop an object.
42
-
43
- `,9:"Missing document `<head>`\n\n",10:`Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021
44
-
45
- `,11:`_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.
46
-
47
- `,12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:`%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.
48
-
49
- `,14:`ThemeProvider: "theme" prop is required.
50
-
51
- `,15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:`Reached the limit of how many styled components may be created at group %s.
52
- You may only create up to 1,073,741,824 components. If you're creating components dynamically,
53
- as for instance in your render method then you may be running into this limitation.
54
-
55
- `,17:`CSSStyleSheet could not be found on HTMLStyleElement.
56
- Has styled-components' style tag been unmounted or altered by another script?
57
- `,18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function Op(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var t=n[0],s=[],r=1,i=n.length;r<i;r+=1)s.push(n[r]);return s.forEach(function(o){t=t.replace(/%[a-z]/,o)}),t}function ls(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return process.env.NODE_ENV==="production"?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(n," for more information.").concat(e.length>0?" Args: ".concat(e.join(", ")):"")):new Error(Op.apply(void 0,Jn([Cp[n]],e,!1)).trim())}var Tp=function(){function n(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return n.prototype.indexOfGroup=function(e){for(var t=0,s=0;s<e;s++)t+=this.groupSizes[s];return t},n.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var s=this.groupSizes,r=s.length,i=r;e>=i;)if((i<<=1)<0)throw ls(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(s),this.length=i;for(var o=r;o<i;o++)this.groupSizes[o]=0}for(var a=this.indexOfGroup(e+1),l=(o=0,t.length);o<l;o++)this.tag.insertRule(a,t[o])&&(this.groupSizes[e]++,a++)},n.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],s=this.indexOfGroup(e),r=s+t;this.groupSizes[e]=0;for(var i=s;i<r;i++)this.tag.deleteRule(s)}},n.prototype.getGroup=function(e){var t="";if(e>=this.length||this.groupSizes[e]===0)return t;for(var s=this.groupSizes[e],r=this.indexOfGroup(e),i=r+s,o=r;o<i;o++)t+="".concat(this.tag.getRule(o)).concat(Da);return t},n}(),Rp=1<<30,Ir=new Map,Wr=new Map,Lr=1,yr=function(n){if(Ir.has(n))return Ir.get(n);for(;Wr.has(Lr);)Lr++;var e=Lr++;if(process.env.NODE_ENV!=="production"&&((0|e)<0||e>Rp))throw ls(16,"".concat(e));return Ir.set(n,e),Wr.set(e,n),e},Ip=function(n,e){Lr=e+1,Ir.set(n,e),Wr.set(e,n)},Lp="style[".concat(gn,"][").concat(Ac,'="').concat(ui,'"]'),qp=new RegExp("^".concat(gn,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),jp=function(n,e,t){for(var s,r=t.split(","),i=0,o=r.length;i<o;i++)(s=r[i])&&n.registerName(e,s)},Mp=function(n,e){for(var t,s=((t=e.textContent)!==null&&t!==void 0?t:"").split(Da),r=[],i=0,o=s.length;i<o;i++){var a=s[i].trim();if(a){var l=a.match(qp);if(l){var c=0|parseInt(l[1],10),f=l[2];c!==0&&(Ip(f,c),jp(n,f,l[3]),n.getTag().insertRules(c,r)),r.length=0}else r.push(a)}}},Al=function(n){for(var e=document.querySelectorAll(Lp),t=0,s=e.length;t<s;t++){var r=e[t];r&&r.getAttribute(gn)!==Sc&&(Mp(n,r),r.parentNode&&r.parentNode.removeChild(r))}};function Dp(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var jc=function(n){var e=document.head,t=n||e,s=document.createElement("style"),r=function(a){var l=Array.from(a.querySelectorAll("style[".concat(gn,"]")));return l[l.length-1]}(t),i=r!==void 0?r.nextSibling:null;s.setAttribute(gn,Sc),s.setAttribute(Ac,ui);var o=Dp();return o&&s.setAttribute("nonce",o),t.insertBefore(s,i),s},Fp=function(){function n(e){this.element=jc(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(t){if(t.sheet)return t.sheet;for(var s=document.styleSheets,r=0,i=s.length;r<i;r++){var o=s[r];if(o.ownerNode===t)return o}throw ls(17)}(this.element),this.length=0}return n.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}},n.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},n.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},n}(),Bp=function(){function n(e){this.element=jc(e),this.nodes=this.element.childNodes,this.length=0}return n.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var s=document.createTextNode(t);return this.element.insertBefore(s,this.nodes[e]||null),this.length++,!0}return!1},n.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},n.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},n}(),Pp=function(){function n(e){this.rules=[],this.length=0}return n.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},n.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},n.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},n}(),Cl=Kr,Vp={isServer:!Kr,useCSSOMInjection:!fp},Mc=function(){function n(e,t,s){e===void 0&&(e=ts),t===void 0&&(t={});var r=this;this.options=Ke(Ke({},Vp),e),this.gs=t,this.names=new Map(s),this.server=!!e.isServer,!this.server&&Kr&&Cl&&(Cl=!1,Al(this)),Ba(this,function(){return function(i){for(var o=i.getTag(),a=o.length,l="",c=function(v){var d=function(E){return Wr.get(E)}(v);if(d===void 0)return"continue";var h=i.names.get(d),m=o.getGroup(v);if(h===void 0||!h.size||m.length===0)return"continue";var g="".concat(gn,".g").concat(v,'[id="').concat(d,'"]'),b="";h!==void 0&&h.forEach(function(E){E.length>0&&(b+="".concat(E,","))}),l+="".concat(m).concat(g,'{content:"').concat(b,'"}').concat(Da)},f=0;f<a;f++)c(f);return l}(r)})}return n.registerId=function(e){return yr(e)},n.prototype.rehydrate=function(){!this.server&&Kr&&Al(this)},n.prototype.reconstructWithOptions=function(e,t){return t===void 0&&(t=!0),new n(Ke(Ke({},this.options),e),this.gs,t&&this.names||void 0)},n.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},n.prototype.getTag=function(){return this.tag||(this.tag=(e=function(t){var s=t.useCSSOMInjection,r=t.target;return t.isServer?new Pp(r):s?new Fp(r):new Bp(r)}(this.options),new Tp(e)));var e},n.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},n.prototype.registerName=function(e,t){if(yr(e),this.names.has(e))this.names.get(e).add(t);else{var s=new Set;s.add(t),this.names.set(e,s)}},n.prototype.insertRules=function(e,t,s){this.registerName(e,t),this.getTag().insertRules(yr(e),s)},n.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},n.prototype.clearRules=function(e){this.getTag().clearGroup(yr(e)),this.clearNames(e)},n.prototype.clearTag=function(){this.tag=void 0},n}(),Up=/&/g,$p=/^\s*\/\/.*$/gm;function Dc(n,e){return n.map(function(t){return t.type==="rule"&&(t.value="".concat(e," ").concat(t.value),t.value=t.value.replaceAll(",",",".concat(e," ")),t.props=t.props.map(function(s){return"".concat(e," ").concat(s)})),Array.isArray(t.children)&&t.type!=="@keyframes"&&(t.children=Dc(t.children,e)),t})}function zp(n){var e,t,s,r=ts,i=r.options,o=i===void 0?ts:i,a=r.plugins,l=a===void 0?ci:a,c=function(d,h,m){return m.startsWith(t)&&m.endsWith(t)&&m.replaceAll(t,"").length>0?".".concat(e):d},f=l.slice();f.push(function(d){d.type===ii&&d.value.includes("&")&&(d.props[0]=d.props[0].replace(Up,t).replace(s,c))}),o.prefix&&f.push(hp),f.push(lp);var v=function(d,h,m,g){h===void 0&&(h=""),m===void 0&&(m=""),g===void 0&&(g="&"),e=g,t=h,s=new RegExp("\\".concat(t,"\\b"),"g");var b=d.replace($p,""),E=op(m||h?"".concat(m," ").concat(h," { ").concat(b," }"):b);o.namespace&&(E=Dc(E,o.namespace));var w=[];return Hr(E,up(f.concat(cp(function(S){return w.push(S)})))),w};return v.hash=l.length?l.reduce(function(d,h){return h.name||ls(15),cn(d,h.name)},Cc).toString():"",v}var Hp=new Mc,ea=zp(),Fc=se.createContext({shouldForwardProp:void 0,styleSheet:Hp,stylis:ea});Fc.Consumer;se.createContext(void 0);function Ol(){return se.useContext(Fc)}var Tl=function(){function n(e,t){var s=this;this.inject=function(r,i){i===void 0&&(i=ea);var o=s.name+i.hash;r.hasNameForId(s.id,o)||r.insertRules(s.id,o,i(s.rules,o,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,Ba(this,function(){throw ls(12,String(s.name))})}return n.prototype.getName=function(e){return e===void 0&&(e=ea),this.name+e.hash},n}(),Kp=function(n){return n>="A"&&n<="Z"};function Rl(n){for(var e="",t=0;t<n.length;t++){var s=n[t];if(t===1&&s==="-"&&n[0]==="-")return n;Kp(s)?e+="-"+s.toLowerCase():e+=s}return e.startsWith("ms-")?"-"+e:e}var Bc=function(n){return n==null||n===!1||n===""},Pc=function(n){var e,t,s=[];for(var r in n){var i=n[r];n.hasOwnProperty(r)&&!Bc(i)&&(Array.isArray(i)&&i.isCss||ns(i)?s.push("".concat(Rl(r),":"),i,";"):ss(i)?s.push.apply(s,Jn(Jn(["".concat(r," {")],Pc(i),!1),["}"],!1)):s.push("".concat(Rl(r),": ").concat((e=r,(t=i)==null||typeof t=="boolean"||t===""?"":typeof t!="number"||t===0||e in dp||e.startsWith("--")?String(t).trim():"".concat(t,"px")),";")))}return s};function mn(n,e,t,s){if(Bc(n))return[];if(Fa(n))return[".".concat(n.styledComponentId)];if(ns(n)){if(!ns(i=n)||i.prototype&&i.prototype.isReactComponent||!e)return[n];var r=n(e);return process.env.NODE_ENV==="production"||typeof r!="object"||Array.isArray(r)||r instanceof Tl||ss(r)||r===null||console.error("".concat(Tc(n)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),mn(r,e,t,s)}var i;return n instanceof Tl?t?(n.inject(t,s),[n.getName(s)]):[n]:ss(n)?Pc(n):Array.isArray(n)?Array.prototype.concat.apply(ci,n.map(function(o){return mn(o,e,t,s)})):[n.toString()]}function Wp(n){for(var e=0;e<n.length;e+=1){var t=n[e];if(ns(t)&&!Fa(t))return!1}return!0}var Gp=Oc(ui),Zp=function(){function n(e,t,s){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(s===void 0||s.isStatic)&&Wp(e),this.componentId=t,this.baseHash=cn(Gp,t),this.baseStyle=s,Mc.registerId(t)}return n.prototype.generateAndInjectStyles=function(e,t,s){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,s):"";if(this.isStatic&&!s.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=dn(r,this.staticRulesId);else{var i=Sl(mn(this.rules,e,t,s)),o=Jo(cn(this.baseHash,i)>>>0);if(!t.hasNameForId(this.componentId,o)){var a=s(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}r=dn(r,o),this.staticRulesId=o}else{for(var l=cn(this.baseHash,s.hash),c="",f=0;f<this.rules.length;f++){var v=this.rules[f];if(typeof v=="string")c+=v,process.env.NODE_ENV!=="production"&&(l=cn(l,v));else if(v){var d=Sl(mn(v,e,t,s));l=cn(l,d+f),c+=d}}if(c){var h=Jo(l>>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,s(c,".".concat(h),void 0,this.componentId)),r=dn(r,h)}}return r},n}(),Vc=se.createContext(void 0);Vc.Consumer;var Eo={},Il=new Set;function Yp(n,e,t){var s=Fa(n),r=n,i=!wo(n),o=e.attrs,a=o===void 0?ci:o,l=e.componentId,c=l===void 0?function(C,A){var z=typeof C!="string"?"sc":kl(C);Eo[z]=(Eo[z]||0)+1;var W="".concat(z,"-").concat(bp(ui+z+Eo[z]));return A?"".concat(A,"-").concat(W):W}(e.displayName,e.parentComponentId):l,f=e.displayName,v=f===void 0?function(C){return wo(C)?"styled.".concat(C):"Styled(".concat(Tc(C),")")}(n):f,d=e.displayName&&e.componentId?"".concat(kl(e.displayName),"-").concat(e.componentId):e.componentId||c,h=s&&r.attrs?r.attrs.concat(a).filter(Boolean):a,m=e.shouldForwardProp;if(s&&r.shouldForwardProp){var g=r.shouldForwardProp;if(e.shouldForwardProp){var b=e.shouldForwardProp;m=function(C,A){return g(C,A)&&b(C,A)}}else m=g}var E=new Zp(t,d,s?r.componentStyle:void 0);function w(C,A){return function(z,W,ae){var fe=z.attrs,me=z.componentStyle,y=z.defaultProps,j=z.foldedComponentIds,_=z.styledComponentId,U=z.target,P=se.useContext(Vc),O=Ol(),D=z.shouldForwardProp||O.shouldForwardProp;process.env.NODE_ENV!=="production"&&se.useDebugValue(_);var Z=mp(W,P,y)||ts,Y=function($,X,M){for(var B,K=Ke(Ke({},X),{className:void 0,theme:M}),V=0;V<$.length;V+=1){var J=ns(B=$[V])?B(K):B;for(var I in J)K[I]=I==="className"?dn(K[I],J[I]):I==="style"?Ke(Ke({},K[I]),J[I]):J[I]}return X.className&&(K.className=dn(K.className,X.className)),K}(fe,W,Z),N=Y.as||U,L={};for(var F in Y)Y[F]===void 0||F[0]==="$"||F==="as"||F==="theme"&&Y.theme===Z||(F==="forwardedAs"?L.as=Y.forwardedAs:D&&!D(F,N)||(L[F]=Y[F],D||process.env.NODE_ENV!=="development"||Wf(F)||Il.has(F)||!Xo.has(N)||(Il.add(F),console.warn('styled-components: it looks like an unknown prop "'.concat(F,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var G=function($,X){var M=Ol(),B=$.generateAndInjectStyles(X,M.styleSheet,M.stylis);return process.env.NODE_ENV!=="production"&&se.useDebugValue(B),B}(me,Y);process.env.NODE_ENV!=="production"&&z.warnTooManyClasses&&z.warnTooManyClasses(G);var H=dn(j,_);return G&&(H+=" "+G),Y.className&&(H+=" "+Y.className),L[wo(N)&&!Xo.has(N)?"class":"className"]=H,ae&&(L.ref=ae),se.createElement(N,L)}(S,C,A)}w.displayName=v;var S=se.forwardRef(w);return S.attrs=h,S.componentStyle=E,S.displayName=v,S.shouldForwardProp=m,S.foldedComponentIds=s?dn(r.foldedComponentIds,r.styledComponentId):"",S.styledComponentId=d,S.target=s?r.target:n,Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(C){this._foldedDefaultProps=s?function(A){for(var z=[],W=1;W<arguments.length;W++)z[W-1]=arguments[W];for(var ae=0,fe=z;ae<fe.length;ae++)Qo(A,fe[ae],!0);return A}({},r.defaultProps,C):C}}),process.env.NODE_ENV!=="production"&&(pp(v,d),S.warnTooManyClasses=function(C,A){var z={},W=!1;return function(ae){if(!W&&(z[ae]=!0,Object.keys(z).length>=200)){var fe=A?' with the id of "'.concat(A,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(C).concat(fe,`.
58
- `)+`Consider using the attrs method, together with a style object for frequently changed styles.
59
- Example:
60
- const Component = styled.div.attrs(props => ({
61
- style: {
62
- background: props.background,
63
- },
64
- }))\`width: 100%;\`
65
-
66
- <Component />`),W=!0,z={}}}}(v,d)),Ba(S,function(){return".".concat(S.styledComponentId)}),i&&qc(S,n,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),S}function Ll(n,e){for(var t=[n[0]],s=0,r=e.length;s<r;s+=1)t.push(e[s],n[s+1]);return t}var ql=function(n){return Object.assign(n,{isCss:!0})};function Xp(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(ns(n)||ss(n))return ql(mn(Ll(ci,Jn([n],e,!0))));var s=n;return e.length===0&&s.length===1&&typeof s[0]=="string"?mn(s):ql(mn(Ll(s,e)))}function ta(n,e,t){if(t===void 0&&(t=ts),!e)throw ls(1,e);var s=function(r){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];return n(e,t,Xp.apply(void 0,Jn([r],i,!1)))};return s.attrs=function(r){return ta(n,e,Ke(Ke({},t),{attrs:Array.prototype.concat(t.attrs,r).filter(Boolean)}))},s.withConfig=function(r){return ta(n,e,Ke(Ke({},t),r))},s}var Uc=function(n){return ta(Yp,n)},Pa=Uc;Xo.forEach(function(n){Pa[n]=Uc(n)});process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
67
- Perhaps you're looking to import 'styled-components/native'?
68
- Read more about this at https://www.styled-components.com/docs/basics#react-native`);var br="__sc-".concat(gn,"__");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window[br]||(window[br]=0),window[br]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
69
-
70
- See https://s-c.sh/2BAXzed for more info.`),window[br]+=1);const Jp=Pa.div`
71
- .filepond {
72
- &--drop-label {
73
- label {
74
- color: ${({$invalid:n})=>n?"var(--color-item-primary-destructive)":"inherit"} !important;
75
- }
76
- }
77
-
78
- &--root {
79
- margin-bottom: 0.5rem;
80
- border-radius: 0.75rem;
81
- }
82
-
83
- &--panel {
84
- border-radius: 0.8rem;
85
- overflow: hidden;
86
-
87
- &-root {
88
- background-color: transparent;
89
- }
90
- }
91
-
92
- &--drip {
93
- border: 1px solid
94
- ${({$invalid:n})=>n?"var(--color-item-primary-destructive)":"var(--color-border-alpha-strong)"};
95
- background-color: transparent;
96
- opacity: 1;
97
- outline-offset: 2px;
98
- border-radius: 0.75rem;
99
- }
100
- }
101
-
102
- &:focus-within {
103
- .filepond {
104
- &--drip {
105
- outline: 2px solid
106
- ${({$invalid:n})=>n?"var(--color-item-primary-destructive)":"var(--color-item-primary-primary)"};
107
- }
108
- }
109
- }
110
- `;function $c({variant:n="default",...e}){return x.ae.jsx(Jp,{$invalid:n==="failure",...e})}$c.displayName="FilepondContainer";var Qp="Label",zc=T.forwardRef((n,e)=>x.ae.jsx(x.h.label,{...n,ref:e,onMouseDown:t=>{var s;t.target.closest("button, input, select, textarea")||((s=n.onMouseDown)==null||s.call(n,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));zc.displayName=Qp;var Hc=zc,em=n=>n.type==="checkbox",tm=n=>n instanceof Date,Kc=n=>n==null;const nm=n=>typeof n=="object";var zs=n=>!Kc(n)&&!Array.isArray(n)&&nm(n)&&!tm(n),sm=n=>zs(n)&&n.target?em(n.target)?n.target.checked:n.target.value:n,rm=n=>n.substring(0,n.search(/\.\d+(\.|$)/))||n,im=(n,e)=>n.has(rm(e)),om=n=>{const e=n.constructor&&n.constructor.prototype;return zs(e)&&e.hasOwnProperty("isPrototypeOf")},am=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Wc(n){let e;const t=Array.isArray(n),s=typeof FileList<"u"?n instanceof FileList:!1;if(n instanceof Date)e=new Date(n);else if(!(am&&(n instanceof Blob||s))&&(t||zs(n)))if(e=t?[]:{},!t&&!om(n))e=n;else for(const r in n)n.hasOwnProperty(r)&&(e[r]=Wc(n[r]));else return n;return e}var Gc=n=>/^\w*$/.test(n),na=n=>n===void 0,lm=n=>Array.isArray(n)?n.filter(Boolean):[],Zc=n=>lm(n.replace(/["|']|\]/g,"").split(/\.|\[/)),He=(n,e,t)=>{if(!e||!zs(n))return t;const s=(Gc(e)?[e]:Zc(e)).reduce((r,i)=>Kc(r)?r:r[i],n);return na(s)||s===n?na(n[e])?t:n[e]:s},_o=n=>typeof n=="boolean",jl=(n,e,t)=>{let s=-1;const r=Gc(e)?[e]:Zc(e),i=r.length,o=i-1;for(;++s<i;){const a=r[s];let l=t;if(s!==o){const c=n[a];l=zs(c)||Array.isArray(c)?c:isNaN(+r[s+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;n[a]=l,n=n[a]}};const Ml={BLUR:"blur",CHANGE:"change"},Dl={all:"all"},Va=se.createContext(null);Va.displayName="HookFormContext";const hi=()=>se.useContext(Va),um=n=>{const{children:e,...t}=n;return se.createElement(Va.Provider,{value:t},e)};var cm=(n,e,t,s=!0)=>{const r={defaultValues:e._defaultValues};for(const i in n)Object.defineProperty(r,i,{get:()=>{const o=i;return e._proxyFormState[o]!==Dl.all&&(e._proxyFormState[o]=!s||Dl.all),t&&(t[o]=!0),n[o]}});return r};const Yc=typeof window<"u"?T.useLayoutEffect:T.useEffect;function hm(n){const e=hi(),{control:t=e.control,disabled:s,name:r,exact:i}=n||{},[o,a]=se.useState(t._formState),l=se.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Yc(()=>t._subscribe({name:r,formState:l.current,exact:i,callback:c=>{!s&&a({...t._formState,...c})}}),[r,s,i]),se.useEffect(()=>{l.current.isValid&&t._setValid(!0)},[t]),se.useMemo(()=>cm(o,t,l.current,!1),[o,t])}var dm=n=>typeof n=="string",fm=(n,e,t,s,r)=>dm(n)?He(t,n,r):Array.isArray(n)?n.map(i=>He(t,i)):t;function pm(n){const e=hi(),{control:t=e.control,name:s,defaultValue:r,disabled:i,exact:o}=n||{},a=se.useRef(r),[l,c]=se.useState(t._getWatch(s,a.current));return Yc(()=>t._subscribe({name:s,formState:{values:!0},exact:o,callback:f=>!i&&c(fm(s,t._names,f.values||t._formValues,!1,a.current))}),[s,t,i,o]),se.useEffect(()=>t._removeUnmounted()),l}function mm(n){const e=hi(),{name:t,disabled:s,control:r=e.control,shouldUnregister:i}=n,o=im(r._names.array,t),a=pm({control:r,name:t,defaultValue:He(r._formValues,t,He(r._defaultValues,t,n.defaultValue)),exact:!0}),l=hm({control:r,name:t,exact:!0}),c=se.useRef(n),f=se.useRef(r.register(t,{...n.rules,value:a,..._o(n.disabled)?{disabled:n.disabled}:{}})),v=se.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!He(l.errors,t)},isDirty:{enumerable:!0,get:()=>!!He(l.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!He(l.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!He(l.validatingFields,t)},error:{enumerable:!0,get:()=>He(l.errors,t)}}),[l,t]),d=se.useCallback(b=>f.current.onChange({target:{value:sm(b),name:t},type:Ml.CHANGE}),[t]),h=se.useCallback(()=>f.current.onBlur({target:{value:He(r._formValues,t),name:t},type:Ml.BLUR}),[t,r._formValues]),m=se.useCallback(b=>{const E=He(r._fields,t);E&&b&&(E._f.ref={focus:()=>b.focus&&b.focus(),select:()=>b.select&&b.select(),setCustomValidity:w=>b.setCustomValidity(w),reportValidity:()=>b.reportValidity()})},[r._fields,t]),g=se.useMemo(()=>({name:t,value:a,..._o(s)||l.disabled?{disabled:l.disabled||s}:{},onChange:d,onBlur:h,ref:m}),[t,s,l.disabled,d,h,m,a]);return se.useEffect(()=>{const b=r._options.shouldUnregister||i;r.register(t,{...c.current.rules,..._o(c.current.disabled)?{disabled:c.current.disabled}:{}});const E=(w,S)=>{const C=He(r._fields,w);C&&C._f&&(C._f.mount=S)};if(E(t,!0),b){const w=Wc(He(r._options.defaultValues,t));jl(r._defaultValues,t,w),na(He(r._formValues,t))&&jl(r._formValues,t,w)}return!o&&r.register(t),()=>{(o?b&&!r._state.action:b)?r.unregister(t):E(t,!1)}},[t,r,o,i]),se.useEffect(()=>{r._setDisabledField({disabled:s,name:t})},[s,t,r]),se.useMemo(()=>({field:g,formState:l,fieldState:v}),[g,l,v])}const gm=n=>n.render(mm(n)),vm=ti.j("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ua=T.forwardRef(({className:n,...e},t)=>x.ae.jsx(Hc,{ref:t,className:Se.mo(vm(),n),...e}));Ua.displayName=Hc.displayName;const ym=um,Xc=T.createContext({}),bm=({...n})=>x.ae.jsx(Xc.Provider,{value:{name:n.name},children:x.ae.jsx(gm,{...n})}),Hs=()=>{const n=T.useContext(Xc),e=T.useContext(Jc),{getFieldState:t,formState:s}=hi(),r=t(n.name,s);if(!n)throw new Error("useFormField should be used within <FormField>");const{id:i}=e;return{id:i,name:n.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...r}},Jc=T.createContext({}),Qc=T.forwardRef(({className:n,...e},t)=>{const s=T.useId();return x.ae.jsx(Jc.Provider,{value:{id:s},children:x.ae.jsx("div",{ref:t,className:Se.mo("relative space-y-2",n),...e})})});Qc.displayName="FormItem";const eh=T.forwardRef(({className:n,...e},t)=>{const{error:s,formItemId:r}=Hs();return x.ae.jsx(Ua,{ref:t,className:Se.mo("!text-body-xs-medium",n,s&&"text-destructive"),htmlFor:r,...e})});eh.displayName="FormLabel";const th=T.forwardRef(({...n},e)=>{const{error:t,formItemId:s,formDescriptionId:r,formMessageId:i}=Hs();return x.ae.jsx(x.j$1,{ref:e,id:s,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...n})});th.displayName="FormControl";const nh=T.forwardRef(({className:n,...e},t)=>{const{formDescriptionId:s}=Hs();return x.ae.jsx("p",{ref:t,id:s,className:Se.mo("text-muted-foreground text-sm",n),...e})});nh.displayName="FormDescription";const sh=T.forwardRef(({className:n,children:e,...t},s)=>{const{error:r,formMessageId:i}=Hs(),o=r?String(r==null?void 0:r.message):e;return o?x.ae.jsx("p",{ref:s,id:i,className:Se.mo("!text-body-xs-medium text-destructive",n),...t,children:o}):null});sh.displayName="FormMessage";var di="Switch",[xm,Fk]=x.j(di),[km,wm]=xm(di),rh=T.forwardRef((n,e)=>{const{__scopeSwitch:t,name:s,checked:r,defaultChecked:i,required:o,disabled:a,value:l="on",onCheckedChange:c,form:f,...v}=n,[d,h]=T.useState(null),m=x.x(e,S=>h(S)),g=T.useRef(!1),b=d?f||!!d.closest("form"):!0,[E,w]=x.y({prop:r,defaultProp:i??!1,onChange:c,caller:di});return x.ae.jsxs(km,{scope:t,checked:E,disabled:a,children:[x.ae.jsx(x.h.button,{type:"button",role:"switch","aria-checked":E,"aria-required":o,"data-state":lh(E),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:m,onClick:x.y$1(n.onClick,S=>{w(C=>!C),b&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})}),b&&x.ae.jsx(ah,{control:d,bubbles:!g.current,name:s,value:l,checked:E,required:o,disabled:a,form:f,style:{transform:"translateX(-100%)"}})]})});rh.displayName=di;var ih="SwitchThumb",oh=T.forwardRef((n,e)=>{const{__scopeSwitch:t,...s}=n,r=wm(ih,t);return x.ae.jsx(x.h.span,{"data-state":lh(r.checked),"data-disabled":r.disabled?"":void 0,...s,ref:e})});oh.displayName=ih;var Em="SwitchBubbleInput",ah=T.forwardRef(({__scopeSwitch:n,control:e,checked:t,bubbles:s=!0,...r},i)=>{const o=T.useRef(null),a=x.x(o,i),l=ni(t),c=Mt.In(e);return T.useEffect(()=>{const f=o.current;if(!f)return;const v=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(v,"checked").set;if(l!==t&&d){const h=new Event("click",{bubbles:s});d.call(f,t),f.dispatchEvent(h)}},[l,t,s]),x.ae.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...r,tabIndex:-1,ref:a,style:{...r.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ah.displayName=Em;function lh(n){return n?"checked":"unchecked"}var uh=rh,_m=oh;const ch=T.forwardRef(({className:n,...e},t)=>x.ae.jsx(uh,{className:Se.mo("peer focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-item-primary data-[state=unchecked]:bg-input inline-flex h-4 w-7 shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-40",n),...e,ref:t,children:x.ae.jsx(_m,{className:Se.mo("bg-background pointer-events-none block size-3.5 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-3 data-[state=unchecked]:translate-x-0")})}));ch.displayName=uh.displayName;const hh=T.forwardRef(({className:n,variant:e,...t},s)=>x.ae.jsx("textarea",{className:Se.mo("min-h-20 px-3 py-2",ri({variant:e}),n),ref:s,...t}));hh.displayName="Textarea";var Nm=[" ","Enter","ArrowUp","ArrowDown"],Sm=[" ","Enter"],vn="Select",[fi,pi,Am]=Rt.h(vn),[us,Bk]=x.j(vn,[Am,Mt.oo]),mi=Mt.oo(),[Cm,Yt]=us(vn),[Om,Tm]=us(vn),dh=n=>{const{__scopeSelect:e,children:t,open:s,defaultOpen:r,onOpenChange:i,value:o,defaultValue:a,onValueChange:l,dir:c,name:f,autoComplete:v,disabled:d,required:h,form:m}=n,g=mi(e),[b,E]=T.useState(null),[w,S]=T.useState(null),[C,A]=T.useState(!1),z=Rt.n(c),[W,ae]=x.y({prop:s,defaultProp:r??!1,onChange:i,caller:vn}),[fe,me]=x.y({prop:o,defaultProp:a,onChange:l,caller:vn}),y=T.useRef(null),j=b?m||!!b.closest("form"):!0,[_,U]=T.useState(new Set),P=Array.from(_).map(O=>O.props.value).join(";");return x.ae.jsx(Mt.io,{...g,children:x.ae.jsxs(Cm,{required:h,scope:e,trigger:b,onTriggerChange:E,valueNode:w,onValueNodeChange:S,valueNodeHasChildren:C,onValueNodeHasChildrenChange:A,contentId:x.g(),value:fe,onValueChange:me,open:W,onOpenChange:ae,dir:z,triggerPointerDownPosRef:y,disabled:d,children:[x.ae.jsx(fi.Provider,{scope:e,children:x.ae.jsx(Om,{scope:n.__scopeSelect,onNativeOptionAdd:T.useCallback(O=>{U(D=>new Set(D).add(O))},[]),onNativeOptionRemove:T.useCallback(O=>{U(D=>{const Z=new Set(D);return Z.delete(O),Z})},[]),children:t})}),j?x.ae.jsxs(Dh,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:v,value:fe,onChange:O=>me(O.target.value),disabled:d,form:m,children:[fe===void 0?x.ae.jsx("option",{value:""}):null,Array.from(_)]},P):null]})})};dh.displayName=vn;var fh="SelectTrigger",ph=T.forwardRef((n,e)=>{const{__scopeSelect:t,disabled:s=!1,...r}=n,i=mi(t),o=Yt(fh,t),a=o.disabled||s,l=x.x(e,o.onTriggerChange),c=pi(t),f=T.useRef("touch"),[v,d,h]=Bh(g=>{const b=c().filter(S=>!S.disabled),E=b.find(S=>S.value===o.value),w=Ph(b,g,E);w!==void 0&&o.onValueChange(w.value)}),m=g=>{a||(o.onOpenChange(!0),h()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return x.ae.jsx(Mt.ro,{asChild:!0,...i,children:x.ae.jsx(x.h.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Fh(o.value)?"":void 0,...r,ref:l,onClick:x.y$1(r.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&m(g)}),onPointerDown:x.y$1(r.onPointerDown,g=>{f.current=g.pointerType;const b=g.target;b.hasPointerCapture(g.pointerId)&&b.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(m(g),g.preventDefault())}),onKeyDown:x.y$1(r.onKeyDown,g=>{const b=v.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&d(g.key),!(b&&g.key===" ")&&Nm.includes(g.key)&&(m(),g.preventDefault())})})})});ph.displayName=fh;var mh="SelectValue",gh=T.forwardRef((n,e)=>{const{__scopeSelect:t,className:s,style:r,children:i,placeholder:o="",...a}=n,l=Yt(mh,t),{onValueNodeHasChildrenChange:c}=l,f=i!==void 0,v=x.x(e,l.onValueNodeChange);return x.w$1(()=>{c(f)},[c,f]),x.ae.jsx(x.h.span,{...a,ref:v,style:{pointerEvents:"none"},children:Fh(l.value)?x.ae.jsx(x.ae.Fragment,{children:o}):i})});gh.displayName=mh;var Rm="SelectIcon",vh=T.forwardRef((n,e)=>{const{__scopeSelect:t,children:s,...r}=n;return x.ae.jsx(x.h.span,{"aria-hidden":!0,...r,ref:e,children:s||"▼"})});vh.displayName=Rm;var Im="SelectPortal",yh=n=>x.ae.jsx(hn.Me,{asChild:!0,...n});yh.displayName=Im;var yn="SelectContent",bh=T.forwardRef((n,e)=>{const t=Yt(yn,n.__scopeSelect),[s,r]=T.useState();if(x.w$1(()=>{r(new DocumentFragment)},[]),!t.open){const i=s;return i?lc.createPortal(x.ae.jsx(xh,{scope:n.__scopeSelect,children:x.ae.jsx(fi.Slot,{scope:n.__scopeSelect,children:x.ae.jsx("div",{children:n.children})})}),i):null}return x.ae.jsx(kh,{...n,ref:e})});bh.displayName=yn;var rt=10,[xh,Xt]=us(yn),Lm="SelectContentImpl",qm=x.g$1("SelectContent.RemoveScroll"),kh=T.forwardRef((n,e)=>{const{__scopeSelect:t,position:s="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:o,side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:v,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:b,...E}=n,w=Yt(yn,t),[S,C]=T.useState(null),[A,z]=T.useState(null),W=x.x(e,M=>C(M)),[ae,fe]=T.useState(null),[me,y]=T.useState(null),j=pi(t),[_,U]=T.useState(!1),P=T.useRef(!1);T.useEffect(()=>{if(S)return hn.Rt(S)},[S]),hn.Ct();const O=T.useCallback(M=>{const[B,...K]=j().map(I=>I.ref.current),[V]=K.slice(-1),J=document.activeElement;for(const I of M)if(I===J||(I==null||I.scrollIntoView({block:"nearest"}),I===B&&A&&(A.scrollTop=0),I===V&&A&&(A.scrollTop=A.scrollHeight),I==null||I.focus(),document.activeElement!==J))return},[j,A]),D=T.useCallback(()=>O([ae,S]),[O,ae,S]);T.useEffect(()=>{_&&D()},[_,D]);const{onOpenChange:Z,triggerPointerDownPosRef:Y}=w;T.useEffect(()=>{if(S){let M={x:0,y:0};const B=V=>{var J,I;M={x:Math.abs(Math.round(V.pageX)-(((J=Y.current)==null?void 0:J.x)??0)),y:Math.abs(Math.round(V.pageY)-(((I=Y.current)==null?void 0:I.y)??0))}},K=V=>{M.x<=10&&M.y<=10?V.preventDefault():S.contains(V.target)||Z(!1),document.removeEventListener("pointermove",B),Y.current=null};return Y.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",K,{capture:!0})}}},[S,Z,Y]),T.useEffect(()=>{const M=()=>Z(!1);return window.addEventListener("blur",M),window.addEventListener("resize",M),()=>{window.removeEventListener("blur",M),window.removeEventListener("resize",M)}},[Z]);const[N,L]=Bh(M=>{const B=j().filter(J=>!J.disabled),K=B.find(J=>J.ref.current===document.activeElement),V=Ph(B,M,K);V&&setTimeout(()=>V.ref.current.focus())}),F=T.useCallback((M,B,K)=>{const V=!P.current&&!K;(w.value!==void 0&&w.value===B||V)&&(fe(M),V&&(P.current=!0))},[w.value]),G=T.useCallback(()=>S==null?void 0:S.focus(),[S]),H=T.useCallback((M,B,K)=>{const V=!P.current&&!K;(w.value!==void 0&&w.value===B||V)&&y(M)},[w.value]),$=s==="popper"?sa:wh,X=$===sa?{side:a,sideOffset:l,align:c,alignOffset:f,arrowPadding:v,collisionBoundary:d,collisionPadding:h,sticky:m,hideWhenDetached:g,avoidCollisions:b}:{};return x.ae.jsx(xh,{scope:t,content:S,viewport:A,onViewportChange:z,itemRefCallback:F,selectedItem:ae,onItemLeave:G,itemTextRefCallback:H,focusSelectedItem:D,selectedItemText:me,position:s,isPositioned:_,searchRef:N,children:x.ae.jsx(hn.dt,{as:qm,allowPinchZoom:!0,children:x.ae.jsx(hn.Se,{asChild:!0,trapped:w.open,onMountAutoFocus:M=>{M.preventDefault()},onUnmountAutoFocus:x.y$1(r,M=>{var B;(B=w.trigger)==null||B.focus({preventScroll:!0}),M.preventDefault()}),children:x.ae.jsx(x.M,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:M=>M.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:x.ae.jsx($,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:M=>M.preventDefault(),...E,...X,onPlaced:()=>U(!0),ref:W,style:{display:"flex",flexDirection:"column",outline:"none",...E.style},onKeyDown:x.y$1(E.onKeyDown,M=>{const B=M.ctrlKey||M.altKey||M.metaKey;if(M.key==="Tab"&&M.preventDefault(),!B&&M.key.length===1&&L(M.key),["ArrowUp","ArrowDown","Home","End"].includes(M.key)){let K=j().filter(V=>!V.disabled).map(V=>V.ref.current);if(["ArrowUp","End"].includes(M.key)&&(K=K.slice().reverse()),["ArrowUp","ArrowDown"].includes(M.key)){const V=M.target,J=K.indexOf(V);K=K.slice(J+1)}setTimeout(()=>O(K)),M.preventDefault()}})})})})})})});kh.displayName=Lm;var jm="SelectItemAlignedPosition",wh=T.forwardRef((n,e)=>{const{__scopeSelect:t,onPlaced:s,...r}=n,i=Yt(yn,t),o=Xt(yn,t),[a,l]=T.useState(null),[c,f]=T.useState(null),v=x.x(e,W=>f(W)),d=pi(t),h=T.useRef(!1),m=T.useRef(!0),{viewport:g,selectedItem:b,selectedItemText:E,focusSelectedItem:w}=o,S=T.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&g&&b&&E){const W=i.trigger.getBoundingClientRect(),ae=c.getBoundingClientRect(),fe=i.valueNode.getBoundingClientRect(),me=E.getBoundingClientRect();if(i.dir!=="rtl"){const V=me.left-ae.left,J=fe.left-V,I=W.left-J,ue=W.width+I,xe=Math.max(ue,ae.width),Ne=window.innerWidth-rt,wt=gl(J,[rt,Math.max(rt,Ne-xe)]);a.style.minWidth=ue+"px",a.style.left=wt+"px"}else{const V=ae.right-me.right,J=window.innerWidth-fe.right-V,I=window.innerWidth-W.right-J,ue=W.width+I,xe=Math.max(ue,ae.width),Ne=window.innerWidth-rt,wt=gl(J,[rt,Math.max(rt,Ne-xe)]);a.style.minWidth=ue+"px",a.style.right=wt+"px"}const y=d(),j=window.innerHeight-rt*2,_=g.scrollHeight,U=window.getComputedStyle(c),P=parseInt(U.borderTopWidth,10),O=parseInt(U.paddingTop,10),D=parseInt(U.borderBottomWidth,10),Z=parseInt(U.paddingBottom,10),Y=P+O+_+Z+D,N=Math.min(b.offsetHeight*5,Y),L=window.getComputedStyle(g),F=parseInt(L.paddingTop,10),G=parseInt(L.paddingBottom,10),H=W.top+W.height/2-rt,$=j-H,X=b.offsetHeight/2,M=b.offsetTop+X,B=P+O+M,K=Y-B;if(B<=H){const V=y.length>0&&b===y[y.length-1].ref.current;a.style.bottom="0px";const J=c.clientHeight-g.offsetTop-g.offsetHeight,I=Math.max($,X+(V?G:0)+J+D),ue=B+I;a.style.height=ue+"px"}else{const V=y.length>0&&b===y[0].ref.current;a.style.top="0px";const J=Math.max(H,P+g.offsetTop+(V?F:0)+X)+K;a.style.height=J+"px",g.scrollTop=B-H+g.offsetTop}a.style.margin=`${rt}px 0`,a.style.minHeight=N+"px",a.style.maxHeight=j+"px",s==null||s(),requestAnimationFrame(()=>h.current=!0)}},[d,i.trigger,i.valueNode,a,c,g,b,E,i.dir,s]);x.w$1(()=>S(),[S]);const[C,A]=T.useState();x.w$1(()=>{c&&A(window.getComputedStyle(c).zIndex)},[c]);const z=T.useCallback(W=>{W&&m.current===!0&&(S(),w==null||w(),m.current=!1)},[S,w]);return x.ae.jsx(Dm,{scope:t,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:z,children:x.ae.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:x.ae.jsx(x.h.div,{...r,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});wh.displayName=jm;var Mm="SelectPopperPosition",sa=T.forwardRef((n,e)=>{const{__scopeSelect:t,align:s="start",collisionPadding:r=rt,...i}=n,o=mi(t);return x.ae.jsx(Mt.so,{...o,...i,ref:e,align:s,collisionPadding:r,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});sa.displayName=Mm;var[Dm,$a]=us(yn,{}),ra="SelectViewport",Eh=T.forwardRef((n,e)=>{const{__scopeSelect:t,nonce:s,...r}=n,i=Xt(ra,t),o=$a(ra,t),a=x.x(e,i.onViewportChange),l=T.useRef(0);return x.ae.jsxs(x.ae.Fragment,{children:[x.ae.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),x.ae.jsx(fi.Slot,{scope:t,children:x.ae.jsx(x.h.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:x.y$1(r.onScroll,c=>{const f=c.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:d}=o;if(d!=null&&d.current&&v){const h=Math.abs(l.current-f.scrollTop);if(h>0){const m=window.innerHeight-rt*2,g=parseFloat(v.style.minHeight),b=parseFloat(v.style.height),E=Math.max(g,b);if(E<m){const w=E+h,S=Math.min(m,w),C=w-S;v.style.height=S+"px",v.style.bottom==="0px"&&(f.scrollTop=C>0?C:0,v.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Eh.displayName=ra;var _h="SelectGroup",[Fm,Bm]=us(_h),Nh=T.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n,r=x.g();return x.ae.jsx(Fm,{scope:t,id:r,children:x.ae.jsx(x.h.div,{role:"group","aria-labelledby":r,...s,ref:e})})});Nh.displayName=_h;var Sh="SelectLabel",Ah=T.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n,r=Bm(Sh,t);return x.ae.jsx(x.h.div,{id:r.id,...s,ref:e})});Ah.displayName=Sh;var Gr="SelectItem",[Pm,Ch]=us(Gr),Oh=T.forwardRef((n,e)=>{const{__scopeSelect:t,value:s,disabled:r=!1,textValue:i,...o}=n,a=Yt(Gr,t),l=Xt(Gr,t),c=a.value===s,[f,v]=T.useState(i??""),[d,h]=T.useState(!1),m=x.x(e,w=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,w,s,r)}),g=x.g(),b=T.useRef("touch"),E=()=>{r||(a.onValueChange(s),a.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.ae.jsx(Pm,{scope:t,value:s,disabled:r,textId:g,isSelected:c,onItemTextChange:T.useCallback(w=>{v(S=>S||((w==null?void 0:w.textContent)??"").trim())},[]),children:x.ae.jsx(fi.ItemSlot,{scope:t,value:s,disabled:r,textValue:f,children:x.ae.jsx(x.h.div,{role:"option","aria-labelledby":g,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...o,ref:m,onFocus:x.y$1(o.onFocus,()=>h(!0)),onBlur:x.y$1(o.onBlur,()=>h(!1)),onClick:x.y$1(o.onClick,()=>{b.current!=="mouse"&&E()}),onPointerUp:x.y$1(o.onPointerUp,()=>{b.current==="mouse"&&E()}),onPointerDown:x.y$1(o.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:x.y$1(o.onPointerMove,w=>{var S;b.current=w.pointerType,r?(S=l.onItemLeave)==null||S.call(l):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:x.y$1(o.onPointerLeave,w=>{var S;w.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:x.y$1(o.onKeyDown,w=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(Sm.includes(w.key)&&E(),w.key===" "&&w.preventDefault())})})})})});Oh.displayName=Gr;var Os="SelectItemText",Th=T.forwardRef((n,e)=>{const{__scopeSelect:t,className:s,style:r,...i}=n,o=Yt(Os,t),a=Xt(Os,t),l=Ch(Os,t),c=Tm(Os,t),[f,v]=T.useState(null),d=x.x(e,E=>v(E),l.onItemTextChange,E=>{var w;return(w=a.itemTextRefCallback)==null?void 0:w.call(a,E,l.value,l.disabled)}),h=f==null?void 0:f.textContent,m=T.useMemo(()=>x.ae.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:b}=c;return x.w$1(()=>(g(m),()=>b(m)),[g,b,m]),x.ae.jsxs(x.ae.Fragment,{children:[x.ae.jsx(x.h.span,{id:l.textId,...i,ref:d}),l.isSelected&&o.valueNode&&!o.valueNodeHasChildren?lc.createPortal(i.children,o.valueNode):null]})});Th.displayName=Os;var Rh="SelectItemIndicator",Ih=T.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n;return Ch(Rh,t).isSelected?x.ae.jsx(x.h.span,{"aria-hidden":!0,...s,ref:e}):null});Ih.displayName=Rh;var ia="SelectScrollUpButton",Lh=T.forwardRef((n,e)=>{const t=Xt(ia,n.__scopeSelect),s=$a(ia,n.__scopeSelect),[r,i]=T.useState(!1),o=x.x(e,s.onScrollButtonChange);return x.w$1(()=>{if(t.viewport&&t.isPositioned){let a=function(){const c=l.scrollTop>0;i(c)};const l=t.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),r?x.ae.jsx(jh,{...n,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=t;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});Lh.displayName=ia;var oa="SelectScrollDownButton",qh=T.forwardRef((n,e)=>{const t=Xt(oa,n.__scopeSelect),s=$a(oa,n.__scopeSelect),[r,i]=T.useState(!1),o=x.x(e,s.onScrollButtonChange);return x.w$1(()=>{if(t.viewport&&t.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<c;i(f)};const l=t.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[t.viewport,t.isPositioned]),r?x.ae.jsx(jh,{...n,ref:o,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=t;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});qh.displayName=oa;var jh=T.forwardRef((n,e)=>{const{__scopeSelect:t,onAutoScroll:s,...r}=n,i=Xt("SelectScrollButton",t),o=T.useRef(null),a=pi(t),l=T.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return T.useEffect(()=>()=>l(),[l]),x.w$1(()=>{var c;const f=a().find(v=>v.ref.current===document.activeElement);(c=f==null?void 0:f.ref.current)==null||c.scrollIntoView({block:"nearest"})},[a]),x.ae.jsx(x.h.div,{"aria-hidden":!0,...r,ref:e,style:{flexShrink:0,...r.style},onPointerDown:x.y$1(r.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(s,50))}),onPointerMove:x.y$1(r.onPointerMove,()=>{var c;(c=i.onItemLeave)==null||c.call(i),o.current===null&&(o.current=window.setInterval(s,50))}),onPointerLeave:x.y$1(r.onPointerLeave,()=>{l()})})}),Vm="SelectSeparator",Mh=T.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n;return x.ae.jsx(x.h.div,{"aria-hidden":!0,...s,ref:e})});Mh.displayName=Vm;var aa="SelectArrow",Um=T.forwardRef((n,e)=>{const{__scopeSelect:t,...s}=n,r=mi(t),i=Yt(aa,t),o=Xt(aa,t);return i.open&&o.position==="popper"?x.ae.jsx(Mt.co,{...r,...s,ref:e}):null});Um.displayName=aa;var $m="SelectBubbleInput",Dh=T.forwardRef(({__scopeSelect:n,value:e,...t},s)=>{const r=T.useRef(null),i=x.x(s,r),o=ni(e);return T.useEffect(()=>{const a=r.current;if(!a)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(o!==e&&c){const f=new Event("change",{bubbles:!0});c.call(a,e),a.dispatchEvent(f)}},[o,e]),x.ae.jsx(x.h.select,{...t,style:{...jf.s,...t.style},ref:i,defaultValue:e})});Dh.displayName=$m;function Fh(n){return n===""||n===void 0}function Bh(n){const e=x.n(n),t=T.useRef(""),s=T.useRef(0),r=T.useCallback(o=>{const a=t.current+o;e(a),function l(c){t.current=c,window.clearTimeout(s.current),c!==""&&(s.current=window.setTimeout(()=>l(""),1e3))}(a)},[e]),i=T.useCallback(()=>{t.current="",window.clearTimeout(s.current)},[]);return T.useEffect(()=>()=>window.clearTimeout(s.current),[]),[t,r,i]}function Ph(n,e,t){const s=e.length>1&&Array.from(e).every(a=>a===e[0])?e[0]:e,r=t?n.indexOf(t):-1;let i=zm(n,Math.max(r,0));s.length===1&&(i=i.filter(a=>a!==t));const o=i.find(a=>a.textValue.toLowerCase().startsWith(s.toLowerCase()));return o!==t?o:void 0}function zm(n,e){return n.map((t,s)=>n[(e+s)%n.length])}var Hm=dh,Vh=ph,Km=gh,Wm=vh,Gm=yh,Uh=bh,Zm=Eh,Ym=Nh,$h=Ah,zh=Oh,Xm=Th,Jm=Ih,Hh=Lh,Kh=qh,Wh=Mh;function Qm(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,Te.ia(n,e)}var Fl=Number.isNaN||function(n){return typeof n=="number"&&n!==n};function eg(n,e){return!!(n===e||Fl(n)&&Fl(e))}function tg(n,e){if(n.length!==e.length)return!1;for(var t=0;t<n.length;t++)if(!eg(n[t],e[t]))return!1;return!0}function No(n,e){e===void 0&&(e=tg);var t,s=[],r,i=!1;function o(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i&&t===this&&e(a,s)||(r=n.apply(this,a),i=!0,t=this,s=a),r}return o}var ng=typeof performance=="object"&&typeof performance.now=="function",Bl=ng?function(){return performance.now()}:function(){return Date.now()};function Pl(n){cancelAnimationFrame(n.id)}function sg(n,e){var t=Bl();function s(){Bl()-t>=e?n.call(null):r.id=requestAnimationFrame(s)}var r={id:requestAnimationFrame(s)};return r}var So=-1;function Vl(n){if(n===void 0&&(n=!1),So===-1||n){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",document.body.appendChild(e),So=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return So}var Pn=null;function Ul(n){if(n===void 0&&(n=!1),Pn===null||n){var e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";var s=document.createElement("div"),r=s.style;return r.width="100px",r.height="100px",e.appendChild(s),document.body.appendChild(e),e.scrollLeft>0?Pn="positive-descending":(e.scrollLeft=1,e.scrollLeft===0?Pn="negative":Pn="positive-ascending"),document.body.removeChild(e),Pn}return Pn}process.env.NODE_ENV;var rg=150,ig=function(n,e){return n},qr=null,jr=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(qr=new WeakSet,jr=new WeakSet);function og(n){var e,t=n.getItemOffset,s=n.getEstimatedTotalSize,r=n.getItemSize,i=n.getOffsetForIndexAndAlignment,o=n.getStartIndexForOffset,a=n.getStopIndexForStartIndex,l=n.initInstanceProps,c=n.validateProps;return e=function(f){Qm(v,f);function v(h){var m;return m=f.call(this,h)||this,m._instanceProps=l(m.props,Te.lv(m)),m._outerRef=void 0,m._resetIsScrollingTimeoutId=null,m.state={instance:Te.lv(m),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof m.props.initialScrollOffset=="number"?m.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},m._callOnItemsRendered=void 0,m._callOnItemsRendered=No(function(g,b,E,w){return m.props.onItemsRendered({overscanStartIndex:g,overscanStopIndex:b,visibleStartIndex:E,visibleStopIndex:w})}),m._callOnScroll=void 0,m._callOnScroll=No(function(g,b,E){return m.props.onScroll({scrollDirection:g,scrollOffset:b,scrollUpdateWasRequested:E})}),m._getItemStyle=void 0,m._getItemStyle=function(g){var b=m.props,E=b.direction,w=b.itemSize,S=b.layout,C=m._getItemStyleCache(w,S,E),A;if(C.hasOwnProperty(g))A=C[g];else{var z=t(m.props,g,m._instanceProps),W=r(m.props,g,m._instanceProps),ae=E==="horizontal"||S==="horizontal",fe=E==="rtl",me=ae?z:0;C[g]=A={position:"absolute",left:fe?void 0:me,right:fe?me:void 0,top:ae?0:z,height:ae?"100%":W,width:ae?W:"100%"}}return A},m._getItemStyleCache=void 0,m._getItemStyleCache=No(function(g,b,E){return{}}),m._onScrollHorizontal=function(g){var b=g.currentTarget,E=b.clientWidth,w=b.scrollLeft,S=b.scrollWidth;m.setState(function(C){if(C.scrollOffset===w)return null;var A=m.props.direction,z=w;if(A==="rtl")switch(Ul()){case"negative":z=-w;break;case"positive-descending":z=S-E-w;break}return z=Math.max(0,Math.min(z,S-E)),{isScrolling:!0,scrollDirection:C.scrollOffset<z?"forward":"backward",scrollOffset:z,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._onScrollVertical=function(g){var b=g.currentTarget,E=b.clientHeight,w=b.scrollHeight,S=b.scrollTop;m.setState(function(C){if(C.scrollOffset===S)return null;var A=Math.max(0,Math.min(S,w-E));return{isScrolling:!0,scrollDirection:C.scrollOffset<A?"forward":"backward",scrollOffset:A,scrollUpdateWasRequested:!1}},m._resetIsScrollingDebounced)},m._outerRefSetter=function(g){var b=m.props.outerRef;m._outerRef=g,typeof b=="function"?b(g):b!=null&&typeof b=="object"&&b.hasOwnProperty("current")&&(b.current=g)},m._resetIsScrollingDebounced=function(){m._resetIsScrollingTimeoutId!==null&&Pl(m._resetIsScrollingTimeoutId),m._resetIsScrollingTimeoutId=sg(m._resetIsScrolling,rg)},m._resetIsScrolling=function(){m._resetIsScrollingTimeoutId=null,m.setState({isScrolling:!1},function(){m._getItemStyleCache(-1,null)})},m}v.getDerivedStateFromProps=function(h,m){return ag(h,m),c(h),null};var d=v.prototype;return d.scrollTo=function(h){h=Math.max(0,h),this.setState(function(m){return m.scrollOffset===h?null:{scrollDirection:m.scrollOffset<h?"forward":"backward",scrollOffset:h,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},d.scrollToItem=function(h,m){m===void 0&&(m="auto");var g=this.props,b=g.itemCount,E=g.layout,w=this.state.scrollOffset;h=Math.max(0,Math.min(h,b-1));var S=0;if(this._outerRef){var C=this._outerRef;E==="vertical"?S=C.scrollWidth>C.clientWidth?Vl():0:S=C.scrollHeight>C.clientHeight?Vl():0}this.scrollTo(i(this.props,h,m,w,this._instanceProps,S))},d.componentDidMount=function(){var h=this.props,m=h.direction,g=h.initialScrollOffset,b=h.layout;if(typeof g=="number"&&this._outerRef!=null){var E=this._outerRef;m==="horizontal"||b==="horizontal"?E.scrollLeft=g:E.scrollTop=g}this._callPropsCallbacks()},d.componentDidUpdate=function(){var h=this.props,m=h.direction,g=h.layout,b=this.state,E=b.scrollOffset,w=b.scrollUpdateWasRequested;if(w&&this._outerRef!=null){var S=this._outerRef;if(m==="horizontal"||g==="horizontal")if(m==="rtl")switch(Ul()){case"negative":S.scrollLeft=-E;break;case"positive-ascending":S.scrollLeft=E;break;default:var C=S.clientWidth,A=S.scrollWidth;S.scrollLeft=A-C-E;break}else S.scrollLeft=E;else S.scrollTop=E}this._callPropsCallbacks()},d.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Pl(this._resetIsScrollingTimeoutId)},d.render=function(){var h=this.props,m=h.children,g=h.className,b=h.direction,E=h.height,w=h.innerRef,S=h.innerElementType,C=h.innerTagName,A=h.itemCount,z=h.itemData,W=h.itemKey,ae=W===void 0?ig:W,fe=h.layout,me=h.outerElementType,y=h.outerTagName,j=h.style,_=h.useIsScrolling,U=h.width,P=this.state.isScrolling,O=b==="horizontal"||fe==="horizontal",D=O?this._onScrollHorizontal:this._onScrollVertical,Z=this._getRangeToRender(),Y=Z[0],N=Z[1],L=[];if(A>0)for(var F=Y;F<=N;F++)L.push(se.createElement(m,{data:z,key:ae(F,z),index:F,isScrolling:_?P:void 0,style:this._getItemStyle(F)}));var G=s(this.props,this._instanceProps);return se.createElement(me||y||"div",{className:g,onScroll:D,ref:this._outerRefSetter,style:Te.k({position:"relative",height:E,width:U,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:b},j)},se.createElement(S||C||"div",{children:L,ref:w,style:{height:O?"100%":G,pointerEvents:P?"none":void 0,width:O?G:"100%"}}))},d._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var h=this.props.itemCount;if(h>0){var m=this._getRangeToRender(),g=m[0],b=m[1],E=m[2],w=m[3];this._callOnItemsRendered(g,b,E,w)}}if(typeof this.props.onScroll=="function"){var S=this.state,C=S.scrollDirection,A=S.scrollOffset,z=S.scrollUpdateWasRequested;this._callOnScroll(C,A,z)}},d._getRangeToRender=function(){var h=this.props,m=h.itemCount,g=h.overscanCount,b=this.state,E=b.isScrolling,w=b.scrollDirection,S=b.scrollOffset;if(m===0)return[0,0,0,0];var C=o(this.props,S,this._instanceProps),A=a(this.props,C,S,this._instanceProps),z=!E||w==="backward"?Math.max(1,g):1,W=!E||w==="forward"?Math.max(1,g):1;return[Math.max(0,C-z),Math.max(0,Math.min(m-1,A+W)),C,A]},v}(se.PureComponent),e.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},e}var ag=function(n,e){var t=n.children,s=n.direction,r=n.height,i=n.layout,o=n.innerTagName,a=n.outerTagName,l=n.width,c=e.instance;if(process.env.NODE_ENV!=="production"){(o!=null||a!=null)&&jr&&!jr.has(c)&&(jr.add(c),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var f=s==="horizontal"||i==="horizontal";switch(s){case"horizontal":case"vertical":qr&&!qr.has(c)&&(qr.add(c),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+s+'" was specified.'))}switch(i){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+i+'" was specified.'))}if(t==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(t===null?"null":typeof t)+'" was specified.'));if(f&&typeof l!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(l===null?"null":typeof l)+'" was specified.'));if(!f&&typeof r!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(r===null?"null":typeof r)+'" was specified.'))}},lg=og({getItemOffset:function(n,e){var t=n.itemSize;return e*t},getItemSize:function(n,e){var t=n.itemSize;return t},getEstimatedTotalSize:function(n){var e=n.itemCount,t=n.itemSize;return t*e},getOffsetForIndexAndAlignment:function(n,e,t,s,r,i){var o=n.direction,a=n.height,l=n.itemCount,c=n.itemSize,f=n.layout,v=n.width,d=o==="horizontal"||f==="horizontal",h=d?v:a,m=Math.max(0,l*c-h),g=Math.min(m,e*c),b=Math.max(0,e*c-h+c+i);switch(t==="smart"&&(s>=b-h&&s<=g+h?t="auto":t="center"),t){case"start":return g;case"end":return b;case"center":{var E=Math.round(b+(g-b)/2);return E<Math.ceil(h/2)?0:E>m+Math.floor(h/2)?m:E}case"auto":default:return s>=b&&s<=g?s:s<b?b:g}},getStartIndexForOffset:function(n,e){var t=n.itemCount,s=n.itemSize;return Math.max(0,Math.min(t-1,Math.floor(e/s)))},getStopIndexForStartIndex:function(n,e,t){var s=n.direction,r=n.height,i=n.itemCount,o=n.itemSize,a=n.layout,l=n.width,c=s==="horizontal"||a==="horizontal",f=e*o,v=c?l:r,d=Math.ceil((v+t-f)/o);return Math.max(0,Math.min(i-1,e+d-1))},initInstanceProps:function(n){},validateProps:function(n){var e=n.itemSize;if(process.env.NODE_ENV!=="production"&&typeof e!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(e===null?"null":typeof e)+'" was specified.'))}});const ug=Hm,cg=Ym,hg=Km,Gh=T.forwardRef(({className:n,children:e,variant:t="default",...s},r)=>x.ae.jsxs(Vh,{ref:r,className:Se.mo("border-border ring-offset-background placeholder:text-muted-foreground focus:ring-offset-none focus:ring-primary flex h-10 w-full items-center justify-between rounded-md border bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-offset-transparent focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 dark:bg-transparent [&>span]:line-clamp-1",t==="failure"&&"focus:ring-destructive hover:bg-destructive/20 bg-destructive/20 border-destructive !text-destructive",n),...s,children:[e,x.ae.jsx(Wm,{asChild:!0,children:x.ae.jsx(uc,{className:"h-4 w-4 opacity-50"})})]}));Gh.displayName=Vh.displayName;const za=T.forwardRef(({className:n,...e},t)=>x.ae.jsx(Hh,{ref:t,className:Se.mo("flex cursor-default items-center justify-center py-1",n),...e,children:x.ae.jsx(Pf,{className:"h-4 w-4"})}));za.displayName=Hh.displayName;const Ha=T.forwardRef(({className:n,...e},t)=>x.ae.jsx(Kh,{ref:t,className:Se.mo("flex cursor-default items-center justify-center py-1",n),...e,children:x.ae.jsx(uc,{className:"h-4 w-4"})}));Ha.displayName=Kh.displayName;const Ka=T.forwardRef(({className:n,children:e,position:t="popper",...s},r)=>x.ae.jsx(Gm,{children:x.ae.jsxs(Uh,{ref:r,className:Se.mo("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md",t==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:t,...s,children:[x.ae.jsx(za,{}),x.ae.jsx(Zm,{className:Se.mo("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),x.ae.jsx(Ha,{})]})}));Ka.displayName=Uh.displayName;const Zh=T.forwardRef(({className:n,...e},t)=>x.ae.jsx($h,{ref:t,className:Se.mo("py-1.5 pr-2 pl-8 text-sm font-semibold",n),...e}));Zh.displayName=$h.displayName;const Wa=T.forwardRef(({className:n,children:e,...t},s)=>x.ae.jsxs(zh,{ref:s,className:Se.mo("focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),...t,children:[x.ae.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:x.ae.jsx(Jm,{children:x.ae.jsx(Rt.t,{className:"h-4 w-4"})})}),x.ae.jsx(Xm,{children:e})]}));Wa.displayName=zh.displayName;const Yh=T.forwardRef(({className:n,...e},t)=>x.ae.jsx(Wh,{ref:t,className:Se.mo("bg-muted -mx-1 my-1 h-px",n),...e}));Yh.displayName=Wh.displayName;const Xh=T.forwardRef(({className:n,options:e,position:t="popper",itemHeight:s=35,maxHeight:r=300,...i},o)=>{const a=se.useRef(null),l=({index:c,style:f})=>{const v=e[c];return x.ae.jsx("div",{style:f,children:x.ae.jsx(Wa,{value:`${v.value}`,children:v.label})})};return x.ae.jsx(Ka,{ref:o,...i,children:x.ae.jsx(lg,{ref:a,height:Math.min(r,e.length*s),itemCount:e.length,itemSize:s,width:"100%",children:l})})});Xh.displayName="VirtualizedSelectContent";var Ga="Radio",[dg,Jh]=x.j(Ga),[fg,pg]=dg(Ga),Qh=T.forwardRef((n,e)=>{const{__scopeRadio:t,name:s,checked:r=!1,required:i,disabled:o,value:a="on",onCheck:l,form:c,...f}=n,[v,d]=T.useState(null),h=x.x(e,b=>d(b)),m=T.useRef(!1),g=v?c||!!v.closest("form"):!0;return x.ae.jsxs(fg,{scope:t,checked:r,disabled:o,children:[x.ae.jsx(x.h.button,{type:"button",role:"radio","aria-checked":r,"data-state":sd(r),"data-disabled":o?"":void 0,disabled:o,value:a,...f,ref:h,onClick:x.y$1(n.onClick,b=>{r||l==null||l(),g&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),g&&x.ae.jsx(nd,{control:v,bubbles:!m.current,name:s,value:a,checked:r,required:i,disabled:o,form:c,style:{transform:"translateX(-100%)"}})]})});Qh.displayName=Ga;var ed="RadioIndicator",td=T.forwardRef((n,e)=>{const{__scopeRadio:t,forceMount:s,...r}=n,i=pg(ed,t);return x.ae.jsx(x.R,{present:s||i.checked,children:x.ae.jsx(x.h.span,{"data-state":sd(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:e})})});td.displayName=ed;var mg="RadioBubbleInput",nd=T.forwardRef(({__scopeRadio:n,control:e,checked:t,bubbles:s=!0,...r},i)=>{const o=T.useRef(null),a=x.x(o,i),l=ni(t),c=Mt.In(e);return T.useEffect(()=>{const f=o.current;if(!f)return;const v=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(v,"checked").set;if(l!==t&&d){const h=new Event("click",{bubbles:s});d.call(f,t),f.dispatchEvent(h)}},[l,t,s]),x.ae.jsx(x.h.input,{type:"radio","aria-hidden":!0,defaultChecked:t,...r,tabIndex:-1,ref:a,style:{...r.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});nd.displayName=mg;function sd(n){return n?"checked":"unchecked"}var gg=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],gi="RadioGroup",[vg,Pk]=x.j(gi,[Rt.be,Jh]),rd=Rt.be(),id=Jh(),[yg,bg]=vg(gi),od=T.forwardRef((n,e)=>{const{__scopeRadioGroup:t,name:s,defaultValue:r,value:i,required:o=!1,disabled:a=!1,orientation:l,dir:c,loop:f=!0,onValueChange:v,...d}=n,h=rd(t),m=Rt.n(c),[g,b]=x.y({prop:i,defaultProp:r??null,onChange:v,caller:gi});return x.ae.jsx(yg,{scope:t,name:s,required:o,disabled:a,value:g,onValueChange:b,children:x.ae.jsx(Rt.Fe,{asChild:!0,...h,orientation:l,dir:m,loop:f,children:x.ae.jsx(x.h.div,{role:"radiogroup","aria-required":o,"aria-orientation":l,"data-disabled":a?"":void 0,dir:m,...d,ref:e})})})});od.displayName=gi;var ad="RadioGroupItem",ld=T.forwardRef((n,e)=>{const{__scopeRadioGroup:t,disabled:s,...r}=n,i=bg(ad,t),o=i.disabled||s,a=rd(t),l=id(t),c=T.useRef(null),f=x.x(e,c),v=i.value===r.value,d=T.useRef(!1);return T.useEffect(()=>{const h=g=>{gg.includes(g.key)&&(d.current=!0)},m=()=>d.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),x.ae.jsx(Rt.ge,{asChild:!0,...a,focusable:!o,active:v,children:x.ae.jsx(Qh,{disabled:o,required:i.required,checked:v,...l,...r,name:i.name,ref:f,onCheck:()=>i.onValueChange(r.value),onKeyDown:x.y$1(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:x.y$1(r.onFocus,()=>{var h;d.current&&((h=c.current)==null||h.click())})})})});ld.displayName=ad;var xg="RadioGroupIndicator",ud=T.forwardRef((n,e)=>{const{__scopeRadioGroup:t,...s}=n,r=id(t);return x.ae.jsx(td,{...r,...s,ref:e})});ud.displayName=xg;var cd=od,hd=ld,kg=ud;const dd=T.forwardRef(({className:n,...e},t)=>x.ae.jsx(cd,{className:Se.mo("grid gap-2",n),...e,ref:t}));dd.displayName=cd.displayName;const fd=T.forwardRef(({className:n,...e},t)=>x.ae.jsx(hd,{ref:t,className:Se.mo("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n),...e,children:x.ae.jsx(kg,{className:"flex items-center justify-center",children:x.ae.jsx(Rt.a,{className:"h-2.5 w-2.5 fill-current text-current"})})}));fd.displayName=hd.displayName;var pd=typeof global=="object"&&global&&global.Object===Object&&global,wg=typeof self=="object"&&self&&self.Object===Object&&self,kt=pd||wg||Function("return this")(),Zt=kt.Symbol,md=Object.prototype,Eg=md.hasOwnProperty,_g=md.toString,Ss=Zt?Zt.toStringTag:void 0;function Ng(n){var e=Eg.call(n,Ss),t=n[Ss];try{n[Ss]=void 0;var s=!0}catch{}var r=_g.call(n);return s&&(e?n[Ss]=t:delete n[Ss]),r}var Sg=Object.prototype,Ag=Sg.toString;function Cg(n){return Ag.call(n)}var Og="[object Null]",Tg="[object Undefined]",$l=Zt?Zt.toStringTag:void 0;function cs(n){return n==null?n===void 0?Tg:Og:$l&&$l in Object(n)?Ng(n):Cg(n)}function It(n){return n!=null&&typeof n=="object"}var bn=Array.isArray;function Jt(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function gd(n){return n}var Rg="[object AsyncFunction]",Ig="[object Function]",Lg="[object GeneratorFunction]",qg="[object Proxy]";function Za(n){if(!Jt(n))return!1;var e=cs(n);return e==Ig||e==Lg||e==Rg||e==qg}var Ao=kt["__core-js_shared__"],zl=function(){var n=/[^.]+$/.exec(Ao&&Ao.keys&&Ao.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}();function jg(n){return!!zl&&zl in n}var Mg=Function.prototype,Dg=Mg.toString;function wn(n){if(n!=null){try{return Dg.call(n)}catch{}try{return n+""}catch{}}return""}var Fg=/[\\^$.*+?()[\]{}|]/g,Bg=/^\[object .+?Constructor\]$/,Pg=Function.prototype,Vg=Object.prototype,Ug=Pg.toString,$g=Vg.hasOwnProperty,zg=RegExp("^"+Ug.call($g).replace(Fg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Hg(n){if(!Jt(n)||jg(n))return!1;var e=Za(n)?zg:Bg;return e.test(wn(n))}function Kg(n,e){return n==null?void 0:n[e]}function En(n,e){var t=Kg(n,e);return Hg(t)?t:void 0}var la=En(kt,"WeakMap"),Hl=Object.create,Wg=function(){function n(){}return function(e){if(!Jt(e))return{};if(Hl)return Hl(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}}();function Gg(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function Zg(n,e){var t=-1,s=n.length;for(e||(e=Array(s));++t<s;)e[t]=n[t];return e}var Yg=800,Xg=16,Jg=Date.now;function Qg(n){var e=0,t=0;return function(){var s=Jg(),r=Xg-(s-t);if(t=s,r>0){if(++e>=Yg)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function e0(n){return function(){return n}}var Zr=function(){try{var n=En(Object,"defineProperty");return n({},"",{}),n}catch{}}(),t0=Zr?function(n,e){return Zr(n,"toString",{configurable:!0,enumerable:!1,value:e0(e),writable:!0})}:gd,n0=Qg(t0);function s0(n,e){for(var t=-1,s=n==null?0:n.length;++t<s&&e(n[t],t,n)!==!1;);return n}var r0=9007199254740991,i0=/^(?:0|[1-9]\d*)$/;function vd(n,e){var t=typeof n;return e=e??r0,!!e&&(t=="number"||t!="symbol"&&i0.test(n))&&n>-1&&n%1==0&&n<e}function Ya(n,e,t){e=="__proto__"&&Zr?Zr(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function Ks(n,e){return n===e||n!==n&&e!==e}var o0=Object.prototype,a0=o0.hasOwnProperty;function yd(n,e,t){var s=n[e];(!(a0.call(n,e)&&Ks(s,t))||t===void 0&&!(e in n))&&Ya(n,e,t)}function l0(n,e,t,s){var r=!t;t||(t={});for(var i=-1,o=e.length;++i<o;){var a=e[i],l=void 0;l===void 0&&(l=n[a]),r?Ya(t,a,l):yd(t,a,l)}return t}var Kl=Math.max;function u0(n,e,t){return e=Kl(e===void 0?n.length-1:e,0),function(){for(var s=arguments,r=-1,i=Kl(s.length-e,0),o=Array(i);++r<i;)o[r]=s[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=s[r];return a[e]=t(o),Gg(n,this,a)}}function c0(n,e){return n0(u0(n,e,gd),n+"")}var h0=9007199254740991;function bd(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=h0}function vi(n){return n!=null&&bd(n.length)&&!Za(n)}function d0(n,e,t){if(!Jt(t))return!1;var s=typeof e;return(s=="number"?vi(t)&&vd(e,t.length):s=="string"&&e in t)?Ks(t[e],n):!1}function f0(n){return c0(function(e,t){var s=-1,r=t.length,i=r>1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=n.length>3&&typeof i=="function"?(r--,i):void 0,o&&d0(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++s<r;){var a=t[s];a&&n(e,a,s,i)}return e})}var p0=Object.prototype;function Xa(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||p0;return n===t}function m0(n,e){for(var t=-1,s=Array(n);++t<n;)s[t]=e(t);return s}var g0="[object Arguments]";function Wl(n){return It(n)&&cs(n)==g0}var xd=Object.prototype,v0=xd.hasOwnProperty,y0=xd.propertyIsEnumerable,ua=Wl(function(){return arguments}())?Wl:function(n){return It(n)&&v0.call(n,"callee")&&!y0.call(n,"callee")};function b0(){return!1}var kd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gl=kd&&typeof module=="object"&&module&&!module.nodeType&&module,x0=Gl&&Gl.exports===kd,Zl=x0?kt.Buffer:void 0,k0=Zl?Zl.isBuffer:void 0,Ms=k0||b0,w0="[object Arguments]",E0="[object Array]",_0="[object Boolean]",N0="[object Date]",S0="[object Error]",A0="[object Function]",C0="[object Map]",O0="[object Number]",T0="[object Object]",R0="[object RegExp]",I0="[object Set]",L0="[object String]",q0="[object WeakMap]",j0="[object ArrayBuffer]",M0="[object DataView]",D0="[object Float32Array]",F0="[object Float64Array]",B0="[object Int8Array]",P0="[object Int16Array]",V0="[object Int32Array]",U0="[object Uint8Array]",$0="[object Uint8ClampedArray]",z0="[object Uint16Array]",H0="[object Uint32Array]",_e={};_e[D0]=_e[F0]=_e[B0]=_e[P0]=_e[V0]=_e[U0]=_e[$0]=_e[z0]=_e[H0]=!0;_e[w0]=_e[E0]=_e[j0]=_e[_0]=_e[M0]=_e[N0]=_e[S0]=_e[A0]=_e[C0]=_e[O0]=_e[T0]=_e[R0]=_e[I0]=_e[L0]=_e[q0]=!1;function K0(n){return It(n)&&bd(n.length)&&!!_e[cs(n)]}function Ja(n){return function(e){return n(e)}}var wd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qs=wd&&typeof module=="object"&&module&&!module.nodeType&&module,W0=qs&&qs.exports===wd,Co=W0&&pd.process,rs=function(){try{var n=qs&&qs.require&&qs.require("util").types;return n||Co&&Co.binding&&Co.binding("util")}catch{}}(),Yl=rs&&rs.isTypedArray,Qa=Yl?Ja(Yl):K0,G0=Object.prototype,Z0=G0.hasOwnProperty;function Ed(n,e){var t=bn(n),s=!t&&ua(n),r=!t&&!s&&Ms(n),i=!t&&!s&&!r&&Qa(n),o=t||s||r||i,a=o?m0(n.length,String):[],l=a.length;for(var c in n)(e||Z0.call(n,c))&&!(o&&(c=="length"||r&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||vd(c,l)))&&a.push(c);return a}function _d(n,e){return function(t){return n(e(t))}}var Y0=_d(Object.keys,Object),X0=Object.prototype,J0=X0.hasOwnProperty;function Q0(n){if(!Xa(n))return Y0(n);var e=[];for(var t in Object(n))J0.call(n,t)&&t!="constructor"&&e.push(t);return e}function e1(n){return vi(n)?Ed(n):Q0(n)}function t1(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var n1=Object.prototype,s1=n1.hasOwnProperty;function r1(n){if(!Jt(n))return t1(n);var e=Xa(n),t=[];for(var s in n)s=="constructor"&&(e||!s1.call(n,s))||t.push(s);return t}function Nd(n){return vi(n)?Ed(n,!0):r1(n)}var Ds=En(Object,"create");function i1(){this.__data__=Ds?Ds(null):{},this.size=0}function o1(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var a1="__lodash_hash_undefined__",l1=Object.prototype,u1=l1.hasOwnProperty;function c1(n){var e=this.__data__;if(Ds){var t=e[n];return t===a1?void 0:t}return u1.call(e,n)?e[n]:void 0}var h1=Object.prototype,d1=h1.hasOwnProperty;function f1(n){var e=this.__data__;return Ds?e[n]!==void 0:d1.call(e,n)}var p1="__lodash_hash_undefined__";function m1(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=Ds&&e===void 0?p1:e,this}function xn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var s=n[e];this.set(s[0],s[1])}}xn.prototype.clear=i1;xn.prototype.delete=o1;xn.prototype.get=c1;xn.prototype.has=f1;xn.prototype.set=m1;function g1(){this.__data__=[],this.size=0}function yi(n,e){for(var t=n.length;t--;)if(Ks(n[t][0],e))return t;return-1}var v1=Array.prototype,y1=v1.splice;function b1(n){var e=this.__data__,t=yi(e,n);if(t<0)return!1;var s=e.length-1;return t==s?e.pop():y1.call(e,t,1),--this.size,!0}function x1(n){var e=this.__data__,t=yi(e,n);return t<0?void 0:e[t][1]}function k1(n){return yi(this.__data__,n)>-1}function w1(n,e){var t=this.__data__,s=yi(t,n);return s<0?(++this.size,t.push([n,e])):t[s][1]=e,this}function Dt(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var s=n[e];this.set(s[0],s[1])}}Dt.prototype.clear=g1;Dt.prototype.delete=b1;Dt.prototype.get=x1;Dt.prototype.has=k1;Dt.prototype.set=w1;var Fs=En(kt,"Map");function E1(){this.size=0,this.__data__={hash:new xn,map:new(Fs||Dt),string:new xn}}function _1(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function bi(n,e){var t=n.__data__;return _1(e)?t[typeof e=="string"?"string":"hash"]:t.map}function N1(n){var e=bi(this,n).delete(n);return this.size-=e?1:0,e}function S1(n){return bi(this,n).get(n)}function A1(n){return bi(this,n).has(n)}function C1(n,e){var t=bi(this,n),s=t.size;return t.set(n,e),this.size+=t.size==s?0:1,this}function _n(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var s=n[e];this.set(s[0],s[1])}}_n.prototype.clear=E1;_n.prototype.delete=N1;_n.prototype.get=S1;_n.prototype.has=A1;_n.prototype.set=C1;function O1(n,e){for(var t=-1,s=e.length,r=n.length;++t<s;)n[r+t]=e[t];return n}var Sd=_d(Object.getPrototypeOf,Object),T1="[object Object]",R1=Function.prototype,I1=Object.prototype,Ad=R1.toString,L1=I1.hasOwnProperty,q1=Ad.call(Object);function j1(n){if(!It(n)||cs(n)!=T1)return!1;var e=Sd(n);if(e===null)return!0;var t=L1.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Ad.call(t)==q1}function M1(){this.__data__=new Dt,this.size=0}function D1(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function F1(n){return this.__data__.get(n)}function B1(n){return this.__data__.has(n)}var P1=200;function V1(n,e){var t=this.__data__;if(t instanceof Dt){var s=t.__data__;if(!Fs||s.length<P1-1)return s.push([n,e]),this.size=++t.size,this;t=this.__data__=new _n(s)}return t.set(n,e),this.size=t.size,this}function yt(n){var e=this.__data__=new Dt(n);this.size=e.size}yt.prototype.clear=M1;yt.prototype.delete=D1;yt.prototype.get=F1;yt.prototype.has=B1;yt.prototype.set=V1;var Cd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Xl=Cd&&typeof module=="object"&&module&&!module.nodeType&&module,U1=Xl&&Xl.exports===Cd,Jl=U1?kt.Buffer:void 0,Ql=Jl?Jl.allocUnsafe:void 0;function Od(n,e){if(e)return n.slice();var t=n.length,s=Ql?Ql(t):new n.constructor(t);return n.copy(s),s}function $1(n,e){for(var t=-1,s=n==null?0:n.length,r=0,i=[];++t<s;){var o=n[t];e(o,t,n)&&(i[r++]=o)}return i}function z1(){return[]}var H1=Object.prototype,K1=H1.propertyIsEnumerable,eu=Object.getOwnPropertySymbols,W1=eu?function(n){return n==null?[]:(n=Object(n),$1(eu(n),function(e){return K1.call(n,e)}))}:z1;function G1(n,e,t){var s=e(n);return bn(n)?s:O1(s,t(n))}function ca(n){return G1(n,e1,W1)}var ha=En(kt,"DataView"),da=En(kt,"Promise"),fa=En(kt,"Set"),tu="[object Map]",Z1="[object Object]",nu="[object Promise]",su="[object Set]",ru="[object WeakMap]",iu="[object DataView]",Y1=wn(ha),X1=wn(Fs),J1=wn(da),Q1=wn(fa),ev=wn(la),it=cs;(ha&&it(new ha(new ArrayBuffer(1)))!=iu||Fs&&it(new Fs)!=tu||da&&it(da.resolve())!=nu||fa&&it(new fa)!=su||la&&it(new la)!=ru)&&(it=function(n){var e=cs(n),t=e==Z1?n.constructor:void 0,s=t?wn(t):"";if(s)switch(s){case Y1:return iu;case X1:return tu;case J1:return nu;case Q1:return su;case ev:return ru}return e});var tv=Object.prototype,nv=tv.hasOwnProperty;function sv(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&nv.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var Yr=kt.Uint8Array;function el(n){var e=new n.constructor(n.byteLength);return new Yr(e).set(new Yr(n)),e}function rv(n,e){var t=el(n.buffer);return new n.constructor(t,n.byteOffset,n.byteLength)}var iv=/\w*$/;function ov(n){var e=new n.constructor(n.source,iv.exec(n));return e.lastIndex=n.lastIndex,e}var ou=Zt?Zt.prototype:void 0,au=ou?ou.valueOf:void 0;function av(n){return au?Object(au.call(n)):{}}function Td(n,e){var t=e?el(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var lv="[object Boolean]",uv="[object Date]",cv="[object Map]",hv="[object Number]",dv="[object RegExp]",fv="[object Set]",pv="[object String]",mv="[object Symbol]",gv="[object ArrayBuffer]",vv="[object DataView]",yv="[object Float32Array]",bv="[object Float64Array]",xv="[object Int8Array]",kv="[object Int16Array]",wv="[object Int32Array]",Ev="[object Uint8Array]",_v="[object Uint8ClampedArray]",Nv="[object Uint16Array]",Sv="[object Uint32Array]";function Av(n,e,t){var s=n.constructor;switch(e){case gv:return el(n);case lv:case uv:return new s(+n);case vv:return rv(n);case yv:case bv:case xv:case kv:case wv:case Ev:case _v:case Nv:case Sv:return Td(n,t);case cv:return new s;case hv:case pv:return new s(n);case dv:return ov(n);case fv:return new s;case mv:return av(n)}}function Rd(n){return typeof n.constructor=="function"&&!Xa(n)?Wg(Sd(n)):{}}var Cv="[object Map]";function Ov(n){return It(n)&&it(n)==Cv}var lu=rs&&rs.isMap,Tv=lu?Ja(lu):Ov,Rv="[object Set]";function Iv(n){return It(n)&&it(n)==Rv}var uu=rs&&rs.isSet,Lv=uu?Ja(uu):Iv,qv=1,Id="[object Arguments]",jv="[object Array]",Mv="[object Boolean]",Dv="[object Date]",Fv="[object Error]",Ld="[object Function]",Bv="[object GeneratorFunction]",Pv="[object Map]",Vv="[object Number]",qd="[object Object]",Uv="[object RegExp]",$v="[object Set]",zv="[object String]",Hv="[object Symbol]",Kv="[object WeakMap]",Wv="[object ArrayBuffer]",Gv="[object DataView]",Zv="[object Float32Array]",Yv="[object Float64Array]",Xv="[object Int8Array]",Jv="[object Int16Array]",Qv="[object Int32Array]",ey="[object Uint8Array]",ty="[object Uint8ClampedArray]",ny="[object Uint16Array]",sy="[object Uint32Array]",we={};we[Id]=we[jv]=we[Wv]=we[Gv]=we[Mv]=we[Dv]=we[Zv]=we[Yv]=we[Xv]=we[Jv]=we[Qv]=we[Pv]=we[Vv]=we[qd]=we[Uv]=we[$v]=we[zv]=we[Hv]=we[ey]=we[ty]=we[ny]=we[sy]=!0;we[Fv]=we[Ld]=we[Kv]=!1;function Mr(n,e,t,s,r,i){var o,a=e&qv;if(o!==void 0)return o;if(!Jt(n))return n;var l=bn(n);if(l)o=sv(n);else{var c=it(n),f=c==Ld||c==Bv;if(Ms(n))return Od(n,a);if(c==qd||c==Id||f&&!r)o=f?{}:Rd(n);else{if(!we[c])return r?n:{};o=Av(n,c,a)}}i||(i=new yt);var v=i.get(n);if(v)return v;i.set(n,o),Lv(n)?n.forEach(function(m){o.add(Mr(m,e,t,m,n,i))}):Tv(n)&&n.forEach(function(m,g){o.set(g,Mr(m,e,t,g,n,i))});var d=ca,h=l?void 0:d(n);return s0(h||n,function(m,g){h&&(g=m,m=n[g]),yd(o,g,Mr(m,e,t,g,n,i))}),o}var ry=1,iy=4;function Zn(n){return Mr(n,ry|iy)}var oy="__lodash_hash_undefined__";function ay(n){return this.__data__.set(n,oy),this}function ly(n){return this.__data__.has(n)}function Xr(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new _n;++e<t;)this.add(n[e])}Xr.prototype.add=Xr.prototype.push=ay;Xr.prototype.has=ly;function uy(n,e){for(var t=-1,s=n==null?0:n.length;++t<s;)if(e(n[t],t,n))return!0;return!1}function cy(n,e){return n.has(e)}var hy=1,dy=2;function jd(n,e,t,s,r,i){var o=t&hy,a=n.length,l=e.length;if(a!=l&&!(o&&l>a))return!1;var c=i.get(n),f=i.get(e);if(c&&f)return c==e&&f==n;var v=-1,d=!0,h=t&dy?new Xr:void 0;for(i.set(n,e),i.set(e,n);++v<a;){var m=n[v],g=e[v];if(s)var b=o?s(g,m,v,e,n,i):s(m,g,v,n,e,i);if(b!==void 0){if(b)continue;d=!1;break}if(h){if(!uy(e,function(E,w){if(!cy(h,w)&&(m===E||r(m,E,t,s,i)))return h.push(w)})){d=!1;break}}else if(!(m===g||r(m,g,t,s,i))){d=!1;break}}return i.delete(n),i.delete(e),d}function fy(n){var e=-1,t=Array(n.size);return n.forEach(function(s,r){t[++e]=[r,s]}),t}function py(n){var e=-1,t=Array(n.size);return n.forEach(function(s){t[++e]=s}),t}var my=1,gy=2,vy="[object Boolean]",yy="[object Date]",by="[object Error]",xy="[object Map]",ky="[object Number]",wy="[object RegExp]",Ey="[object Set]",_y="[object String]",Ny="[object Symbol]",Sy="[object ArrayBuffer]",Ay="[object DataView]",cu=Zt?Zt.prototype:void 0,Oo=cu?cu.valueOf:void 0;function Cy(n,e,t,s,r,i,o){switch(t){case Ay:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case Sy:return!(n.byteLength!=e.byteLength||!i(new Yr(n),new Yr(e)));case vy:case yy:case ky:return Ks(+n,+e);case by:return n.name==e.name&&n.message==e.message;case wy:case _y:return n==e+"";case xy:var a=fy;case Ey:var l=s&my;if(a||(a=py),n.size!=e.size&&!l)return!1;var c=o.get(n);if(c)return c==e;s|=gy,o.set(n,e);var f=jd(a(n),a(e),s,r,i,o);return o.delete(n),f;case Ny:if(Oo)return Oo.call(n)==Oo.call(e)}return!1}var Oy=1,Ty=Object.prototype,Ry=Ty.hasOwnProperty;function Iy(n,e,t,s,r,i){var o=t&Oy,a=ca(n),l=a.length,c=ca(e),f=c.length;if(l!=f&&!o)return!1;for(var v=l;v--;){var d=a[v];if(!(o?d in e:Ry.call(e,d)))return!1}var h=i.get(n),m=i.get(e);if(h&&m)return h==e&&m==n;var g=!0;i.set(n,e),i.set(e,n);for(var b=o;++v<l;){d=a[v];var E=n[d],w=e[d];if(s)var S=o?s(w,E,d,e,n,i):s(E,w,d,n,e,i);if(!(S===void 0?E===w||r(E,w,t,s,i):S)){g=!1;break}b||(b=d=="constructor")}if(g&&!b){var C=n.constructor,A=e.constructor;C!=A&&"constructor"in n&&"constructor"in e&&!(typeof C=="function"&&C instanceof C&&typeof A=="function"&&A instanceof A)&&(g=!1)}return i.delete(n),i.delete(e),g}var Ly=1,hu="[object Arguments]",du="[object Array]",xr="[object Object]",qy=Object.prototype,fu=qy.hasOwnProperty;function jy(n,e,t,s,r,i){var o=bn(n),a=bn(e),l=o?du:it(n),c=a?du:it(e);l=l==hu?xr:l,c=c==hu?xr:c;var f=l==xr,v=c==xr,d=l==c;if(d&&Ms(n)){if(!Ms(e))return!1;o=!0,f=!1}if(d&&!f)return i||(i=new yt),o||Qa(n)?jd(n,e,t,s,r,i):Cy(n,e,l,t,s,r,i);if(!(t&Ly)){var h=f&&fu.call(n,"__wrapped__"),m=v&&fu.call(e,"__wrapped__");if(h||m){var g=h?n.value():n,b=m?e.value():e;return i||(i=new yt),r(g,b,t,s,i)}}return d?(i||(i=new yt),Iy(n,e,t,s,r,i)):!1}function Md(n,e,t,s,r){return n===e?!0:n==null||e==null||!It(n)&&!It(e)?n!==n&&e!==e:jy(n,e,t,s,Md,r)}function My(n){return function(e,t,s){for(var r=-1,i=Object(e),o=s(e),a=o.length;a--;){var l=o[++r];if(t(i[l],l,i)===!1)break}return e}}var Dy=My();function pa(n,e,t){(t!==void 0&&!Ks(n[e],t)||t===void 0&&!(e in n))&&Ya(n,e,t)}function Fy(n){return It(n)&&vi(n)}function ma(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function By(n){return l0(n,Nd(n))}function Py(n,e,t,s,r,i,o){var a=ma(n,t),l=ma(e,t),c=o.get(l);if(c){pa(n,t,c);return}var f=i?i(a,l,t+"",n,e,o):void 0,v=f===void 0;if(v){var d=bn(l),h=!d&&Ms(l),m=!d&&!h&&Qa(l);f=l,d||h||m?bn(a)?f=a:Fy(a)?f=Zg(a):h?(v=!1,f=Od(l,!0)):m?(v=!1,f=Td(l,!0)):f=[]:j1(l)||ua(l)?(f=a,ua(a)?f=By(a):(!Jt(a)||Za(a))&&(f=Rd(l))):v=!1}v&&(o.set(l,f),r(f,l,s,i,o),o.delete(l)),pa(n,t,f)}function Dd(n,e,t,s,r){n!==e&&Dy(e,function(i,o){if(r||(r=new yt),Jt(i))Py(n,e,o,t,Dd,s,r);else{var a=s?s(ma(n,o),i,o+"",n,e,r):void 0;a===void 0&&(a=i),pa(n,o,a)}},Nd)}function $t(n,e){return Md(n,e)}var Wt=f0(function(n,e,t){Dd(n,e,t)}),ne=(n=>(n[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",n))(ne||{});class xt{constructor(e,t,s={}){this.attrName=e,this.keyName=t;const r=ne.TYPE&ne.ATTRIBUTE;this.scope=s.scope!=null?s.scope&ne.LEVEL|r:ne.ATTRIBUTE,s.whitelist!=null&&(this.whitelist=s.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class Yn extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const Fd=class ga{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let s=null;try{s=e.parentNode}catch{return null}return this.find(s,t)}return null}create(e,t,s){const r=this.query(t);if(r==null)throw new Yn(`Unable to create ${t} blot`);const i=r,o=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(s),a=new i(e,o,s);return ga.blots.set(a.domNode,a),a}find(e,t=!1){return ga.find(e,t)}query(e,t=ne.ANY){let s;return typeof e=="string"?s=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?s=this.types.text:typeof e=="number"?e&ne.LEVEL&ne.BLOCK?s=this.types.block:e&ne.LEVEL&ne.INLINE&&(s=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(r=>(s=this.classes[r],!!s)),s=s||this.tags[e.tagName]),s==null?null:"scope"in s&&t&ne.LEVEL&s.scope&&t&ne.TYPE&s.scope?s:null}register(...e){return e.map(t=>{const s="blotName"in t,r="attrName"in t;if(!s&&!r)throw new Yn("Invalid definition");if(s&&t.blotName==="abstract")throw new Yn("Cannot register abstract class");const i=s?t.blotName:r?t.attrName:void 0;return this.types[i]=t,r?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):s&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(o=>o.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(o=>{(this.tags[o]==null||t.className==null)&&(this.tags[o]=t)}))),t})}};Fd.blots=new WeakMap;let is=Fd;function pu(n,e){return(n.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class Vy extends xt{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){pu(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(pu(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const ut=Vy;function To(n){const e=n.split("-"),t=e.slice(1).map(s=>s[0].toUpperCase()+s.slice(1)).join("");return e[0]+t}class Uy extends xt{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[To(this.keyName)]=t,!0):!1}remove(e){e.style[To(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[To(this.keyName)];return this.canAdd(e,t)?t:""}}const Qt=Uy;class $y{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=is.find(this.domNode);if(e==null)return;const t=xt.keys(this.domNode),s=ut.keys(this.domNode),r=Qt.keys(this.domNode);t.concat(s).concat(r).forEach(i=>{const o=e.scroll.query(i,ne.ATTRIBUTE);o instanceof xt&&(this.attributes[o.attrName]=o)})}copy(e){Object.keys(this.attributes).forEach(t=>{const s=this.attributes[t].value(this.domNode);e.format(t,s)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const xi=$y,Bd=class{constructor(n,e){this.scroll=n,this.domNode=e,is.blots.set(e,this),this.prev=null,this.next=null}static create(n){if(this.tagName==null)throw new Yn("Blot definition missing tagName");let e,t;return Array.isArray(this.tagName)?(typeof n=="string"?(t=n.toUpperCase(),parseInt(t,10).toString()===t&&(t=parseInt(t,10))):typeof n=="number"&&(t=n),typeof t=="number"?e=document.createElement(this.tagName[t-1]):t&&this.tagName.indexOf(t)>-1?e=document.createElement(t):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 n=this.domNode.cloneNode(!1);return this.scroll.create(n)}detach(){this.parent!=null&&this.parent.removeChild(this),is.blots.delete(this.domNode)}deleteAt(n,e){this.isolate(n,e).remove()}formatAt(n,e,t,s){const r=this.isolate(n,e);if(this.scroll.query(t,ne.BLOT)!=null&&s)r.wrap(t,s);else if(this.scroll.query(t,ne.ATTRIBUTE)!=null){const i=this.scroll.create(this.statics.scope);r.wrap(i),i.format(t,s)}}insertAt(n,e,t){const s=t==null?this.scroll.create("text",e):this.scroll.create(e,t),r=this.split(n);this.parent.insertBefore(s,r||void 0)}isolate(n,e){const t=this.split(n);if(t==null)throw new Error("Attempt to isolate at end");return t.split(e),t}length(){return 1}offset(n=this.parent){return this.parent==null||this===n?0:this.parent.children.offset(this)+this.parent.offset(n)}optimize(n){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(n,e){const t=typeof n=="string"?this.scroll.create(n,e):n;return this.parent!=null&&(this.parent.insertBefore(t,this.next||void 0),this.remove()),t}split(n,e){return n===0?this:this.next}update(n,e){}wrap(n,e){const t=typeof n=="string"?this.scroll.create(n,e):n;if(this.parent!=null&&this.parent.insertBefore(t,this.next||void 0),typeof t.appendChild!="function")throw new Yn(`Cannot wrap ${n}`);return t.appendChild(this),t}};Bd.blotName="abstract";let Pd=Bd;const Vd=class extends Pd{static value(n){return!0}index(n,e){return this.domNode===n||this.domNode.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(e,1):-1}position(n,e){let t=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return n>0&&(t+=1),[this.parent.domNode,t]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};Vd.scope=ne.INLINE_BLOT;let zy=Vd;const Fe=zy;class Hy{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let s=t();for(;s&&e>0;)e-=1,s=t();return s}contains(e){const t=this.iterator();let s=t();for(;s;){if(s===e)return!0;s=t()}return!1}indexOf(e){const t=this.iterator();let s=t(),r=0;for(;s;){if(s===e)return r;r+=1,s=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,s=this.head;for(;s!=null;){if(s===e)return t;t+=s.length(),s=s.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const s=this.iterator();let r=s();for(;r;){const i=r.length();if(e<i||t&&e===i&&(r.next==null||r.next.length()!==0))return[r,e];e-=i,r=s()}return[null,0]}forEach(e){const t=this.iterator();let s=t();for(;s;)e(s),s=t()}forEachAt(e,t,s){if(t<=0)return;const[r,i]=this.find(e);let o=e-i;const a=this.iterator(r);let l=a();for(;l&&o<e+t;){const c=l.length();e>o?s(l,e-o,Math.min(t,o+c-e)):s(l,0,Math.min(c,e+t-o)),o+=c,l=a()}}map(e){return this.reduce((t,s)=>(t.push(e(s)),t),[])}reduce(e,t){const s=this.iterator();let r=s();for(;r;)t=e(t,r),r=s();return t}}function mu(n,e){const t=e.find(n);if(t)return t;try{return e.create(n)}catch{const s=e.create(ne.INLINE);return Array.from(n.childNodes).forEach(r=>{s.domNode.appendChild(r)}),n.parentNode&&n.parentNode.replaceChild(s.domNode,n),s.attach(),s}}const Ud=class Ut extends Pd{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,Ut.uiClass&&this.uiNode.classList.add(Ut.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Hy,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=mu(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Yn)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(s,r,i)=>{s.deleteAt(r,i)})}descendant(e,t=0){const[s,r]=this.children.find(t);return e.blotName==null&&e(s)||e.blotName!=null&&s instanceof e?[s,r]:s instanceof Ut?s.descendant(e,r):[null,-1]}descendants(e,t=0,s=Number.MAX_VALUE){let r=[],i=s;return this.children.forEachAt(t,s,(o,a,l)=>{(e.blotName==null&&e(o)||e.blotName!=null&&o instanceof e)&&r.push(o),o instanceof Ut&&(r=r.concat(o.descendants(e,a,i))),i-=l}),r}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(s=>t instanceof s)||(t.statics.scope===ne.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof Ut?t.unwrap():t.remove())})}formatAt(e,t,s,r){this.children.forEachAt(e,t,(i,o,a)=>{i.formatAt(o,a,s,r)})}insertAt(e,t,s){const[r,i]=this.children.find(e);if(r)r.insertAt(i,t,s);else{const o=s==null?this.scroll.create("text",t):this.scroll.create(t,s);this.appendChild(o)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let s=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(s=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==s)&&this.domNode.insertBefore(e.domNode,s),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(s=>{e.insertBefore(s,t)})}optimize(e){if(super.optimize(e),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 t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[s,r]=this.children.find(e,t),i=[[this,e]];return s instanceof Ut?i.concat(s.path(r,t)):(s!=null&&i.push([s,r]),i)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const s=typeof e=="string"?this.scroll.create(e,t):e;return s instanceof Ut&&this.moveChildren(s),super.replaceWith(s)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const s=this.clone();return this.parent&&this.parent.insertBefore(s,this.next||void 0),this.children.forEachAt(e,this.length(),(r,i,o)=>{const a=r.split(i,t);a!=null&&s.appendChild(a)}),s}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const s=[],r=[];e.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(s.push(...i.addedNodes),r.push(...i.removedNodes))}),r.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const o=this.scroll.find(i);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),s.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,o)=>i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let o=null;i.nextSibling!=null&&(o=this.scroll.find(i.nextSibling));const a=mu(i,this.scroll);(a.next!==o||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,o||void 0))}),this.enforceAllowedChildren()}};Ud.uiClass="";let Ky=Ud;const at=Ky;function Wy(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}const Vn=class Un extends at{static create(e){return super.create(e)}static formats(e,t){const s=t.query(Un.blotName);if(!(s!=null&&e.tagName===s.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new xi(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(s=>{s instanceof Un||(s=s.wrap(Un.blotName,!0)),this.attributes.copy(s)}),this.unwrap();else{const s=this.scroll.query(e,ne.INLINE);if(s==null)return;s instanceof xt?this.attributes.attribute(s,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,s,r){this.formats()[s]!=null||this.scroll.query(s,ne.ATTRIBUTE)?this.isolate(e,t).format(s,r):super.formatAt(e,t,s,r)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const s=this.next;s instanceof Un&&s.prev===this&&Wy(t,s.formats())&&(s.moveChildren(this),s.remove())}replaceWith(e,t){const s=super.replaceWith(e,t);return this.attributes.copy(s),s}update(e,t){super.update(e,t),e.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}wrap(e,t){const s=super.wrap(e,t);return s instanceof Un&&this.attributes.move(s),s}};Vn.allowedChildren=[Vn,Fe],Vn.blotName="inline",Vn.scope=ne.INLINE_BLOT,Vn.tagName="SPAN";let Gy=Vn;const tl=Gy,$n=class va extends at{static create(e){return super.create(e)}static formats(e,t){const s=t.query(va.blotName);if(!(s!=null&&e.tagName===s.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new xi(this.domNode)}format(e,t){const s=this.scroll.query(e,ne.BLOCK);s!=null&&(s instanceof xt?this.attributes.attribute(s,t):e===this.statics.blotName&&!t?this.replaceWith(va.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,s,r){this.scroll.query(s,ne.BLOCK)!=null?this.format(s,r):super.formatAt(e,t,s,r)}insertAt(e,t,s){if(s==null||this.scroll.query(t,ne.INLINE)!=null)super.insertAt(e,t,s);else{const r=this.split(e);if(r!=null){const i=this.scroll.create(t,s);r.parent.insertBefore(i,r)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const s=super.replaceWith(e,t);return this.attributes.copy(s),s}update(e,t){super.update(e,t),e.some(s=>s.target===this.domNode&&s.type==="attributes")&&this.attributes.build()}};$n.blotName="block",$n.scope=ne.BLOCK_BLOT,$n.tagName="P",$n.allowedChildren=[tl,$n,Fe];let Zy=$n;const Bs=Zy,ya=class extends at{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(n,e){super.deleteAt(n,e),this.enforceAllowedChildren()}formatAt(n,e,t,s){super.formatAt(n,e,t,s),this.enforceAllowedChildren()}insertAt(n,e,t){super.insertAt(n,e,t),this.enforceAllowedChildren()}optimize(n){super.optimize(n),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};ya.blotName="container",ya.scope=ne.BLOCK_BLOT;let Yy=ya;const ki=Yy;class Xy extends Fe{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,s,r){e===0&&t===this.length()?this.format(s,r):super.formatAt(e,t,s,r)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Ge=Xy,Jy={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},Qy=100,zn=class extends at{constructor(n,e){super(null,e),this.registry=n,this.scroll=this,this.build(),this.observer=new MutationObserver(t=>{this.update(t)}),this.observer.observe(this.domNode,Jy),this.attach()}create(n,e){return this.registry.create(this,n,e)}find(n,e=!1){const t=this.registry.find(n,e);return t?t.scroll===this?t:e?this.find(t.scroll.domNode.parentNode,!0):null:null}query(n,e=ne.ANY){return this.registry.query(n,e)}register(...n){return this.registry.register(...n)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(n,e){this.update(),n===0&&e===this.length()?this.children.forEach(t=>{t.remove()}):super.deleteAt(n,e)}formatAt(n,e,t,s){this.update(),super.formatAt(n,e,t,s)}insertAt(n,e,t){this.update(),super.insertAt(n,e,t)}optimize(n=[],e={}){super.optimize(e);const t=e.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)n.push(s.pop());const r=(a,l=!0)=>{a==null||a===this||a.domNode.parentNode!=null&&(t.has(a.domNode)||t.set(a.domNode,[]),l&&r(a.parent))},i=a=>{t.has(a.domNode)&&(a instanceof at&&a.children.forEach(i),t.delete(a.domNode),a.optimize(e))};let o=n;for(let a=0;o.length>0;a+=1){if(a>=Qy)throw new Error("[Parchment] Maximum optimize iterations reached");for(o.forEach(l=>{const c=this.find(l.target,!0);c!=null&&(c.domNode===l.target&&(l.type==="childList"?(r(this.find(l.previousSibling,!1)),Array.from(l.addedNodes).forEach(f=>{const v=this.find(f,!1);r(v,!1),v instanceof at&&v.children.forEach(d=>{r(d,!1)})})):l.type==="attributes"&&r(c.prev)),r(c))}),this.children.forEach(i),o=Array.from(this.observer.takeRecords()),s=o.slice();s.length>0;)n.push(s.pop())}}update(n,e={}){n=n||this.observer.takeRecords();const t=new WeakMap;n.map(s=>{const r=this.find(s.target,!0);return r==null?null:t.has(r.domNode)?(t.get(r.domNode).push(s),null):(t.set(r.domNode,[s]),r)}).forEach(s=>{s!=null&&s!==this&&t.has(s.domNode)&&s.update(t.get(s.domNode)||[],e)}),e.mutationsMap=t,t.has(this.domNode)&&super.update(t.get(this.domNode),e),this.optimize(n,e)}};zn.blotName="scroll",zn.defaultChild=Bs,zn.allowedChildren=[Bs,ki],zn.scope=ne.BLOCK_BLOT,zn.tagName="DIV";let eb=zn;const nl=eb,ba=class $d extends Fe{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,s){s==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,s)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof $d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const s=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(s,this.next||void 0),this.text=this.statics.value(this.domNode),s}update(e,t){e.some(s=>s.type==="characterData"&&s.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};ba.blotName="text",ba.scope=ne.INLINE_BLOT;let tb=ba;const Jr=tb,nb=Object.freeze(Object.defineProperty({__proto__:null,Attributor:xt,AttributorStore:xi,BlockBlot:Bs,ClassAttributor:ut,ContainerBlot:ki,EmbedBlot:Ge,InlineBlot:tl,LeafBlot:Fe,ParentBlot:at,Registry:is,Scope:ne,ScrollBlot:nl,StyleAttributor:Qt,TextBlot:Jr},Symbol.toStringTag,{value:"Module"}));var Ro={exports:{}},Io,gu;function sb(){if(gu)return Io;gu=1;var n=-1,e=1,t=0;function s(y,j,_,U,P){if(y===j)return y?[[t,y]]:[];if(_!=null){var O=fe(y,j,_);if(O)return O}var D=a(y,j),Z=y.substring(0,D);y=y.substring(D),j=j.substring(D),D=c(y,j);var Y=y.substring(y.length-D);y=y.substring(0,y.length-D),j=j.substring(0,j.length-D);var N=r(y,j);return Z&&N.unshift([t,Z]),Y&&N.push([t,Y]),w(N,P),U&&v(N),N}function r(y,j){var _;if(!y)return[[e,j]];if(!j)return[[n,y]];var U=y.length>j.length?y:j,P=y.length>j.length?j:y,O=U.indexOf(P);if(O!==-1)return _=[[e,U.substring(0,O)],[t,P],[e,U.substring(O+P.length)]],y.length>j.length&&(_[0][0]=_[2][0]=n),_;if(P.length===1)return[[n,y],[e,j]];var D=f(y,j);if(D){var Z=D[0],Y=D[1],N=D[2],L=D[3],F=D[4],G=s(Z,N),H=s(Y,L);return G.concat([[t,F]],H)}return i(y,j)}function i(y,j){for(var _=y.length,U=j.length,P=Math.ceil((_+U)/2),O=P,D=2*P,Z=new Array(D),Y=new Array(D),N=0;N<D;N++)Z[N]=-1,Y[N]=-1;Z[O+1]=0,Y[O+1]=0;for(var L=_-U,F=L%2!==0,G=0,H=0,$=0,X=0,M=0;M<P;M++){for(var B=-M+G;B<=M-H;B+=2){var K=O+B,V;B===-M||B!==M&&Z[K-1]<Z[K+1]?V=Z[K+1]:V=Z[K-1]+1;for(var J=V-B;V<_&&J<U&&y.charAt(V)===j.charAt(J);)V++,J++;if(Z[K]=V,V>_)H+=2;else if(J>U)G+=2;else if(F){var I=O+L-B;if(I>=0&&I<D&&Y[I]!==-1){var ue=_-Y[I];if(V>=ue)return o(y,j,V,J)}}}for(var xe=-M+$;xe<=M-X;xe+=2){var I=O+xe,ue;xe===-M||xe!==M&&Y[I-1]<Y[I+1]?ue=Y[I+1]:ue=Y[I-1]+1;for(var Ne=ue-xe;ue<_&&Ne<U&&y.charAt(_-ue-1)===j.charAt(U-Ne-1);)ue++,Ne++;if(Y[I]=ue,ue>_)X+=2;else if(Ne>U)$+=2;else if(!F){var K=O+L-xe;if(K>=0&&K<D&&Z[K]!==-1){var V=Z[K],J=O+V-K;if(ue=_-ue,V>=ue)return o(y,j,V,J)}}}}return[[n,y],[e,j]]}function o(y,j,_,U){var P=y.substring(0,_),O=j.substring(0,U),D=y.substring(_),Z=j.substring(U),Y=s(P,O),N=s(D,Z);return Y.concat(N)}function a(y,j){if(!y||!j||y.charAt(0)!==j.charAt(0))return 0;for(var _=0,U=Math.min(y.length,j.length),P=U,O=0;_<P;)y.substring(O,P)==j.substring(O,P)?(_=P,O=_):U=P,P=Math.floor((U-_)/2+_);return S(y.charCodeAt(P-1))&&P--,P}function l(y,j){var _=y.length,U=j.length;if(_==0||U==0)return 0;_>U?y=y.substring(_-U):_<U&&(j=j.substring(0,_));var P=Math.min(_,U);if(y==j)return P;for(var O=0,D=1;;){var Z=y.substring(P-D),Y=j.indexOf(Z);if(Y==-1)return O;D+=Y,(Y==0||y.substring(P-D)==j.substring(0,D))&&(O=D,D++)}}function c(y,j){if(!y||!j||y.slice(-1)!==j.slice(-1))return 0;for(var _=0,U=Math.min(y.length,j.length),P=U,O=0;_<P;)y.substring(y.length-P,y.length-O)==j.substring(j.length-P,j.length-O)?(_=P,O=_):U=P,P=Math.floor((U-_)/2+_);return C(y.charCodeAt(y.length-P))&&P--,P}function f(y,j){var _=y.length>j.length?y:j,U=y.length>j.length?j:y;if(_.length<4||U.length*2<_.length)return null;function P(H,$,X){for(var M=H.substring(X,X+Math.floor(H.length/4)),B=-1,K="",V,J,I,ue;(B=$.indexOf(M,B+1))!==-1;){var xe=a(H.substring(X),$.substring(B)),Ne=c(H.substring(0,X),$.substring(0,B));K.length<Ne+xe&&(K=$.substring(B-Ne,B)+$.substring(B,B+xe),V=H.substring(0,X-Ne),J=H.substring(X+xe),I=$.substring(0,B-Ne),ue=$.substring(B+xe))}return K.length*2>=H.length?[V,J,I,ue,K]:null}var O=P(_,U,Math.ceil(_.length/4)),D=P(_,U,Math.ceil(_.length/2)),Z;if(!O&&!D)return null;D?O?Z=O[4].length>D[4].length?O:D:Z=D:Z=O;var Y,N,L,F;y.length>j.length?(Y=Z[0],N=Z[1],L=Z[2],F=Z[3]):(L=Z[0],F=Z[1],Y=Z[2],N=Z[3]);var G=Z[4];return[Y,N,L,F,G]}function v(y){for(var j=!1,_=[],U=0,P=null,O=0,D=0,Z=0,Y=0,N=0;O<y.length;)y[O][0]==t?(_[U++]=O,D=Y,Z=N,Y=0,N=0,P=y[O][1]):(y[O][0]==e?Y+=y[O][1].length:N+=y[O][1].length,P&&P.length<=Math.max(D,Z)&&P.length<=Math.max(Y,N)&&(y.splice(_[U-1],0,[n,P]),y[_[U-1]+1][0]=e,U--,U--,O=U>0?_[U-1]:-1,D=0,Z=0,Y=0,N=0,P=null,j=!0)),O++;for(j&&w(y),E(y),O=1;O<y.length;){if(y[O-1][0]==n&&y[O][0]==e){var L=y[O-1][1],F=y[O][1],G=l(L,F),H=l(F,L);G>=H?(G>=L.length/2||G>=F.length/2)&&(y.splice(O,0,[t,F.substring(0,G)]),y[O-1][1]=L.substring(0,L.length-G),y[O+1][1]=F.substring(G),O++):(H>=L.length/2||H>=F.length/2)&&(y.splice(O,0,[t,L.substring(0,H)]),y[O-1][0]=e,y[O-1][1]=F.substring(0,F.length-H),y[O+1][0]=n,y[O+1][1]=L.substring(H),O++),O++}O++}}var d=/[^a-zA-Z0-9]/,h=/\s/,m=/[\r\n]/,g=/\n\r?\n$/,b=/^\r?\n\r?\n/;function E(y){function j(H,$){if(!H||!$)return 6;var X=H.charAt(H.length-1),M=$.charAt(0),B=X.match(d),K=M.match(d),V=B&&X.match(h),J=K&&M.match(h),I=V&&X.match(m),ue=J&&M.match(m),xe=I&&H.match(g),Ne=ue&&$.match(b);return xe||Ne?5:I||ue?4:B&&!V&&J?3:V||J?2:B||K?1:0}for(var _=1;_<y.length-1;){if(y[_-1][0]==t&&y[_+1][0]==t){var U=y[_-1][1],P=y[_][1],O=y[_+1][1],D=c(U,P);if(D){var Z=P.substring(P.length-D);U=U.substring(0,U.length-D),P=Z+P.substring(0,P.length-D),O=Z+O}for(var Y=U,N=P,L=O,F=j(U,P)+j(P,O);P.charAt(0)===O.charAt(0);){U+=P.charAt(0),P=P.substring(1)+O.charAt(0),O=O.substring(1);var G=j(U,P)+j(P,O);G>=F&&(F=G,Y=U,N=P,L=O)}y[_-1][1]!=Y&&(Y?y[_-1][1]=Y:(y.splice(_-1,1),_--),y[_][1]=N,L?y[_+1][1]=L:(y.splice(_+1,1),_--))}_++}}function w(y,j){y.push([t,""]);for(var _=0,U=0,P=0,O="",D="",Z;_<y.length;){if(_<y.length-1&&!y[_][1]){y.splice(_,1);continue}switch(y[_][0]){case e:P++,D+=y[_][1],_++;break;case n:U++,O+=y[_][1],_++;break;case t:var Y=_-P-U-1;if(j){if(Y>=0&&z(y[Y][1])){var N=y[Y][1].slice(-1);if(y[Y][1]=y[Y][1].slice(0,-1),O=N+O,D=N+D,!y[Y][1]){y.splice(Y,1),_--;var L=Y-1;y[L]&&y[L][0]===e&&(P++,D=y[L][1]+D,L--),y[L]&&y[L][0]===n&&(U++,O=y[L][1]+O,L--),Y=L}}if(A(y[_][1])){var N=y[_][1].charAt(0);y[_][1]=y[_][1].slice(1),O+=N,D+=N}}if(_<y.length-1&&!y[_][1]){y.splice(_,1);break}if(O.length>0||D.length>0){O.length>0&&D.length>0&&(Z=a(D,O),Z!==0&&(Y>=0?y[Y][1]+=D.substring(0,Z):(y.splice(0,0,[t,D.substring(0,Z)]),_++),D=D.substring(Z),O=O.substring(Z)),Z=c(D,O),Z!==0&&(y[_][1]=D.substring(D.length-Z)+y[_][1],D=D.substring(0,D.length-Z),O=O.substring(0,O.length-Z)));var F=P+U;O.length===0&&D.length===0?(y.splice(_-F,F),_=_-F):O.length===0?(y.splice(_-F,F,[e,D]),_=_-F+1):D.length===0?(y.splice(_-F,F,[n,O]),_=_-F+1):(y.splice(_-F,F,[n,O],[e,D]),_=_-F+2)}_!==0&&y[_-1][0]===t?(y[_-1][1]+=y[_][1],y.splice(_,1)):_++,P=0,U=0,O="",D="";break}}y[y.length-1][1]===""&&y.pop();var G=!1;for(_=1;_<y.length-1;)y[_-1][0]===t&&y[_+1][0]===t&&(y[_][1].substring(y[_][1].length-y[_-1][1].length)===y[_-1][1]?(y[_][1]=y[_-1][1]+y[_][1].substring(0,y[_][1].length-y[_-1][1].length),y[_+1][1]=y[_-1][1]+y[_+1][1],y.splice(_-1,1),G=!0):y[_][1].substring(0,y[_+1][1].length)==y[_+1][1]&&(y[_-1][1]+=y[_+1][1],y[_][1]=y[_][1].substring(y[_+1][1].length)+y[_+1][1],y.splice(_+1,1),G=!0)),_++;G&&w(y,j)}function S(y){return y>=55296&&y<=56319}function C(y){return y>=56320&&y<=57343}function A(y){return C(y.charCodeAt(0))}function z(y){return S(y.charCodeAt(y.length-1))}function W(y){for(var j=[],_=0;_<y.length;_++)y[_][1].length>0&&j.push(y[_]);return j}function ae(y,j,_,U){return z(y)||A(U)?null:W([[t,y],[n,j],[e,_],[t,U]])}function fe(y,j,_){var U=typeof _=="number"?{index:_,length:0}:_.oldRange,P=typeof _=="number"?null:_.newRange,O=y.length,D=j.length;if(U.length===0&&(P===null||P.length===0)){var Z=U.index,Y=y.slice(0,Z),N=y.slice(Z),L=P?P.index:null;e:{var F=Z+D-O;if(L!==null&&L!==F||F<0||F>D)break e;var G=j.slice(0,F),H=j.slice(F);if(H!==N)break e;var $=Math.min(Z,F),X=Y.slice(0,$),M=G.slice(0,$);if(X!==M)break e;var B=Y.slice($),K=G.slice($);return ae(X,B,K,N)}e:{if(L!==null&&L!==Z)break e;var V=Z,G=j.slice(0,V),H=j.slice(V);if(G!==Y)break e;var J=Math.min(O-V,D-V),I=N.slice(N.length-J),ue=H.slice(H.length-J);if(I!==ue)break e;var B=N.slice(0,N.length-J),K=H.slice(0,H.length-J);return ae(Y,B,K,I)}}if(U.length>0&&P&&P.length===0)e:{var X=y.slice(0,U.index),I=y.slice(U.index+U.length),$=X.length,J=I.length;if(D<$+J)break e;var M=j.slice(0,$),ue=j.slice(D-J);if(X!==M||I!==ue)break e;var B=y.slice($,O-J),K=j.slice($,D-J);return ae(X,B,K,I)}return null}function me(y,j,_,U){return s(y,j,_,U,!0)}return me.INSERT=e,me.DELETE=n,me.EQUAL=t,Io=me,Io}var Dr={exports:{}};Dr.exports;var vu;function zd(){return vu||(vu=1,function(n,e){var t=200,s="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",v="[object GeneratorFunction]",d="[object Map]",h="[object Number]",m="[object Object]",g="[object Promise]",b="[object RegExp]",E="[object Set]",w="[object String]",S="[object Symbol]",C="[object WeakMap]",A="[object ArrayBuffer]",z="[object DataView]",W="[object Float32Array]",ae="[object Float64Array]",fe="[object Int8Array]",me="[object Int16Array]",y="[object Int32Array]",j="[object Uint8Array]",_="[object Uint8ClampedArray]",U="[object Uint16Array]",P="[object Uint32Array]",O=/[\\^$.*+?()[\]{}|]/g,D=/\w*$/,Z=/^\[object .+?Constructor\]$/,Y=/^(?:0|[1-9]\d*)$/,N={};N[i]=N[o]=N[A]=N[z]=N[a]=N[l]=N[W]=N[ae]=N[fe]=N[me]=N[y]=N[d]=N[h]=N[m]=N[b]=N[E]=N[w]=N[S]=N[j]=N[_]=N[U]=N[P]=!0,N[c]=N[f]=N[C]=!1;var L=typeof Te.ai=="object"&&Te.ai&&Te.ai.Object===Object&&Te.ai,F=typeof self=="object"&&self&&self.Object===Object&&self,G=L||F||Function("return this")(),H=e&&!e.nodeType&&e,$=H&&!0&&n&&!n.nodeType&&n,X=$&&$.exports===H;function M(u,p){return u.set(p[0],p[1]),u}function B(u,p){return u.add(p),u}function K(u,p){for(var k=-1,R=u?u.length:0;++k<R&&p(u[k],k,u)!==!1;);return u}function V(u,p){for(var k=-1,R=p.length,ce=u.length;++k<R;)u[ce+k]=p[k];return u}function J(u,p,k,R){for(var ce=-1,oe=u?u.length:0;++ce<oe;)k=p(k,u[ce],ce,u);return k}function I(u,p){for(var k=-1,R=Array(u);++k<u;)R[k]=p(k);return R}function ue(u,p){return u==null?void 0:u[p]}function xe(u){var p=!1;if(u!=null&&typeof u.toString!="function")try{p=!!(u+"")}catch{}return p}function Ne(u){var p=-1,k=Array(u.size);return u.forEach(function(R,ce){k[++p]=[ce,R]}),k}function wt(u,p){return function(k){return u(p(k))}}function Xs(u){var p=-1,k=Array(u.size);return u.forEach(function(R){k[++p]=R}),k}var Ii=Array.prototype,Li=Function.prototype,Cn=Object.prototype,hs=G["__core-js_shared__"],Js=function(){var u=/[^.]+$/.exec(hs&&hs.keys&&hs.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),Qs=Li.toString,dt=Cn.hasOwnProperty,On=Cn.toString,qi=RegExp("^"+Qs.call(dt).replace(O,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tn=X?G.Buffer:void 0,Tn=G.Symbol,ds=G.Uint8Array,Ze=wt(Object.getPrototypeOf,Object),er=Object.create,tr=Cn.propertyIsEnumerable,ji=Ii.splice,fs=Object.getOwnPropertySymbols,Rn=tn?tn.isBuffer:void 0,nr=wt(Object.keys,Object),In=nt(G,"DataView"),nn=nt(G,"Map"),tt=nt(G,"Promise"),Ln=nt(G,"Set"),ps=nt(G,"WeakMap"),sn=nt(Object,"create"),ms=Ue(In),rn=Ue(nn),gs=Ue(tt),vs=Ue(Ln),ys=Ue(ps),Bt=Tn?Tn.prototype:void 0,sr=Bt?Bt.valueOf:void 0;function Et(u){var p=-1,k=u?u.length:0;for(this.clear();++p<k;){var R=u[p];this.set(R[0],R[1])}}function Mi(){this.__data__=sn?sn(null):{}}function Di(u){return this.has(u)&&delete this.__data__[u]}function Fi(u){var p=this.__data__;if(sn){var k=p[u];return k===s?void 0:k}return dt.call(p,u)?p[u]:void 0}function rr(u){var p=this.__data__;return sn?p[u]!==void 0:dt.call(p,u)}function bs(u,p){var k=this.__data__;return k[u]=sn&&p===void 0?s:p,this}Et.prototype.clear=Mi,Et.prototype.delete=Di,Et.prototype.get=Fi,Et.prototype.has=rr,Et.prototype.set=bs;function Ie(u){var p=-1,k=u?u.length:0;for(this.clear();++p<k;){var R=u[p];this.set(R[0],R[1])}}function Bi(){this.__data__=[]}function Pi(u){var p=this.__data__,k=jn(p,u);if(k<0)return!1;var R=p.length-1;return k==R?p.pop():ji.call(p,k,1),!0}function Vi(u){var p=this.__data__,k=jn(p,u);return k<0?void 0:p[k][1]}function Ui(u){return jn(this.__data__,u)>-1}function $i(u,p){var k=this.__data__,R=jn(k,u);return R<0?k.push([u,p]):k[R][1]=p,this}Ie.prototype.clear=Bi,Ie.prototype.delete=Pi,Ie.prototype.get=Vi,Ie.prototype.has=Ui,Ie.prototype.set=$i;function je(u){var p=-1,k=u?u.length:0;for(this.clear();++p<k;){var R=u[p];this.set(R[0],R[1])}}function zi(){this.__data__={hash:new Et,map:new(nn||Ie),string:new Et}}function Hi(u){return an(this,u).delete(u)}function Ki(u){return an(this,u).get(u)}function Wi(u){return an(this,u).has(u)}function Gi(u,p){return an(this,u).set(u,p),this}je.prototype.clear=zi,je.prototype.delete=Hi,je.prototype.get=Ki,je.prototype.has=Wi,je.prototype.set=Gi;function $e(u){this.__data__=new Ie(u)}function Zi(){this.__data__=new Ie}function Yi(u){return this.__data__.delete(u)}function Xi(u){return this.__data__.get(u)}function Ji(u){return this.__data__.has(u)}function Qi(u,p){var k=this.__data__;if(k instanceof Ie){var R=k.__data__;if(!nn||R.length<t-1)return R.push([u,p]),this;k=this.__data__=new je(R)}return k.set(u,p),this}$e.prototype.clear=Zi,$e.prototype.delete=Yi,$e.prototype.get=Xi,$e.prototype.has=Ji,$e.prototype.set=Qi;function qn(u,p){var k=Es(u)||Dn(u)?I(u.length,String):[],R=k.length,ce=!!R;for(var oe in u)dt.call(u,oe)&&!(ce&&(oe=="length"||po(oe,R)))&&k.push(oe);return k}function ir(u,p,k){var R=u[p];(!(dt.call(u,p)&&cr(R,k))||k===void 0&&!(p in u))&&(u[p]=k)}function jn(u,p){for(var k=u.length;k--;)if(cr(u[k][0],p))return k;return-1}function ft(u,p){return u&&ws(p,Ns(p),u)}function xs(u,p,k,R,ce,oe,ge){var pe;if(R&&(pe=oe?R(u,ce,oe,ge):R(u)),pe!==void 0)return pe;if(!mt(u))return u;var Ae=Es(u);if(Ae){if(pe=ho(u),!p)return lo(u,pe)}else{var ve=Nt(u),Me=ve==f||ve==v;if(hr(u))return Mn(u,p);if(ve==m||ve==i||Me&&!oe){if(xe(u))return oe?u:{};if(pe=pt(Me?{}:u),!p)return uo(u,ft(pe,u))}else{if(!N[ve])return oe?u:{};pe=fo(u,ve,xs,p)}}ge||(ge=new $e);var ze=ge.get(u);if(ze)return ze;if(ge.set(u,pe),!Ae)var Oe=k?co(u):Ns(u);return K(Oe||u,function(De,Le){Oe&&(Le=De,De=u[Le]),ir(pe,Le,xs(De,p,k,R,Le,u,ge))}),pe}function eo(u){return mt(u)?er(u):{}}function to(u,p,k){var R=p(u);return Es(u)?R:V(R,k(u))}function no(u){return On.call(u)}function so(u){if(!mt(u)||go(u))return!1;var p=_s(u)||xe(u)?qi:Z;return p.test(Ue(u))}function ro(u){if(!lr(u))return nr(u);var p=[];for(var k in Object(u))dt.call(u,k)&&k!="constructor"&&p.push(k);return p}function Mn(u,p){if(p)return u.slice();var k=new u.constructor(u.length);return u.copy(k),k}function ks(u){var p=new u.constructor(u.byteLength);return new ds(p).set(new ds(u)),p}function on(u,p){var k=p?ks(u.buffer):u.buffer;return new u.constructor(k,u.byteOffset,u.byteLength)}function or(u,p,k){var R=p?k(Ne(u),!0):Ne(u);return J(R,M,new u.constructor)}function ar(u){var p=new u.constructor(u.source,D.exec(u));return p.lastIndex=u.lastIndex,p}function io(u,p,k){var R=p?k(Xs(u),!0):Xs(u);return J(R,B,new u.constructor)}function oo(u){return sr?Object(sr.call(u)):{}}function ao(u,p){var k=p?ks(u.buffer):u.buffer;return new u.constructor(k,u.byteOffset,u.length)}function lo(u,p){var k=-1,R=u.length;for(p||(p=Array(R));++k<R;)p[k]=u[k];return p}function ws(u,p,k,R){k||(k={});for(var ce=-1,oe=p.length;++ce<oe;){var ge=p[ce],pe=void 0;ir(k,ge,pe===void 0?u[ge]:pe)}return k}function uo(u,p){return ws(u,_t(u),p)}function co(u){return to(u,Ns,_t)}function an(u,p){var k=u.__data__;return mo(p)?k[typeof p=="string"?"string":"hash"]:k.map}function nt(u,p){var k=ue(u,p);return so(k)?k:void 0}var _t=fs?wt(fs,Object):yo,Nt=no;(In&&Nt(new In(new ArrayBuffer(1)))!=z||nn&&Nt(new nn)!=d||tt&&Nt(tt.resolve())!=g||Ln&&Nt(new Ln)!=E||ps&&Nt(new ps)!=C)&&(Nt=function(u){var p=On.call(u),k=p==m?u.constructor:void 0,R=k?Ue(k):void 0;if(R)switch(R){case ms:return z;case rn:return d;case gs:return g;case vs:return E;case ys:return C}return p});function ho(u){var p=u.length,k=u.constructor(p);return p&&typeof u[0]=="string"&&dt.call(u,"index")&&(k.index=u.index,k.input=u.input),k}function pt(u){return typeof u.constructor=="function"&&!lr(u)?eo(Ze(u)):{}}function fo(u,p,k,R){var ce=u.constructor;switch(p){case A:return ks(u);case a:case l:return new ce(+u);case z:return on(u,R);case W:case ae:case fe:case me:case y:case j:case _:case U:case P:return ao(u,R);case d:return or(u,R,k);case h:case w:return new ce(u);case b:return ar(u);case E:return io(u,R,k);case S:return oo(u)}}function po(u,p){return p=p??r,!!p&&(typeof u=="number"||Y.test(u))&&u>-1&&u%1==0&&u<p}function mo(u){var p=typeof u;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?u!=="__proto__":u===null}function go(u){return!!Js&&Js in u}function lr(u){var p=u&&u.constructor,k=typeof p=="function"&&p.prototype||Cn;return u===k}function Ue(u){if(u!=null){try{return Qs.call(u)}catch{}try{return u+""}catch{}}return""}function ur(u){return xs(u,!0,!0)}function cr(u,p){return u===p||u!==u&&p!==p}function Dn(u){return vo(u)&&dt.call(u,"callee")&&(!tr.call(u,"callee")||On.call(u)==i)}var Es=Array.isArray;function Fn(u){return u!=null&&dr(u.length)&&!_s(u)}function vo(u){return fr(u)&&Fn(u)}var hr=Rn||bo;function _s(u){var p=mt(u)?On.call(u):"";return p==f||p==v}function dr(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=r}function mt(u){var p=typeof u;return!!u&&(p=="object"||p=="function")}function fr(u){return!!u&&typeof u=="object"}function Ns(u){return Fn(u)?qn(u):ro(u)}function yo(){return[]}function bo(){return!1}n.exports=ur}(Dr,Dr.exports)),Dr.exports}var Fr={exports:{}};Fr.exports;var yu;function Hd(){return yu||(yu=1,function(n,e){var t=200,s="__lodash_hash_undefined__",r=1,i=2,o=9007199254740991,a="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",f="[object Boolean]",v="[object Date]",d="[object Error]",h="[object Function]",m="[object GeneratorFunction]",g="[object Map]",b="[object Number]",E="[object Null]",w="[object Object]",S="[object Promise]",C="[object Proxy]",A="[object RegExp]",z="[object Set]",W="[object String]",ae="[object Symbol]",fe="[object Undefined]",me="[object WeakMap]",y="[object ArrayBuffer]",j="[object DataView]",_="[object Float32Array]",U="[object Float64Array]",P="[object Int8Array]",O="[object Int16Array]",D="[object Int32Array]",Z="[object Uint8Array]",Y="[object Uint8ClampedArray]",N="[object Uint16Array]",L="[object Uint32Array]",F=/[\\^$.*+?()[\]{}|]/g,G=/^\[object .+?Constructor\]$/,H=/^(?:0|[1-9]\d*)$/,$={};$[_]=$[U]=$[P]=$[O]=$[D]=$[Z]=$[Y]=$[N]=$[L]=!0,$[a]=$[l]=$[y]=$[f]=$[j]=$[v]=$[d]=$[h]=$[g]=$[b]=$[w]=$[A]=$[z]=$[W]=$[me]=!1;var X=typeof Te.ai=="object"&&Te.ai&&Te.ai.Object===Object&&Te.ai,M=typeof self=="object"&&self&&self.Object===Object&&self,B=X||M||Function("return this")(),K=e&&!e.nodeType&&e,V=K&&!0&&n&&!n.nodeType&&n,J=V&&V.exports===K,I=J&&X.process,ue=function(){try{return I&&I.binding&&I.binding("util")}catch{}}(),xe=ue&&ue.isTypedArray;function Ne(u,p){for(var k=-1,R=u==null?0:u.length,ce=0,oe=[];++k<R;){var ge=u[k];p(ge,k,u)&&(oe[ce++]=ge)}return oe}function wt(u,p){for(var k=-1,R=p.length,ce=u.length;++k<R;)u[ce+k]=p[k];return u}function Xs(u,p){for(var k=-1,R=u==null?0:u.length;++k<R;)if(p(u[k],k,u))return!0;return!1}function Ii(u,p){for(var k=-1,R=Array(u);++k<u;)R[k]=p(k);return R}function Li(u){return function(p){return u(p)}}function Cn(u,p){return u.has(p)}function hs(u,p){return u==null?void 0:u[p]}function Js(u){var p=-1,k=Array(u.size);return u.forEach(function(R,ce){k[++p]=[ce,R]}),k}function Qs(u,p){return function(k){return u(p(k))}}function dt(u){var p=-1,k=Array(u.size);return u.forEach(function(R){k[++p]=R}),k}var On=Array.prototype,qi=Function.prototype,tn=Object.prototype,Tn=B["__core-js_shared__"],ds=qi.toString,Ze=tn.hasOwnProperty,er=function(){var u=/[^.]+$/.exec(Tn&&Tn.keys&&Tn.keys.IE_PROTO||"");return u?"Symbol(src)_1."+u:""}(),tr=tn.toString,ji=RegExp("^"+ds.call(Ze).replace(F,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fs=J?B.Buffer:void 0,Rn=B.Symbol,nr=B.Uint8Array,In=tn.propertyIsEnumerable,nn=On.splice,tt=Rn?Rn.toStringTag:void 0,Ln=Object.getOwnPropertySymbols,ps=fs?fs.isBuffer:void 0,sn=Qs(Object.keys,Object),ms=_t(B,"DataView"),rn=_t(B,"Map"),gs=_t(B,"Promise"),vs=_t(B,"Set"),ys=_t(B,"WeakMap"),Bt=_t(Object,"create"),sr=Ue(ms),Et=Ue(rn),Mi=Ue(gs),Di=Ue(vs),Fi=Ue(ys),rr=Rn?Rn.prototype:void 0,bs=rr?rr.valueOf:void 0;function Ie(u){var p=-1,k=u==null?0:u.length;for(this.clear();++p<k;){var R=u[p];this.set(R[0],R[1])}}function Bi(){this.__data__=Bt?Bt(null):{},this.size=0}function Pi(u){var p=this.has(u)&&delete this.__data__[u];return this.size-=p?1:0,p}function Vi(u){var p=this.__data__;if(Bt){var k=p[u];return k===s?void 0:k}return Ze.call(p,u)?p[u]:void 0}function Ui(u){var p=this.__data__;return Bt?p[u]!==void 0:Ze.call(p,u)}function $i(u,p){var k=this.__data__;return this.size+=this.has(u)?0:1,k[u]=Bt&&p===void 0?s:p,this}Ie.prototype.clear=Bi,Ie.prototype.delete=Pi,Ie.prototype.get=Vi,Ie.prototype.has=Ui,Ie.prototype.set=$i;function je(u){var p=-1,k=u==null?0:u.length;for(this.clear();++p<k;){var R=u[p];this.set(R[0],R[1])}}function zi(){this.__data__=[],this.size=0}function Hi(u){var p=this.__data__,k=Mn(p,u);if(k<0)return!1;var R=p.length-1;return k==R?p.pop():nn.call(p,k,1),--this.size,!0}function Ki(u){var p=this.__data__,k=Mn(p,u);return k<0?void 0:p[k][1]}function Wi(u){return Mn(this.__data__,u)>-1}function Gi(u,p){var k=this.__data__,R=Mn(k,u);return R<0?(++this.size,k.push([u,p])):k[R][1]=p,this}je.prototype.clear=zi,je.prototype.delete=Hi,je.prototype.get=Ki,je.prototype.has=Wi,je.prototype.set=Gi;function $e(u){var p=-1,k=u==null?0:u.length;for(this.clear();++p<k;){var R=u[p];this.set(R[0],R[1])}}function Zi(){this.size=0,this.__data__={hash:new Ie,map:new(rn||je),string:new Ie}}function Yi(u){var p=nt(this,u).delete(u);return this.size-=p?1:0,p}function Xi(u){return nt(this,u).get(u)}function Ji(u){return nt(this,u).has(u)}function Qi(u,p){var k=nt(this,u),R=k.size;return k.set(u,p),this.size+=k.size==R?0:1,this}$e.prototype.clear=Zi,$e.prototype.delete=Yi,$e.prototype.get=Xi,$e.prototype.has=Ji,$e.prototype.set=Qi;function qn(u){var p=-1,k=u==null?0:u.length;for(this.__data__=new $e;++p<k;)this.add(u[p])}function ir(u){return this.__data__.set(u,s),this}function jn(u){return this.__data__.has(u)}qn.prototype.add=qn.prototype.push=ir,qn.prototype.has=jn;function ft(u){var p=this.__data__=new je(u);this.size=p.size}function xs(){this.__data__=new je,this.size=0}function eo(u){var p=this.__data__,k=p.delete(u);return this.size=p.size,k}function to(u){return this.__data__.get(u)}function no(u){return this.__data__.has(u)}function so(u,p){var k=this.__data__;if(k instanceof je){var R=k.__data__;if(!rn||R.length<t-1)return R.push([u,p]),this.size=++k.size,this;k=this.__data__=new $e(R)}return k.set(u,p),this.size=k.size,this}ft.prototype.clear=xs,ft.prototype.delete=eo,ft.prototype.get=to,ft.prototype.has=no,ft.prototype.set=so;function ro(u,p){var k=Dn(u),R=!k&&cr(u),ce=!k&&!R&&Fn(u),oe=!k&&!R&&!ce&&fr(u),ge=k||R||ce||oe,pe=ge?Ii(u.length,String):[],Ae=pe.length;for(var ve in u)Ze.call(u,ve)&&!(ge&&(ve=="length"||ce&&(ve=="offset"||ve=="parent")||oe&&(ve=="buffer"||ve=="byteLength"||ve=="byteOffset")||fo(ve,Ae)))&&pe.push(ve);return pe}function Mn(u,p){for(var k=u.length;k--;)if(ur(u[k][0],p))return k;return-1}function ks(u,p,k){var R=p(u);return Dn(u)?R:wt(R,k(u))}function on(u){return u==null?u===void 0?fe:E:tt&&tt in Object(u)?Nt(u):lr(u)}function or(u){return mt(u)&&on(u)==a}function ar(u,p,k,R,ce){return u===p?!0:u==null||p==null||!mt(u)&&!mt(p)?u!==u&&p!==p:io(u,p,k,R,ar,ce)}function io(u,p,k,R,ce,oe){var ge=Dn(u),pe=Dn(p),Ae=ge?l:pt(u),ve=pe?l:pt(p);Ae=Ae==a?w:Ae,ve=ve==a?w:ve;var Me=Ae==w,ze=ve==w,Oe=Ae==ve;if(Oe&&Fn(u)){if(!Fn(p))return!1;ge=!0,Me=!1}if(Oe&&!Me)return oe||(oe=new ft),ge||fr(u)?ws(u,p,k,R,ce,oe):uo(u,p,Ae,k,R,ce,oe);if(!(k&r)){var De=Me&&Ze.call(u,"__wrapped__"),Le=ze&&Ze.call(p,"__wrapped__");if(De||Le){var Pt=De?u.value():u,St=Le?p.value():p;return oe||(oe=new ft),ce(Pt,St,k,R,oe)}}return Oe?(oe||(oe=new ft),co(u,p,k,R,ce,oe)):!1}function oo(u){if(!dr(u)||mo(u))return!1;var p=hr(u)?ji:G;return p.test(Ue(u))}function ao(u){return mt(u)&&_s(u.length)&&!!$[on(u)]}function lo(u){if(!go(u))return sn(u);var p=[];for(var k in Object(u))Ze.call(u,k)&&k!="constructor"&&p.push(k);return p}function ws(u,p,k,R,ce,oe){var ge=k&r,pe=u.length,Ae=p.length;if(pe!=Ae&&!(ge&&Ae>pe))return!1;var ve=oe.get(u);if(ve&&oe.get(p))return ve==p;var Me=-1,ze=!0,Oe=k&i?new qn:void 0;for(oe.set(u,p),oe.set(p,u);++Me<pe;){var De=u[Me],Le=p[Me];if(R)var Pt=ge?R(Le,De,Me,p,u,oe):R(De,Le,Me,u,p,oe);if(Pt!==void 0){if(Pt)continue;ze=!1;break}if(Oe){if(!Xs(p,function(St,ln){if(!Cn(Oe,ln)&&(De===St||ce(De,St,k,R,oe)))return Oe.push(ln)})){ze=!1;break}}else if(!(De===Le||ce(De,Le,k,R,oe))){ze=!1;break}}return oe.delete(u),oe.delete(p),ze}function uo(u,p,k,R,ce,oe,ge){switch(k){case j:if(u.byteLength!=p.byteLength||u.byteOffset!=p.byteOffset)return!1;u=u.buffer,p=p.buffer;case y:return!(u.byteLength!=p.byteLength||!oe(new nr(u),new nr(p)));case f:case v:case b:return ur(+u,+p);case d:return u.name==p.name&&u.message==p.message;case A:case W:return u==p+"";case g:var pe=Js;case z:var Ae=R&r;if(pe||(pe=dt),u.size!=p.size&&!Ae)return!1;var ve=ge.get(u);if(ve)return ve==p;R|=i,ge.set(u,p);var Me=ws(pe(u),pe(p),R,ce,oe,ge);return ge.delete(u),Me;case ae:if(bs)return bs.call(u)==bs.call(p)}return!1}function co(u,p,k,R,ce,oe){var ge=k&r,pe=an(u),Ae=pe.length,ve=an(p),Me=ve.length;if(Ae!=Me&&!ge)return!1;for(var ze=Ae;ze--;){var Oe=pe[ze];if(!(ge?Oe in p:Ze.call(p,Oe)))return!1}var De=oe.get(u);if(De&&oe.get(p))return De==p;var Le=!0;oe.set(u,p),oe.set(p,u);for(var Pt=ge;++ze<Ae;){Oe=pe[ze];var St=u[Oe],ln=p[Oe];if(R)var ml=ge?R(ln,St,Oe,p,u,oe):R(St,ln,Oe,u,p,oe);if(!(ml===void 0?St===ln||ce(St,ln,k,R,oe):ml)){Le=!1;break}Pt||(Pt=Oe=="constructor")}if(Le&&!Pt){var pr=u.constructor,mr=p.constructor;pr!=mr&&"constructor"in u&&"constructor"in p&&!(typeof pr=="function"&&pr instanceof pr&&typeof mr=="function"&&mr instanceof mr)&&(Le=!1)}return oe.delete(u),oe.delete(p),Le}function an(u){return ks(u,Ns,ho)}function nt(u,p){var k=u.__data__;return po(p)?k[typeof p=="string"?"string":"hash"]:k.map}function _t(u,p){var k=hs(u,p);return oo(k)?k:void 0}function Nt(u){var p=Ze.call(u,tt),k=u[tt];try{u[tt]=void 0;var R=!0}catch{}var ce=tr.call(u);return R&&(p?u[tt]=k:delete u[tt]),ce}var ho=Ln?function(u){return u==null?[]:(u=Object(u),Ne(Ln(u),function(p){return In.call(u,p)}))}:yo,pt=on;(ms&&pt(new ms(new ArrayBuffer(1)))!=j||rn&&pt(new rn)!=g||gs&&pt(gs.resolve())!=S||vs&&pt(new vs)!=z||ys&&pt(new ys)!=me)&&(pt=function(u){var p=on(u),k=p==w?u.constructor:void 0,R=k?Ue(k):"";if(R)switch(R){case sr:return j;case Et:return g;case Mi:return S;case Di:return z;case Fi:return me}return p});function fo(u,p){return p=p??o,!!p&&(typeof u=="number"||H.test(u))&&u>-1&&u%1==0&&u<p}function po(u){var p=typeof u;return p=="string"||p=="number"||p=="symbol"||p=="boolean"?u!=="__proto__":u===null}function mo(u){return!!er&&er in u}function go(u){var p=u&&u.constructor,k=typeof p=="function"&&p.prototype||tn;return u===k}function lr(u){return tr.call(u)}function Ue(u){if(u!=null){try{return ds.call(u)}catch{}try{return u+""}catch{}}return""}function ur(u,p){return u===p||u!==u&&p!==p}var cr=or(function(){return arguments}())?or:function(u){return mt(u)&&Ze.call(u,"callee")&&!In.call(u,"callee")},Dn=Array.isArray;function Es(u){return u!=null&&_s(u.length)&&!hr(u)}var Fn=ps||bo;function vo(u,p){return ar(u,p)}function hr(u){if(!dr(u))return!1;var p=on(u);return p==h||p==m||p==c||p==C}function _s(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=o}function dr(u){var p=typeof u;return u!=null&&(p=="object"||p=="function")}function mt(u){return u!=null&&typeof u=="object"}var fr=xe?Li(xe):ao;function Ns(u){return Es(u)?ro(u):lo(u)}function yo(){return[]}function bo(){return!1}n.exports=vo}(Fr,Fr.exports)),Fr.exports}var kr={},bu;function rb(){if(bu)return kr;bu=1,Object.defineProperty(kr,"__esModule",{value:!0});const n=zd(),e=Hd();var t;return function(s){function r(l={},c={},f=!1){typeof l!="object"&&(l={}),typeof c!="object"&&(c={});let v=n(c);f||(v=Object.keys(v).reduce((d,h)=>(v[h]!=null&&(d[h]=v[h]),d),{}));for(const d in l)l[d]!==void 0&&c[d]===void 0&&(v[d]=l[d]);return Object.keys(v).length>0?v:void 0}s.compose=r;function i(l={},c={}){typeof l!="object"&&(l={}),typeof c!="object"&&(c={});const f=Object.keys(l).concat(Object.keys(c)).reduce((v,d)=>(e(l[d],c[d])||(v[d]=c[d]===void 0?null:c[d]),v),{});return Object.keys(f).length>0?f:void 0}s.diff=i;function o(l={},c={}){l=l||{};const f=Object.keys(c).reduce((v,d)=>(c[d]!==l[d]&&l[d]!==void 0&&(v[d]=c[d]),v),{});return Object.keys(l).reduce((v,d)=>(l[d]!==c[d]&&c[d]===void 0&&(v[d]=null),v),f)}s.invert=o;function a(l,c,f=!1){if(typeof l!="object")return c;if(typeof c!="object")return;if(!f)return c;const v=Object.keys(c).reduce((d,h)=>(l[h]===void 0&&(d[h]=c[h]),d),{});return Object.keys(v).length>0?v:void 0}s.transform=a}(t||(t={})),kr.default=t,kr}var wr={},xu;function Kd(){if(xu)return wr;xu=1,Object.defineProperty(wr,"__esModule",{value:!0});var n;return function(e){function t(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}e.length=t}(n||(n={})),wr.default=n,wr}var Er={},ku;function ib(){if(ku)return Er;ku=1,Object.defineProperty(Er,"__esModule",{value:!0});const n=Kd();class e{constructor(s){this.ops=s,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(s){s||(s=1/0);const r=this.ops[this.index];if(r){const i=this.offset,o=n.default.length(r);if(s>=o-i?(s=o-i,this.index+=1,this.offset=0):this.offset+=s,typeof r.delete=="number")return{delete:s};{const a={};return r.attributes&&(a.attributes=r.attributes),typeof r.retain=="number"?a.retain=s:typeof r.retain=="object"&&r.retain!==null?a.retain=r.retain:typeof r.insert=="string"?a.insert=r.insert.substr(i,s):a.insert=r.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?n.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,r=this.index,i=this.next(),o=this.ops.slice(this.index);return this.offset=s,this.index=r,[i].concat(o)}}else return[]}}return Er.default=e,Er}var wu;function ob(){return wu||(wu=1,function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=sb(),s=zd(),r=Hd(),i=rb();e.AttributeMap=i.default;const o=Kd();e.Op=o.default;const a=ib();e.OpIterator=a.default;const l="\0",c=(v,d)=>{if(typeof v!="object"||v===null)throw new Error(`cannot retain a ${typeof v}`);if(typeof d!="object"||d===null)throw new Error(`cannot retain a ${typeof d}`);const h=Object.keys(v)[0];if(!h||h!==Object.keys(d)[0])throw new Error(`embed types not matched: ${h} != ${Object.keys(d)[0]}`);return[h,v[h],d[h]]};class f{constructor(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]}static registerEmbed(d,h){this.handlers[d]=h}static unregisterEmbed(d){delete this.handlers[d]}static getHandler(d){const h=this.handlers[d];if(!h)throw new Error(`no handlers for embed type "${d}"`);return h}insert(d,h){const m={};return typeof d=="string"&&d.length===0?this:(m.insert=d,h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(m.attributes=h),this.push(m))}delete(d){return d<=0?this:this.push({delete:d})}retain(d,h){if(typeof d=="number"&&d<=0)return this;const m={retain:d};return h!=null&&typeof h=="object"&&Object.keys(h).length>0&&(m.attributes=h),this.push(m)}push(d){let h=this.ops.length,m=this.ops[h-1];if(d=s(d),typeof m=="object"){if(typeof d.delete=="number"&&typeof m.delete=="number")return this.ops[h-1]={delete:m.delete+d.delete},this;if(typeof m.delete=="number"&&d.insert!=null&&(h-=1,m=this.ops[h-1],typeof m!="object"))return this.ops.unshift(d),this;if(r(d.attributes,m.attributes)){if(typeof d.insert=="string"&&typeof m.insert=="string")return this.ops[h-1]={insert:m.insert+d.insert},typeof d.attributes=="object"&&(this.ops[h-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof m.retain=="number")return this.ops[h-1]={retain:m.retain+d.retain},typeof d.attributes=="object"&&(this.ops[h-1].attributes=d.attributes),this}}return h===this.ops.length?this.ops.push(d):this.ops.splice(h,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 h=[],m=[];return this.forEach(g=>{(d(g)?h:m).push(g)}),[h,m]}reduce(d,h){return this.ops.reduce(d,h)}changeLength(){return this.reduce((d,h)=>h.insert?d+o.default.length(h):h.delete?d-h.delete:d,0)}length(){return this.reduce((d,h)=>d+o.default.length(h),0)}slice(d=0,h=1/0){const m=[],g=new a.default(this.ops);let b=0;for(;b<h&&g.hasNext();){let E;b<d?E=g.next(d-b):(E=g.next(h-b),m.push(E)),b+=o.default.length(E)}return new f(m)}compose(d){const h=new a.default(this.ops),m=new a.default(d.ops),g=[],b=m.peek();if(b!=null&&typeof b.retain=="number"&&b.attributes==null){let w=b.retain;for(;h.peekType()==="insert"&&h.peekLength()<=w;)w-=h.peekLength(),g.push(h.next());b.retain-w>0&&m.next(b.retain-w)}const E=new f(g);for(;h.hasNext()||m.hasNext();)if(m.peekType()==="insert")E.push(m.next());else if(h.peekType()==="delete")E.push(h.next());else{const w=Math.min(h.peekLength(),m.peekLength()),S=h.next(w),C=m.next(w);if(C.retain){const A={};if(typeof S.retain=="number")A.retain=typeof C.retain=="number"?w:C.retain;else if(typeof C.retain=="number")S.retain==null?A.insert=S.insert:A.retain=S.retain;else{const W=S.retain==null?"insert":"retain",[ae,fe,me]=c(S[W],C.retain),y=f.getHandler(ae);A[W]={[ae]:y.compose(fe,me,W==="retain")}}const z=i.default.compose(S.attributes,C.attributes,typeof S.retain=="number");if(z&&(A.attributes=z),E.push(A),!m.hasNext()&&r(E.ops[E.ops.length-1],A)){const W=new f(h.rest());return E.concat(W).chop()}}else typeof C.delete=="number"&&(typeof S.retain=="number"||typeof S.retain=="object"&&S.retain!==null)&&E.push(C)}return E.chop()}concat(d){const h=new f(this.ops.slice());return d.ops.length>0&&(h.push(d.ops[0]),h.ops=h.ops.concat(d.ops.slice(1))),h}diff(d,h){if(this.ops===d.ops)return new f;const m=[this,d].map(S=>S.map(C=>{if(C.insert!=null)return typeof C.insert=="string"?C.insert:l;const A=S===d?"on":"with";throw new Error("diff() called "+A+" non-document")}).join("")),g=new f,b=t(m[0],m[1],h,!0),E=new a.default(this.ops),w=new a.default(d.ops);return b.forEach(S=>{let C=S[1].length;for(;C>0;){let A=0;switch(S[0]){case t.INSERT:A=Math.min(w.peekLength(),C),g.push(w.next(A));break;case t.DELETE:A=Math.min(C,E.peekLength()),E.next(A),g.delete(A);break;case t.EQUAL:A=Math.min(E.peekLength(),w.peekLength(),C);const z=E.next(A),W=w.next(A);r(z.insert,W.insert)?g.retain(A,i.default.diff(z.attributes,W.attributes)):g.push(W).delete(A);break}C-=A}}),g.chop()}eachLine(d,h=`
111
- `){const m=new a.default(this.ops);let g=new f,b=0;for(;m.hasNext();){if(m.peekType()!=="insert")return;const E=m.peek(),w=o.default.length(E)-m.peekLength(),S=typeof E.insert=="string"?E.insert.indexOf(h,w)-w:-1;if(S<0)g.push(m.next());else if(S>0)g.push(m.next(S));else{if(d(g,m.next(1).attributes||{},b)===!1)return;b+=1,g=new f}}g.length()>0&&d(g,{},b)}invert(d){const h=new f;return this.reduce((m,g)=>{if(g.insert)h.delete(o.default.length(g));else{if(typeof g.retain=="number"&&g.attributes==null)return h.retain(g.retain),m+g.retain;if(g.delete||typeof g.retain=="number"){const b=g.delete||g.retain;return d.slice(m,m+b).forEach(E=>{g.delete?h.push(E):g.retain&&g.attributes&&h.retain(o.default.length(E),i.default.invert(g.attributes,E.attributes))}),m+b}else if(typeof g.retain=="object"&&g.retain!==null){const b=d.slice(m,m+1),E=new a.default(b.ops).next(),[w,S,C]=c(g.retain,E.insert),A=f.getHandler(w);return h.retain({[w]:A.invert(S,C)},i.default.invert(g.attributes,E.attributes)),m+1}}return m},0),h.chop()}transform(d,h=!1){if(h=!!h,typeof d=="number")return this.transformPosition(d,h);const m=d,g=new a.default(this.ops),b=new a.default(m.ops),E=new f;for(;g.hasNext()||b.hasNext();)if(g.peekType()==="insert"&&(h||b.peekType()!=="insert"))E.retain(o.default.length(g.next()));else if(b.peekType()==="insert")E.push(b.next());else{const w=Math.min(g.peekLength(),b.peekLength()),S=g.next(w),C=b.next(w);if(S.delete)continue;if(C.delete)E.push(C);else{const A=S.retain,z=C.retain;let W=typeof z=="object"&&z!==null?z:w;if(typeof A=="object"&&A!==null&&typeof z=="object"&&z!==null){const ae=Object.keys(A)[0];if(ae===Object.keys(z)[0]){const fe=f.getHandler(ae);fe&&(W={[ae]:fe.transform(A[ae],z[ae],h)})}}E.retain(W,i.default.transform(S.attributes,C.attributes,h))}}return E.chop()}transformPosition(d,h=!1){h=!!h;const m=new a.default(this.ops);let g=0;for(;m.hasNext()&&g<=d;){const b=m.peekLength(),E=m.peekType();if(m.next(),E==="delete"){d-=Math.min(b,d-g);continue}else E==="insert"&&(g<d||!h)&&(d+=b);g+=b}return d}}f.Op=o.default,f.OpIterator=a.default,f.AttributeMap=i.default,f.handlers={},e.default=f,n.exports=f,n.exports.default=f}(Ro,Ro.exports)),Ro.exports}var Je=ob();const te=Te.Jm(Je);class ct extends Ge{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}ct.blotName="break";ct.tagName="BR";let lt=class extends Jr{};const ab={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function wi(n){return n.replace(/[&<>"']/g,e=>ab[e])}const Br=class Hn extends tl{static compare(e,t){const s=Hn.order.indexOf(e),r=Hn.order.indexOf(t);return s>=0||r>=0?s-r:e===t?0:e<t?-1:1}formatAt(e,t,s,r){if(Hn.compare(this.statics.blotName,s)<0&&this.scroll.query(s,ne.BLOT)){const i=this.isolate(e,t);r&&i.wrap(s,r)}else super.formatAt(e,t,s,r)}optimize(e){if(super.optimize(e),this.parent instanceof Hn&&Hn.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};Q(Br,"allowedChildren",[Br,ct,Ge,lt]),Q(Br,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let en=Br;const Eu=1;class qe extends Bs{constructor(){super(...arguments),Q(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Wd(this)),this.cache.delta}deleteAt(e,t){super.deleteAt(e,t),this.cache={}}formatAt(e,t,s,r){t<=0||(this.scroll.query(s,ne.BLOCK)?e+t===this.length()&&this.format(s,r):super.formatAt(e,Math.min(t,this.length()-e-1),s,r),this.cache={})}insertAt(e,t,s){if(s!=null){super.insertAt(e,t,s),this.cache={};return}if(t.length===0)return;const r=t.split(`
112
- `),i=r.shift();i.length>0&&(e<this.length()-1||this.children.tail==null?super.insertAt(Math.min(e,this.length()-1),i):this.children.tail.insertAt(this.children.tail.length(),i),this.cache={});let o=this;r.reduce((a,l)=>(o=o.split(a,!0),o.insertAt(0,l),l.length),e+i.length)}insertBefore(e,t){const{head:s}=this.children;super.insertBefore(e,t),s instanceof ct&&s.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+Eu),this.cache.length}moveChildren(e,t){super.moveChildren(e,t),this.cache={}}optimize(e){super.optimize(e),this.cache={}}path(e){return super.path(e,!0)}removeChild(e){super.removeChild(e),this.cache={}}split(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t&&(e===0||e>=this.length()-Eu)){const r=this.clone();return e===0?(this.parent.insertBefore(r,this),this):(this.parent.insertBefore(r,this.next),r)}const s=super.split(e,t);return this.cache={},s}}qe.blotName="block";qe.tagName="P";qe.defaultChild=ct;qe.allowedChildren=[ct,en,Ge,lt];class Qe extends Ge{attach(){super.attach(),this.attributes=new xi(this.domNode)}delta(){return new te().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const s=this.scroll.query(e,ne.BLOCK_ATTRIBUTE);s!=null&&this.attributes.attribute(s,t)}formatAt(e,t,s,r){this.format(s,r)}insertAt(e,t,s){if(s!=null){super.insertAt(e,t,s);return}const r=t.split(`
113
- `),i=r.pop(),o=r.map(l=>{const c=this.scroll.create(qe.blotName);return c.insertAt(0,l),c}),a=this.split(e);o.forEach(l=>{this.parent.insertBefore(l,a)}),i&&this.parent.insertBefore(this.scroll.create("text",i),a)}}Qe.scope=ne.BLOCK_BLOT;function Wd(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.descendants(Fe).reduce((t,s)=>s.length()===0?t:t.insert(s.value(),Ye(s,{},e)),new te).insert(`
114
- `,Ye(n))}function Ye(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return n==null||("formats"in n&&typeof n.formats=="function"&&(e={...e,...n.formats()},t&&delete e["code-token"]),n.parent==null||n.parent.statics.blotName==="scroll"||n.parent.statics.scope!==n.statics.scope)?e:Ye(n.parent,e,t)}const Ts=class un extends Ge{static value(){}constructor(e,t,s){super(e,t),this.selection=s,this.textNode=document.createTextNode(un.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,t){if(this.savedLength!==0){super.format(e,t);return}let s=this,r=0;for(;s!=null&&s.statics.scope!==ne.BLOCK_BLOT;)r+=s.offset(s.parent),s=s.parent;s!=null&&(this.savedLength=un.CONTENTS.length,s.optimize(),s.formatAt(r,un.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}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 e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof lt?this.prev:null,s=t?t.length():0,r=this.next instanceof lt?this.next:null,i=r?r.text:"",{textNode:o}=this,a=o.data.split(un.CONTENTS).join("");o.data=un.CONTENTS;let l;if(t)l=t,(a||r)&&(t.insertAt(t.length(),a+i),r&&r.remove());else if(r)l=r,r.insertAt(0,a);else{const c=document.createTextNode(a);l=this.scroll.create(c),this.parent.insertBefore(l,this)}if(this.remove(),e){const c=(d,h)=>t&&d===t.domNode?h:d===o?s+h-1:r&&d===r.domNode?s+a.length+h:null,f=c(e.start.node,e.start.offset),v=c(e.end.node,e.end.offset);if(f!==null&&v!==null)return{startNode:l.domNode,startOffset:f,endNode:l.domNode,endOffset:v}}return null}update(e,t){if(e.some(s=>s.type==="characterData"&&s.target===this.textNode)){const s=this.restore();s&&(t.range=s)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=un.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};Q(Ts,"blotName","cursor"),Q(Ts,"className","ql-cursor"),Q(Ts,"tagName","span"),Q(Ts,"CONTENTS","\uFEFF");let Ei=Ts;var _u={exports:{}},Nu;function lb(){return Nu||(Nu=1,function(n){var e=Object.prototype.hasOwnProperty,t="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(t=!1));function r(l,c,f){this.fn=l,this.context=c,this.once=f||!1}function i(l,c,f,v,d){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new r(f,v||l,d),m=t?t+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],h]:l._events[m].push(h):(l._events[m]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new s:delete l._events[c]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],c,f;if(this._eventsCount===0)return l;for(f in c=this._events)e.call(c,f)&&l.push(t?f.slice(1):f);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(c)):l},a.prototype.listeners=function(l){var c=t?t+l:l,f=this._events[c];if(!f)return[];if(f.fn)return[f.fn];for(var v=0,d=f.length,h=new Array(d);v<d;v++)h[v]=f[v].fn;return h},a.prototype.listenerCount=function(l){var c=t?t+l:l,f=this._events[c];return f?f.fn?1:f.length:0},a.prototype.emit=function(l,c,f,v,d,h){var m=t?t+l:l;if(!this._events[m])return!1;var g=this._events[m],b=arguments.length,E,w;if(g.fn){switch(g.once&&this.removeListener(l,g.fn,void 0,!0),b){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,c),!0;case 3:return g.fn.call(g.context,c,f),!0;case 4:return g.fn.call(g.context,c,f,v),!0;case 5:return g.fn.call(g.context,c,f,v,d),!0;case 6:return g.fn.call(g.context,c,f,v,d,h),!0}for(w=1,E=new Array(b-1);w<b;w++)E[w-1]=arguments[w];g.fn.apply(g.context,E)}else{var S=g.length,C;for(w=0;w<S;w++)switch(g[w].once&&this.removeListener(l,g[w].fn,void 0,!0),b){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,c);break;case 3:g[w].fn.call(g[w].context,c,f);break;case 4:g[w].fn.call(g[w].context,c,f,v);break;default:if(!E)for(C=1,E=new Array(b-1);C<b;C++)E[C-1]=arguments[C];g[w].fn.apply(g[w].context,E)}}return!0},a.prototype.on=function(l,c,f){return i(this,l,c,f,!1)},a.prototype.once=function(l,c,f){return i(this,l,c,f,!0)},a.prototype.removeListener=function(l,c,f,v){var d=t?t+l:l;if(!this._events[d])return this;if(!c)return o(this,d),this;var h=this._events[d];if(h.fn)h.fn===c&&(!v||h.once)&&(!f||h.context===f)&&o(this,d);else{for(var m=0,g=[],b=h.length;m<b;m++)(h[m].fn!==c||v&&!h[m].once||f&&h[m].context!==f)&&g.push(h[m]);g.length?this._events[d]=g.length===1?g[0]:g:o(this,d)}return this},a.prototype.removeAllListeners=function(l){var c;return l?(c=t?t+l:l,this._events[c]&&o(this,c)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a}(_u)),_u.exports}var ub=lb();const cb=Te.Jm(ub),xa=new WeakMap,ka=["error","warn","log","info"];let wa="warn";function Gd(n){if(wa&&ka.indexOf(n)<=ka.indexOf(wa)){for(var e=arguments.length,t=new Array(e>1?e-1:0),s=1;s<e;s++)t[s-1]=arguments[s];console[n](...t)}}function Ft(n){return ka.reduce((e,t)=>(e[t]=Gd.bind(console,t,n),e),{})}Ft.level=n=>{wa=n};Gd.level=Ft.level;const Lo=Ft("quill:events"),hb=["selectionchange","mousedown","mouseup","click"];hb.forEach(n=>{document.addEventListener(n,function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];Array.from(document.querySelectorAll(".ql-container")).forEach(r=>{const i=xa.get(r);i&&i.emitter&&i.emitter.handleDOM(...t)})})});class ee extends cb{constructor(){super(),this.domListeners={},this.on("error",Lo.error)}emit(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return Lo.log.call(Lo,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),r=1;r<t;r++)s[r-1]=arguments[r];(this.domListeners[e.type]||[]).forEach(i=>{let{node:o,handler:a}=i;(e.target===o||o.contains(e.target))&&a(e,...s)})}listenDOM(e,t,s){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:s})}}Q(ee,"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"}),Q(ee,"sources",{API:"api",SILENT:"silent",USER:"user"});const qo=Ft("quill:selection");class kn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}}class db{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new kn(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,ee.sources.USER),1)}),this.emitter.on(ee.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const s=this.getNativeRange();s!=null&&s.start.node!==this.cursor.textNode&&this.emitter.once(ee.events.SCROLL_UPDATE,(r,i)=>{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=i.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?ee.sources.SILENT:r)}catch{}})}),this.emitter.on(ee.events.SCROLL_OPTIMIZE,(s,r)=>{if(r.range){const{startNode:i,startOffset:o,endNode:a,endOffset:l}=r.range;this.setNativeRange(i,o,a,l),this.update(ee.sources.SILENT)}}),this.update(ee.sources.SILENT)}handleComposition(){this.emitter.on(ee.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on(ee.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update(ee.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const s=this.getNativeRange();if(!(s==null||!s.native.collapsed||this.scroll.query(e,ne.BLOCK))){if(s.start.node!==this.cursor.textNode){const r=this.scroll.find(s.start.node,!1);if(r==null)return;if(r instanceof Fe){const i=r.split(s.start.offset);r.parent.insertBefore(this.cursor,i)}else r.insertBefore(this.cursor,s.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const s=this.scroll.length();e=Math.min(e,s-1),t=Math.min(e+t,s-1)-e;let r,[i,o]=this.scroll.leaf(e);if(i==null)return null;if(t>0&&o===i.length()){const[f]=this.scroll.leaf(e+1);if(f){const[v]=this.scroll.line(e),[d]=this.scroll.line(e+1);v===d&&(i=f,o=0)}}[r,o]=i.position(o,!0);const a=document.createRange();if(t>0)return a.setStart(r,o),[i,o]=this.scroll.leaf(e+t),i==null?null:([r,o]=i.position(o,!0),a.setEnd(r,o),a.getBoundingClientRect());let l="left",c;if(r instanceof Text){if(!r.data.length)return null;o<r.data.length?(a.setStart(r,o),a.setEnd(r,o+1)):(a.setStart(r,o-1),a.setEnd(r,o),l="right"),c=a.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;c=i.domNode.getBoundingClientRect(),o>0&&(l="right")}return{bottom:c.top+c.height,height:c.height,left:c[l],right:c[l],top:c.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(t==null)return null;const s=this.normalizeNative(t);return qo.info("getNativeRange",s),s}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&jo(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const s=t.map(o=>{const[a,l]=o,c=this.scroll.find(a,!0),f=c.offset(this.scroll);return l===0?f:c instanceof Fe?f+c.index(a,l):f+c.length()}),r=Math.min(Math.max(...s),this.scroll.length()-1),i=Math.min(r,...s);return new kn(i,r-i)}normalizeNative(e){if(!jo(this.root,e.startContainer)||!e.collapsed&&!jo(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(s=>{let{node:r,offset:i}=s;for(;!(r instanceof Text)&&r.childNodes.length>0;)if(r.childNodes.length>i)r=r.childNodes[i],i=0;else if(r.childNodes.length===i)r=r.lastChild,r instanceof Text?i=r.data.length:r.childNodes.length>0?i=r.childNodes.length:i=r.childNodes.length+1;else break;s.node=r,s.offset=i}),t}rangeToNative(e){const t=this.scroll.length(),s=(r,i)=>{r=Math.min(t-1,r);const[o,a]=this.scroll.leaf(r);return o?o.position(a,i):[null,-1]};return[...s(e.index,!1),...s(e.index+e.length,!0)]}setNativeRange(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(qo.info("setNativeRange",e,t,s,r),e!=null&&(this.root.parentNode==null||e.parentNode==null||s.parentNode==null))return;const o=document.getSelection();if(o!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||i||e!==a.startContainer||t!==a.startOffset||s!==a.endContainer||r!==a.endOffset){e instanceof Element&&e.tagName==="BR"&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),s instanceof Element&&s.tagName==="BR"&&(r=Array.from(s.parentNode.childNodes).indexOf(s),s=s.parentNode);const l=document.createRange();l.setStart(e,t),l.setEnd(s,r),o.removeAllRanges(),o.addRange(l)}}else o.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ee.sources.API;if(typeof t=="string"&&(s=t,t=!1),qo.info("setRange",e),e!=null){const r=this.rangeToNative(e);this.setNativeRange(...r,t)}else this.setNativeRange(null);this.update(s)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ee.sources.USER;const t=this.lastRange,[s,r]=this.getRange();if(this.lastRange=s,this.lastNative=r,this.lastRange!=null&&(this.savedRange=this.lastRange),!$t(t,this.lastRange)){if(!this.composing&&r!=null&&r.native.collapsed&&r.start.node!==this.cursor.textNode){const o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}const i=[ee.events.SELECTION_CHANGE,Zn(this.lastRange),Zn(t),e];this.emitter.emit(ee.events.EDITOR_CHANGE,...i),e!==ee.sources.SILENT&&this.emitter.emit(...i)}}}function jo(n,e){try{e.parentNode}catch{return!1}return n.contains(e)}const fb=/^[ -~]*$/;class pb{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const s=Su(e),r=new te;return gb(s.ops.slice()).reduce((i,o)=>{const a=Je.Op.length(o);let l=o.attributes||{},c=!1,f=!1;if(o.insert!=null){if(r.retain(a),typeof o.insert=="string"){const h=o.insert;f=!h.endsWith(`
115
- `)&&(t<=i||!!this.scroll.descendant(Qe,i)[0]),this.scroll.insertAt(i,h);const[m,g]=this.scroll.line(i);let b=Wt({},Ye(m));if(m instanceof qe){const[E]=m.descendant(Fe,g);E&&(b=Wt(b,Ye(E)))}l=Je.AttributeMap.diff(b,l)||{}}else if(typeof o.insert=="object"){const h=Object.keys(o.insert)[0];if(h==null)return i;const m=this.scroll.query(h,ne.INLINE)!=null;if(m)(t<=i||this.scroll.descendant(Qe,i)[0])&&(f=!0);else if(i>0){const[g,b]=this.scroll.descendant(Fe,i-1);g instanceof lt?g.value()[b]!==`
116
- `&&(c=!0):g instanceof Ge&&g.statics.scope===ne.INLINE_BLOT&&(c=!0)}if(this.scroll.insertAt(i,h,o.insert[h]),m){const[g]=this.scroll.descendant(Fe,i);if(g){const b=Wt({},Ye(g));l=Je.AttributeMap.diff(b,l)||{}}}}t+=a}else if(r.push(o),o.retain!==null&&typeof o.retain=="object"){const h=Object.keys(o.retain)[0];if(h==null)return i;this.scroll.updateEmbedAt(i,h,o.retain[h])}Object.keys(l).forEach(h=>{this.scroll.formatAt(i,a,h,l[h])});const v=c?1:0,d=f?1:0;return t+=v+d,r.retain(v),r.delete(d),i+a+v+d},0),r.reduce((i,o)=>typeof o.delete=="number"?(this.scroll.deleteAt(i,o.delete),i):i+Je.Op.length(o),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(s)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new te().retain(e).delete(t))}formatLine(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(s).forEach(i=>{this.scroll.lines(e,Math.max(t,1)).forEach(o=>{o.format(i,s[i])})}),this.scroll.optimize();const r=new te().retain(e).retain(t,Zn(s));return this.update(r)}formatText(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(s).forEach(i=>{this.scroll.formatAt(e,t,i,s[i])});const r=new te().retain(e).retain(t,Zn(s));return this.update(r)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new te)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=[],r=[];t===0?this.scroll.path(e).forEach(a=>{const[l]=a;l instanceof qe?s.push(l):l instanceof Fe&&r.push(l)}):(s=this.scroll.lines(e,t),r=this.scroll.descendants(Fe,e,t));const[i,o]=[s,r].map(a=>{const l=a.shift();if(l==null)return{};let c=Ye(l);for(;Object.keys(c).length>0;){const f=a.shift();if(f==null)return c;c=mb(Ye(f),c)}return c});return{...i,...o}}getHTML(e,t){const[s,r]=this.scroll.line(e);if(s){const i=s.length();return s.length()>=r+t&&!(r===0&&t===i)?Ps(s,r,t,!0):Ps(this.scroll,e,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter(s=>typeof s.insert=="string").map(s=>s.insert).join("")}insertContents(e,t){const s=Su(t),r=new te().retain(e).concat(s);return this.scroll.insertContents(e,s),this.update(r)}insertEmbed(e,t,s){return this.scroll.insertAt(e,t,s),this.update(new te().retain(e).insert({[t]:s}))}insertText(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
117
- `).replace(/\r/g,`
118
- `),this.scroll.insertAt(e,t),Object.keys(s).forEach(r=>{this.scroll.formatAt(e,t.length,r,s[r])}),this.update(new te().retain(e).insert(t,Zn(s)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if((e==null?void 0:e.statics.blotName)!==qe.blotName)return!1;const t=e;return t.children.length>1?!1:t.children.head instanceof ct}removeFormat(e,t){const s=this.getText(e,t),[r,i]=this.scroll.line(e+t);let o=0,a=new te;r!=null&&(o=r.length()-i,a=r.delta().slice(i,i+o-1).insert(`
119
- `));const l=this.getContents(e,t+o).diff(new te().insert(s).concat(a)),c=new te().retain(e).concat(l);return this.applyDelta(c)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const r=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(fb)&&this.scroll.find(t[0].target)){const i=this.scroll.find(t[0].target),o=Ye(i),a=i.offset(this.scroll),l=t[0].oldValue.replace(Ei.CONTENTS,""),c=new te().insert(l),f=new te().insert(i.value()),v=s&&{oldRange:Au(s.oldRange,-a),newRange:Au(s.newRange,-a)};e=new te().retain(a).concat(c.diff(f,v)).reduce((d,h)=>h.insert?d.insert(h.insert,o):d.push(h),new te),this.delta=r.compose(e)}else this.delta=this.getDelta(),(!e||!$t(r.compose(e),this.delta))&&(e=r.diff(this.delta,s));return e}}function Kn(n,e,t){if(n.length===0){const[h]=Mo(t.pop());return e<=0?`</li></${h}>`:`</li></${h}>${Kn([],e-1,t)}`}const[{child:s,offset:r,length:i,indent:o,type:a},...l]=n,[c,f]=Mo(a);if(o>e)return t.push(a),o===e+1?`<${c}><li${f}>${Ps(s,r,i)}${Kn(l,o,t)}`:`<${c}><li>${Kn(n,e+1,t)}`;const v=t[t.length-1];if(o===e&&a===v)return`</li><li${f}>${Ps(s,r,i)}${Kn(l,o,t)}`;const[d]=Mo(t.pop());return`</li></${d}>${Kn(n,e-1,t)}`}function Ps(n,e,t){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in n&&typeof n.html=="function")return n.html(e,t);if(n instanceof lt)return wi(n.value().slice(e,e+t)).replaceAll(" ","&nbsp;");if(n instanceof at){if(n.statics.blotName==="list-container"){const c=[];return n.children.forEachAt(e,t,(f,v,d)=>{const h="formats"in f&&typeof f.formats=="function"?f.formats():{};c.push({child:f,offset:v,length:d,indent:h.indent||0,type:h.list})}),Kn(c,-1,[])}const r=[];if(n.children.forEachAt(e,t,(c,f,v)=>{r.push(Ps(c,f,v))}),s||n.statics.blotName==="list")return r.join("");const{outerHTML:i,innerHTML:o}=n.domNode,[a,l]=i.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${r.join("")}<${l}`:`${a}>${r.join("")}<${l}`}return n.domNode instanceof Element?n.domNode.outerHTML:""}function mb(n,e){return Object.keys(e).reduce((t,s)=>{if(n[s]==null)return t;const r=e[s];return r===n[s]?t[s]=r:Array.isArray(r)?r.indexOf(n[s])<0?t[s]=r.concat([n[s]]):t[s]=r:t[s]=[r,n[s]],t},{})}function Mo(n){const e=n==="ordered"?"ol":"ul";switch(n){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function Su(n){return n.reduce((e,t)=>{if(typeof t.insert=="string"){const s=t.insert.replace(/\r\n/g,`
120
- `).replace(/\r/g,`
121
- `);return e.insert(s,t.attributes)}return e.push(t)},new te)}function Au(n,e){let{index:t,length:s}=n;return new kn(t+e,s)}function gb(n){const e=[];return n.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
122
- `).forEach((s,r)=>{r&&e.push({insert:`
123
- `,attributes:t.attributes}),s&&e.push({insert:s,attributes:t.attributes})}):e.push(t)}),e}class ht{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}Q(ht,"DEFAULTS",{});const _r="\uFEFF";class sl extends Ge{constructor(e,t){super(e,t),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(_r),this.rightGuard=document.createTextNode(_r),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,s;const r=e.data.split(_r).join("");if(e===this.leftGuard)if(this.prev instanceof lt){const i=this.prev.length();this.prev.insertAt(i,r),t={startNode:this.prev.domNode,startOffset:i+r.length}}else s=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(s),this),t={startNode:s,startOffset:r.length};else e===this.rightGuard&&(this.next instanceof lt?(this.next.insertAt(0,r),t={startNode:this.next.domNode,startOffset:r.length}):(s=document.createTextNode(r),this.parent.insertBefore(this.scroll.create(s),this.next),t={startNode:s,startOffset:r.length}));return e.data=_r,t}update(e,t){e.forEach(s=>{if(s.type==="characterData"&&(s.target===this.leftGuard||s.target===this.rightGuard)){const r=this.restore(s.target);r&&(t.range=r)}})}}class vb{constructor(e,t){Q(this,"isComposing",!1),this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof sl)&&(this.emitter.emit(ee.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit(ee.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit(ee.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit(ee.events.COMPOSITION_END,e),this.isComposing=!1}}const Pr=class{constructor(e,t){Q(this,"modules",{}),this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}};Q(Pr,"DEFAULTS",{modules:{}}),Q(Pr,"themes",{default:Pr});let _i=Pr;const yb=n=>n.parentElement||n.getRootNode().host||null,bb=n=>{const e=n.getBoundingClientRect(),t="offsetWidth"in n&&Math.abs(e.width)/n.offsetWidth||1,s="offsetHeight"in n&&Math.abs(e.height)/n.offsetHeight||1;return{top:e.top,right:e.left+n.clientWidth*t,bottom:e.top+n.clientHeight*s,left:e.left}},Nr=n=>{const e=parseInt(n,10);return Number.isNaN(e)?0:e},Cu=(n,e,t,s,r,i)=>n<t&&e>s?0:n<t?-(t-n+r):e>s?e-n>s-t?n+r-t:e-s+i:0,xb=(n,e)=>{var t,s,r;const i=n.ownerDocument;let o=e,a=n;for(;a;){const l=a===i.body,c=l?{top:0,right:((t=window.visualViewport)==null?void 0:t.width)??i.documentElement.clientWidth,bottom:((s=window.visualViewport)==null?void 0:s.height)??i.documentElement.clientHeight,left:0}:bb(a),f=getComputedStyle(a),v=Cu(o.left,o.right,c.left,c.right,Nr(f.scrollPaddingLeft),Nr(f.scrollPaddingRight)),d=Cu(o.top,o.bottom,c.top,c.bottom,Nr(f.scrollPaddingTop),Nr(f.scrollPaddingBottom));if(v||d)if(l)(r=i.defaultView)==null||r.scrollBy(v,d);else{const{scrollLeft:h,scrollTop:m}=a;d&&(a.scrollTop+=d),v&&(a.scrollLeft+=v);const g=a.scrollLeft-h,b=a.scrollTop-m;o={left:o.left-g,top:o.top-b,right:o.right-g,bottom:o.bottom-b}}a=l||f.position==="fixed"?null:yb(a)}},kb=100,wb=["block","break","cursor","inline","scroll","text"],Eb=(n,e,t)=>{const s=new is;return wb.forEach(r=>{const i=e.query(r);i&&s.register(i)}),n.forEach(r=>{let i=e.query(r);i||t.error(`Cannot register "${r}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;i;)if(s.register(i),i="blotName"in i?i.requiredContainer??null:null,o+=1,o>kb){t.error(`Cycle detected in registering blot requiredContainer: "${r}"`);break}}),s},Xn=Ft("quill"),Vr=new is;at.uiClass="ql-ui";const Wn=class Rs{static debug(e){e===!0&&(e="log"),Ft.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return xa.get(e)||Vr.find(e,t)}static import(e){return this.imports[e]==null&&Xn.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),s="attrName"in e?e.attrName:e.blotName;typeof s=="string"?this.register(`formats/${s}`,e,t):Object.keys(e).forEach(r=>{this.register(r,e[r],t)})}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],s=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!s&&Xn.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&Vr.register(t),typeof t.register=="function"&&t.register(Vr)}}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=_b(e,t),this.container=this.options.container,this.container==null){Xn.error("Invalid Quill container",e);return}this.options.debug&&Rs.debug(this.options.debug);const s=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",xa.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new ee;const r=nl.blotName,i=this.options.registry.query(r);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${r}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new pb(this.scroll),this.selection=new db(this.scroll,this.emitter),this.composition=new vb(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(ee.events.EDITOR_CHANGE,o=>{o===ee.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on(ee.events.SCROLL_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),f=l&&c?{oldRange:l,newRange:c}:void 0;st.call(this,()=>this.editor.update(null,a,f),o)}),this.emitter.on(ee.events.SCROLL_EMBED_UPDATE,(o,a)=>{const l=this.selection.lastRange,[c]=this.selection.getRange(),f=l&&c?{oldRange:l,newRange:c}:void 0;st.call(this,()=>{const v=new te().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(v,[],f)},Rs.sources.USER)}),s){const o=this.clipboard.convert({html:`${s}<p><br></p>`,text:`
124
- `});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(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const s=e;e=document.createElement("div"),e.classList.add(s)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,s){return[e,t,,s]=At(e,t,s),st.call(this,()=>this.editor.deleteText(e,t),s,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ee.sources.API;return st.call(this,()=>{const r=this.getSelection(!0);let i=new te;if(r==null)return i;if(this.scroll.query(e,ne.BLOCK))i=this.editor.formatLine(r.index,r.length,{[e]:t});else{if(r.length===0)return this.selection.format(e,t),i;i=this.editor.formatText(r.index,r.length,{[e]:t})}return this.setSelection(r,ee.sources.SILENT),i},s)}formatLine(e,t,s,r,i){let o;return[e,t,o,i]=At(e,t,s,r,i),st.call(this,()=>this.editor.formatLine(e,t,o),i,e,0)}formatText(e,t,s,r,i){let o;return[e,t,o,i]=At(e,t,s,r,i),st.call(this,()=>this.editor.formatText(e,t,o),i,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=null;if(typeof e=="number"?s=this.selection.getBounds(e,t):s=this.selection.getBounds(e.index,e.length),!s)return null;const r=this.container.getBoundingClientRect();return{bottom:s.bottom-r.top,height:s.height,left:s.left-r.left,right:s.right-r.left,top:s.top-r.top,width:s.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=At(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return arguments.length>0&&arguments[0]!==void 0&&arguments[0]&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=At(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=At(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Rs.sources.API;return st.call(this,()=>this.editor.insertEmbed(e,t,s),r,e)}insertText(e,t,s,r,i){let o;return[e,,o,i]=At(e,0,s,r,i),st.call(this,()=>this.editor.insertText(e,t,o),i,e,t.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(e,t,s){return[e,t,,s]=At(e,t,s),st.call(this,()=>this.editor.removeFormat(e,t),s,e)}scrollRectIntoView(e){xb(this.root,e)}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 e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.sources.API;return st.call(this,()=>{e=new te(e);const s=this.getLength(),r=this.editor.deleteText(0,s),i=this.editor.insertContents(0,e),o=this.editor.deleteText(this.getLength()-1,1);return r.compose(i).compose(o)},t)}setSelection(e,t,s){e==null?this.selection.setRange(null,t||Rs.sources.API):([e,t,,s]=At(e,t,s),this.selection.setRange(new kn(Math.max(0,e),t),s),s!==ee.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.sources.API;const s=new te().insert(e);return this.setContents(s,t)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ee.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ee.sources.API;return st.call(this,()=>(e=new te(e),this.editor.applyDelta(e)),t,!0)}};Q(Wn,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:Vr,theme:"default"}),Q(Wn,"events",ee.events),Q(Wn,"sources",ee.sources),Q(Wn,"version","2.0.3"),Q(Wn,"imports",{delta:te,parchment:nb,"core/module":ht,"core/theme":_i});let q=Wn;function Ou(n){return typeof n=="string"?document.querySelector(n):n}function Do(n){return Object.entries(n??{}).reduce((e,t)=>{let[s,r]=t;return{...e,[s]:r===!0?{}:r}},{})}function Tu(n){return Object.fromEntries(Object.entries(n).filter(e=>e[1]!==void 0))}function _b(n,e){const t=Ou(n);if(!t)throw new Error("Invalid Quill container");const s=!e.theme||e.theme===q.DEFAULTS.theme?_i:q.import(`themes/${e.theme}`);if(!s)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:r,...i}=q.DEFAULTS,{modules:o,...a}=s.DEFAULTS;let l=Do(e.modules);l!=null&&l.toolbar&&l.toolbar.constructor!==Object&&(l={...l,toolbar:{container:l.toolbar}});const c=Wt({},Do(r),Do(o),l),f={...i,...Tu(a),...Tu(e)};let v=e.registry;return v?e.formats&&Xn.warn('Ignoring "formats" option because "registry" is specified'):v=e.formats?Eb(e.formats,f.registry,Xn):f.registry,{...f,registry:v,container:t,theme:s,modules:Object.entries(c).reduce((d,h)=>{let[m,g]=h;if(!g)return d;const b=q.import(`modules/${m}`);return b==null?(Xn.error(`Cannot load ${m} module. Are you sure you registered it?`),d):{...d,[m]:Wt({},b.DEFAULTS||{},g)}},{}),bounds:Ou(f.bounds)}}function st(n,e,t,s){if(!this.isEnabled()&&e===ee.sources.USER&&!this.allowReadOnlyEdits)return new te;let r=t==null?null:this.getSelection();const i=this.editor.delta,o=n();if(r!=null&&(t===!0&&(t=r.index),s==null?r=Ru(r,o,e):s!==0&&(r=Ru(r,t,s,e)),this.setSelection(r,ee.sources.SILENT)),o.length()>0){const a=[ee.events.TEXT_CHANGE,o,i,e];this.emitter.emit(ee.events.EDITOR_CHANGE,...a),e!==ee.sources.SILENT&&this.emitter.emit(...a)}return o}function At(n,e,t,s,r){let i={};return typeof n.index=="number"&&typeof n.length=="number"?typeof e!="number"?(r=s,s=t,t=e,e=n.length,n=n.index):(e=n.length,n=n.index):typeof e!="number"&&(r=s,s=t,t=e,e=0),typeof t=="object"?(i=t,r=s):typeof t=="string"&&(s!=null?i[t]=s:r=t),r=r||ee.sources.API,[n,e,i,r]}function Ru(n,e,t,s){const r=typeof t=="number"?t:0;if(n==null)return null;let i,o;return e&&typeof e.transformPosition=="function"?[i,o]=[n.index,n.index+n.length].map(a=>e.transformPosition(a,s!==ee.sources.USER)):[i,o]=[n.index,n.index+n.length].map(a=>a<e||a===e&&s===ee.sources.USER?a:r>=0?a+r:Math.max(e,a+r)),new kn(i,o-i)}class Nn extends ki{}function Iu(n){return n instanceof qe||n instanceof Qe}function Lu(n){return typeof n.updateContent=="function"}class Gn extends nl{constructor(e,t,s){let{emitter:r}=s;super(e,t),this.emitter=r,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",i=>this.handleDragStart(i))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit(ee.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit(ee.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit(ee.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[s,r]=this.line(e),[i]=this.line(e+t);if(super.deleteAt(e,t),i!=null&&s!==i&&r>0){if(s instanceof Qe||i instanceof Qe){this.optimize();return}const o=i.children.head instanceof ct?null:i.children.head;s.moveChildren(i,o),s.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,s,r){super.formatAt(e,t,s,r),this.optimize()}insertAt(e,t,s){if(e>=this.length())if(s==null||this.scroll.query(t,ne.BLOCK)==null){const r=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(r),s==null&&t.endsWith(`
125
- `)?r.insertAt(0,t.slice(0,-1),s):r.insertAt(0,t,s)}else{const r=this.scroll.create(t,s);this.appendChild(r)}else super.insertAt(e,t,s);this.optimize()}insertBefore(e,t){if(e.statics.scope===ne.INLINE_BLOT){const s=this.scroll.create(this.statics.defaultChild.blotName);s.appendChild(e),super.insertBefore(s,t)}else super.insertBefore(e,t)}insertContents(e,t){const s=this.deltaToRenderBlocks(t.concat(new te().insert(`
126
- `))),r=s.pop();if(r==null)return;this.batchStart();const i=s.shift();if(i){const l=i.type==="block"&&(i.delta.length()===0||!this.descendant(Qe,e)[0]&&e<this.length()),c=i.type==="block"?i.delta:new te().insert({[i.key]:i.value});Fo(this,e,c);const f=i.type==="block"?1:0,v=e+c.length()+f;l&&this.insertAt(v-1,`
127
- `);const d=Ye(this.line(e)[0]),h=Je.AttributeMap.diff(d,i.attributes)||{};Object.keys(h).forEach(m=>{this.formatAt(v-1,1,m,h[m])}),e=v}let[o,a]=this.children.find(e);if(s.length&&(o&&(o=o.split(a),a=0),s.forEach(l=>{if(l.type==="block"){const c=this.createBlock(l.attributes,o||void 0);Fo(c,0,l.delta)}else{const c=this.create(l.key,l.value);this.insertBefore(c,o||void 0),Object.keys(l.attributes).forEach(f=>{c.format(f,l.attributes[f])})}})),r.type==="block"&&r.delta.length()){const l=o?o.offset(o.scroll)+a:this.length();Fo(this,l,r.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[s,r]=t;return s instanceof Fe?[s,r]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(Iu,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const s=(r,i,o)=>{let a=[],l=o;return r.children.forEachAt(i,o,(c,f,v)=>{Iu(c)?a.push(c):c instanceof ki&&(a=a.concat(s(c,f,l))),l-=v}),a};return s(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit(ee.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=ee.sources.USER;typeof e=="string"&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(s=>{let{target:r}=s;const i=this.find(r,!0);return i&&!Lu(i)}),e.length>0&&this.emitter.emit(ee.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit(ee.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,s){const[r]=this.descendant(i=>i instanceof Qe,e);r&&r.statics.blotName===t&&Lu(r)&&r.updateContent(s)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let s=new te;return e.forEach(r=>{const i=r==null?void 0:r.insert;if(i)if(typeof i=="string"){const o=i.split(`
128
- `);o.slice(0,-1).forEach(l=>{s.insert(l,r.attributes),t.push({type:"block",delta:s,attributes:r.attributes??{}}),s=new te});const a=o[o.length-1];a&&s.insert(a,r.attributes)}else{const o=Object.keys(i)[0];if(!o)return;this.query(o,ne.INLINE)?s.push(r):(s.length()&&t.push({type:"block",delta:s,attributes:{}}),s=new te,t.push({type:"blockEmbed",key:o,value:i[o],attributes:r.attributes??{}}))}}),s.length()&&t.push({type:"block",delta:s,attributes:{}}),t}createBlock(e,t){let s;const r={};Object.entries(e).forEach(a=>{let[l,c]=a;this.query(l,ne.BLOCK&ne.BLOT)!=null?s=l:r[l]=c});const i=this.create(s||this.statics.defaultChild.blotName,s?e[s]:void 0);this.insertBefore(i,t||void 0);const o=i.length();return Object.entries(r).forEach(a=>{let[l,c]=a;i.formatAt(0,o,l,c)}),i}}Q(Gn,"blotName","scroll"),Q(Gn,"className","ql-editor"),Q(Gn,"tagName","DIV"),Q(Gn,"defaultChild",qe),Q(Gn,"allowedChildren",[qe,Qe,Nn]);function Fo(n,e,t){t.reduce((s,r)=>{const i=Je.Op.length(r);let o=r.attributes||{};if(r.insert!=null){if(typeof r.insert=="string"){const a=r.insert;n.insertAt(s,a);const[l]=n.descendant(Fe,s),c=Ye(l);o=Je.AttributeMap.diff(c,o)||{}}else if(typeof r.insert=="object"){const a=Object.keys(r.insert)[0];if(a==null)return s;if(n.insertAt(s,a,r.insert[a]),n.scroll.query(a,ne.INLINE)!=null){const[l]=n.descendant(Fe,s),c=Ye(l);o=Je.AttributeMap.diff(c,o)||{}}}}return Object.keys(o).forEach(a=>{n.formatAt(s,i,a,o[a])}),s+i},e)}const rl={scope:ne.BLOCK,whitelist:["right","center","justify"]},Nb=new xt("align","align",rl),Zd=new ut("align","ql-align",rl),Yd=new Qt("align","text-align",rl);class Xd extends Qt{value(e){let t=super.value(e);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):t}}const Sb=new ut("color","ql-color",{scope:ne.INLINE}),il=new Xd("color","color",{scope:ne.INLINE}),Ab=new ut("background","ql-bg",{scope:ne.INLINE}),ol=new Xd("background","background-color",{scope:ne.INLINE});class Sn extends Nn{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map(s=>s.length()<=1?"":s.domNode.innerText).join(`
129
- `).slice(e,e+t)}html(e,t){return`<pre>
130
- ${wi(this.code(e,t))}
131
- </pre>`}}class Be extends qe{static register(){q.register(Sn)}}Q(Be,"TAB"," ");class al extends en{}al.blotName="code";al.tagName="CODE";Be.blotName="code-block";Be.className="ql-code-block";Be.tagName="DIV";Sn.blotName="code-block-container";Sn.className="ql-code-block-container";Sn.tagName="DIV";Sn.allowedChildren=[Be];Be.allowedChildren=[lt,ct,Ei];Be.requiredContainer=Sn;const ll={scope:ne.BLOCK,whitelist:["rtl"]},Jd=new xt("direction","dir",ll),Qd=new ut("direction","ql-direction",ll),ef=new Qt("direction","direction",ll),tf={scope:ne.INLINE,whitelist:["serif","monospace"]},nf=new ut("font","ql-font",tf);class Cb extends Qt{value(e){return super.value(e).replace(/["']/g,"")}}const sf=new Cb("font","font-family",tf),rf=new ut("size","ql-size",{scope:ne.INLINE,whitelist:["small","large","huge"]}),of=new Qt("size","font-size",{scope:ne.INLINE,whitelist:["10px","18px","32px"]}),Ob=Ft("quill:keyboard"),Tb=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class Ni extends ht{static match(e,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(s=>!!t[s]!==e[s]&&t[s]!==null)?!1:t.key===e.key||t.key===e.which}constructor(e,t){super(e,t),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(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=Ib(e);if(r==null){Ob.warn("Attempted to add invalid keyboard binding",r);return}typeof t=="function"&&(t={handler:t}),typeof s=="function"&&(s={handler:s}),(Array.isArray(r.key)?r.key:[r.key]).forEach(i=>{const o={...r,key:i,...t,...s};this.bindings[o.key]=this.bindings[o.key]||[],this.bindings[o.key].push(o)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const t=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(m=>Ni.match(e,m));if(t.length===0)return;const s=q.find(e.target,!0);if(s&&s.scroll!==this.quill.scroll)return;const r=this.quill.getSelection();if(r==null||!this.quill.hasFocus())return;const[i,o]=this.quill.getLine(r.index),[a,l]=this.quill.getLeaf(r.index),[c,f]=r.length===0?[a,l]:this.quill.getLeaf(r.index+r.length),v=a instanceof Jr?a.value().slice(0,l):"",d=c instanceof Jr?c.value().slice(f):"",h={collapsed:r.length===0,empty:r.length===0&&i.length()<=1,format:this.quill.getFormat(r),line:i,offset:o,prefix:v,suffix:d,event:e};t.some(m=>{if(m.collapsed!=null&&m.collapsed!==h.collapsed||m.empty!=null&&m.empty!==h.empty||m.offset!=null&&m.offset!==h.offset)return!1;if(Array.isArray(m.format)){if(m.format.every(g=>h.format[g]==null))return!1}else if(typeof m.format=="object"&&!Object.keys(m.format).every(g=>m.format[g]===!0?h.format[g]!=null:m.format[g]===!1?h.format[g]==null:$t(m.format[g],h.format[g])))return!1;return m.prefix!=null&&!m.prefix.test(h.prefix)||m.suffix!=null&&!m.suffix.test(h.suffix)?!1:m.handler.call(this,r,h,m)!==!0})&&e.preventDefault()})}handleBackspace(e,t){const s=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let r={};const[i]=this.quill.getLine(e.index);let o=new te().retain(e.index-s).delete(s);if(t.offset===0){const[a]=this.quill.getLine(e.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const l=i.formats(),c=this.quill.getFormat(e.index-1,1);if(r=Je.AttributeMap.diff(l,c)||{},Object.keys(r).length>0){const f=new te().retain(e.index+i.length()-2).retain(1,r);o=o.compose(f)}}}this.quill.updateContents(o,q.sources.USER),this.quill.focus()}handleDelete(e,t){const s=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-s)return;let r={};const[i]=this.quill.getLine(e.index);let o=new te().retain(e.index).delete(s);if(t.offset>=i.length()-1){const[a]=this.quill.getLine(e.index+1);if(a){const l=i.formats(),c=this.quill.getFormat(e.index,1);r=Je.AttributeMap.diff(l,c)||{},Object.keys(r).length>0&&(o=o.retain(a.length()-1).retain(1,r))}}this.quill.updateContents(o,q.sources.USER),this.quill.focus()}handleDeleteRange(e){ul({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const s=Object.keys(t.format).reduce((i,o)=>(this.quill.scroll.query(o,ne.BLOCK)&&!Array.isArray(t.format[o])&&(i[o]=t.format[o]),i),{}),r=new te().retain(e.index).delete(e.length).insert(`
132
- `,s);this.quill.updateContents(r,q.sources.USER),this.quill.setSelection(e.index+1,q.sources.SILENT),this.quill.focus()}}const Rb={bindings:{bold:Bo("bold"),italic:Bo("italic"),underline:Bo("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(n,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",q.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(n,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",q.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(n,e){e.format.indent!=null?this.quill.format("indent","-1",q.sources.USER):e.format.list!=null&&this.quill.format("list",!1,q.sources.USER)}},"indent code-block":qu(!0),"outdent code-block":qu(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(n){this.quill.deleteText(n.index-1,1,q.sources.USER)}},tab:{key:"Tab",handler(n,e){if(e.format.table)return!0;this.quill.history.cutoff();const t=new te().retain(n.index).delete(n.length).insert(" ");return this.quill.updateContents(t,q.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index+1,q.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,q.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(n,e){const t={list:!1};e.format.indent&&(t.indent=!1),this.quill.formatLine(n.index,n.length,t,q.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(n){const[e,t]=this.quill.getLine(n.index),s={...e.formats(),list:"checked"},r=new te().retain(n.index).insert(`
133
- `,s).retain(e.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(r,q.sources.USER),this.quill.setSelection(n.index+1,q.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(n,e){const[t,s]=this.quill.getLine(n.index),r=new te().retain(n.index).insert(`
134
- `,e.format).retain(t.length()-s-1).retain(1,{header:null});this.quill.updateContents(r,q.sources.USER),this.quill.setSelection(n.index+1,q.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(n){const e=this.quill.getModule("table");if(e){const[t,s,r,i]=e.getTable(n),o=Lb(t,s,r,i);if(o==null)return;let a=t.offset();if(o<0){const l=new te().retain(a).insert(`
135
- `);this.quill.updateContents(l,q.sources.USER),this.quill.setSelection(n.index+1,n.length,q.sources.SILENT)}else if(o>0){a+=t.length();const l=new te().retain(a).insert(`
136
- `);this.quill.updateContents(l,q.sources.USER),this.quill.setSelection(a,q.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(n,e){const{event:t,line:s}=e,r=s.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(r-1,q.sources.USER):this.quill.setSelection(r+s.length(),q.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(n,e){if(this.quill.scroll.query("list")==null)return!0;const{length:t}=e.prefix,[s,r]=this.quill.getLine(n.index);if(r>t)return!0;let i;switch(e.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(n.index," ",q.sources.USER),this.quill.history.cutoff();const o=new te().retain(n.index-r).delete(t+1).retain(s.length()-2-r).retain(1,{list:i});return this.quill.updateContents(o,q.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index-t,q.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(n){const[e,t]=this.quill.getLine(n.index);let s=2,r=e;for(;r!=null&&r.length()<=1&&r.formats()["code-block"];)if(r=r.prev,s-=1,s<=0){const i=new te().retain(n.index+e.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,q.sources.USER),this.quill.setSelection(n.index-1,q.sources.SILENT),!1}return!0}},"embed left":Sr("ArrowLeft",!1),"embed left shift":Sr("ArrowLeft",!0),"embed right":Sr("ArrowRight",!1),"embed right shift":Sr("ArrowRight",!0),"table down":ju(!1),"table up":ju(!0)}};Ni.DEFAULTS=Rb;function qu(n){return{key:"Tab",shiftKey:!n,format:{"code-block":!0},handler(e,t){let{event:s}=t;const r=this.quill.scroll.query("code-block"),{TAB:i}=r;if(e.length===0&&!s.shiftKey){this.quill.insertText(e.index,i,q.sources.USER),this.quill.setSelection(e.index+i.length,q.sources.SILENT);return}const o=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:a,length:l}=e;o.forEach((c,f)=>{n?(c.insertAt(0,i),f===0?a+=i.length:l+=i.length):c.domNode.textContent.startsWith(i)&&(c.deleteAt(0,i.length),f===0?a-=i.length:l-=i.length)}),this.quill.update(q.sources.USER),this.quill.setSelection(a,l,q.sources.SILENT)}}}function Sr(n,e){return{key:n,shiftKey:e,altKey:null,[n==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(t){let{index:s}=t;n==="ArrowRight"&&(s+=t.length+1);const[r]=this.quill.getLeaf(s);return r instanceof Ge?(n==="ArrowLeft"?e?this.quill.setSelection(t.index-1,t.length+1,q.sources.USER):this.quill.setSelection(t.index-1,q.sources.USER):e?this.quill.setSelection(t.index,t.length+1,q.sources.USER):this.quill.setSelection(t.index+t.length+1,q.sources.USER),!1):!0}}}function Bo(n){return{key:n[0],shortKey:!0,handler(e,t){this.quill.format(n,!t.format[n],q.sources.USER)}}}function ju(n){return{key:n?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,t){const s=n?"prev":"next",r=t.line,i=r.parent[s];if(i!=null){if(i.statics.blotName==="table-row"){let o=i.children.head,a=r;for(;a.prev!=null;)a=a.prev,o=o.next;const l=o.offset(this.quill.scroll)+Math.min(t.offset,o.length()-1);this.quill.setSelection(l,0,q.sources.USER)}}else{const o=r.table()[s];o!=null&&(n?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,q.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,q.sources.USER))}return!1}}}function Ib(n){if(typeof n=="string"||typeof n=="number")n={key:n};else if(typeof n=="object")n=Zn(n);else return null;return n.shortKey&&(n[Tb]=n.shortKey,delete n.shortKey),n}function ul(n){let{quill:e,range:t}=n;const s=e.getLines(t);let r={};if(s.length>1){const i=s[0].formats(),o=s[s.length-1].formats();r=Je.AttributeMap.diff(o,i)||{}}e.deleteText(t,q.sources.USER),Object.keys(r).length>0&&e.formatLine(t.index,1,r,q.sources.USER),e.setSelection(t.index,q.sources.SILENT)}function Lb(n,e,t,s){return e.prev==null&&e.next==null?t.prev==null&&t.next==null?s===0?-1:1:t.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const qb=/font-weight:\s*normal/,jb=["P","OL","UL"],Mu=n=>n&&jb.includes(n.tagName),Mb=n=>{Array.from(n.querySelectorAll("br")).filter(e=>Mu(e.previousElementSibling)&&Mu(e.nextElementSibling)).forEach(e=>{var t;(t=e.parentNode)==null||t.removeChild(e)})},Db=n=>{Array.from(n.querySelectorAll('b[style*="font-weight"]')).filter(e=>{var t;return(t=e.getAttribute("style"))==null?void 0:t.match(qb)}).forEach(e=>{var t;const s=n.createDocumentFragment();s.append(...e.childNodes),(t=e.parentNode)==null||t.replaceChild(s,e)})};function Fb(n){n.querySelector('[id^="docs-internal-guid-"]')&&(Db(n),Mb(n))}const Bb=/\bmso-list:[^;]*ignore/i,Pb=/\bmso-list:[^;]*\bl(\d+)/i,Vb=/\bmso-list:[^;]*\blevel(\d+)/i,Ub=(n,e)=>{const t=n.getAttribute("style"),s=t==null?void 0:t.match(Pb);if(!s)return null;const r=Number(s[1]),i=t==null?void 0:t.match(Vb),o=i?Number(i[1]):1,a=new RegExp(`@list l${r}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),l=e.match(a),c=l&&l[1]==="bullet"?"bullet":"ordered";return{id:r,indent:o,type:c,element:n}},$b=n=>{var e,t;const s=Array.from(n.querySelectorAll("[style*=mso-list]")),r=[],i=[];s.forEach(l=>{(l.getAttribute("style")||"").match(Bb)?r.push(l):i.push(l)}),r.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)});const o=n.documentElement.innerHTML,a=i.map(l=>Ub(l,o)).filter(l=>l);for(;a.length;){const l=[];let c=a.shift();for(;c;)l.push(c),c=a.length&&((e=a[0])==null?void 0:e.element)===c.element.nextElementSibling&&a[0].id===c.id?a.shift():null;const f=document.createElement("ul");l.forEach(h=>{const m=document.createElement("li");m.setAttribute("data-list",h.type),h.indent>1&&m.setAttribute("class",`ql-indent-${h.indent-1}`),m.innerHTML=h.element.innerHTML,f.appendChild(m)});const v=(t=l[0])==null?void 0:t.element,{parentNode:d}=v??{};v&&(d==null||d.replaceChild(f,v)),l.slice(1).forEach(h=>{let{element:m}=h;d==null||d.removeChild(m)})}};function zb(n){n.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&$b(n)}const Hb=[zb,Fb],Kb=n=>{n.documentElement&&Hb.forEach(e=>{e(n)})},Wb=Ft("quill:clipboard"),Gb=[[Node.TEXT_NODE,ox],[Node.TEXT_NODE,Fu],["br",Qb],[Node.ELEMENT_NODE,Fu],[Node.ELEMENT_NODE,Jb],[Node.ELEMENT_NODE,Xb],[Node.ELEMENT_NODE,rx],["li",nx],["ol, ul",sx],["pre",ex],["tr",ix],["b",Po("bold")],["i",Po("italic")],["strike",Po("strike")],["style",tx]],Zb=[Nb,Jd].reduce((n,e)=>(n[e.keyName]=e,n),{}),Du=[Yd,ol,il,ef,sf,of].reduce((n,e)=>(n[e.keyName]=e,n),{});class af extends ht{constructor(e,t){super(e,t),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=[],Gb.concat(this.options.matchers??[]).forEach(s=>{let[r,i]=s;this.addMatcher(r,i)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:s}=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(r[Be.blotName])return new te().insert(s||"",{[Be.blotName]:r[Be.blotName]});if(!t)return new te().insert(s||"",r);const i=this.convertHTML(t);return Ws(i,`
137
- `)&&(i.ops[i.ops.length-1].attributes==null||r.table)?i.compose(new te().retain(i.length()-1).delete(1)):i}normalizeHTML(e){Kb(e)}convertHTML(e){const t=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(t);const s=t.body,r=new WeakMap,[i,o]=this.prepareMatching(s,r);return cl(this.quill.scroll,s,i,o,r)}dangerouslyPasteHTML(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:q.sources.API;if(typeof e=="string"){const r=this.convert({html:e,text:""});this.quill.setContents(r,t),this.quill.setSelection(0,q.sources.SILENT)}else{const r=this.convert({html:t,text:""});this.quill.updateContents(new te().retain(e).concat(r),s),this.quill.setSelection(e+r.length(),q.sources.SILENT)}}onCaptureCopy(e){var t,s;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[i]=this.quill.selection.getRange();if(i==null)return;const{html:o,text:a}=this.onCopy(i,r);(t=e.clipboardData)==null||t.setData("text/plain",a),(s=e.clipboardData)==null||s.setData("text/html",o),r&&ul({range:i,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
138
- `)}onCapturePaste(e){var t,s,r,i,o;if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const a=this.quill.getSelection(!0);if(a==null)return;const l=(t=e.clipboardData)==null?void 0:t.getData("text/html");let c=(s=e.clipboardData)==null?void 0:s.getData("text/plain");if(!l&&!c){const v=(r=e.clipboardData)==null?void 0:r.getData("text/uri-list");v&&(c=this.normalizeURIList(v))}const f=Array.from(((i=e.clipboardData)==null?void 0:i.files)||[]);if(!l&&f.length>0){this.quill.uploader.upload(a,f);return}if(l&&f.length>0){const v=new DOMParser().parseFromString(l,"text/html");if(v.body.childElementCount===1&&((o=v.body.firstElementChild)==null?void 0:o.tagName)==="IMG"){this.quill.uploader.upload(a,f);return}}this.onPaste(a,{html:l,text:c})}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:s,html:r}=t;const i=this.quill.getFormat(e.index),o=this.convert({text:s,html:r},i);Wb.log("onPaste",o,{text:s,html:r});const a=new te().retain(e.index).delete(e.length).concat(o);this.quill.updateContents(a,q.sources.USER),this.quill.setSelection(a.length()-e.length,q.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const s=[],r=[];return this.matchers.forEach(i=>{const[o,a]=i;switch(o){case Node.TEXT_NODE:r.push(a);break;case Node.ELEMENT_NODE:s.push(a);break;default:Array.from(e.querySelectorAll(o)).forEach(l=>{if(t.has(l)){const c=t.get(l);c==null||c.push(a)}else t.set(l,[a])});break}}),[s,r]}}Q(af,"DEFAULTS",{matchers:[]});function An(n,e,t,s){return s.query(e)?n.reduce((r,i)=>{if(!i.insert)return r;if(i.attributes&&i.attributes[e])return r.push(i);const o=t?{[e]:t}:{};return r.insert(i.insert,{...o,...i.attributes})},new te):n}function Ws(n,e){let t="";for(let s=n.ops.length-1;s>=0&&t.length<e.length;--s){const r=n.ops[s];if(typeof r.insert!="string")break;t=r.insert+t}return t.slice(-1*e.length)===e}function zt(n,e){if(!(n instanceof Element))return!1;const t=e.query(n);return t&&t.prototype instanceof Ge?!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(n.tagName.toLowerCase())}function Yb(n,e){return n.previousElementSibling&&n.nextElementSibling&&!zt(n.previousElementSibling,e)&&!zt(n.nextElementSibling,e)}const Ar=new WeakMap;function lf(n){return n==null?!1:(Ar.has(n)||(n.tagName==="PRE"?Ar.set(n,!0):Ar.set(n,lf(n.parentNode))),Ar.get(n))}function cl(n,e,t,s,r){return e.nodeType===e.TEXT_NODE?s.reduce((i,o)=>o(e,i,n),new te):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((i,o)=>{let a=cl(n,o,t,s,r);return o.nodeType===e.ELEMENT_NODE&&(a=t.reduce((l,c)=>c(o,l,n),a),a=(r.get(o)||[]).reduce((l,c)=>c(o,l,n),a)),i.concat(a)},new te):new te}function Po(n){return(e,t,s)=>An(t,n,!0,s)}function Xb(n,e,t){const s=xt.keys(n),r=ut.keys(n),i=Qt.keys(n),o={};return s.concat(r).concat(i).forEach(a=>{let l=t.query(a,ne.ATTRIBUTE);l!=null&&(o[l.attrName]=l.value(n),o[l.attrName])||(l=Zb[a],l!=null&&(l.attrName===a||l.keyName===a)&&(o[l.attrName]=l.value(n)||void 0),l=Du[a],l!=null&&(l.attrName===a||l.keyName===a)&&(l=Du[a],o[l.attrName]=l.value(n)||void 0))}),Object.entries(o).reduce((a,l)=>{let[c,f]=l;return An(a,c,f,t)},e)}function Jb(n,e,t){const s=t.query(n);if(s==null)return e;if(s.prototype instanceof Ge){const r={},i=s.value(n);if(i!=null)return r[s.blotName]=i,new te().insert(r,s.formats(n,t))}else if(s.prototype instanceof Bs&&!Ws(e,`
139
- `)&&e.insert(`
140
- `),"blotName"in s&&"formats"in s&&typeof s.formats=="function")return An(e,s.blotName,s.formats(n,t),t);return e}function Qb(n,e){return Ws(e,`
141
- `)||e.insert(`
142
- `),e}function ex(n,e,t){const s=t.query("code-block"),r=s&&"formats"in s&&typeof s.formats=="function"?s.formats(n,t):!0;return An(e,"code-block",r,t)}function tx(){return new te}function nx(n,e,t){const s=t.query(n);if(s==null||s.blotName!=="list"||!Ws(e,`
143
- `))return e;let r=-1,i=n.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(r+=1),i=i.parentNode;return r<=0?e:e.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,{indent:r,...a.attributes||{}}):o,new te)}function sx(n,e,t){const s=n;let r=s.tagName==="OL"?"ordered":"bullet";const i=s.getAttribute("data-checked");return i&&(r=i==="true"?"checked":"unchecked"),An(e,"list",r,t)}function Fu(n,e,t){if(!Ws(e,`
144
- `)){if(zt(n,t)&&(n.childNodes.length>0||n instanceof HTMLParagraphElement))return e.insert(`
145
- `);if(e.length()>0&&n.nextSibling){let s=n.nextSibling;for(;s!=null;){if(zt(s,t))return e.insert(`
146
- `);const r=t.query(s);if(r&&r.prototype instanceof Qe)return e.insert(`
147
- `);s=s.firstChild}}}return e}function rx(n,e,t){var s;const r={},i=n.style||{};return i.fontStyle==="italic"&&(r.italic=!0),i.textDecoration==="underline"&&(r.underline=!0),i.textDecoration==="line-through"&&(r.strike=!0),((s=i.fontWeight)!=null&&s.startsWith("bold")||parseInt(i.fontWeight,10)>=700)&&(r.bold=!0),e=Object.entries(r).reduce((o,a)=>{let[l,c]=a;return An(o,l,c,t)},e),parseFloat(i.textIndent||0)>0?new te().insert(" ").concat(e):e}function ix(n,e,t){var s,r;const i=((s=n.parentElement)==null?void 0:s.tagName)==="TABLE"?n.parentElement:(r=n.parentElement)==null?void 0:r.parentElement;if(i!=null){const o=Array.from(i.querySelectorAll("tr")).indexOf(n)+1;return An(e,"table",o,t)}return e}function ox(n,e,t){var s;let r=n.data;if(((s=n.parentElement)==null?void 0:s.tagName)==="O:P")return e.insert(r.trim());if(!lf(n)){if(r.trim().length===0&&r.includes(`
148
- `)&&!Yb(n,t))return e;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(n.previousSibling==null&&n.parentElement!=null&&zt(n.parentElement,t)||n.previousSibling instanceof Element&&zt(n.previousSibling,t))&&(r=r.replace(/^ /,"")),(n.nextSibling==null&&n.parentElement!=null&&zt(n.parentElement,t)||n.nextSibling instanceof Element&&zt(n.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return e.insert(r)}class uf extends ht{constructor(e,t){super(e,t),Q(this,"lastRecorded",0),Q(this,"ignoreChange",!1),Q(this,"stack",{undo:[],redo:[]}),Q(this,"currentRange",null),this.quill.on(q.events.EDITOR_CHANGE,(s,r,i,o)=>{s===q.events.SELECTION_CHANGE?r&&o!==q.sources.SILENT&&(this.currentRange=r):s===q.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||o===q.sources.USER?this.record(r,i):this.transform(r)),this.currentRange=Ea(this.currentRange,r))}),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(e,t){if(this.stack[e].length===0)return;const s=this.stack[e].pop();if(!s)return;const r=this.quill.getContents(),i=s.delta.invert(r);this.stack[t].push({delta:i,range:Ea(s.range,i)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,q.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(e,t){if(e.ops.length===0)return;this.stack.redo=[];let s=e.invert(t),r=this.currentRange;const i=Date.now();if(this.lastRecorded+this.options.delay>i&&this.stack.undo.length>0){const o=this.stack.undo.pop();o&&(s=s.compose(o.delta),r=o.range)}else this.lastRecorded=i;s.length()!==0&&(this.stack.undo.push({delta:s,range:r}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(e){Bu(this.stack.undo,e),Bu(this.stack.redo,e)}undo(){this.change("undo","redo")}restoreSelection(e){if(e.range)this.quill.setSelection(e.range,q.sources.USER);else{const t=lx(this.quill.scroll,e.delta);this.quill.setSelection(t,q.sources.USER)}}}Q(uf,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function Bu(n,e){let t=e;for(let s=n.length-1;s>=0;s-=1){const r=n[s];n[s]={delta:t.transform(r.delta,!0),range:r.range&&Ea(r.range,t)},t=r.delta.transform(t),n[s].delta.length()===0&&n.splice(s,1)}}function ax(n,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
149
- `):t.attributes!=null?Object.keys(t.attributes).some(s=>n.query(s,ne.BLOCK)!=null):!1}function lx(n,e){const t=e.reduce((r,i)=>r+(i.delete||0),0);let s=e.length()-t;return ax(n,e)&&(s-=1),s}function Ea(n,e){if(!n)return n;const t=e.transformPosition(n.index),s=e.transformPosition(n.index+n.length);return{index:t,length:s-t}}class cf extends ht{constructor(e,t){super(e,t),e.root.addEventListener("drop",s=>{var r;s.preventDefault();let i=null;if(document.caretRangeFromPoint)i=document.caretRangeFromPoint(s.clientX,s.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(s.clientX,s.clientY);i=document.createRange(),i.setStart(a.offsetNode,a.offset),i.setEnd(a.offsetNode,a.offset)}const o=i&&e.selection.normalizeNative(i);if(o){const a=e.selection.normalizedToRange(o);(r=s.dataTransfer)!=null&&r.files&&this.upload(a,s.dataTransfer.files)}})}upload(e,t){const s=[];Array.from(t).forEach(r=>{var i;r&&(i=this.options.mimetypes)!=null&&i.includes(r.type)&&s.push(r)}),s.length>0&&this.options.handler.call(this,e,s)}}cf.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(n,e){if(!this.quill.scroll.query("image"))return;const t=e.map(s=>new Promise(r=>{const i=new FileReader;i.onload=()=>{r(i.result)},i.readAsDataURL(s)}));Promise.all(t).then(s=>{const r=s.reduce((i,o)=>i.insert({image:o}),new te().retain(n.index).delete(n.length));this.quill.updateContents(r,ee.sources.USER),this.quill.setSelection(n.index+s.length,ee.sources.SILENT)})}};const ux=["insertText","insertReplacementText"];class cx extends ht{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",s=>{this.handleBeforeInput(s)}),/Android/i.test(navigator.userAgent)||e.on(q.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){ul({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const s=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new te().retain(e.index).insert(t,s),q.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,q.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!ux.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const s=hx(e);if(s==null)return;const r=this.quill.selection.normalizeNative(t),i=r?this.quill.selection.normalizedToRange(r):null;i&&this.replaceText(i,s)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function hx(n){var e;return typeof n.data=="string"?n.data:(e=n.dataTransfer)!=null&&e.types.includes("text/plain")?n.dataTransfer.getData("text/plain"):null}const dx=/Mac/i.test(navigator.platform),fx=100,px=n=>!!(n.key==="ArrowLeft"||n.key==="ArrowRight"||n.key==="ArrowUp"||n.key==="ArrowDown"||n.key==="Home"||dx&&n.key==="a"&&n.ctrlKey===!0);class mx extends ht{constructor(e,t){super(e,t),Q(this,"isListening",!1),Q(this,"selectionChangeDeadline",0),this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(e,t){let{line:s,event:r}=t;if(!(s instanceof at)||!s.uiNode)return!0;const i=getComputedStyle(s.domNode).direction==="rtl";return i&&r.key!=="ArrowRight"||!i&&r.key!=="ArrowLeft"?!0:(this.quill.setSelection(e.index-1,e.length+(r.shiftKey?1:0),q.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",e=>{!e.defaultPrevented&&px(e)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+fx,this.isListening)return;this.isListening=!0;const e=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",e,{once:!0})}handleSelectionChange(){const e=document.getSelection();if(!e)return;const t=e.getRangeAt(0);if(t.collapsed!==!0||t.startOffset!==0)return;const s=this.quill.scroll.find(t.startContainer);if(!(s instanceof at)||!s.uiNode)return;const r=document.createRange();r.setStartAfter(s.uiNode),r.setEndAfter(s.uiNode),e.removeAllRanges(),e.addRange(r)}}q.register({"blots/block":qe,"blots/block/embed":Qe,"blots/break":ct,"blots/container":Nn,"blots/cursor":Ei,"blots/embed":sl,"blots/inline":en,"blots/scroll":Gn,"blots/text":lt,"modules/clipboard":af,"modules/history":uf,"modules/keyboard":Ni,"modules/uploader":cf,"modules/input":cx,"modules/uiNode":mx});class gx extends ut{add(e,t){let s=0;if(t==="+1"||t==="-1"){const r=this.value(e)||0;s=t==="+1"?r+1:r-1}else typeof t=="number"&&(s=t);return s===0?(this.remove(e),!0):super.add(e,s.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const vx=new gx("indent","ql-indent",{scope:ne.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class _a extends qe{}Q(_a,"blotName","blockquote"),Q(_a,"tagName","blockquote");class Na extends qe{static formats(e){return this.tagName.indexOf(e.tagName)+1}}Q(Na,"blotName","header"),Q(Na,"tagName",["H1","H2","H3","H4","H5","H6"]);class Gs extends Nn{}Gs.blotName="list-container";Gs.tagName="OL";class Zs extends qe{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){q.register(Gs)}constructor(e,t){super(e,t);const s=t.ownerDocument.createElement("span"),r=i=>{if(!e.isEnabled())return;const o=this.statics.formats(t,e);o==="checked"?(this.format("list","unchecked"),i.preventDefault()):o==="unchecked"&&(this.format("list","checked"),i.preventDefault())};s.addEventListener("mousedown",r),s.addEventListener("touchstart",r),this.attachUI(s)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}Zs.blotName="list";Zs.tagName="LI";Gs.allowedChildren=[Zs];Zs.requiredContainer=Gs;class Vs extends en{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}Q(Vs,"blotName","bold"),Q(Vs,"tagName",["STRONG","B"]);class Sa extends Vs{}Q(Sa,"blotName","italic"),Q(Sa,"tagName",["EM","I"]);class Ht extends en{static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return hf(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}Q(Ht,"blotName","link"),Q(Ht,"tagName","A"),Q(Ht,"SANITIZED_URL","about:blank"),Q(Ht,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function hf(n,e){const t=document.createElement("a");t.href=n;const s=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(s)>-1}class Aa extends en{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}Q(Aa,"blotName","script"),Q(Aa,"tagName",["SUB","SUP"]);class Ca extends Vs{}Q(Ca,"blotName","strike"),Q(Ca,"tagName",["S","STRIKE"]);class Oa extends en{}Q(Oa,"blotName","underline"),Q(Oa,"tagName","U");class Ur extends sl{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}Q(Ur,"blotName","formula"),Q(Ur,"className","ql-formula"),Q(Ur,"tagName","SPAN");const Pu=["alt","height","width"];class Ta extends Ge{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Pu.reduce((t,s)=>(e.hasAttribute(s)&&(t[s]=e.getAttribute(s)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return hf(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){Pu.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}Q(Ta,"blotName","image"),Q(Ta,"tagName","IMG");const Vu=["height","width"];class $r extends Qe{static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return Vu.reduce((t,s)=>(e.hasAttribute(s)&&(t[s]=e.getAttribute(s)),t),{})}static sanitize(e){return Ht.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){Vu.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}Q($r,"blotName","video"),Q($r,"className","ql-video"),Q($r,"tagName","IFRAME");const Is=new ut("code-token","hljs",{scope:ne.INLINE});class Lt extends en{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(Be.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,s){super(e,t,s),Is.add(this.domNode,s)}format(e,t){e!==Lt.blotName?super.format(e,t):t?Is.add(this.domNode,t):(Is.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Is.value(this.domNode)||this.unwrap()}}Lt.blotName="code-token";Lt.className="ql-token";class Xe extends Be{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),Lt.blotName,!1),super.replaceWith(e,t)}}class js extends Sn{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===Xe.blotName&&(this.forceNext=!0,this.children.forEach(s=>{s.format(e,t)}))}formatAt(e,t,s,r){s===Xe.blotName&&(this.forceNext=!0),super.formatAt(e,t,s,r)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(i=>i!==this.uiNode).map(i=>i.textContent).join(`
150
- `)}
151
- `,r=Xe.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==s){if(s.trim().length>0||this.cachedText==null){const i=this.children.reduce((a,l)=>a.concat(Wd(l,!1)),new te),o=e(s,r);i.diff(o).reduce((a,l)=>{let{retain:c,attributes:f}=l;return c?(f&&Object.keys(f).forEach(v=>{[Xe.blotName,Lt.blotName].includes(v)&&this.formatAt(a,c,v,f[v])}),a+c):a},0)}this.cachedText=s,this.forceNext=!1}}html(e,t){const[s]=this.children.find(e);return`<pre data-language="${s?Xe.formats(s.domNode):"plain"}">
152
- ${wi(this.code(e,t))}
153
- </pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=Xe.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}js.allowedChildren=[Xe];Xe.requiredContainer=js;Xe.allowedChildren=[Lt,Ei,lt,ct];const yx=(n,e,t)=>{if(typeof n.versionString=="string"){const s=n.versionString.split(".")[0];if(parseInt(s,10)>=11)return n.highlight(t,{language:e}).value}return n.highlight(e,t).value};class df extends ht{static register(){q.register(Lt,!0),q.register(Xe,!0),q.register(js,!0)}constructor(e,t){if(super(e,t),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,r)=>{let{key:i}=r;return s[i]=!0,s},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(q.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof js))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(s=>{let{key:r,label:i}=s;const o=t.ownerDocument.createElement("option");o.textContent=i,o.setAttribute("value",r),t.appendChild(o)}),t.addEventListener("change",()=>{e.format(Xe.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(t),e.children.head&&(t.value=Xe.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(q.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(q.sources.USER);const s=this.quill.getSelection();(e==null?this.quill.scroll.descendants(js):[e]).forEach(r=>{r.highlight(this.highlightBlot,t)}),this.quill.update(q.sources.SILENT),s!=null&&this.quill.setSelection(s,q.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return wi(e).split(`
154
- `).reduce((r,i,o)=>(o!==0&&r.insert(`
155
- `,{[Be.blotName]:t}),r.insert(i)),new te);const s=this.quill.root.ownerDocument.createElement("div");return s.classList.add(Be.className),s.innerHTML=yx(this.options.hljs,t,e),cl(this.quill.scroll,s,[(r,i)=>{const o=Is.value(r);return o?i.compose(new te().retain(i.length(),{[Lt.blotName]:o})):i}],[(r,i)=>r.data.split(`
156
- `).reduce((o,a,l)=>(l!==0&&o.insert(`
157
- `,{[Be.blotName]:t}),o.insert(a)),i)],new WeakMap)}}df.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"}]};const Ra=class ff extends qe{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",hl()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===ff.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};Q(Ra,"blotName","table"),Q(Ra,"tagName","TD");let Ot=Ra;class qt extends Nn{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),s=this.next.children.head.formats(),r=this.next.children.tail.formats();return e.table===t.table&&e.table===s.table&&e.table===r.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const s=t.formats(),r=t.next.formats();if(s.table!==r.table){const i=this.splitAfter(t);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}Q(qt,"blotName","table-row"),Q(qt,"tagName","TR");class bt extends Nn{}Q(bt,"blotName","table-body"),Q(bt,"tagName","TBODY");class os extends Nn{balanceCells(){const e=this.descendants(qt),t=e.reduce((s,r)=>Math.max(r.children.length,s),0);e.forEach(s=>{new Array(t-s.children.length).fill(0).forEach(()=>{let r;s.children.head!=null&&(r=Ot.formats(s.children.head.domNode));const i=this.scroll.create(Ot.blotName,r);s.appendChild(i),i.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(bt);t==null||t.children.head==null||t.children.forEach(s=>{const r=s.children.at(e);r!=null&&r.remove()})}insertColumn(e){const[t]=this.descendant(bt);t==null||t.children.head==null||t.children.forEach(s=>{const r=s.children.at(e),i=Ot.formats(s.children.head.domNode),o=this.scroll.create(Ot.blotName,i);s.insertBefore(o,r)})}insertRow(e){const[t]=this.descendant(bt);if(t==null||t.children.head==null)return;const s=hl(),r=this.scroll.create(qt.blotName);t.children.head.children.forEach(()=>{const o=this.scroll.create(Ot.blotName,s);r.appendChild(o)});const i=t.children.at(e);t.insertBefore(r,i)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Q(os,"blotName","table-container"),Q(os,"tagName","TABLE");os.allowedChildren=[bt];bt.requiredContainer=os;bt.allowedChildren=[qt];qt.requiredContainer=bt;qt.allowedChildren=[Ot];Ot.requiredContainer=qt;function hl(){return`row-${Math.random().toString(36).slice(2,6)}`}class bx extends ht{static register(){q.register(Ot),q.register(qt),q.register(bt),q.register(os)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(os).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(q.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(q.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(q.sources.USER),this.quill.setSelection(t,q.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,s]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==Ot.blotName)return[null,null,null,-1];const r=t.parent;return[r.parent.parent,r,t,s]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[s,r,i]=this.getTable(t);if(i==null)return;const o=i.cellOffset();s.insertColumn(o+e),this.quill.update(q.sources.USER);let a=r.rowOffset();e===0&&(a+=1),this.quill.setSelection(t.index+a,t.length,q.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[s,r,i]=this.getTable(t);if(i==null)return;const o=r.rowOffset();s.insertRow(o+e),this.quill.update(q.sources.USER),e>0?this.quill.setSelection(t,q.sources.SILENT):this.quill.setSelection(t.index+r.children.length,t.length,q.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const s=this.quill.getSelection();if(s==null)return;const r=new Array(e).fill(0).reduce(i=>{const o=new Array(t).fill(`
158
- `).join("");return i.insert(o,{table:hl()})},new te().retain(s.index));this.quill.updateContents(r,q.sources.USER),this.quill.setSelection(s.index,q.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(q.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(q.events.TEXT_CHANGE,(s,r,i)=>{i===q.sources.USER&&this.balanceTables()}),!0):!1)})}}const Uu=Ft("quill:toolbar");class dl extends ht{constructor(e,t){var s,r;if(super(e,t),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),xx(i,this.options.container),(r=(s=e.container)==null?void 0:s.parentNode)==null||r.insertBefore(i,e.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Uu.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(i=>{var o;const a=(o=this.options.handlers)==null?void 0:o[i];a&&this.addHandler(i,a)}),Array.from(this.container.querySelectorAll("button, select")).forEach(i=>{this.attach(i)}),this.quill.on(q.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(r=>r.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){Uu.warn("ignoring attaching to nonexistent format",t,e);return}const s=e.tagName==="SELECT"?"change":"click";e.addEventListener(s,r=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),r.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof Ge){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new te().retain(o.index).delete(o.length).insert({[t]:i}),q.sources.USER)}else this.quill.format(t,i,q.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(s=>{const[r,i]=s;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[r]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(t[r])){let a=t[r];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=t[r],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=t[r]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}}dl.DEFAULTS={};function $u(n,e,t){const s=document.createElement("button");s.setAttribute("type","button"),s.classList.add(`ql-${e}`),s.setAttribute("aria-pressed","false"),t!=null?(s.value=t,s.setAttribute("aria-label",`${e}: ${t}`)):s.setAttribute("aria-label",e),n.appendChild(s)}function xx(n,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const s=document.createElement("span");s.classList.add("ql-formats"),t.forEach(r=>{if(typeof r=="string")$u(s,r);else{const i=Object.keys(r)[0],o=r[i];Array.isArray(o)?kx(s,i,o):$u(s,i,o)}}),n.appendChild(s)})}function kx(n,e,t){const s=document.createElement("select");s.classList.add(`ql-${e}`),t.forEach(r=>{const i=document.createElement("option");r!==!1?i.setAttribute("value",String(r)):i.setAttribute("selected","selected"),s.appendChild(i)}),n.appendChild(s)}dl.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,ne.INLINE)!=null&&this.quill.format(t,!1,q.sources.USER)})}else this.quill.removeFormat(n.index,n.length,q.sources.USER)},direction(n){const{align:e}=this.quill.getFormat();n==="rtl"&&e==null?this.quill.format("align","right",q.sources.USER):!n&&e==="right"&&this.quill.format("align",!1,q.sources.USER),this.quill.format("direction",n,q.sources.USER)},indent(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e),s=parseInt(t.indent||0,10);if(n==="+1"||n==="-1"){let r=n==="+1"?1:-1;t.direction==="rtl"&&(r*=-1),this.quill.format("indent",s+r,q.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,q.sources.USER)},list(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e);n==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,q.sources.USER):this.quill.format("list","unchecked",q.sources.USER):this.quill.format("list",n,q.sources.USER)}}};const wx='<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>',Ex='<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>',_x='<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>',Nx='<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>',Sx='<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>',Ax='<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>',Cx='<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>',Ox='<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>',zu='<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>',Tx='<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>',Rx='<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>',Ix='<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>',Lx='<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>',qx='<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>',jx='<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>',Mx='<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>',Dx='<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>',Fx='<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>',Bx='<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>',Px='<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>',Vx='<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>',Ux='<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>',$x='<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>',zx='<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>',Hx='<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>',Kx='<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>',Wx='<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>',Gx='<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>',Zx='<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>',Yx='<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>',Xx='<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>',Jx='<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>',Qx='<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>',Us={align:{"":wx,center:Ex,right:_x,justify:Nx},background:Sx,blockquote:Ax,bold:Cx,clean:Ox,code:zu,"code-block":zu,color:Tx,direction:{"":Rx,rtl:Ix},formula:Lx,header:{1:qx,2:jx,3:Mx,4:Dx,5:Fx,6:Bx},italic:Px,image:Vx,indent:{"+1":Ux,"-1":$x},link:zx,list:{bullet:Hx,check:Kx,ordered:Wx},script:{sub:Gx,super:Zx},strike:Yx,table:Xx,underline:Jx,video:Qx},ek='<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 Hu=0;function Ku(n,e){n.setAttribute(e,`${n.getAttribute(e)!=="true"}`)}class Si{constructor(e){this.select=e,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",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Ku(this.label,"aria-expanded"),Ku(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const s=e.getAttribute("value");return s&&t.setAttribute("data-value",s),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",r=>{switch(r.key){case"Enter":this.selectItem(t,!0),r.preventDefault();break;case"Escape":this.escape(),r.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=ek,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${Hu}`,Hu+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const s=this.buildItem(t);e.appendChild(s),t.selected===!0&&this.selectItem(s)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.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(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const s=this.container.querySelector(".ql-selected");e!==s&&(s!=null&&s.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const s=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(s)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class pf extends Si{constructor(e,t){super(e),this.label.innerHTML=t,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(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const s=this.label.querySelector(".ql-color-label"),r=e&&e.getAttribute("data-value")||"";s&&(s.tagName==="line"?s.style.stroke=r:s.style.fill=r)}}class mf extends Si{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(s=>{s.innerHTML=t[s.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const s=e||this.defaultItem;if(s!=null){if(this.label.innerHTML===s.innerHTML)return;this.label.innerHTML=s.innerHTML}}}const tk=n=>{const{overflowY:e}=getComputedStyle(n,null);return e!=="visible"&&e!=="clip"};class gf{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,tk(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(e){const t=e.left+e.width/2-this.root.offsetWidth/2,s=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${s}px`,this.root.classList.remove("ql-flip");const r=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let o=0;if(i.right>r.right&&(o=r.right-i.right,this.root.style.left=`${t+o}px`),i.left<r.left&&(o=r.left-i.left,this.root.style.left=`${t+o}px`),i.bottom>r.bottom){const a=i.bottom-i.top,l=e.bottom-e.top+a;this.root.style.top=`${s-l}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const nk=[!1,"center","right","justify"],sk=["#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"],rk=[!1,"serif","monospace"],ik=["1","2","3",!1],ok=["small",!1,"large","huge"];class Ys extends _i{constructor(e,t){super(e,t);const s=r=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",s);return}this.tooltip!=null&&!this.tooltip.root.contains(r.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(r.target)||i.close()})};e.emitter.listenDOM("click",document.body,s)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(s=>{(s.getAttribute("class")||"").split(/\s+/).forEach(r=>{if(r.startsWith("ql-")&&(r=r.slice(3),t[r]!=null))if(r==="direction")s.innerHTML=t[r][""]+t[r].rtl;else if(typeof t[r]=="string")s.innerHTML=t[r];else{const i=s.value||"";i!=null&&t[r][i]&&(s.innerHTML=t[r][i])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(r=>{if(r.classList.contains("ql-align")&&(r.querySelector("option")==null&&As(r,nk),typeof t.align=="object"))return new mf(r,t.align);if(r.classList.contains("ql-background")||r.classList.contains("ql-color")){const i=r.classList.contains("ql-background")?"background":"color";return r.querySelector("option")==null&&As(r,sk,i==="background"?"#ffffff":"#000000"),new pf(r,t[i])}return r.querySelector("option")==null&&(r.classList.contains("ql-font")?As(r,rk):r.classList.contains("ql-header")?As(r,ik):r.classList.contains("ql-size")&&As(r,ok)),new Si(r)});const s=()=>{this.pickers.forEach(r=>{r.update()})};this.quill.on(ee.events.EDITOR_CHANGE,s)}}Ys.DEFAULTS=Wt({},_i.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class vf extends gf{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=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;t!=null?this.textbox.value=t:e!==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-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,ee.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,ee.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=ak(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const s=t.index+t.length;this.quill.insertEmbed(s,this.root.getAttribute("data-mode"),e,ee.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(s+1," ",ee.sources.USER),this.quill.setSelection(s+2,ee.sources.USER)}break}}this.textbox.value="",this.hide()}}function ak(n){let e=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:n}function As(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(s=>{const r=document.createElement("option");s===t?r.setAttribute("selected","selected"):r.setAttribute("value",String(s)),n.appendChild(r)})}const lk=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class yf extends vf{constructor(e,t){super(e,t),this.quill.on(ee.events.EDITOR_CHANGE,(s,r,i,o)=>{if(s===ee.events.SELECTION_CHANGE)if(r!=null&&r.length>0&&o===ee.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(r.index,r.length);if(a.length===1){const l=this.quill.getBounds(r);l!=null&&this.position(l)}else{const l=a[a.length-1],c=this.quill.getIndex(l),f=Math.min(l.length()-1,r.index+r.length-c),v=this.quill.getBounds(new kn(c,f));v!=null&&this.position(v)}}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(ee.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),s=this.root.querySelector(".ql-tooltip-arrow");return s.style.marginLeft="",t!==0&&(s.style.marginLeft=`${-1*t-s.offsetWidth/2}px`),t}}Q(yf,"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(""));class bf extends Ys{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=lk),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new yf(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Us),this.buildPickers(e.container.querySelectorAll("select"),Us))}}bf.DEFAULTS=Wt({},Ys.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,q.sources.USER)}}}}});const uk=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class xf extends vf{constructor(){super(...arguments),Q(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",e=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),e.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",e=>{if(this.linkRange!=null){const t=this.linkRange;this.restoreFocus(),this.quill.formatText(t,"link",!1,ee.sources.USER),delete this.linkRange}e.preventDefault(),this.hide()}),this.quill.on(ee.events.SELECTION_CHANGE,(e,t,s)=>{if(e!=null){if(e.length===0&&s===ee.sources.USER){const[r,i]=this.quill.scroll.descendant(Ht,e.index);if(r!=null){this.linkRange=new kn(e.index-i,r.length());const o=Ht.formats(r.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")}}Q(xf,"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(""));class kf extends Ys{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=uk),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Us),this.buildPickers(e.container.querySelectorAll("select"),Us),this.tooltip=new xf(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,s)=>{e.handlers.link.call(e,!s.format.link)}))}}kf.DEFAULTS=Wt({},Ys.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:s}=this.quill.theme;s.edit("link",t)}else this.quill.format("link",!1,q.sources.USER)}}}}});q.register({"attributors/attribute/direction":Jd,"attributors/class/align":Zd,"attributors/class/background":Ab,"attributors/class/color":Sb,"attributors/class/direction":Qd,"attributors/class/font":nf,"attributors/class/size":rf,"attributors/style/align":Yd,"attributors/style/background":ol,"attributors/style/color":il,"attributors/style/direction":ef,"attributors/style/font":sf,"attributors/style/size":of},!0);q.register({"formats/align":Zd,"formats/direction":Qd,"formats/indent":vx,"formats/background":ol,"formats/color":il,"formats/font":nf,"formats/size":rf,"formats/blockquote":_a,"formats/code-block":Be,"formats/header":Na,"formats/list":Zs,"formats/bold":Vs,"formats/code":al,"formats/italic":Sa,"formats/link":Ht,"formats/script":Aa,"formats/strike":Ca,"formats/underline":Oa,"formats/formula":Ur,"formats/image":Ta,"formats/video":$r,"modules/syntax":df,"modules/table":bx,"modules/toolbar":dl,"themes/bubble":bf,"themes/snow":kf,"ui/icons":Us,"ui/picker":Si,"ui/icon-picker":mf,"ui/color-picker":pf,"ui/tooltip":gf},!0);class Ai extends se.Component{constructor(e){super(e),this.editingAreaRef=se.createRef(),this.containerRef=se.createRef(),this.dirtyProps=["modules","formats","bounds","theme","children"],this.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],this.state={generation:0},this.selection=null,this.onEditorChange=(s,r,i,o)=>{var a,l;s==="text-change"?(a=this.onEditorChangeText)==null||a.call(this,this.editor.root.innerHTML,r,o,this.unprivilegedEditor):s==="selection-change"&&((l=this.onEditorChangeSelection)==null||l.call(this,r,o,this.unprivilegedEditor))};const t=this.isControlled()?e.value:e.defaultValue;this.value=t??""}validateProps(e){if(se.Children.count(e.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(se.Children.count(e.children)){const t=se.Children.only(e.children);if((t==null?void 0:t.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&e.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")}shouldComponentUpdate(e,t){if(this.validateProps(e),!this.editor||this.state.generation!==t.generation)return!0;if("value"in e){const s=this.getEditorContents(),r=e.value??"";this.isEqualValue(r,s)||this.setEditorContents(this.editor,r)}return e.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,e.readOnly),[...this.cleanProps,...this.dirtyProps].some(s=>!$t(e[s],this.props[s]))}shouldComponentRegenerate(e){return this.dirtyProps.some(t=>!$t(e[t],this.props[t]))}componentDidMount(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())}componentWillUnmount(){this.destroyEditor()}componentDidUpdate(e,t){if(this.editor&&this.shouldComponentRegenerate(e)){const s=this.editor.getContents(),r=this.editor.getSelection();this.regenerationSnapshot={delta:s,selection:r},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==t.generation){const{delta:s,selection:r}=this.regenerationSnapshot;delete this.regenerationSnapshot,this.instantiateEditor();const i=this.editor;i.setContents(s),Wu(()=>this.setEditorSelection(i,r))}}instantiateEditor(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())}destroyEditor(){var e,t;if(!this.editor)return;this.unhookEditor(this.editor);const s=(e=this.props.modules)==null?void 0:e.toolbar;if(!(typeof s=="object"&&s&&"container"in s&&typeof s.container=="string"||typeof s=="string")){const r=(t=this.containerRef.current)==null?void 0:t.querySelector(".ql-toolbar");r&&r.remove()}delete this.editor}isControlled(){return"value"in this.props}getEditorConfig(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,tabIndex:this.props.tabIndex,theme:this.props.theme}}getEditor(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor}createEditor(e,t){const s=new q(e,t);return t.tabIndex!=null&&this.setEditorTabIndex(s,t.tabIndex),this.hookEditor(s),s}hookEditor(e){this.unprivilegedEditor=this.makeUnprivilegedEditor(e),e.on("editor-change",this.onEditorChange)}unhookEditor(e){e.off("editor-change",this.onEditorChange)}getEditorContents(){return this.value}getEditorSelection(){return this.selection}isDelta(e){return e&&e.ops}isEqualValue(e,t){return this.isDelta(e)&&this.isDelta(t)?$t(e.ops,t.ops):$t(e,t)}setEditorContents(e,t){this.value=t;const s=this.getEditorSelection();typeof t=="string"?e.setContents(e.clipboard.convert({html:t})):e.setContents(t),Wu(()=>this.setEditorSelection(e,s))}setEditorSelection(e,t){if(this.selection=t,t){const s=e.getLength();t.index=Math.max(0,Math.min(t.index,s-1)),t.length=Math.max(0,Math.min(t.length,s-1-t.index)),e.setSelection(t)}}setEditorTabIndex(e,t){var s;(s=e==null?void 0:e.scroll)!=null&&s.domNode&&(e.scroll.domNode.tabIndex=t)}setEditorReadOnly(e,t){t?e.disable():e.enable()}makeUnprivilegedEditor(e){const t=e;return{getHTML:()=>t.root.innerHTML,getSemanticHTML:t.getSemanticHTML.bind(t),getLength:t.getLength.bind(t),getText:t.getText.bind(t),getContents:t.getContents.bind(t),getSelection:t.getSelection.bind(t),getBounds:t.getBounds.bind(t)}}getEditingArea(){const e=this.editingAreaRef.current;if(!e)throw new Error("Cannot find element for editing area");if(e.nodeType===3)throw new Error("Editing area cannot be a text node");return e}renderEditingArea(){const{children:e,preserveWhitespace:t}=this.props,{generation:s}=this.state,r={key:s,ref:this.editingAreaRef};return se.Children.count(e)?se.cloneElement(se.Children.only(e),r):t?se.createElement("pre",{...r}):se.createElement("div",{...r})}render(){return se.createElement("div",{ref:this.containerRef,id:this.props.id,style:this.props.style,key:this.state.generation,className:`quill ${this.props.className??""}`,onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())}onEditorChangeText(e,t,s,r){var i,o;if(!this.editor)return;const a=this.isDelta(this.value)?r.getContents():r.getHTML();a!==this.getEditorContents()&&(this.lastDeltaChangeSet=t,this.value=a,(o=(i=this.props).onChange)==null||o.call(i,e,t,s,r))}onEditorChangeSelection(e,t,s){var r,i,o,a,l,c;if(!this.editor)return;const f=this.getEditorSelection(),v=!f&&e,d=f&&!e;$t(e,f)||(this.selection=e,(i=(r=this.props).onChangeSelection)==null||i.call(r,e,t,s),v?(a=(o=this.props).onFocus)==null||a.call(o,e,t,s):d&&((c=(l=this.props).onBlur)==null||c.call(l,f,t,s)))}focus(){this.editor&&this.editor.focus()}blur(){this.editor&&(this.selection=null,this.editor.blur())}}Ai.displayName="React Quill";Ai.Quill=q;Ai.defaultProps={theme:"snow",modules:{},readOnly:!1};function Wu(n){Promise.resolve().then(n)}const ck=ti.j("w-full rounded-lg border border-border-alpha-strong dark:bg-transparent file:border-0 placeholder:text-secondary placeholder:text-body-sm-regular focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-bg focus-within:ring-offset-2 focus-within:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"focus-within:ring-item-primary",failure:"focus-within:ring-item-destructive bg-item-destructive-focus placeholder:text-item-destructive border-item-destructive text-destructive",success:"focus-within:ring-success bg-success/20 placeholder:text-success/80 border-success text-success"}},defaultVariants:{variant:"default"}}),hk=Pa.div`
159
- .quill {
160
- .ql {
161
- &-toolbar {
162
- border: none;
163
- }
164
-
165
- &-editor,
166
- &-container {
167
- min-height: 120px;
168
- border: none;
169
- }
170
- }
171
- `;function wf({containerProps:n,className:e,variant:t,...s}){return x.ae.jsx(hk,{...n,className:Se.mo(ck({variant:t}),"block h-auto p-0",e),children:x.ae.jsx(Ai,{theme:"snow",...s})})}wf.displayName="HtmlEditor";function Gt(n){return typeof n=="string"||n instanceof String}function Gu(n){var e;return typeof n=="object"&&n!=null&&(n==null||(e=n.constructor)==null?void 0:e.name)==="Object"}function Ef(n,e){return Array.isArray(e)?Ef(n,(t,s)=>e.includes(s)):Object.entries(n).reduce((t,s)=>{let[r,i]=s;return e(i,r)&&(t[r]=i),t},{})}const ie={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function dk(n){switch(n){case ie.LEFT:return ie.FORCE_LEFT;case ie.RIGHT:return ie.FORCE_RIGHT;default:return n}}function Vo(n){return n.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Qr(n,e){if(e===n)return!0;const t=Array.isArray(e),s=Array.isArray(n);let r;if(t&&s){if(e.length!=n.length)return!1;for(r=0;r<e.length;r++)if(!Qr(e[r],n[r]))return!1;return!0}if(t!=s)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){const i=e instanceof Date,o=n instanceof Date;if(i&&o)return e.getTime()==n.getTime();if(i!=o)return!1;const a=e instanceof RegExp,l=n instanceof RegExp;if(a&&l)return e.toString()==n.toString();if(a!=l)return!1;const c=Object.keys(e);for(r=0;r<c.length;r++)if(!Object.prototype.hasOwnProperty.call(n,c[r]))return!1;for(r=0;r<c.length;r++)if(!Qr(n[c[r]],e[c[r]]))return!1;return!0}else if(e&&n&&typeof e=="function"&&typeof n=="function")return e.toString()===n.toString();return!1}class fk{constructor(e){for(Object.assign(this,e);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?ie.NONE:(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?ie.RIGHT:ie.LEFT}}function le(n,e){return new le.InputMask(n,e)}function _f(n){if(n==null)throw new Error("mask property should be defined");return n instanceof RegExp?le.MaskedRegExp:Gt(n)?le.MaskedPattern:n===Date?le.MaskedDate:n===Number?le.MaskedNumber:Array.isArray(n)||n===Array?le.MaskedDynamic:le.Masked&&n.prototype instanceof le.Masked?n:le.Masked&&n instanceof le.Masked?n.constructor:n instanceof Function?le.MaskedFunction:(console.warn("Mask not found for mask",n),le.Masked)}function $s(n){if(!n)throw new Error("Options in not defined");if(le.Masked){if(n.prototype instanceof le.Masked)return{mask:n};const{mask:e=void 0,...t}=n instanceof le.Masked?{mask:n}:Gu(n)&&n.mask instanceof le.Masked?n:{};if(e){const s=e.mask;return{...Ef(e,(r,i)=>!i.startsWith("_")),mask:e.constructor,_mask:s,...t}}}return Gu(n)?{...n}:{mask:n}}function jt(n){if(le.Masked&&n instanceof le.Masked)return n;const e=$s(n),t=_f(e.mask);if(!t)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===t&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new t(e)}le.createMask=jt;class fl{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return e??this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return e??this.value.length}select(e,t){if(!(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}le.MaskElement=fl;const Zu=90,pk=89;class Ci extends fl{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t,s;return(e=(t=(s=this.input).getRootNode)==null?void 0:t.call(s))!=null?e:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){if(this._handlers.redo&&(e.keyCode===Zu&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===pk&&e.ctrlKey))return e.preventDefault(),this._handlers.redo(e);if(this._handlers.undo&&e.keyCode===Zu&&(e.metaKey||e.ctrlKey))return e.preventDefault(),this._handlers.undo(e);e.isComposing||this._handlers.selectionChange(e)}_onBeforeinput(e){if(e.inputType==="historyUndo"&&this._handlers.undo)return e.preventDefault(),this._handlers.undo(e);if(e.inputType==="historyRedo"&&this._handlers.redo)return e.preventDefault(),this._handlers.redo(e)}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}le.HTMLMaskElement=Ci;class mk extends Ci{constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}le.HTMLMaskElement=Ci;class Nf extends Ci{get _unsafeSelectionStart(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,r=t&&t.focusOffset;return r==null||s==null||s<r?s:r}get _unsafeSelectionEnd(){const e=this.rootElement,t=e.getSelection&&e.getSelection(),s=t&&t.anchorOffset,r=t&&t.focusOffset;return r==null||s==null||s>r?s:r}_unsafeSelect(e,t){if(!this.rootElement.createRange)return;const s=this.rootElement.createRange();s.setStart(this.input.firstChild||this.input,e),s.setEnd(this.input.lastChild||this.input,t);const r=this.rootElement,i=r.getSelection&&r.getSelection();i&&(i.removeAllRanges(),i.addRange(s))}get value(){return this.input.textContent||""}set value(e){this.input.textContent=e}}le.HTMLContenteditableMaskElement=Nf;class Oi{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return this.states.length===0}push(e){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(e),this.states.length>Oi.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}Oi.MAX_LENGTH=100;class gk{constructor(e,t){this.el=e instanceof fl?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new Nf(e):new mk(e),this.masked=jt(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new Oi,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(this.maskEquals(e))return;if(!(e instanceof le.Masked)&&this.masked.constructor===_f(e)){this.masked.updateOptions({mask:e});return}const t=e instanceof le.Masked?e:jt({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const s=this._listeners[e];s&&s.forEach(r=>r(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){!this.el||!this.el.isActive||(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){const t=this.masked.unmaskedValue,s=this.masked.value,r=this.masked.rawInputValue,i=this.displayValue,o=this.unmaskedValue!==t||this.value!==s||this._rawInputValue!==r;this._unmaskedValue=t,this._value=s,this._rawInputValue=r,this.el.value!==i&&(this.el.value=i),e==="auto"?this.alignCursor():e!=null&&(this.cursorPos=e),o&&this._fireChangeEvents(),!this._historyChanging&&(o||this.history.isEmpty)&&this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...s}=e,r=!this.maskEquals(t),i=this.masked.optionsIsChanged(s);r&&(this.mask=t),i&&this.masked.updateOptions(s),(r||i)&&this.updateControl()}updateCursor(e){e!=null&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,ie.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;const s=this._listeners[e].indexOf(t);return s>=0&&this._listeners[e].splice(s,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();const t=new fk({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),s=this.masked.rawInputValue,r=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,i=s===this.masked.rawInputValue?t.removeDirection:ie.NONE;let o=this.masked.nearestInputPos(t.startChangePos+r,i);i!==ie.NONE&&(o=this.masked.nearestInputPos(o,ie.NONE)),this.updateControl(o),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}le.InputMask=gk;class de{static normalize(e){return Array.isArray(e)?e:[e,new de]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return!!this.rawInserted||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}le.ChangeDetails=de;class vt{constructor(e,t,s){e===void 0&&(e=""),t===void 0&&(t=0),this.value=e,this.from=t,this.stop=s}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||e!=null&&this.from>=e)return"";const t=this.value[0];return this.value=this.value.slice(1),t}shift(){if(!this.value.length)return"";const e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class Pe{constructor(e){this._value="",this._update({...Pe.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){t===void 0&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this.displayValue.slice(e,t)}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new vt(this.extractInput(e,t),e)}appendTail(e){return Gt(e)&&(e=new vt(String(e))),e.appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new de({inserted:e,rawInserted:e})):new de}_appendChar(e,t,s){t===void 0&&(t={});const r=this.state;let i;if([e,i]=this.doPrepareChar(e,t),e&&(i=i.aggregate(this._appendCharRaw(e,t)),!i.rawInserted&&this.autofix==="pad")){const o=this.state;this.state=r;let a=this.pad(t);const l=this._appendCharRaw(e,t);a=a.aggregate(l),l.rawInserted||a.equals(i)?i=a:this.state=o}if(i.inserted){let o,a=this.doValidate(t)!==!1;if(a&&s!=null){const l=this.state;if(this.overwrite===!0){o=s.state;for(let f=0;f<i.rawInserted.length;++f)s.unshift(this.displayValue.length-i.tailShift)}let c=this.appendTail(s);if(a=c.rawInserted.length===s.toString().length,!(a&&c.inserted)&&this.overwrite==="shift"){this.state=l,o=s.state;for(let f=0;f<i.rawInserted.length;++f)s.shift();c=this.appendTail(s),a=c.rawInserted.length===s.toString().length}a&&c.inserted&&(this.state=l)}a||(i=new de,this.state=r,s&&o&&(s.state=o))}return i}_appendPlaceholder(){return new de}_appendEager(){return new de}append(e,t,s){if(!Gt(e))throw new Error("value should be string");const r=Gt(s)?new vt(String(s)):s;t!=null&&t.tail&&(t._beforeTailState=this.state);let i;[e,i]=this.doPrepare(e,t);for(let o=0;o<e.length;++o){const a=this._appendChar(e[o],t,r);if(!a.rawInserted&&!this.doSkipInvalid(e[o],t,r))break;i.aggregate(a)}return(this.eager===!0||this.eager==="append")&&t!=null&&t.input&&e&&i.aggregate(this._appendEager()),r!=null&&(i.tailShift+=this.appendTail(r).tailShift),i}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t),new de}withValueRefresh(e){if(this._refreshing||!this._initialized)return e();this._refreshing=!0;const t=this.rawInputValue,s=this.value,r=e();return this.rawInputValue=t,this.value&&this.value!==s&&s.indexOf(this.value)===0&&(this.append(s.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(e){if(this._isolated||!this._initialized)return e(this);this._isolated=!0;const t=this.state,s=e(this);return this.state=t,delete this._isolated,s}doSkipInvalid(e,t,s){return!!this.skipInvalid}doPrepare(e,t){return t===void 0&&(t={}),de.normalize(this.prepare?this.prepare(e,this,t):e)}doPrepareChar(e,t){return t===void 0&&(t={}),de.normalize(this.prepareChar?this.prepareChar(e,this,t):e)}doValidate(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))}doCommit(){this.commit&&this.commit(this.value,this)}splice(e,t,s,r,i){s===void 0&&(s=""),r===void 0&&(r=ie.NONE),i===void 0&&(i={input:!0});const o=e+t,a=this.extractTail(o),l=this.eager===!0||this.eager==="remove";let c;l&&(r=dk(r),c=this.extractInput(0,o,{raw:!0}));let f=e;const v=new de;if(r!==ie.NONE&&(f=this.nearestInputPos(e,t>1&&e!==0&&!l?ie.NONE:r),v.tailShift=f-e),v.aggregate(this.remove(f)),l&&r!==ie.NONE&&c===this.rawInputValue)if(r===ie.FORCE_LEFT){let d;for(;c===this.rawInputValue&&(d=this.displayValue.length);)v.aggregate(new de({tailShift:-1})).aggregate(this.remove(d-1))}else r===ie.FORCE_RIGHT&&a.unshift();return v.aggregate(this.append(s,i,a))}maskEquals(e){return this.mask===e}optionsIsChanged(e){return!Qr(this,e)}typedValueEquals(e){const t=this.typedValue;return e===t||Pe.EMPTY_VALUES.includes(e)&&Pe.EMPTY_VALUES.includes(t)||(this.format?this.format(e,this)===this.format(this.typedValue,this):!1)}pad(e){return new de}}Pe.DEFAULTS={skipInvalid:!0};Pe.EMPTY_VALUES=[void 0,null,""];le.Masked=Pe;class fn{constructor(e,t){e===void 0&&(e=[]),t===void 0&&(t=0),this.chunks=e,this.from=t}toString(){return this.chunks.map(String).join("")}extend(e){if(!String(e))return;e=Gt(e)?new vt(String(e)):e;const t=this.chunks[this.chunks.length-1],s=t&&(t.stop===e.stop||e.stop==null)&&e.from===t.from+t.toString().length;if(e instanceof vt)s?t.extend(e.toString()):this.chunks.push(e);else if(e instanceof fn){if(e.stop==null){let r;for(;e.chunks.length&&e.chunks[0].stop==null;)r=e.chunks.shift(),r.from+=e.from,this.extend(r)}e.toString()&&(e.stop=e.blockIndex,this.chunks.push(e))}}appendTo(e){if(!(e instanceof le.MaskedPattern))return new vt(this.toString()).appendTo(e);const t=new de;for(let s=0;s<this.chunks.length;++s){const r=this.chunks[s],i=e._mapPosToBlock(e.displayValue.length),o=r.stop;let a;if(o!=null&&(!i||i.index<=o)&&((r instanceof fn||e._stops.indexOf(o)>=0)&&t.aggregate(e._appendPlaceholder(o)),a=r instanceof fn&&e._blocks[o]),a){const l=a.appendTail(r);t.aggregate(l);const c=r.toString().slice(l.rawInserted.length);c&&t.aggregate(e.append(c,{tail:!0}))}else t.aggregate(e.append(r.toString(),{tail:!0}))}return t}get state(){return{chunks:this.chunks.map(e=>e.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...s}=e;Object.assign(this,s),this.chunks=t.map(r=>{const i="chunks"in r?new fn:new vt;return i.state=r,i})}unshift(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";const t=e!=null?e-this.from:e;let s=0;for(;s<this.chunks.length;){const r=this.chunks[s],i=r.unshift(t);if(r.toString()){if(!i)break;++s}else this.chunks.splice(s,1);if(i)return i}return""}shift(){if(!this.chunks.length)return"";let e=this.chunks.length-1;for(;0<=e;){const t=this.chunks[e],s=t.shift();if(t.toString()){if(!s)break;--e}else this.chunks.splice(e,1);if(s)return s}return""}}class vk{constructor(e,t){this.masked=e,this._log=[];const{offset:s,index:r}=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=s,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(e){Object.assign(this,e)}pushState(){this._log.push(this.state)}popState(){const e=this._log.pop();return e&&(this.state=e),e}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(e())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ie.FORCE_LEFT),this.offset!==0))return!0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ie.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ie.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!(this.block.isFixed||!this.block.value)&&(this.offset=this.block.nearestInputPos(this.offset,ie.FORCE_RIGHT),this.offset!==this.block.value.length))return!0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,ie.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,ie.NONE),!0})}}class Sf{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._value=this._value.slice(0,e)+this._value.slice(t),this._value||(this._isRawInput=!1),new de}nearestInputPos(e,t){t===void 0&&(t=ie.NONE);const s=0,r=this._value.length;switch(t){case ie.LEFT:case ie.FORCE_LEFT:return s;case ie.NONE:case ie.RIGHT:case ie.FORCE_RIGHT:default:return r}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this._value.length),s===void 0&&(s={}),s.raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return!!this._value}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new de;const s=this.eager===!0||this.eager==="append",r=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!s)&&!t.tail,i=new de({inserted:this.char,rawInserted:r?this.char:""});return this._value=this.char,this._isRawInput=r&&(t.raw||t.input),i}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new de;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new vt("")}appendTail(e){return Gt(e)&&(e=new vt(String(e))),e.appendTo(this)}append(e,t,s){const r=this._appendChar(e[0],t);return s!=null&&(r.tailShift+=this.appendTail(s).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=!!e._rawInputValue}pad(e){return this._appendPlaceholder()}}class ei{constructor(e){const{parent:t,isOptional:s,placeholderChar:r,displayChar:i,lazy:o,eager:a,...l}=e;this.masked=jt(l),Object.assign(this,{parent:t,isOptional:s,placeholderChar:r,displayChar:i,lazy:o,eager:a})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),e===0&&t>=1?(this.isFilled=!1,this.masked.remove(e,t)):new de}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return!!this.masked.value||this.isOptional}_appendChar(e,t){if(t===void 0&&(t={}),this.isFilled)return new de;const s=this.masked.state;let r=this.masked._appendChar(e,this.currentMaskFlags(t));return r.inserted&&this.doValidate(t)===!1&&(r=new de,this.masked.state=s),!r.inserted&&!this.isOptional&&!this.lazy&&!t.input&&(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=!!r.inserted,r}append(e,t,s){return this.masked.append(e,this.currentMaskFlags(t),s)}_appendPlaceholder(){return this.isFilled||this.isOptional?new de:(this.isFilled=!0,new de({inserted:this.placeholderChar}))}_appendEager(){return new de}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.masked.extractInput(e,t,s)}nearestInputPos(e,t){t===void 0&&(t=ie.NONE);const s=0,r=this.value.length,i=Math.min(Math.max(e,s),r);switch(t){case ie.LEFT:case ie.FORCE_LEFT:return this.isComplete?i:s;case ie.RIGHT:case ie.FORCE_RIGHT:return this.isComplete?i:r;case ie.NONE:default:return i}}totalInputPositions(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.value.length),this.value.slice(e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)}}pad(e){return new de}}ei.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class yk extends Pe{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=s=>s.search(t)>=0),super._update(e)}}le.MaskedRegExp=yk;class Ve extends Pe{constructor(e){super({...Ve.DEFAULTS,...e,definitions:Object.assign({},ei.DEFAULT_DEFINITIONS,e==null?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){const e=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const t=this.mask;if(!t||!e)return;let s=!1,r=!1;for(let i=0;i<t.length;++i){if(this.blocks){const c=t.slice(i),f=Object.keys(this.blocks).filter(d=>c.indexOf(d)===0);f.sort((d,h)=>h.length-d.length);const v=f[0];if(v){const{expose:d,repeat:h,...m}=$s(this.blocks[v]),g={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...m,repeat:h,parent:this},b=h!=null?new le.RepeatBlock(g):jt(g);b&&(this._blocks.push(b),d&&(this.exposeBlock=b),this._maskedBlocks[v]||(this._maskedBlocks[v]=[]),this._maskedBlocks[v].push(this._blocks.length-1)),i+=v.length-1;continue}}let o=t[i],a=o in e;if(o===Ve.STOP_CHAR){this._stops.push(this._blocks.length);continue}if(o==="{"||o==="}"){s=!s;continue}if(o==="["||o==="]"){r=!r;continue}if(o===Ve.ESCAPE_CHAR){if(++i,o=t[i],!o)break;a=!1}const l=a?new ei({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...$s(e[o]),parent:this}):new Sf({char:o,eager:this.eager,isUnmasking:s});this._blocks.push(l)}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(!e){this.reset();return}const{_blocks:t,...s}=e;this._blocks.forEach((r,i)=>r.state=t[i]),super.state=s}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()}else super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=e,this.appendTail(t),this.doCommit()}else super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){if(this.exposeBlock){const t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()}else super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new de;let s=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(s==null)return t;this._blocks[s].isFilled&&++s;for(let r=s;r<this._blocks.length;++r){const i=this._blocks[r]._appendEager();if(!i.inserted)break;t.aggregate(i)}return t}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._mapPosToBlock(this.displayValue.length),r=new de;if(!s)return r;for(let o=s.index,a;a=this._blocks[o];++o){var i;const l=a._appendChar(e,{...t,_beforeTailState:(i=t._beforeTailState)==null||(i=i._blocks)==null?void 0:i[o]});if(r.aggregate(l),l.consumed)break}return r}extractTail(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=new fn;return e===t||this._forEachBlocksInRange(e,t,(r,i,o,a)=>{const l=r.extractTail(o,a);l.stop=this._findStopBefore(i),l.from=this._blockStartPos(i),l instanceof fn&&(l.blockIndex=i),s.extend(l)}),s}extractInput(e,t,s){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),s===void 0&&(s={}),e===t)return"";let r="";return this._forEachBlocksInRange(e,t,(i,o,a,l)=>{r+=i.extractInput(a,l,s)}),r}_findStopBefore(e){let t;for(let s=0;s<this._stops.length;++s){const r=this._stops[s];if(r<=e)t=r;else break}return t}_appendPlaceholder(e){const t=new de;if(this.lazy&&e==null)return t;const s=this._mapPosToBlock(this.displayValue.length);if(!s)return t;const r=s.index,i=e??this._blocks.length;return this._blocks.slice(r,i).forEach(o=>{if(!o.lazy||e!=null){var a;t.aggregate(o._appendPlaceholder((a=o._blocks)==null?void 0:a.length))}}),t}_mapPosToBlock(e){let t="";for(let s=0;s<this._blocks.length;++s){const r=this._blocks[s],i=t.length;if(t+=r.displayValue,e<=t.length)return{index:s,offset:e-i}}}_blockStartPos(e){return this._blocks.slice(0,e).reduce((t,s)=>t+=s.displayValue.length,0)}_forEachBlocksInRange(e,t,s){t===void 0&&(t=this.displayValue.length);const r=this._mapPosToBlock(e);if(r){const i=this._mapPosToBlock(t),o=i&&r.index===i.index,a=r.offset,l=i&&o?i.offset:this._blocks[r.index].displayValue.length;if(s(this._blocks[r.index],r.index,a,l),i&&!o){for(let c=r.index+1;c<i.index;++c)s(this._blocks[c],c,0,this._blocks[c].displayValue.length);s(this._blocks[i.index],i.index,0,i.offset)}}}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._forEachBlocksInRange(e,t,(r,i,o,a)=>{s.aggregate(r.remove(o,a))}),s}nearestInputPos(e,t){if(t===void 0&&(t=ie.NONE),!this._blocks.length)return 0;const s=new vk(this,e);if(t===ie.NONE)return s.pushRightBeforeInput()||(s.popState(),s.pushLeftBeforeInput())?s.pos:this.displayValue.length;if(t===ie.LEFT||t===ie.FORCE_LEFT){if(t===ie.LEFT){if(s.pushRightBeforeFilled(),s.ok&&s.pos===e)return e;s.popState()}if(s.pushLeftBeforeInput(),s.pushLeftBeforeRequired(),s.pushLeftBeforeFilled(),t===ie.LEFT){if(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.ok&&s.pos<=e||(s.popState(),s.ok&&s.pos<=e))return s.pos;s.popState()}return s.ok?s.pos:t===ie.FORCE_LEFT?0:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:0)}return t===ie.RIGHT||t===ie.FORCE_RIGHT?(s.pushRightBeforeInput(),s.pushRightBeforeRequired(),s.pushRightBeforeFilled()?s.pos:t===ie.FORCE_RIGHT?this.displayValue.length:(s.popState(),s.ok||(s.popState(),s.ok)?s.pos:this.nearestInputPos(e,ie.LEFT))):e}totalInputPositions(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);let s=0;return this._forEachBlocksInRange(e,t,(r,i,o,a)=>{s+=r.totalInputPositions(o,a)}),s}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(s=>this._blocks[s]):[]}pad(e){const t=new de;return this._forEachBlocksInRange(0,this.displayValue.length,s=>t.aggregate(s.pad(e))),t}}Ve.DEFAULTS={...Pe.DEFAULTS,lazy:!0,placeholderChar:"_"};Ve.STOP_CHAR="`";Ve.ESCAPE_CHAR="\\";Ve.InputDefinition=ei;Ve.FixedDefinition=Sf;le.MaskedPattern=Ve;class zr extends Ve{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:s=this.from||0,maxLength:r=this.maxLength||0,autofix:i=this.autofix,...o}=e;this.to=t,this.from=s,this.maxLength=Math.max(String(t).length,r),this.autofix=i;const a=String(this.from).padStart(this.maxLength,"0"),l=String(this.to).padStart(this.maxLength,"0");let c=0;for(;c<l.length&&l[c]===a[c];)++c;o.mask=l.slice(0,c).replace(/0/g,"\\0")+"0".repeat(this.maxLength-c),super._update(o)}get isComplete(){return super.isComplete&&!!this.value}boundaries(e){let t="",s="";const[,r,i]=e.match(/^(\D*)(\d*)(\D*)/)||[];return i&&(t="0".repeat(r.length)+i,s="9".repeat(r.length)+i),t=t.padEnd(this.maxLength,"0"),s=s.padEnd(this.maxLength,"9"),[t,s]}doPrepareChar(e,t){t===void 0&&(t={});let s;return[e,s]=super.doPrepareChar(e.replace(/\D/g,""),t),e||(s.skip=!this.isComplete),[e,s]}_appendCharRaw(e,t){if(t===void 0&&(t={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(e,t);const s=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[i,o]=this.boundaries(this.value+e);return Number(o)<this.from?super._appendCharRaw(s[this.value.length],t):Number(i)>this.to?!t.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength?super._appendCharRaw(s[this.value.length],t).aggregate(this._appendCharRaw(e,t)):super._appendCharRaw(r[this.value.length],t):super._appendCharRaw(e,t)}doValidate(e){const t=this.value;if(t.search(/[^0]/)===-1&&t.length<=this._matchFrom)return!0;const[s,r]=this.boundaries(t);return this.from<=Number(r)&&Number(s)<=this.to&&super.doValidate(e)}pad(e){const t=new de;if(this.value.length===this.maxLength)return t;const s=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let i=0;i<r;++i)t.aggregate(super._appendCharRaw("0",e));s.split("").forEach(i=>this._appendCharRaw(i))}return t}}le.MaskedRange=zr;const bk="d{.}`m{.}`Y";class Tt extends Ve{static extractPatternOptions(e){const{mask:t,pattern:s,...r}=e;return{...r,mask:Gt(t)?t:s}}constructor(e){super(Tt.extractPatternOptions({...Tt.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:s,blocks:r,...i}={...Tt.DEFAULTS,...e},o=Object.assign({},Tt.GET_DEFAULT_BLOCKS());e.min&&(o.Y.from=e.min.getFullYear()),e.max&&(o.Y.to=e.max.getFullYear()),e.min&&e.max&&o.Y.from===o.Y.to&&(o.m.from=e.min.getMonth()+1,o.m.to=e.max.getMonth()+1,o.m.from===o.m.to&&(o.d.from=e.min.getDate(),o.d.to=e.max.getDate())),Object.assign(o,this.blocks,r),super._update({...i,mask:Gt(t)?t:s,blocks:o})}doValidate(e){const t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&t!=null&&(this.min==null||this.min<=t)&&(this.max==null||t<=this.max))}isDateExist(e){return this.format(this.parse(e,this),this).indexOf(e)>=0}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(Tt.extractPatternOptions(e))}}Tt.GET_DEFAULT_BLOCKS=()=>({d:{mask:zr,from:1,to:31,maxLength:2},m:{mask:zr,from:1,to:12,maxLength:2},Y:{mask:zr,from:1900,to:9999}});Tt.DEFAULTS={...Ve.DEFAULTS,mask:Date,pattern:bk,format:(n,e)=>{if(!n)return"";const t=String(n.getDate()).padStart(2,"0"),s=String(n.getMonth()+1).padStart(2,"0"),r=n.getFullYear();return[t,s,r].join(".")},parse:(n,e)=>{const[t,s,r]=n.split(".").map(Number);return new Date(r,s-1,t)}};le.MaskedDate=Tt;class Ti extends Pe{constructor(e){super({...Ti.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(t=>{const{expose:s,...r}=$s(t),i=jt({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...r});return s&&(this.exposeMask=i),i}):[])}_appendCharRaw(e,t){t===void 0&&(t={});const s=this._applyDispatch(e,t);return this.currentMask&&s.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),s}_applyDispatch(e,t,s){e===void 0&&(e=""),t===void 0&&(t={}),s===void 0&&(s="");const r=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value,i=this.rawInputValue,o=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:i,a=i.slice(o.length),l=this.currentMask,c=new de,f=l==null?void 0:l.state;return this.currentMask=this.doDispatch(e,{...t},s),this.currentMask&&(this.currentMask!==l?(this.currentMask.reset(),o&&(this.currentMask.append(o,{raw:!0}),c.tailShift=this.currentMask.value.length-r.length),a&&(c.tailShift+=this.currentMask.append(a,{raw:!0,tail:!0}).tailShift)):f&&(this.currentMask.state=f)),c}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new de;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t,s;return{...e,_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((s=e._beforeTailState)==null?void 0:s.currentMask)||e._beforeTailState}}doDispatch(e,t,s){return t===void 0&&(t={}),s===void 0&&(s=""),this.dispatch(e,this,t,s)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){t===void 0&&(t={});let[s,r]=super.doPrepare(e,t);if(this.currentMask){let i;[s,i]=super.doPrepare(s,this.currentMaskFlags(t)),r=r.aggregate(i)}return[s,r]}doPrepareChar(e,t){t===void 0&&(t={});let[s,r]=super.doPrepareChar(e,t);if(this.currentMask){let i;[s,i]=super.doPrepareChar(s,this.currentMaskFlags(t)),r=r.aggregate(i)}return[s,r]}reset(){var e;(e=this.currentMask)==null||e.reset(),this.compiledMasks.forEach(t=>t.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask){this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,this._applyDispatch();return}let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return!!((e=this.currentMask)!=null&&e.isComplete)}get isFilled(){var e;return!!((e=this.currentMask)!=null&&e.isFilled)}remove(e,t){const s=new de;return this.currentMask&&s.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),s}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(t=>t.state),currentMaskRef:this.currentMask,currentMask:(e=this.currentMask)==null?void 0:e.state}}set state(e){const{compiledMasks:t,currentMaskRef:s,currentMask:r,...i}=e;t&&this.compiledMasks.forEach((o,a)=>o.state=t[a]),s!=null&&(this.currentMask=s,this.currentMask.state=r),super.state=i}extractInput(e,t,s){return this.currentMask?this.currentMask.extractInput(e,t,s):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(e){return Array.isArray(e)?this.compiledMasks.every((t,s)=>{if(!e[s])return;const{mask:r,...i}=e[s];return Qr(t,i)&&t.maskEquals(r)}):super.maskEquals(e)}typedValueEquals(e){var t;return!!((t=this.currentMask)!=null&&t.typedValueEquals(e))}}Ti.DEFAULTS={...Pe.DEFAULTS,dispatch:(n,e,t,s)=>{if(!e.compiledMasks.length)return;const r=e.rawInputValue,i=e.compiledMasks.map((o,a)=>{const l=e.currentMask===o,c=l?o.displayValue.length:o.nearestInputPos(o.displayValue.length,ie.FORCE_LEFT);return o.rawInputValue!==r?(o.reset(),o.append(r,{raw:!0})):l||o.remove(c),o.append(n,e.currentMaskFlags(t)),o.appendTail(s),{index:a,weight:o.rawInputValue.length,totalInputPositions:o.totalInputPositions(0,Math.max(c,o.nearestInputPos(o.displayValue.length,ie.FORCE_LEFT)))}});return i.sort((o,a)=>a.weight-o.weight||a.totalInputPositions-o.totalInputPositions),e.compiledMasks[i[0].index]}};le.MaskedDynamic=Ti;class Ri extends Ve{constructor(e){super({...Ri.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...s}=e;if(t){const r=t.map(a=>a.length),i=Math.min(...r),o=Math.max(...r)-i;s.mask="*".repeat(i),o&&(s.mask+="["+"*".repeat(o)+"]"),this.enum=t}super._update(s)}_appendCharRaw(e,t){t===void 0&&(t={});const s=Math.min(this.nearestInputPos(0,ie.FORCE_RIGHT),this.value.length),r=this.enum.filter(i=>this.matchValue(i,this.unmaskedValue+e,s));if(r.length){r.length===1&&this._forEachBlocksInRange(0,this.value.length,(o,a)=>{const l=r[0][a];a>=this.value.length||l===o.value||(o.reset(),o._appendChar(l,t))});const i=super._appendCharRaw(r[0][this.value.length],t);return r.length===1&&r[0].slice(this.unmaskedValue.length).split("").forEach(o=>i.aggregate(super._appendCharRaw(o))),i}return new de({skip:!this.isComplete})}extractTail(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),new vt("",e)}remove(e,t){if(e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),e===t)return new de;const s=Math.min(super.nearestInputPos(0,ie.FORCE_RIGHT),this.value.length);let r;for(r=e;r>=0&&!(this.enum.filter(o=>this.matchValue(o,this.value.slice(s,r),s)).length>1);--r);const i=super.remove(r,t);return i.tailShift+=r-e,i}get isComplete(){return this.enum.indexOf(this.value)>=0}}Ri.DEFAULTS={...Ve.DEFAULTS,matchValue:(n,e,t)=>n.indexOf(e,t)===t};le.MaskedEnum=Ri;class xk extends Pe{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}le.MaskedFunction=xk;var Af;class We extends Pe{constructor(e){super({...We.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){const e="^"+(this.allowNegative?"[+|\\-]?":""),t="\\d*",s=(this.scale?"("+Vo(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+s),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Vo).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Vo(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){t===void 0&&(t={});const[s,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!s&&(r.skip=!0),s&&!this.allowPositive&&!this.value&&s!=="-"&&r.aggregate(this._appendChar("-")),[s,r]}_separatorsCount(e,t){t===void 0&&(t=!1);let s=0;for(let r=0;r<e;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++s,t&&(e+=this.thousandsSeparator.length));return s}_separatorsCountFromSlice(e){return e===void 0&&(e=this._value),this._separatorsCount(this._removeThousandsSeparators(e).length,!0)}extractInput(e,t,s){return e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t),this._removeThousandsSeparators(super.extractInput(e,t,s))}_appendCharRaw(e,t){t===void 0&&(t={});const s=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,r=this._separatorsCountFromSlice(s);this._value=this._removeThousandsSeparators(this.value);const i=this._value;this._value+=e;const o=this.number;let a=!isNaN(o),l=!1;if(a){let d;this.min!=null&&this.min<0&&this.number<this.min&&(d=this.min),this.max!=null&&this.max>0&&this.number>this.max&&(d=this.max),d!=null&&(this.autofix?(this._value=this.format(d,this).replace(We.UNMASKED_RADIX,this.radix),l||(l=i===this._value&&!t.tail)):a=!1),a&&(a=!!this._value.match(this._numberRegExp))}let c;a?c=new de({inserted:this._value.slice(i.length),rawInserted:l?"":e,skip:l}):(this._value=i,c=new de),this._value=this._insertThousandsSeparators(this._value);const f=t.tail&&t._beforeTailState?t._beforeTailState._value:this._value,v=this._separatorsCountFromSlice(f);return c.tailShift+=(v-r)*this.thousandsSeparator.length,c}_findSeparatorAround(e){if(this.thousandsSeparator){const t=e-this.thousandsSeparator.length+1,s=this.value.indexOf(this.thousandsSeparator,t);if(s<=e)return s}return-1}_adjustRangeWithSeparators(e,t){const s=this._findSeparatorAround(e);s>=0&&(e=s);const r=this._findSeparatorAround(t);return r>=0&&(t=r+this.thousandsSeparator.length),[e,t]}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);const s=this.value.slice(0,e),r=this.value.slice(t),i=this._separatorsCount(s.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(s+r));const o=this._separatorsCountFromSlice(s);return new de({tailShift:(o-i)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case ie.NONE:case ie.LEFT:case ie.FORCE_LEFT:{const s=this._findSeparatorAround(e-1);if(s>=0){const r=s+this.thousandsSeparator.length;if(e<r||this.value.length<=r||t===ie.FORCE_LEFT)return s}break}case ie.RIGHT:case ie.FORCE_RIGHT:{const s=this._findSeparatorAround(e);if(s>=0)return s+this.thousandsSeparator.length}}return e}doCommit(){if(this.value){const e=this.number;let t=e;this.min!=null&&(t=Math.max(t,this.min)),this.max!=null&&(t=Math.min(t,this.max)),t!==e&&(this.unmaskedValue=this.format(t,this));let s=this.value;this.normalizeZeros&&(s=this._normalizeZeros(s)),this.padFractionalZeros&&this.scale>0&&(s=this._padFractionalZeros(s)),this._value=s}super.doCommit()}_normalizeZeros(e){const t=this._removeThousandsSeparators(e).split(this.radix);return t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(s,r,i,o)=>r+o),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),t.length>1&&(t[1]=t[1].replace(/0*$/,""),t[1].length||(t.length=1)),this._insertThousandsSeparators(t.join(this.radix))}_padFractionalZeros(e){if(!e)return e;const t=e.split(this.radix);return t.length<2&&t.push(""),t[1]=t[1].padEnd(this.scale,"0"),t.join(this.radix)}doSkipInvalid(e,t,s){t===void 0&&(t={});const r=this.scale===0&&e!==this.thousandsSeparator&&(e===this.radix||e===We.UNMASKED_RADIX||this.mapToRadix.includes(e));return super.doSkipInvalid(e,t,s)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,We.UNMASKED_RADIX)}set unmaskedValue(e){super.unmaskedValue=e}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(e){this.rawInputValue=this.format(e,this).replace(We.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(e){this.typedValue=e}get allowNegative(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0}get allowPositive(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0}typedValueEquals(e){return(super.typedValueEquals(e)||We.EMPTY_VALUES.includes(e)&&We.EMPTY_VALUES.includes(this.typedValue))&&!(e===0&&this.value==="")}}Af=We;We.UNMASKED_RADIX=".";We.EMPTY_VALUES=[...Pe.EMPTY_VALUES,0];We.DEFAULTS={...Pe.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[Af.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:n=>n.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})};le.MaskedNumber=We;const Ia={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function Cf(n,e,t){e===void 0&&(e=Ia.MASKED),t===void 0&&(t=Ia.MASKED);const s=jt(n);return r=>s.runIsolated(i=>(i[e]=r,i[t]))}function kk(n,e,t,s){return Cf(e,t,s)(n)}le.PIPE_TYPE=Ia;le.createPipe=Cf;le.pipe=kk;class wk extends Ve{get repeatFrom(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)!=null?e:0}get repeatTo(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){var t,s,r;const{repeat:i,...o}=$s(e);this._blockOpts=Object.assign({},this._blockOpts,o);const a=jt(this._blockOpts);this.repeat=(t=(s=i??a.repeat)!=null?s:this.repeat)!=null?t:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&((r=this._blocks)==null?void 0:r.length)||0,this.repeatFrom)),blocks:{m:a},eager:a.eager,overwrite:a.overwrite,skipInvalid:a.skipInvalid,lazy:a.lazy,placeholderChar:a.placeholderChar,displayChar:a.displayChar})}_allocateBlock(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===1/0||this._blocks.length<this.repeatTo)return this._blocks.push(jt(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]}_appendCharRaw(e,t){t===void 0&&(t={});const s=new de;for(let l=(r=(i=this._mapPosToBlock(this.displayValue.length))==null?void 0:i.index)!=null?r:Math.max(this._blocks.length-1,0),c,f;c=(o=this._blocks[l])!=null?o:f=!f&&this._allocateBlock(l);++l){var r,i,o,a;const v=c._appendChar(e,{...t,_beforeTailState:(a=t._beforeTailState)==null||(a=a._blocks)==null?void 0:a[l]});if(v.skip&&f){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(s.aggregate(v),v.consumed)break}return s}_trimEmptyTail(e,t){var s,r;e===void 0&&(e=0);const i=Math.max(((s=this._mapPosToBlock(e))==null?void 0:s.index)||0,this.repeatFrom,0);let o;t!=null&&(o=(r=this._mapPosToBlock(t))==null?void 0:r.index),o==null&&(o=this._blocks.length-1);let a=0;for(let l=o;i<=l&&!this._blocks[l].unmaskedValue;--l,++a);a&&(this._blocks.splice(o-a+1,a),this.mask=this.mask.slice(a))}reset(){super.reset(),this._trimEmptyTail()}remove(e,t){e===void 0&&(e=0),t===void 0&&(t=this.displayValue.length);const s=super.remove(e,t);return this._trimEmptyTail(e,t),s}totalInputPositions(e,t){return e===void 0&&(e=0),t==null&&this.repeatTo===1/0?1/0:super.totalInputPositions(e,t)}get state(){return super.state}set state(e){this._blocks.length=e._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=e}}le.RepeatBlock=wk;try{globalThis.IMask=le}catch{}var Cr={exports:{}},Uo={exports:{}},ye={};/** @license React v16.13.1
172
- * react-is.production.min.js
173
- *
174
- * Copyright (c) Facebook, Inc. and its affiliates.
175
- *
176
- * This source code is licensed under the MIT license found in the
177
- * LICENSE file in the root directory of this source tree.
178
- */var Yu;function Ek(){if(Yu)return ye;Yu=1;var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,r=n?Symbol.for("react.strict_mode"):60108,i=n?Symbol.for("react.profiler"):60114,o=n?Symbol.for("react.provider"):60109,a=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,v=n?Symbol.for("react.suspense"):60113,d=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,E=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(A){if(typeof A=="object"&&A!==null){var z=A.$$typeof;switch(z){case e:switch(A=A.type,A){case l:case c:case s:case i:case r:case v:return A;default:switch(A=A&&A.$$typeof,A){case a:case f:case m:case h:case o:return A;default:return z}}case t:return z}}}function C(A){return S(A)===c}return ye.AsyncMode=l,ye.ConcurrentMode=c,ye.ContextConsumer=a,ye.ContextProvider=o,ye.Element=e,ye.ForwardRef=f,ye.Fragment=s,ye.Lazy=m,ye.Memo=h,ye.Portal=t,ye.Profiler=i,ye.StrictMode=r,ye.Suspense=v,ye.isAsyncMode=function(A){return C(A)||S(A)===l},ye.isConcurrentMode=C,ye.isContextConsumer=function(A){return S(A)===a},ye.isContextProvider=function(A){return S(A)===o},ye.isElement=function(A){return typeof A=="object"&&A!==null&&A.$$typeof===e},ye.isForwardRef=function(A){return S(A)===f},ye.isFragment=function(A){return S(A)===s},ye.isLazy=function(A){return S(A)===m},ye.isMemo=function(A){return S(A)===h},ye.isPortal=function(A){return S(A)===t},ye.isProfiler=function(A){return S(A)===i},ye.isStrictMode=function(A){return S(A)===r},ye.isSuspense=function(A){return S(A)===v},ye.isValidElementType=function(A){return typeof A=="string"||typeof A=="function"||A===s||A===c||A===i||A===r||A===v||A===d||typeof A=="object"&&A!==null&&(A.$$typeof===m||A.$$typeof===h||A.$$typeof===o||A.$$typeof===a||A.$$typeof===f||A.$$typeof===b||A.$$typeof===E||A.$$typeof===w||A.$$typeof===g)},ye.typeOf=S,ye}var ke={};/** @license React v16.13.1
179
- * react-is.development.js
180
- *
181
- * Copyright (c) Facebook, Inc. and its affiliates.
182
- *
183
- * This source code is licensed under the MIT license found in the
184
- * LICENSE file in the root directory of this source tree.
185
- */var Xu;function _k(){return Xu||(Xu=1,process.env.NODE_ENV!=="production"&&function(){var n=typeof Symbol=="function"&&Symbol.for,e=n?Symbol.for("react.element"):60103,t=n?Symbol.for("react.portal"):60106,s=n?Symbol.for("react.fragment"):60107,r=n?Symbol.for("react.strict_mode"):60108,i=n?Symbol.for("react.profiler"):60114,o=n?Symbol.for("react.provider"):60109,a=n?Symbol.for("react.context"):60110,l=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,v=n?Symbol.for("react.suspense"):60113,d=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,E=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function S(I){return typeof I=="string"||typeof I=="function"||I===s||I===c||I===i||I===r||I===v||I===d||typeof I=="object"&&I!==null&&(I.$$typeof===m||I.$$typeof===h||I.$$typeof===o||I.$$typeof===a||I.$$typeof===f||I.$$typeof===b||I.$$typeof===E||I.$$typeof===w||I.$$typeof===g)}function C(I){if(typeof I=="object"&&I!==null){var ue=I.$$typeof;switch(ue){case e:var xe=I.type;switch(xe){case l:case c:case s:case i:case r:case v:return xe;default:var Ne=xe&&xe.$$typeof;switch(Ne){case a:case f:case m:case h:case o:return Ne;default:return ue}}case t:return ue}}}var A=l,z=c,W=a,ae=o,fe=e,me=f,y=s,j=m,_=h,U=t,P=i,O=r,D=v,Z=!1;function Y(I){return Z||(Z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),N(I)||C(I)===l}function N(I){return C(I)===c}function L(I){return C(I)===a}function F(I){return C(I)===o}function G(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function H(I){return C(I)===f}function $(I){return C(I)===s}function X(I){return C(I)===m}function M(I){return C(I)===h}function B(I){return C(I)===t}function K(I){return C(I)===i}function V(I){return C(I)===r}function J(I){return C(I)===v}ke.AsyncMode=A,ke.ConcurrentMode=z,ke.ContextConsumer=W,ke.ContextProvider=ae,ke.Element=fe,ke.ForwardRef=me,ke.Fragment=y,ke.Lazy=j,ke.Memo=_,ke.Portal=U,ke.Profiler=P,ke.StrictMode=O,ke.Suspense=D,ke.isAsyncMode=Y,ke.isConcurrentMode=N,ke.isContextConsumer=L,ke.isContextProvider=F,ke.isElement=G,ke.isForwardRef=H,ke.isFragment=$,ke.isLazy=X,ke.isMemo=M,ke.isPortal=B,ke.isProfiler=K,ke.isStrictMode=V,ke.isSuspense=J,ke.isValidElementType=S,ke.typeOf=C}()),ke}var Ju;function Of(){return Ju||(Ju=1,process.env.NODE_ENV==="production"?Uo.exports=Ek():Uo.exports=_k()),Uo.exports}/*
186
- object-assign
187
- (c) Sindre Sorhus
188
- @license MIT
189
- */var $o,Qu;function Nk(){if(Qu)return $o;Qu=1;var n=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,t=Object.prototype.propertyIsEnumerable;function s(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function r(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},a=0;a<10;a++)o["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $o=r()?Object.assign:function(i,o){for(var a,l=s(i),c,f=1;f<arguments.length;f++){a=Object(arguments[f]);for(var v in a)e.call(a,v)&&(l[v]=a[v]);if(n){c=n(a);for(var d=0;d<c.length;d++)t.call(a,c[d])&&(l[c[d]]=a[c[d]])}}return l},$o}var zo,ec;function pl(){if(ec)return zo;ec=1;var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return zo=n,zo}var tc,nc;function Tf(){return nc||(nc=1,tc=Function.call.bind(Object.prototype.hasOwnProperty)),tc}var Ho,sc;function Sk(){if(sc)return Ho;sc=1;var n=function(){};if(process.env.NODE_ENV!=="production"){var e=pl(),t={},s=Tf();n=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function r(i,o,a,l,c){if(process.env.NODE_ENV!=="production"){for(var f in i)if(s(i,f)){var v;try{if(typeof i[f]!="function"){var d=Error((l||"React class")+": "+a+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}v=i[f](o,f,l,a,null,e)}catch(m){v=m}if(v&&!(v instanceof Error)&&n((l||"React class")+": type specification of "+a+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof v+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),v instanceof Error&&!(v.message in t)){t[v.message]=!0;var h=c?c():"";n("Failed "+a+" type: "+v.message+(h??""))}}}}return r.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(t={})},Ho=r,Ho}var Ko,rc;function Ak(){if(rc)return Ko;rc=1;var n=Of(),e=Nk(),t=pl(),s=Tf(),r=Sk(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return Ko=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function v(N){var L=N&&(c&&N[c]||N[f]);if(typeof L=="function")return L}var d="<<anonymous>>",h={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:w(),arrayOf:S,element:C(),elementType:A(),instanceOf:z,node:me(),objectOf:ae,oneOf:W,oneOfType:fe,shape:j,exact:_};function m(N,L){return N===L?N!==0||1/N===1/L:N!==N&&L!==L}function g(N,L){this.message=N,this.data=L&&typeof L=="object"?L:{},this.stack=""}g.prototype=Error.prototype;function b(N){if(process.env.NODE_ENV!=="production")var L={},F=0;function G($,X,M,B,K,V,J){if(B=B||d,V=V||M,J!==t){if(l){var I=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw I.name="Invariant Violation",I}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ue=B+":"+M;!L[ue]&&F<3&&(i("You are manually calling a React.PropTypes validation function for the `"+V+"` prop on `"+B+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[ue]=!0,F++)}}return X[M]==null?$?X[M]===null?new g("The "+K+" `"+V+"` is marked as required "+("in `"+B+"`, but its value is `null`.")):new g("The "+K+" `"+V+"` is marked as required in "+("`"+B+"`, but its value is `undefined`.")):null:N(X,M,B,K,V)}var H=G.bind(null,!1);return H.isRequired=G.bind(null,!0),H}function E(N){function L(F,G,H,$,X,M){var B=F[G],K=O(B);if(K!==N){var V=D(B);return new g("Invalid "+$+" `"+X+"` of type "+("`"+V+"` supplied to `"+H+"`, expected ")+("`"+N+"`."),{expectedType:N})}return null}return b(L)}function w(){return b(o)}function S(N){function L(F,G,H,$,X){if(typeof N!="function")return new g("Property `"+X+"` of component `"+H+"` has invalid PropType notation inside arrayOf.");var M=F[G];if(!Array.isArray(M)){var B=O(M);return new g("Invalid "+$+" `"+X+"` of type "+("`"+B+"` supplied to `"+H+"`, expected an array."))}for(var K=0;K<M.length;K++){var V=N(M,K,H,$,X+"["+K+"]",t);if(V instanceof Error)return V}return null}return b(L)}function C(){function N(L,F,G,H,$){var X=L[F];if(!a(X)){var M=O(X);return new g("Invalid "+H+" `"+$+"` of type "+("`"+M+"` supplied to `"+G+"`, expected a single ReactElement."))}return null}return b(N)}function A(){function N(L,F,G,H,$){var X=L[F];if(!n.isValidElementType(X)){var M=O(X);return new g("Invalid "+H+" `"+$+"` of type "+("`"+M+"` supplied to `"+G+"`, expected a single ReactElement type."))}return null}return b(N)}function z(N){function L(F,G,H,$,X){if(!(F[G]instanceof N)){var M=N.name||d,B=Y(F[G]);return new g("Invalid "+$+" `"+X+"` of type "+("`"+B+"` supplied to `"+H+"`, expected ")+("instance of `"+M+"`."))}return null}return b(L)}function W(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function L(F,G,H,$,X){for(var M=F[G],B=0;B<N.length;B++)if(m(M,N[B]))return null;var K=JSON.stringify(N,function(V,J){var I=D(J);return I==="symbol"?String(J):J});return new g("Invalid "+$+" `"+X+"` of value `"+String(M)+"` "+("supplied to `"+H+"`, expected one of "+K+"."))}return b(L)}function ae(N){function L(F,G,H,$,X){if(typeof N!="function")return new g("Property `"+X+"` of component `"+H+"` has invalid PropType notation inside objectOf.");var M=F[G],B=O(M);if(B!=="object")return new g("Invalid "+$+" `"+X+"` of type "+("`"+B+"` supplied to `"+H+"`, expected an object."));for(var K in M)if(s(M,K)){var V=N(M,K,H,$,X+"."+K,t);if(V instanceof Error)return V}return null}return b(L)}function fe(N){if(!Array.isArray(N))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var L=0;L<N.length;L++){var F=N[L];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(F)+" at index "+L+"."),o}function G(H,$,X,M,B){for(var K=[],V=0;V<N.length;V++){var J=N[V],I=J(H,$,X,M,B,t);if(I==null)return null;I.data&&s(I.data,"expectedType")&&K.push(I.data.expectedType)}var ue=K.length>0?", expected one of type ["+K.join(", ")+"]":"";return new g("Invalid "+M+" `"+B+"` supplied to "+("`"+X+"`"+ue+"."))}return b(G)}function me(){function N(L,F,G,H,$){return U(L[F])?null:new g("Invalid "+H+" `"+$+"` supplied to "+("`"+G+"`, expected a ReactNode."))}return b(N)}function y(N,L,F,G,H){return new g((N||"React class")+": "+L+" type `"+F+"."+G+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+H+"`.")}function j(N){function L(F,G,H,$,X){var M=F[G],B=O(M);if(B!=="object")return new g("Invalid "+$+" `"+X+"` of type `"+B+"` "+("supplied to `"+H+"`, expected `object`."));for(var K in N){var V=N[K];if(typeof V!="function")return y(H,$,X,K,D(V));var J=V(M,K,H,$,X+"."+K,t);if(J)return J}return null}return b(L)}function _(N){function L(F,G,H,$,X){var M=F[G],B=O(M);if(B!=="object")return new g("Invalid "+$+" `"+X+"` of type `"+B+"` "+("supplied to `"+H+"`, expected `object`."));var K=e({},F[G],N);for(var V in K){var J=N[V];if(s(N,V)&&typeof J!="function")return y(H,$,X,V,D(J));if(!J)return new g("Invalid "+$+" `"+X+"` key `"+V+"` supplied to `"+H+"`.\nBad object: "+JSON.stringify(F[G],null," ")+`
190
- Valid keys: `+JSON.stringify(Object.keys(N),null," "));var I=J(M,V,H,$,X+"."+V,t);if(I)return I}return null}return b(L)}function U(N){switch(typeof N){case"number":case"string":case"undefined":return!0;case"boolean":return!N;case"object":if(Array.isArray(N))return N.every(U);if(N===null||a(N))return!0;var L=v(N);if(L){var F=L.call(N),G;if(L!==N.entries){for(;!(G=F.next()).done;)if(!U(G.value))return!1}else for(;!(G=F.next()).done;){var H=G.value;if(H&&!U(H[1]))return!1}}else return!1;return!0;default:return!1}}function P(N,L){return N==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function O(N){var L=typeof N;return Array.isArray(N)?"array":N instanceof RegExp?"object":P(L,N)?"symbol":L}function D(N){if(typeof N>"u"||N===null)return""+N;var L=O(N);if(L==="object"){if(N instanceof Date)return"date";if(N instanceof RegExp)return"regexp"}return L}function Z(N){var L=D(N);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function Y(N){return!N.constructor||!N.constructor.name?d:N.constructor.name}return h.checkPropTypes=r,h.resetWarningCache=r.resetWarningCache,h.PropTypes=h,h},Ko}var Wo,ic;function Ck(){if(ic)return Wo;ic=1;var n=pl();function e(){}function t(){}return t.resetWarningCache=e,Wo=function(){function s(o,a,l,c,f,v){if(v!==n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}s.isRequired=s;function r(){return s}var i={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:r,element:s,elementType:s,instanceOf:r,node:s,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:t,resetWarningCache:e};return i.PropTypes=i,i},Wo}var oc;function Ok(){if(oc)return Cr.exports;if(oc=1,process.env.NODE_ENV!=="production"){var n=Of(),e=!0;Cr.exports=Ak()(n.isElement,e)}else Cr.exports=Ck()();return Cr.exports}var Tk=Ok();const re=Te.Jm(Tk),Rf={mask:re.oneOfType([re.array,re.func,re.string,re.instanceOf(RegExp),re.oneOf([Date,Number,le.Masked]),re.instanceOf(le.Masked)]),value:re.any,unmask:re.oneOfType([re.bool,re.oneOf(["typed"])]),prepare:re.func,prepareChar:re.func,validate:re.func,commit:re.func,overwrite:re.oneOfType([re.bool,re.oneOf(["shift"])]),eager:re.oneOfType([re.bool,re.oneOf(["append","remove"])]),skipInvalid:re.bool,onAccept:re.func,onComplete:re.func,placeholderChar:re.string,displayChar:re.string,lazy:re.bool,definitions:re.object,blocks:re.object,enum:re.arrayOf(re.string),maxLength:re.number,from:re.number,to:re.number,pattern:re.string,format:re.func,parse:re.func,autofix:re.oneOfType([re.bool,re.oneOf(["pad"])]),radix:re.string,thousandsSeparator:re.string,mapToRadix:re.arrayOf(re.string),scale:re.number,normalizeZeros:re.bool,padFractionalZeros:re.bool,min:re.oneOfType([re.number,re.instanceOf(Date)]),max:re.oneOfType([re.number,re.instanceOf(Date)]),dispatch:re.func,inputRef:re.oneOfType([re.func,re.shape({current:re.object})])},If=Object.keys(Rf).filter(n=>n!=="value"),Rk=["value","unmask","onAccept","onComplete","inputRef"],Ik=If.filter(n=>Rk.indexOf(n)<0);function Lk(n){var e;const t=(e=class extends se.Component{constructor(r){super(r),this._inputRef=this._inputRef.bind(this)}componentDidMount(){this.props.mask&&this.initMask()}componentDidUpdate(){const r=this.props,i=this._extractMaskOptionsFromProps(r);if(i.mask)this.maskRef?(this.maskRef.updateOptions(i),"value"in r&&r.value!==void 0&&(this.maskValue=r.value)):this.initMask(i);else if(this.destroyMask(),"value"in r&&r.value!==void 0){var o;(o=this.element)!=null&&o.isContentEditable&&this.element.tagName!=="INPUT"&&this.element.tagName!=="TEXTAREA"?this.element.textContent=r.value:this.element.value=r.value}}componentWillUnmount(){this.destroyMask()}_inputRef(r){this.element=r,this.props.inputRef&&(Object.prototype.hasOwnProperty.call(this.props.inputRef,"current")?this.props.inputRef.current=r:this.props.inputRef(r))}initMask(r){r===void 0&&(r=this._extractMaskOptionsFromProps(this.props)),this.maskRef=le(this.element,r).on("accept",this._onAccept.bind(this)).on("complete",this._onComplete.bind(this)),"value"in this.props&&this.props.value!==void 0&&(this.maskValue=this.props.value)}destroyMask(){this.maskRef&&(this.maskRef.destroy(),delete this.maskRef)}_extractMaskOptionsFromProps(r){const{...i}=r;return Object.keys(i).filter(o=>Ik.indexOf(o)<0).forEach(o=>{delete i[o]}),i}_extractNonMaskProps(r){const{...i}=r;return If.forEach(o=>{o!=="maxLength"&&delete i[o]}),"defaultValue"in i||(i.defaultValue=r.mask?"":i.value),delete i.value,i}get maskValue(){return this.maskRef?this.props.unmask==="typed"?this.maskRef.typedValue:this.props.unmask?this.maskRef.unmaskedValue:this.maskRef.value:""}set maskValue(r){this.maskRef&&(r=r==null&&this.props.unmask!=="typed"?"":r,this.props.unmask==="typed"?this.maskRef.typedValue=r:this.props.unmask?this.maskRef.unmaskedValue=r:this.maskRef.value=r)}_onAccept(r){this.props.onAccept&&this.maskRef&&this.props.onAccept(this.maskValue,this.maskRef,r)}_onComplete(r){this.props.onComplete&&this.maskRef&&this.props.onComplete(this.maskValue,this.maskRef,r)}render(){return se.createElement(n,{...this._extractNonMaskProps(this.props),inputRef:this._inputRef})}},e.displayName=void 0,e.propTypes=void 0,e),s=n.displayName||n.name||"Component";return t.displayName="IMask("+s+")",t.propTypes=Rf,se.forwardRef((r,i)=>se.createElement(t,{...r,ref:i}))}const qk=Lk(n=>{let{inputRef:e,...t}=n;return se.createElement("input",{...t,ref:e})}),jk=(n,e)=>se.createElement(qk,{...n,ref:e}),Mk=se.forwardRef(jk),Lf=se.forwardRef(({className:n,type:e,variant:t,...s},r)=>x.ae.jsx(Mk,{className:Se.mo(ri({variant:t}),n),ref:r,...s}));Lf.displayName="MaskInput";exports.$m=Xh;exports.Fm=Gh;exports.Gg=sh;exports.Gh=za;exports.Hg=nh;exports.Jg=hh;exports.Jm=fd;exports.Kh=Ha;exports.Kx=ug;exports.Qg=ch;exports.Qm=dd;exports.Ug=eh;exports.Ux=ym;exports.Vg=Qc;exports.Wh=Ka;exports.Wx=cg;exports.Yh=Wa;exports.Yx=hg;exports.dp=vc;exports.fp=yc;exports.gi=Hs;exports.ja=ri;exports.jm=Yh;exports.mx=Lf;exports.qm=Zh;exports.th=Ua;exports.xg=$c;exports.zg=th;exports.zw=wf;exports.zx=bm;