ados-rcm 1.1.690 → 1.1.692

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.
package/dist/index.cjs.js CHANGED
@@ -282,7 +282,7 @@ performance.now();setTimeout(w,2300>q&&2E3<q?2300-q:500)})])},types:[]});z.ready
282
282
 
283
283
  ${ee["Invalid file(s)"]}: ${Ue}${nn?`
284
284
 
285
- `+nn:""}`)}at.length>0&&J([...D||[],...at])}},[J,Fe,r,t,ee,D,g]),ot=z.useCallback(()=>{var ut;return(ut=Ae.current)==null?void 0:ut.click()},[]),tt=z.useCallback(ut=>{const at=ut.target.files;at!=null&&at.length&&(Qe(at),Le())},[Qe,Le]),rt=z.useCallback(ut=>{if(l==null||l(ut),!J||!D)return;const at=Cd.getFileKey(ut),gt=D.filter(It=>Cd.getFileKey(It)!==at);J(gt),Le()},[l,J,D,Le]),dt=z.useCallback(()=>{J&&(J([]),Le())},[J,Le]),Mt=z.useCallback(ut=>{if(!i)return Promise.resolve();const at=Cd.getFileKey(ut);return K.current[at]==="Loading"?Promise.resolve():(Me(at,"Loading"),new Promise(gt=>{i(ut,(It,ln)=>{Me(at,It,ln),gt()})}))},[i,Me]),Bt=z.useCallback(async()=>{if(D!=null&&D.length){if(ne){const ut={...K.current},at={...he.current};D.forEach(gt=>{const It=Cd.getFileKey(gt);ut[It]="Loading",It in at&&delete at[It]}),K.current=ut,he.current=at,ne(ut),se(at)}if(S){S(D,(ut,at)=>{if(ne){const gt={...K.current,...ut};K.current=gt,ne(gt)}if(se&&at){const gt={...he.current,...at};he.current=gt,se(gt)}});return}for(const ut of D){if(!i)continue;const at=Cd.getFileKey(ut);await new Promise(gt=>{i(ut,(It,ln)=>{if(ne){const sn={...K.current};sn[at]=It,K.current=sn,ne(sn)}if(se&&ln!==void 0){const sn={...he.current};sn[at]=ln,he.current=sn,se(sn)}gt()})})}}},[D,i,S,ne,se]),Ft=z.useCallback(()=>{!(D!=null&&D.length)||!o||o(D)},[D,o]),Jt=z.useMemo(()=>{const ut=at=>(at.preventDefault(),at.stopPropagation(),at);return{onDragEnter:at=>{ut(at),!fe&&!x&&re(!0)},onDragOver:at=>{ut(at),!fe&&!x&&at.dataTransfer&&(at.dataTransfer.dropEffect="copy")},onDragLeave:at=>{var It;ut(at);const gt=(It=He.current)==null?void 0:It.contains(at.relatedTarget);(!at.relatedTarget||!gt)&&re(!1)},onDrop:at=>{var gt;ut(at),re(!1),!fe&&!x&&((gt=at.dataTransfer.files)!=null&&gt.length)&&Qe(at.dataTransfer.files)}}},[fe,x,Qe]),pn=z.useMemo(()=>{const ut=bt.clsx(pl.ButtonRenderer,"NoSelect");return{upload:at=>M.jsx(Ba,{className:ut,icon:"X",iconSize:"sm",style:{color:"var(--AFileUploader_text_color)"},tooltip:ee.Delete,type:"Raw",onClick:()=>rt(at)}),loading:at=>{const gt=ke(at),It=gt!==void 0?`${Math.round(gt*10)/10}%`:void 0;return M.jsx(Ba,{className:ut,icon:"Spinner",iconSize:"sm",tooltip:It,type:"Raw"})},error:at=>M.jsx(s9,{baseClass:ut,errorClass:pl.ErrorColor,errorCursorClass:pl.ErrorCursor,file:at,resources:ee,onDownload:Mt}),download:at=>M.jsx(Ba,{className:ut,icon:"FileDownload",iconSize:"sm",style:{color:"var(--AFileUploader_brand_color)"},tooltip:ee.Download,type:"Raw",onClick:()=>Mt(at)}),view:()=>null}},[ee,rt,Mt,ke]),zt=z.useCallback((ut,at)=>{const gt=Re(ut),It=ze(ut),ln=()=>a==="Upload"?pn.upload(ut):a==="View"?pn.view():gt?pn.loading(ut):It?pn.error(ut):pn.download(ut);return M.jsx(wm,{ButtonRenderer:ln,className:bt.clsx(pl.FileChip,It&&pl.ErrorBorder),label:M.jsx("div",{className:pl.FileChipContent,children:M.jsxs(vl,{className:pl.FileNameContainer,children:[M.jsx(nd,{children:ut.name,className:bt.clsx(It&&pl.ErrorColor)}),M.jsx("span",{children:Lg(ut.size),className:pl.FileSize})]})})},at)},[Re,ze,a,pn]),vn=z.useCallback(()=>M.jsx("div",{className:bt.clsx(pl.FileBox,fe&&pl.ErrorBorder,fe&&pl.ErrorColor,fe&&pl.ErrorCursor,ht&&pl.Disabled,j&&!(D!=null&&D.length)&&pl.FileBoxFullSize),...Jt,ref:He,children:j?M.jsxs(vl,{className:bt.clsx("NoSelect"),style:{gap:4,display:D!=null&&D.length?"flex":"none"},children:[M.jsx(uo,{icon:"FileDownload"}),M.jsx("span",{children:ee["Drop file to select"]})]}):M.jsxs(Ic,{className:bt.clsx(pl.SelectRenderer,"NoSelect"),isDisabled:fe||x||ht,type:"Raw",onClick:ot,children:[ee["Insert File"],g&&` ${(D==null?void 0:D.length)||0} / ${g}`]})}),[fe,ht,j,D==null?void 0:D.length,Jt,ee,x,ot,g]);z.useEffect(()=>{const ut=setTimeout(()=>{if(!(D!=null&&D.length)){ve(void 0);return}const at=D.filter(sn=>Re(sn));if(at.length===0){ve(void 0);return}let gt=0,It=0;if(at.forEach(sn=>{const nn=Cd.getFileKey(sn),Ue=ue[nn];typeof Ue=="number"&&(gt+=Ue,It+=1)}),It===0){ve(void 0);return}const ln=gt/It;ve(Math.round(ln*10)/10)},300);return()=>clearTimeout(ut)},[D,Re,ue]);const Ht=I!==void 0?I:ge,wn=z.useMemo(()=>{const ut=a==="Upload",at=a==="View",gt=ut?ee["Delete All"]:ee["Download All"],It=ut?dt:Bt,ln=(D==null?void 0:D.some(nn=>Re(nn)))||!1,sn=Ht!==void 0?`${Math.round(Ht*10)/10}%`:void 0;return M.jsxs(vl,{className:pl.LabelContainer,children:[Y.label,a==="Upload"&&M.jsxs(nd,{className:bt.clsx(pl.TotalFileSize,"NoSelect"),children:["(",M.jsx("span",{className:bt.clsx(fe&&pl.ErrorColor),children:Lg(xe)})," / ",Lg(u),")"]}),!at&&M.jsxs(vl,{style:{gap:4,alignItems:"center"},children:[M.jsx("span",{children:gt,style:{opacity:ln?.6:1},className:bt.clsx(pl.LabelButton,"Label1",(Xe||ln)&&pl.Disabled,ut&&pl.Delete),onClick:!Xe&&!ln?It:void 0}),!ut&&ln&&sn&&M.jsx("span",{className:bt.clsx("Caption1"),style:{color:"var(--AFileUploader_text_color)",opacity:.6,display:"flex",alignItems:"center"},children:sn})]}),o&&M.jsx("span",{children:ee["Download List"]||"Download List",className:bt.clsx(pl.LabelButton,"Label1",!(D!=null&&D.length)&&pl.Disabled),style:{marginLeft:"auto",opacity:D!=null&&D.length?1:.6},onClick:D!=null&&D.length?Ft:void 0})]})},[a,ee,dt,Bt,D,Y.label,fe,xe,u,Xe,o,Ft,Re,Ht]);return a!=="Upload"&&!(D!=null&&D.length)?null:M.jsxs(sg,{wrapId:P,wrapProps:H,labelProps:W,...Y,label:wn,children:[M.jsx("input",{ref:Ae,multiple:!0,accept:t||"",style:{display:"none"},type:"file",onChange:tt}),M.jsxs(Wi,{...B,className:bt.clsx(pl.AFileUploader,_),children:[M.jsxs(vl,{className:pl.ChipsContainer,children:[a==="Upload"&&vn(),D==null?void 0:D.map(zt)]}),a==="Upload"&&M.jsx(Wi,{className:bt.clsx(pl.DropIdle,"Title1","NoSelect"),style:{color:j?"var(--AFileUploader_brand_color)":"var(--AFileUploader_disabled_color)",opacity:j?1:.4},...Jt,abaseRef:He,onClick:ut=>ut.preventDefault(),children:!(D!=null&&D.length)&&M.jsxs(vl,{style:{gap:4},children:[M.jsx(uo,{icon:"FileDownload",size:"2xl"}),M.jsx("span",{children:ee["Drop file to select"]})]})})]})]})},c9="_AFloatMenu_xco8u_1",u9="_Content_xco8u_10",Q2={AFloatMenu:c9,Content:u9},H3=n=>{const e=Vn.c(67),{defs:t,defaultDef:r,actionRef:i,offset:o,onClose:l,onClick:a,onPaperClick:u,position:g,width:m}=n,x=g===void 0?O1.ES:g,w=m===void 0?137:m;let _;e[0]!==r?(_={content:f9,...r},e[0]=r,e[1]=_):_=e[1];const S=_;let R;e[2]!==S||e[3]!==t?(R={},rr.keys(t).forEach(Qe=>{const ot=t[Qe],tt={...S,...ot};tt.noDisplay||(R[Qe]=tt)}),e[2]=S,e[3]=t,e[4]=R):R=e[4];const I=R,[O,P]=z.useState(null);let H;e[5]!==o||e[6]!==x?(H=Qe=>{JC(Qe,J,x,o),P(Qe)},e[5]=o,e[6]=x,e[7]=H):H=e[7];const W=H,[Y,B]=z.useState(!1),[ee,D]=z.useState(!1),J=z.useRef(null);let fe;e[8]!==W?(fe=Qe=>{D(!0),setTimeout(()=>B(!0),0),setTimeout(()=>W(Qe),0)},e[8]=W,e[9]=fe):fe=e[9];const Z=fe;let te;e[10]!==l?(te=()=>{B(!1),D(!0),l==null||l()},e[10]=l,e[11]=te):te=e[11];const ne=te;let ue;e[12]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>D(!1),e[12]=ue):ue=e[12];const se=ue;let j;e[13]!==ne||e[14]!==u?(j=async Qe=>{const ot=document.getElementById("root"),tt=Qe.target,rt=J.current;!ot||!rt||!tt||!rt.contains(tt)&&ot.contains(tt)&&(await(u==null?void 0:u(Qe)),ne())},e[13]=ne,e[14]=u,e[15]=j):j=e[15];const re=j;let ge,ve;e[16]!==Y||e[17]!==re?(ge=()=>{if(Y)return setTimeout(()=>document.addEventListener("mousedown",re),0),()=>document.removeEventListener("mousedown",re)},ve=[Y,re],e[16]=Y,e[17]=re,e[18]=ge,e[19]=ve):(ge=e[18],ve=e[19]),z.useEffect(ge,ve);let oe;e[20]!==W||e[21]!==O?(oe=()=>{O&&W(O)},e[20]=W,e[21]=O,e[22]=oe):oe=e[22];const K=oe;let he,Ae;e[23]!==Y||e[24]!==O||e[25]!==K?(he=()=>{if(!Y||!O)return;let Qe=O.parentElement;for(;Qe;)Qe.addEventListener("scroll",K),Qe=Qe.parentElement;return()=>{let ot=O.parentElement;for(;ot;)ot.removeEventListener("scroll",K),ot=ot.parentElement}},Ae=[O,Y,K],e[23]=Y,e[24]=O,e[25]=K,e[26]=he,e[27]=Ae):(he=e[26],Ae=e[27]),z.useEffect(he,Ae);let He,xe;e[28]!==Y||e[29]!==K?(He=()=>{if(Y)return window.addEventListener("resize",K),()=>window.removeEventListener("resize",K)},xe=[Y,K],e[28]=Y,e[29]=K,e[30]=He,e[31]=xe):(He=e[30],xe=e[31]),z.useEffect(He,xe);let Fe;e[32]!==ne?(Fe=Qe=>{Qe[0].intersectionRatio===0&&ne()},e[32]=ne,e[33]=Fe):Fe=e[33];const Me=Fe;let Be;e[34]!==Y||e[35]!==Me?(Be=()=>{if(!Y)return;const Qe=new IntersectionObserver(Me,{threshold:0});return J.current&&Qe.observe(J.current),()=>Qe.disconnect()},e[34]=Y,e[35]=Me,e[36]=Be):Be=e[36];let ke;e[37]!==Y||e[38]!==Me?(ke=[J,Y,Me],e[37]=Y,e[38]=Me,e[39]=ke):ke=e[39],z.useEffect(Be,ke);let Re,ze;e[40]!==i||e[41]!==ne||e[42]!==Z?(Re=()=>{i&&(i.current={open:Z,close:ne})},ze=[i,Z,ne],e[40]=i,e[41]=ne,e[42]=Z,e[43]=Re,e[44]=ze):(Re=e[43],ze=e[44]),z.useEffect(Re,ze);let Xe;e[45]!==ne||e[46]!==I||e[47]!==a||e[48]!==Y?(Xe=Qe=>{var ot;if(Y){if((ot=I[Qe])!=null&&ot.isDisabled)return}else return;a==null||a(Qe),ne()},e[45]=ne,e[46]=I,e[47]=a,e[48]=Y,e[49]=Xe):Xe=e[49];const Le=Xe;if(!Y&&!ee)return null;let ht;if(e[50]!==S||e[51]!==I||e[52]!==Y||e[53]!==Le||e[54]!==w){const Qe=+Y,ot=Y&&Object.keys(I).length>0?"visible":"hidden";let tt;e[56]!==Qe||e[57]!==ot||e[58]!==w?(tt={opacity:Qe,visibility:ot,minWidth:w},e[56]=Qe,e[57]=ot,e[58]=w,e[59]=tt):tt=e[59];let rt;e[60]!==S||e[61]!==I||e[62]!==Le?(rt=rr.map(I,(Mt,Bt)=>{const[Ft]=Mt,Jt={...S,...I[Ft]};let{content:pn,noDisplay:zt,tooltipDirection:vn,...Ht}=Jt;const wn=vn===void 0?ic.E:vn;return zt?null:(pn=Vr.getContent(Jt.content,{defKey:Ft,def:Jt}),z.createElement(Wi,{...Ht,key:Bt,className:bt.clsx(Q2.Content,"Label2","IsClickable",Ht.className),tooltipDirection:wn,onClick:ut=>{var at;Le==null||Le(Ft),(at=Ht.onClick)==null||at.call(Ht,ut)}},pn))}),e[60]=S,e[61]=I,e[62]=Le,e[63]=rt):rt=e[63];let dt;e[64]!==tt||e[65]!==rt?(dt=M.jsx("div",{ref:J,className:Q2.AFloatMenu,style:tt,onTransitionEnd:se,children:rt}),e[64]=tt,e[65]=rt,e[66]=dt):dt=e[66],ht=su.createPortal(dt,document.body),e[50]=S,e[51]=I,e[52]=Y,e[53]=Le,e[54]=w,e[55]=ht}else ht=e[55];return ht},f9=n=>n.defKey;function h9(n){try{const e=Number.parseInt(n);return isNaN(e)?void 0:e}catch{return}}const G0={parseInt:h9},d9=`${Number.MAX_SAFE_INTEGER}`.length-1,g9=n=>{const e=Vn.c(58);let t,r,i,o,l,a,u,g,m,x,w,_,S;if(e[0]!==n){const{unit:Be,unitMargin:ke,unitOptions:Re,useSelectUnit:ze,type:Xe,min:Le,max:ht,unitSelectWidth:Qe,unitOptionsRenderer:ot,useValue:tt,onEnterPress:rt,canAsterisk:dt,onFocus:Mt,...Bt}=n;g=Be,l=ke,m=Re,_=ze,a=Xe,o=Le,i=ht,w=Qe,x=ot,S=tt,r=rt,u=dt,t=Bt,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=g,e[9]=m,e[10]=x,e[11]=w,e[12]=_,e[13]=S}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],g=e[8],m=e[9],x=e[10],w=e[11],_=e[12],S=e[13];const R=l===void 0?4:l,I=a===void 0?"Secondary":a,O=i!==void 0&&o!==void 0?Math.max(`${i}`.length+1,`${o}`.length+1):d9,[P,H]=Do(S,""),[W,Y]=z.useState(!1),[B,ee]=z.useState(""),D=z.useRef(null);let J;e:{if(!P||!H){J=String(P);break e}const Be=String(P),ke=G0.parseInt(Be);if(ke!==void 0){if(o!==void 0&&ke<o){const Re=`${o}`;H(Re),J=Re;break e}if(i!==void 0&&ke>i){const Re=`${i}`;H(Re),J=Re;break e}}J=Be}const fe=J;let Z;e[14]!==W||e[15]!==i||e[16]!==H?(Z=Be=>{if(W){if(i!==void 0&&Be!==""){const ke=G0.parseInt(Be);if(ke!==void 0&&ke>i){ee(`${i}`);return}}ee(Be)}else H&&H(Be)},e[14]=W,e[15]=i,e[16]=H,e[17]=Z):Z=e[17];const te=Z;let ne;e[18]!==fe?(ne=()=>{Y(!0),ee(fe)},e[18]=fe,e[19]=ne):ne=e[19];const ue=ne;let se;e[20]!==i||e[21]!==o||e[22]!==H?(se=Be=>{if(Y(!1),!H)return;const ke=Be.target.value;let Re=ke;if(ke===""||ke==="-")Re=o!==void 0?`${o}`:ke;else{const ze=G0.parseInt(ke);ze===void 0?Re=o!==void 0?`${o}`:ke:o!==void 0&&ze<o?Re=`${o}`:i!==void 0&&ze>i&&(Re=`${i}`)}Re!==ke&&(Be.target.value=Re),H(Re)},e[20]=i,e[21]=o,e[22]=H,e[23]=se):se=e[23];const j=se;let re;e[24]!==r?(re=Be=>{var ke;(ke=D.current)==null||ke.blur(),r==null||r(Be)},e[24]=r,e[25]=re):re=e[25];const ge=re,ve=o===void 0&&i===void 0?g??"number":`${o??""}~${i??""}`,[oe,K]=Do(_,(m==null?void 0:m[0])??"");let he;if(m){const Be=w||"fit-content";let ke;e[26]!==Be?(ke={maxWidth:Be},e[26]=Be,e[27]=ke):ke=e[27];let Re;e[28]!==K||e[29]!==oe?(Re=[oe,K],e[28]=K,e[29]=oe,e[30]=Re):Re=e[30];let ze;e[31]!==R?(ze={style:{color:"var(--label-normal)",marginLeft:4,marginRight:R}},e[31]=R,e[32]=ze):ze=e[32];let Xe;e[33]!==ke||e[34]!==Re||e[35]!==ze||e[36]!==m||e[37]!==x?(Xe=M.jsx(Ed,{className:ou.ANumInputUnitSelect,OptionRenderer:x,options:m,style:ke,type:"Raw",useSelect:Re,arrowProps:ze}),e[33]=ke,e[34]=Re,e[35]=ze,e[36]=m,e[37]=x,e[38]=Xe):Xe=e[38],he=Xe}else{let Be;e[39]!==g||e[40]!==R?(Be=g&&M.jsx("span",{style:{marginRight:R},children:g}),e[39]=g,e[40]=R,e[41]=Be):Be=e[41],he=Be}const Ae=he;let He;e[42]!==n.className?(He=bt.clsx(ou.ANumInput,n.className),e[42]=n.className,e[43]=He):He=e[43];const xe=W?B:fe;let Fe;e[44]!==te||e[45]!==xe?(Fe=[xe,te],e[44]=te,e[45]=xe,e[46]=Fe):Fe=e[46];let Me;return e[47]!==t||e[48]!==O||e[49]!==j||e[50]!==ge||e[51]!==ue||e[52]!==ve||e[53]!==Fe||e[54]!==He||e[55]!==I||e[56]!==Ae?(Me=M.jsx(ag,{...t,autoComplete:"off",className:He,inputRef:D,maxLength:O,placeholder:ve,RightAddon:Ae,type:I,useValue:Fe,onBlur:j,onEnterPress:ge,onFocus:ue}),e[47]=t,e[48]=O,e[49]=j,e[50]=ge,e[51]=ue,e[52]=ve,e[53]=Fe,e[54]=He,e[55]=I,e[56]=Ae,e[57]=Me):Me=e[57],Me},p9="_AListView_1nv5l_1",v9="_Row_1nv5l_10",b9="_Label_1nv5l_19",y9="_Content_1nv5l_29",h0={AListView:p9,Row:v9,Label:b9,Content:y9},m9=n=>{const e=Vn.c(50);let t,r,i,o,l,a,u,g,m,x,w,_,S,R,I,O,P,H,W;if(e[0]!==n){const{defs:D,defaultDef:J,item:fe,rowHeight:Z,labelWidth:te,noBorder:ne,onlyMiddleBorder:ue,rowGap:se,middleBorder:j,rowBottomBorder:re,outerBorder:ge,style:ve,labelClassName:oe,contentClassName:K,labelStyle:he,contentStyle:Ae,isPending:He,...xe}=n;g=fe,O=Z,w=te,I=se,P=ve,m=oe,i=K,x=he,o=Ae,u=He,S=ne||ue,r=S?"":re||"var(--AListView_border-thin)",R=S?"":ge||"var(--AListView_border-thick)",_=ne?"":j||"var(--AListView_border-thick)";let Fe;e[20]!==J?(Fe={content:w9,label:x9,...J},e[20]=J,e[21]=Fe):Fe=e[21],l=Fe;let Me;e[22]!==l||e[23]!==D?(Me={},rr.keys(D).forEach(Be=>{const ke=D[Be],Re={...l,...ke};Me[Be]=Re}),e[22]=l,e[23]=D,e[24]=Me):Me=e[24],a=Me,t=Wi,H=xe,W=bt.clsx(h0.AListView,xe.className),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=g,e[9]=m,e[10]=x,e[11]=w,e[12]=_,e[13]=S,e[14]=R,e[15]=I,e[16]=O,e[17]=P,e[18]=H,e[19]=W}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],g=e[8],m=e[9],x=e[10],w=e[11],_=e[12],S=e[13],R=e[14],I=e[15],O=e[16],P=e[17],H=e[18],W=e[19];let Y;e[25]!==r||e[26]!==P?(Y={...P,borderTop:r},e[25]=r,e[26]=P,e[27]=Y):Y=e[27];let B;e[28]!==r||e[29]!==i||e[30]!==o||e[31]!==l||e[32]!==a||e[33]!==u||e[34]!==g||e[35]!==m||e[36]!==x||e[37]!==w||e[38]!==_||e[39]!==S||e[40]!==R||e[41]!==I||e[42]!==O?(B=rr.map(a,(D,J)=>{const[fe]=D,Z={...l,...a[fe]},te=Vr.getContent(Z.label,{defKey:fe,item:g,def:Z}),ne=Vr.getContent(Z.content,{defKey:fe,item:g||{[fe]:""},def:Z}),ue=Vr.getContent(Z.bold||"label",{defKey:fe,item:g,def:Z});return M.jsxs("div",{className:h0.Row,style:{height:Z.height??O,minHeight:Z.height??O,maxHeight:Z.height??O,borderBottom:r,marginTop:J===0?0:typeof I=="number"?`${I}px`:I},children:[M.jsx("div",{className:bt.clsx(h0.Label,"NoSelect",ue!=="content"&&"Bold",m),style:{width:w,minWidth:w,maxWidth:w,borderLeft:R,paddingLeft:S?0:10,...x},children:M.jsx(nd,{children:te})}),M.jsx("div",{className:bt.clsx(h0.Content,ue!=="label"&&"Bold",i),style:{borderLeft:_,borderRight:R,...o},children:M.jsx(nd,{isPending:u,style:{width:"100%",padding:S?0:10},children:ne})})]},fe)}),e[28]=r,e[29]=i,e[30]=o,e[31]=l,e[32]=a,e[33]=u,e[34]=g,e[35]=m,e[36]=x,e[37]=w,e[38]=_,e[39]=S,e[40]=R,e[41]=I,e[42]=O,e[43]=B):B=e[43];let ee;return e[44]!==t||e[45]!==H||e[46]!==W||e[47]!==Y||e[48]!==B?(ee=M.jsx(t,{...H,className:W,style:Y,children:B}),e[44]=t,e[45]=H,e[46]=W,e[47]=Y,e[48]=B,e[49]=ee):ee=e[49],ee},x9=n=>n.defKey,w9=n=>{const{defKey:e,item:t}=n;if(t)if(rr.hasKey(t,e)){const r=t[e];return rr.isReactNode(r)?r:null}else return null;else return null},C9="_ALoadingBorder_kwc1g_1",_9="_ProgressBar_kwc1g_9",S9="_IsLoading_kwc1g_15",T9="_Cover_kwc1g_19",ep={ALoadingBorder:C9,ProgressBar:_9,IsLoading:S9,Cover:T9},Em=n=>{const e=Vn.c(15),{isLoading:t}=n,[r,i]=z.useState(!1),o=z.useRef(null);let l,a;e[0]!==t?(l=()=>{t?(i(!0),o.current&&clearTimeout(o.current)):o.current=setTimeout(()=>i(!1),300)},a=[t],e[0]=t,e[1]=l,e[2]=a):(l=e[1],a=e[2]),z.useEffect(l,a);let u;e[3]!==r?(u=bt.clsx(ep.ProgressBar,r&&ep.IsLoading),e[3]=r,e[4]=u):u=e[4];let g;e[5]!==u?(g=M.jsx("div",{className:u}),e[5]=u,e[6]=g):g=e[6];let m;e[7]!==t?(m=bt.clsx(ep.Cover,t&&ep.IsLoading),e[7]=t,e[8]=m):m=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x={transition:"all 300ms"},e[9]=x):x=e[9];let w;e[10]!==m?(w=M.jsx("div",{className:m,style:x}),e[10]=m,e[11]=w):w=e[11];let _;return e[12]!==g||e[13]!==w?(_=M.jsxs("div",{className:ep.ALoadingBorder,children:[g,w]}),e[12]=g,e[13]=w,e[14]=_):_=e[14],_},A9="_Container_ez8dc_1",E9="_Option_ez8dc_7",R9="_RadioButton_ez8dc_14",I9="_InnerCircle_ez8dc_24",k9="_isChecked_ez8dc_29",c1={Container:A9,Option:E9,RadioButton:R9,InnerCircle:I9,isChecked:k9},M9=n=>{const{options:e,useSelect:t,selectDisabled:r,radius:i=23,innerRadius:o=i*.6,OptionRenderer:l=W3}=n,[a,u]=Do(t,e[0]);return M.jsx("div",{className:c1.Container,children:e.map((g,m)=>{const x=r==null?void 0:r(g),w=()=>x?null:u==null?void 0:u(g);return M.jsxs(vl,{className:bt.clsx(c1.Option,"IsClickable"),isDisabled:x,onClick:w,children:[M.jsx(L9,{innerRadius:o,isChecked:a===g,radius:i},m),M.jsx(l,{option:g})]},m)})})},W3=({option:n})=>n,L9=n=>{const e=Vn.c(15),{isChecked:t,radius:r,innerRadius:i}=n;let o;e[0]!==t?(o=bt.clsx(c1.RadioButton,t&&c1.isChecked),e[0]=t,e[1]=o):o=e[1];let l;e[2]!==r?(l={width:r,height:r},e[2]=r,e[3]=l):l=e[3];let a;e[4]!==t?(a=bt.clsx(c1.InnerCircle,t&&c1.isChecked),e[4]=t,e[5]=a):a=e[5];let u;e[6]!==i?(u={width:i,height:i},e[6]=i,e[7]=u):u=e[7];let g;e[8]!==a||e[9]!==u?(g=M.jsx(Wi,{className:a,style:u}),e[8]=a,e[9]=u,e[10]=g):g=e[10];let m;return e[11]!==o||e[12]!==l||e[13]!==g?(m=M.jsx(Wi,{className:o,style:l,children:g}),e[11]=o,e[12]=l,e[13]=g,e[14]=m):m=e[14],m},O9="_AMultiSelect_19uuu_1",P9="_Arrow_19uuu_15",D9="_Primary_19uuu_24",N9="_UnAvailable_19uuu_35",F9="_IsOpen_19uuu_35",B9="_Secondary_19uuu_42",z9="_Placeholder_19uuu_58",H9="_ValuesContainer_19uuu_63",W9="_Values_19uuu_63",U9="_Options_19uuu_82",G9="_Option_19uuu_82",Y9="_Selected_19uuu_124",V9="_CheckBox_19uuu_131",sf={AMultiSelect:O9,Arrow:P9,Primary:D9,UnAvailable:N9,IsOpen:F9,Secondary:B9,Placeholder:z9,ValuesContainer:H9,Values:W9,Options:U9,Option:G9,Selected:Y9,CheckBox:V9},Z9=n=>{const{options:e,useSelect:t,type:r="Primary",placeholder:i=Nr.AMultiSelect["Select(Placeholder)"],onClose:o,SelectedRenderer:l=K9,OptionRenderer:a=J9,minShowRows:u=2,maxShowRows:g=6,arrowProps:m,isAutoWidth:x=!1,...w}=n,_=z.useRef(null),S=z.useMemo(()=>w.abaseRef??_,[w.abaseRef]),R=z.useRef(null),[I,O]=Do(t,[]),[P,H]=z.useState(void 0),W=z.useRef(e),Y=z.useRef(null),[B,ee]=z.useState(!1),[D,J]=z.useState(!1),fe=z.useCallback(()=>J(!1),[]),Z=z.useCallback(()=>{w.isDisabled||w.isLoading||e.length<1||(J(!0),setTimeout(()=>ee(!0),0),setTimeout(()=>lb(R,S,e,u,g),0))},[S,w.isDisabled,w.isLoading,e,u,g]),te=z.useCallback(()=>{ee(!1),J(!0),o==null||o()},[o]),ne=z.useCallback(oe=>{var K;B?te():Z(),setTimeout(()=>lb(R,S,e,u,g),0),(K=w.onClick)==null||K.call(w,oe)},[S,w,e,B,te,Z,u,g]),ue=z.useCallback(()=>{lb(R,S,e,u,g)},[S,e,u,g]);z.useEffect(()=>{if(!B||!S.current)return;const oe=S.current;let K=oe.parentElement;for(;K;)K.addEventListener("scroll",ue),K=K.parentElement;return()=>{let he=oe.parentElement;for(;he;)he.removeEventListener("scroll",ue),he=he.parentElement}},[S,B,ue]),z.useEffect(()=>{if(B)return window.addEventListener("resize",ue),()=>window.removeEventListener("resize",ue)},[B,ue]);const se=z.useCallback(oe=>{oe[0].intersectionRatio===0&&te()},[te]);z.useEffect(()=>{if(!B)return;const oe=new IntersectionObserver(se,{threshold:0});return S.current&&oe.observe(S.current),()=>oe.disconnect()},[S,B,se]);const j=z.useCallback(oe=>{const K=oe.target,he=S.current,Ae=R.current;!he||!K||!Ae||!he.contains(K)&&!Ae.contains(K)&&te()},[S,te]),re=z.useMemo(()=>w.isDisabled||w.isLoading||e.length<1,[w.isDisabled,w.isLoading,e]);z.useEffect(()=>{if(B)return setTimeout(()=>document.addEventListener("mousedown",j),0),()=>document.removeEventListener("mousedown",j)},[B,j]);const ge=z.useCallback((oe,K)=>{oe.stopPropagation(),oe.preventDefault();let he=[...I];he.includes(K)?he=he.filter(Ae=>Ae!==K):he.push(K),O==null||O(he)},[I,O]),ve=z.useCallback(()=>{if(!x||!S.current)return;const oe=Mg.calculateOptimalSelectWidth({elementRef:S,options:e,selectedOptions:I,placeholder:i,optionRenderer:K=>a({option:K}),type:r,isMulti:!0});H(oe)},[x,S,e,I,i,a,r]);return z.useEffect(()=>x?((e!==W.current||P===void 0)&&(Y.current!==null&&cancelAnimationFrame(Y.current),Y.current=requestAnimationFrame(()=>{ve(),Y.current=null,W.current=[...e]})),()=>{Y.current!==null&&(cancelAnimationFrame(Y.current),Y.current=null)}):void 0,[x,e,ve,P]),z.useEffect(()=>()=>{typeof Mg.clearCache=="function"&&Mg.clearCache()},[]),M.jsxs(M.Fragment,{children:[M.jsxs(Wi,{...w,abaseRef:S,isDisabled:w.isDisabled||e.length<1,className:bt.clsx(w.className,sf.AMultiSelect,"NoSelect",B&&sf.IsOpen,re&&sf.UnAvailable,sf[r]),style:{padding:r==="Secondary"?"8px 8px 8px 0":0,width:P?`${P}px`:x?"100px":void 0,...w.style},onClick:ne,children:[M.jsx("div",{className:sf.ValuesContainer,children:M.jsx("div",{className:bt.clsx(sf.Values,I.length<1&&sf.Placeholder),children:M.jsx(l,{OptionRenderer:a,placeholder:i,selectedOptions:I})})}),M.jsx("div",{...m,className:bt.clsx(sf.Arrow,m==null?void 0:m.className),children:M.jsx(uo,{icon:"TriangleDown",style:{transform:B?"rotate(180deg)":"",transition:"var(--Transition)"}})})]}),e.length>0&&(B||D)&&su.createPortal(M.jsx("div",{ref:R,className:bt.clsx(sf.Options,sf[r]),style:{opacity:+B,visibility:B?"visible":"hidden",pointerEvents:B?void 0:"none",width:P?`${P}px`:x?"100px":void 0,borderRadius:S.current?window.getComputedStyle(S.current).borderRadius:void 0},onTransitionEnd:fe,children:e.map((oe,K)=>{var Ae;const he=I.includes(oe);return M.jsxs("div",{className:bt.clsx(sf.Option,he&&sf.Selected,"NoSelect",sf[r]),style:{height:(Ae=S.current)==null?void 0:Ae.getBoundingClientRect().height},onClick:He=>ge(He,oe),children:[M.jsx(w1,{className:sf.CheckBox,useCheck:[+he,void 0]}),M.jsx(a,{option:oe})]},K)})}),document.body)]})};function lb(n,e,t,r,i){if(!e.current||!n.current||!t||t.length<1)return;const o=e.current.getBoundingClientRect(),l=X9(o,t.length,r,i),a=window.getComputedStyle(e.current);n.current.style.top=`calc(${l.top??0}px - ${a.borderTopWidth})`,n.current.style.bottom=l.bottom?l.bottom+"px":"",n.current.style.left=l.left+"px",n.current.style.width||(n.current.style.minWidth=l.minWidth+"px"),n.current.style.minHeight=l.minHeight+"px",n.current.style.maxHeight=l.maxHeight+"px",n.current.style.visibility="visible"}function X9(n,e,t,r){const i={top:n.bottom,bottom:void 0,left:n.left,height:"fit-content",minWidth:n.width,minHeight:n.height*Math.min(t,e),maxHeight:n.height*r>window.innerHeight-n.bottom-10?window.innerHeight-n.bottom-10:n.height*r};return window.innerHeight-n.bottom-10<i.height&&(window.innerHeight-n.bottom-10<i.minHeight?(i.top=n.top-e*n.height,i.top<0&&(i.top=10,i.minHeight=n.top-10,i.height=n.top-10)):i.height=window.innerHeight-n.bottom-10),i}const K9=n=>{const e=Vn.c(3),{OptionRenderer:t,selectedOptions:r,placeholder:i}=n;if(r.length<1)return i;if(r.length===1){let o;return e[0]!==t||e[1]!==r[0]?(o=M.jsx(t,{option:r[0]}),e[0]=t,e[1]=r[0],e[2]=o):o=e[2],o}else return`${r.length} selected`},J9=n=>{const{option:e}=n;return rr.isReactNode(e)?e:null},Q9="_Container_10ion_1",q9="_Steps_10ion_9",j9="_Step_10ion_9",$9="_OutCircle_10ion_26",eI="_IsOver_10ion_37",tI="_InCircle_10ion_41",nI="_Line_10ion_54",rI="_Left_10ion_66",iI="_Right_10ion_69",oI="_ContentContainer_10ion_73",lI="_Content_10ion_73",ku={Container:Q9,Steps:q9,Step:j9,OutCircle:$9,IsOver:eI,InCircle:tI,Line:nI,Left:rI,Right:iI,ContentContainer:oI,Content:lI},sI=n=>{const e=Vn.c(26),{useSelect:t,steps:r,StepRenderer:i,ContentRenderer:o}=n,l=i===void 0?q2:i,a=o===void 0?q2:o;if(r.length===0)throw new Error("steps should have at least one element");const u=z.useRef(null),[g,m]=Do(t,r[0]);let x;e[0]!==m?(x=Y=>m==null?void 0:m(Y),e[0]=m,e[1]=x):x=e[1];const w=x,_=r.indexOf(g);let S;e[2]!==_||e[3]!==w||e[4]!==r[0]?(S=()=>{_<0&&w(r[0])},e[2]=_,e[3]=w,e[4]=r[0],e[5]=S):S=e[5];let R;e[6]!==_||e[7]!==w||e[8]!==r?(R=[_,r,w],e[6]=_,e[7]=w,e[8]=r,e[9]=R):R=e[9],z.useEffect(S,R);let I;e[10]!==l||e[11]!==_||e[12]!==w||e[13]!==r?(I=r.map((Y,B)=>{const ee=r.indexOf(Y),D=_>=B,J=_>B;return M.jsxs("div",{className:ku.Step,children:[B!==0&&M.jsx("div",{className:bt.clsx(ku.Line,ku.Left,D&&ku.IsOver)}),B!==r.length-1&&M.jsx("div",{className:bt.clsx(ku.Line,ku.Right,J&&ku.IsOver)}),M.jsx(Ic,{className:bt.clsx(ku.OutCircle,D&&ku.IsOver),type:"Raw",onClick:()=>w(Y),children:M.jsx("div",{className:bt.clsx(ku.InCircle,D&&ku.IsOver)})}),M.jsx(l,{step:Y,stepIdx:ee})]},B)}),e[10]=l,e[11]=_,e[12]=w,e[13]=r,e[14]=I):I=e[14];let O;e[15]!==I?(O=M.jsx("div",{className:ku.Steps,children:I}),e[15]=I,e[16]=O):O=e[16];let P;e[17]!==a||e[18]!==_||e[19]!==r?(P=r.map((Y,B)=>{const ee=r.indexOf(Y);return M.jsx("div",{className:ku.Content,style:B===0?{marginLeft:`${_*-100}%`}:{},children:M.jsx(a,{step:Y,stepIdx:ee})},B)}),e[17]=a,e[18]=_,e[19]=r,e[20]=P):P=e[20];let H;e[21]!==P?(H=M.jsx("div",{ref:u,className:ku.ContentContainer,children:P}),e[21]=P,e[22]=H):H=e[22];let W;return e[23]!==O||e[24]!==H?(W=M.jsxs("div",{className:ku.Container,children:[O,H]}),e[23]=O,e[24]=H,e[25]=W):W=e[25],W},q2=n=>{const{step:e}=n;return typeof e=="object"?rr.stringify(e):e},aI="_ATab_9eg6z_1",cI="_Addon_9eg6z_9",uI="_Option_9eg6z_14",fI="_Underline_9eg6z_26",hI="_IsSelected_9eg6z_26",dI="_IndicatorTrack_9eg6z_37",gI="_Indicator_9eg6z_37",pI="_Primary_9eg6z_54",vI="_Secondary_9eg6z_57",bI="_IsDisabled_9eg6z_63",yI="_Tertiary_9eg6z_77",mI="_Quaternary_9eg6z_101",Xh={ATab:aI,Addon:cI,Option:uI,Underline:fI,IsSelected:hI,IndicatorTrack:dI,Indicator:gI,Primary:pI,Secondary:vI,IsDisabled:bI,Tertiary:yI,Quaternary:mI},xI=["Primary","Secondary","Tertiary","Quaternary"],U3=n=>{const{options:e,useSelect:t,selectDisabled:r,type:i="Primary",tabProps:o,optionProps:l,optionWidth:a,OptionRenderer:u=wI,RightAddon:g,LeftAddon:m,color:x,selectedColor:w,underline:_,indicatorProps:S,indicatorTrackProps:R,height:I=40}=n;if(e.length===0)throw new Error("options should have at least one element");const O=z.useMemo(()=>e.findIndex(Me=>!(r!=null&&r(Me))),[e,r]),P=i==="Tertiary",H=i==="Secondary",W=P?I*.1:0,Y=H?8:0,B=z.useMemo(()=>W+Y,[W,Y]),ee=z.useMemo(()=>(Y-W)/e.length,[e.length,W,Y]),[D,J]=Do(t,e[O]),fe=z.useRef([]),Z=z.useCallback(Me=>J==null?void 0:J(Me),[J]),te=z.useMemo(()=>typeof a=="number"?a+"px":a,[a]),ne=z.useMemo(()=>e.indexOf(D),[e,D]),ue=z.useMemo(()=>`calc(${100/e.length}% + ${ee}px)`,[e.length,ee]),se=z.useMemo(()=>te||`calc(${ue} - ${B}px)`,[ue,B,te]),[j,re]=z.useState(0),[ge,ve]=z.useState(0),[oe,K]=z.useState(se),he=z.useRef(null),Ae=z.useRef(null),He=KC(Ae,he),xe=z.useMemo(()=>{let Me;switch(te){case void 0:Me=`calc(${ue} * ${ne})`;break;case"fit-content":Me=`calc(${j}px)`;break;default:Me=`calc((${te} + ${B}px) * ${ne})`;break}return Me},[te,ue,ne,j,B]),Fe=z.useMemo(()=>{switch(te){case void 0:return;case"fit-content":return`calc(${ge}px)`;default:return`calc((${te} + ${B}px - ${ee}px) * ${e.length})`}},[te,ee,B,e,ge]);return z.useEffect(()=>{var Be,ke;if(e.includes(D)||J==null||J(e[O]),te!=="fit-content"){K(se);return}let Me=0;fe.current.forEach((Re,ze)=>{ze<ne&&Re.current&&(Me+=Re.current.offsetWidth+B)}),re(Me),K(`calc(${((ke=(Be=fe.current[ne])==null?void 0:Be.current)==null?void 0:ke.offsetWidth)||0}px)`),ve(fe.current.reduce((Re,ze)=>{var Xe;return Re+((((Xe=ze.current)==null?void 0:Xe.offsetWidth)||0)+B-ee)},0))},[te,fe,e,D,J,O,ee,B,ne,se]),M.jsxs("div",{ref:he,...o,className:bt.clsx(Xh.ATab,"Headline2",Xh[i],o==null?void 0:o.className),style:{minHeight:I,height:I,maxHeight:I},children:[m&&M.jsx("div",{ref:Ae,className:Xh.Addon,children:m}),M.jsx("div",{...S,className:bt.clsx(Xh.Indicator,S==null?void 0:S.className),style:{minWidth:oe,left:xe,marginLeft:W,transform:`translate(${He??0}px, ${P?"-50%":"0"})`,height:P?I-W*2:void 0,...S==null?void 0:S.style}}),M.jsx("div",{...R,className:bt.clsx(Xh.IndicatorTrack,R==null?void 0:R.className),style:{width:Fe,marginLeft:P?He:0,height:I,...R==null?void 0:R.style}}),e.map((Me,Be)=>{const ke=r==null?void 0:r(Me);return fe.current[Be]||(fe.current[Be]=z.createRef()),M.jsx(Wi,{abaseRef:fe.current[Be],...l,isDisabled:ke,className:bt.clsx(Xh.Option,ke&&Xh.IsDiabled,Me===D&&Xh.IsSelected,"IsClickable",_&&Xh.Underline,l==null?void 0:l.className),style:{minWidth:se,maxWidth:se,marginLeft:W,marginRight:Y,"--color":Me===D&&w||x,height:I,...l==null?void 0:l.style},onClick:Re=>{!ke&&Z(Me),l&&l.onClick&&l.onClick(Re)},children:M.jsx(u,{option:Me})},Be)}),M.jsx(cs,{w:W}),g&&M.jsxs(M.Fragment,{children:[M.jsx(Hg,{}),M.jsx("div",{className:Xh.Addon,children:g})]})]})},wI=n=>{const{option:e}=n;if(typeof e=="string")return e;if(typeof e=="number")return e;if(typeof e=="object"){if(e===null)return"";const t=rr.keys(e);return"name"in t?e.name:"label"in t?e.label:"value"in t?e.value:JSON.stringify(e)}else return JSON.stringify(e)};function G3(...n){const e=Vn.c(3),t=n,r=z.useRef(!1);let i,o;e[0]!==t?(i=()=>{r.current||(r.current=!0,t.forEach(CI))},o=[t],e[0]=t,e[1]=i,e[2]=o):(i=e[1],o=e[2]),z.useEffect(i,o)}function CI(n){return n()}const Y3={String:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;if(t==="")return rr.keys(e).some(m=>{const x=e[m],w=Vr.getContent(x.asText,{defKey:m,def:x,item:n});if(w!==void 0)return w.toString().toLowerCase().includes(i.toLowerCase());const _=Vr.getContent(x.content,{defKey:m,def:x,item:n});return["string","number"].includes(typeof _)&&_!==void 0&&_!==null?_.toString().toLowerCase().includes(i.toLowerCase()):!1});const o=rr.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Vr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0)return u.toString().toLowerCase().includes(i.toLowerCase());const g=Vr.getContent(a.content,{defKey:l,def:a,item:n});return["string","number"].includes(typeof g)&&g!==void 0&&g!==null?g.toString().toLowerCase().includes(i.toLowerCase()):!1},Select:(n,e,t,r)=>{const{value:i}=r;if(i==null)return!1;const o=rr.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Vr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0)return i.toString().toLowerCase()===u.toString().toLowerCase();const g=Vr.getContent(a.content,{defKey:l,def:a,item:n});return["string","number"].includes(typeof g)&&g!==void 0&&g!==null?i.toString().toLowerCase()===g.toString().toLowerCase():!1},Date:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;const o=rr.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Vr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0){const m=Yn.toDate(u.toString());return m&&Yn.eq(m,i)}const g=Vr.getContent(a.content,{defKey:l,def:a,item:n});if(["string","number"].includes(typeof g)&&g!==void 0&&g!==null){const m=Yn.toDate(g.toString());return m&&Yn.eq(m,i)}return!1},DateRange:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;const o=rr.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Vr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0){const m=Yn.toDate(u.toString());return m&&Yn.be(i.sDate,m,i.eDate)}const g=Vr.getContent(a.content,{defKey:l,def:a,item:n});if(["string","number"].includes(typeof g)&&g!==void 0&&g!==null){const m=Yn.toDate(g.toString());return m&&Yn.be(i.sDate,m,i.eDate)}return!1}},_I=(n,e,t)=>{let r=n;return rr.keys(t).forEach(o=>{const l=t[o];l.value===void 0||l.value===null||l.value===""||(r=r.filter(a=>{var u;return(u=l.predicate??Y3[l.type])==null?void 0:u(a,e,o,l)}))}),r},SI=(n,e,t)=>{if(!t)return n;const r=t.defKey,i=e[r];if(r===void 0)return n;const o=t.sortF??((l,a)=>{const u=Vr.getContent(i.content,{defKey:r,def:i,item:l}),g=Vr.getContent(i.content,{defKey:r,def:i,item:a});return typeof u=="string"&&typeof g=="string"?u<g?-1:u>g?1:0:typeof u=="number"&&typeof g=="number"?u-g:typeof u=="string"&&typeof g=="number"?-1:typeof u=="number"&&typeof g=="string"||u===void 0&&g!==void 0?1:u!==void 0&&g===void 0?-1:0});return typeof o=="function"&&o.length>=3?n.slice().sort((l,a)=>o(l,a,t.isAsc)):n.slice().sort((l,a)=>{const u=o(l,a);return t.isAsc?u:-u})},TI=(n,e,t)=>n.slice((e-1)*t,e*t),V3=(n,e)=>{const t=Math.max(Math.ceil(n/e),1);return Array.from({length:t},(r,i)=>i+1)},AI=(n,e,t,r)=>{const i=V3(e,t),o=Math.floor((n-1)/r),l=o*r+1,a=(o+1)*r,u=i.slice(l-1,a);return{pages:i,rangedPages:u}},EI=(n,e,t)=>{const r=[],i=Object.keys(t),o=[];i.forEach(w=>{const _=t[w],S=Vr.getContent(_.hContent,{defKey:w,def:_});if(S!==void 0){if(typeof S=="string"){o.push(S);return}else if(typeof S=="number"){o.push(S.toString());return}}const R=Vr.getContent(_.name,{defKey:w,def:_});if(R!==void 0&&typeof R=="string"){o.push(R);return}o.push(w)});const l=o.map(w=>`"${w.replaceAll('"','""')}"`);r.push(l.join(",")),e.forEach(w=>{const _=[];i.forEach(R=>{const I=t[R],O=Vr.getContent(I.content,{defKey:R,def:I,item:w});if(O!==void 0){if(typeof O=="string"){_.push(O);return}else if(typeof O=="number"){_.push(O.toString());return}}const P=w[R];typeof P=="string"?_.push(P):typeof P=="number"?_.push(P.toString()):_.push("")});const S=_.map(R=>`"${R.replaceAll('"','""')}"`);r.push(S.join(","))});const a=`${n}.csv`,u="\uFEFF"+r.join(`
285
+ `+nn:""}`)}at.length>0&&J([...D||[],...at])}},[J,Fe,r,t,ee,D,g]),ot=z.useCallback(()=>{var ut;return(ut=Ae.current)==null?void 0:ut.click()},[]),tt=z.useCallback(ut=>{const at=ut.target.files;at!=null&&at.length&&(Qe(at),Le())},[Qe,Le]),rt=z.useCallback(ut=>{if(l==null||l(ut),!J||!D)return;const at=Cd.getFileKey(ut),gt=D.filter(It=>Cd.getFileKey(It)!==at);J(gt),Le()},[l,J,D,Le]),dt=z.useCallback(()=>{J&&(J([]),Le())},[J,Le]),Mt=z.useCallback(ut=>{if(!i)return Promise.resolve();const at=Cd.getFileKey(ut);return K.current[at]==="Loading"?Promise.resolve():(Me(at,"Loading"),new Promise(gt=>{i(ut,(It,ln)=>{Me(at,It,ln),gt()})}))},[i,Me]),Bt=z.useCallback(async()=>{if(D!=null&&D.length){if(ne){const ut={...K.current},at={...he.current};D.forEach(gt=>{const It=Cd.getFileKey(gt);ut[It]="Loading",It in at&&delete at[It]}),K.current=ut,he.current=at,ne(ut),se(at)}if(S){S(D,(ut,at)=>{if(ne){const gt={...K.current,...ut};K.current=gt,ne(gt)}if(se&&at){const gt={...he.current,...at};he.current=gt,se(gt)}});return}for(const ut of D){if(!i)continue;const at=Cd.getFileKey(ut);await new Promise(gt=>{i(ut,(It,ln)=>{if(ne){const sn={...K.current};sn[at]=It,K.current=sn,ne(sn)}if(se&&ln!==void 0){const sn={...he.current};sn[at]=ln,he.current=sn,se(sn)}gt()})})}}},[D,i,S,ne,se]),Ft=z.useCallback(()=>{!(D!=null&&D.length)||!o||o(D)},[D,o]),Jt=z.useMemo(()=>{const ut=at=>(at.preventDefault(),at.stopPropagation(),at);return{onDragEnter:at=>{ut(at),!fe&&!x&&re(!0)},onDragOver:at=>{ut(at),!fe&&!x&&at.dataTransfer&&(at.dataTransfer.dropEffect="copy")},onDragLeave:at=>{var It;ut(at);const gt=(It=He.current)==null?void 0:It.contains(at.relatedTarget);(!at.relatedTarget||!gt)&&re(!1)},onDrop:at=>{var gt;ut(at),re(!1),!fe&&!x&&((gt=at.dataTransfer.files)!=null&&gt.length)&&Qe(at.dataTransfer.files)}}},[fe,x,Qe]),pn=z.useMemo(()=>{const ut=bt.clsx(pl.ButtonRenderer,"NoSelect");return{upload:at=>M.jsx(Ba,{className:ut,icon:"X",iconSize:"sm",style:{color:"var(--AFileUploader_text_color)"},tooltip:ee.Delete,type:"Raw",onClick:()=>rt(at)}),loading:at=>{const gt=ke(at),It=gt!==void 0?`${Math.round(gt*10)/10}%`:void 0;return M.jsx(Ba,{className:ut,icon:"Spinner",iconSize:"sm",tooltip:It,type:"Raw"})},error:at=>M.jsx(s9,{baseClass:ut,errorClass:pl.ErrorColor,errorCursorClass:pl.ErrorCursor,file:at,resources:ee,onDownload:Mt}),download:at=>M.jsx(Ba,{className:ut,icon:"FileDownload",iconSize:"sm",style:{color:"var(--AFileUploader_brand_color)"},tooltip:ee.Download,type:"Raw",onClick:()=>Mt(at)}),view:()=>null}},[ee,rt,Mt,ke]),zt=z.useCallback((ut,at)=>{const gt=Re(ut),It=ze(ut),ln=()=>a==="Upload"?pn.upload(ut):a==="View"?pn.view():gt?pn.loading(ut):It?pn.error(ut):pn.download(ut);return M.jsx(wm,{ButtonRenderer:ln,className:bt.clsx(pl.FileChip,It&&pl.ErrorBorder),label:M.jsx("div",{className:pl.FileChipContent,children:M.jsxs(vl,{className:pl.FileNameContainer,children:[M.jsx(nd,{children:ut.name,className:bt.clsx(It&&pl.ErrorColor)}),M.jsx("span",{children:Lg(ut.size),className:pl.FileSize})]})})},at)},[Re,ze,a,pn]),vn=z.useCallback(()=>M.jsx("div",{className:bt.clsx(pl.FileBox,fe&&pl.ErrorBorder,fe&&pl.ErrorColor,fe&&pl.ErrorCursor,ht&&pl.Disabled,j&&!(D!=null&&D.length)&&pl.FileBoxFullSize),...Jt,ref:He,children:j?M.jsxs(vl,{className:bt.clsx("NoSelect"),style:{gap:4,display:D!=null&&D.length?"flex":"none"},children:[M.jsx(uo,{icon:"FileDownload"}),M.jsx("span",{children:ee["Drop file to select"]})]}):M.jsxs(Ic,{className:bt.clsx(pl.SelectRenderer,"NoSelect"),isDisabled:fe||x||ht,type:"Raw",onClick:ot,children:[ee["Insert File"],g&&` ${(D==null?void 0:D.length)||0} / ${g}`]})}),[fe,ht,j,D==null?void 0:D.length,Jt,ee,x,ot,g]);z.useEffect(()=>{const ut=setTimeout(()=>{if(!(D!=null&&D.length)){ve(void 0);return}const at=D.filter(sn=>Re(sn));if(at.length===0){ve(void 0);return}let gt=0,It=0;if(at.forEach(sn=>{const nn=Cd.getFileKey(sn),Ue=ue[nn];typeof Ue=="number"&&(gt+=Ue,It+=1)}),It===0){ve(void 0);return}const ln=gt/It;ve(Math.round(ln*10)/10)},300);return()=>clearTimeout(ut)},[D,Re,ue]);const Ht=I!==void 0?I:ge,wn=z.useMemo(()=>{const ut=a==="Upload",at=a==="View",gt=ut?ee["Delete All"]:ee["Download All"],It=ut?dt:Bt,ln=(D==null?void 0:D.some(nn=>Re(nn)))||!1,sn=Ht!==void 0?`${Math.round(Ht*10)/10}%`:void 0;return M.jsxs(vl,{className:pl.LabelContainer,children:[Y.label,a==="Upload"&&M.jsxs(nd,{className:bt.clsx(pl.TotalFileSize,"NoSelect"),children:["(",M.jsx("span",{className:bt.clsx(fe&&pl.ErrorColor),children:Lg(xe)})," / ",Lg(u),")"]}),!at&&M.jsxs(vl,{style:{gap:4,alignItems:"center"},children:[M.jsx("span",{children:gt,style:{opacity:ln?.6:1},className:bt.clsx(pl.LabelButton,"Label1",(Xe||ln)&&pl.Disabled,ut&&pl.Delete),onClick:!Xe&&!ln?It:void 0}),!ut&&ln&&sn&&M.jsx("span",{className:bt.clsx("Caption1"),style:{color:"var(--AFileUploader_text_color)",opacity:.6,display:"flex",alignItems:"center"},children:sn})]}),o&&M.jsx("span",{children:ee["Download List"]||"Download List",className:bt.clsx(pl.LabelButton,"Label1",!(D!=null&&D.length)&&pl.Disabled),style:{marginLeft:"auto",opacity:D!=null&&D.length?1:.6},onClick:D!=null&&D.length?Ft:void 0})]})},[a,ee,dt,Bt,D,Y.label,fe,xe,u,Xe,o,Ft,Re,Ht]);return a!=="Upload"&&!(D!=null&&D.length)?null:M.jsxs(sg,{wrapId:P,wrapProps:H,labelProps:W,...Y,label:wn,children:[M.jsx("input",{ref:Ae,multiple:!0,accept:t||"",style:{display:"none"},type:"file",onChange:tt}),M.jsxs(Wi,{...B,className:bt.clsx(pl.AFileUploader,_),children:[M.jsxs(vl,{className:pl.ChipsContainer,children:[a==="Upload"&&vn(),D==null?void 0:D.map(zt)]}),a==="Upload"&&M.jsx(Wi,{className:bt.clsx(pl.DropIdle,"Title1","NoSelect"),style:{color:j?"var(--AFileUploader_brand_color)":"var(--AFileUploader_disabled_color)",opacity:j?1:.4},...Jt,abaseRef:He,onClick:ut=>ut.preventDefault(),children:!(D!=null&&D.length)&&M.jsxs(vl,{style:{gap:4},children:[M.jsx(uo,{icon:"FileDownload",size:"2xl"}),M.jsx("span",{children:ee["Drop file to select"]})]})})]})]})},c9="_AFloatMenu_xco8u_1",u9="_Content_xco8u_10",Q2={AFloatMenu:c9,Content:u9},H3=n=>{const e=Vn.c(67),{defs:t,defaultDef:r,actionRef:i,offset:o,onClose:l,onClick:a,onPaperClick:u,position:g,width:m}=n,x=g===void 0?O1.ES:g,w=m===void 0?137:m;let _;e[0]!==r?(_={content:f9,...r},e[0]=r,e[1]=_):_=e[1];const S=_;let R;e[2]!==S||e[3]!==t?(R={},rr.keys(t).forEach(Qe=>{const ot=t[Qe],tt={...S,...ot};tt.noDisplay||(R[Qe]=tt)}),e[2]=S,e[3]=t,e[4]=R):R=e[4];const I=R,[O,P]=z.useState(null);let H;e[5]!==o||e[6]!==x?(H=Qe=>{JC(Qe,J,x,o),P(Qe)},e[5]=o,e[6]=x,e[7]=H):H=e[7];const W=H,[Y,B]=z.useState(!1),[ee,D]=z.useState(!1),J=z.useRef(null);let fe;e[8]!==W?(fe=Qe=>{D(!0),setTimeout(()=>B(!0),0),setTimeout(()=>W(Qe),0)},e[8]=W,e[9]=fe):fe=e[9];const Z=fe;let te;e[10]!==l?(te=()=>{B(!1),D(!0),l==null||l()},e[10]=l,e[11]=te):te=e[11];const ne=te;let ue;e[12]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>D(!1),e[12]=ue):ue=e[12];const se=ue;let j;e[13]!==ne||e[14]!==u?(j=async Qe=>{const ot=document.getElementById("root"),tt=Qe.target,rt=J.current;!ot||!rt||!tt||!rt.contains(tt)&&ot.contains(tt)&&(await(u==null?void 0:u(Qe)),ne())},e[13]=ne,e[14]=u,e[15]=j):j=e[15];const re=j;let ge,ve;e[16]!==Y||e[17]!==re?(ge=()=>{if(Y)return setTimeout(()=>document.addEventListener("mousedown",re),0),()=>document.removeEventListener("mousedown",re)},ve=[Y,re],e[16]=Y,e[17]=re,e[18]=ge,e[19]=ve):(ge=e[18],ve=e[19]),z.useEffect(ge,ve);let oe;e[20]!==W||e[21]!==O?(oe=()=>{O&&W(O)},e[20]=W,e[21]=O,e[22]=oe):oe=e[22];const K=oe;let he,Ae;e[23]!==Y||e[24]!==O||e[25]!==K?(he=()=>{if(!Y||!O)return;let Qe=O.parentElement;for(;Qe;)Qe.addEventListener("scroll",K),Qe=Qe.parentElement;return()=>{let ot=O.parentElement;for(;ot;)ot.removeEventListener("scroll",K),ot=ot.parentElement}},Ae=[O,Y,K],e[23]=Y,e[24]=O,e[25]=K,e[26]=he,e[27]=Ae):(he=e[26],Ae=e[27]),z.useEffect(he,Ae);let He,xe;e[28]!==Y||e[29]!==K?(He=()=>{if(Y)return window.addEventListener("resize",K),()=>window.removeEventListener("resize",K)},xe=[Y,K],e[28]=Y,e[29]=K,e[30]=He,e[31]=xe):(He=e[30],xe=e[31]),z.useEffect(He,xe);let Fe;e[32]!==ne?(Fe=Qe=>{Qe[0].intersectionRatio===0&&ne()},e[32]=ne,e[33]=Fe):Fe=e[33];const Me=Fe;let Be;e[34]!==Y||e[35]!==Me?(Be=()=>{if(!Y)return;const Qe=new IntersectionObserver(Me,{threshold:0});return J.current&&Qe.observe(J.current),()=>Qe.disconnect()},e[34]=Y,e[35]=Me,e[36]=Be):Be=e[36];let ke;e[37]!==Y||e[38]!==Me?(ke=[J,Y,Me],e[37]=Y,e[38]=Me,e[39]=ke):ke=e[39],z.useEffect(Be,ke);let Re,ze;e[40]!==i||e[41]!==ne||e[42]!==Z?(Re=()=>{i&&(i.current={open:Z,close:ne})},ze=[i,Z,ne],e[40]=i,e[41]=ne,e[42]=Z,e[43]=Re,e[44]=ze):(Re=e[43],ze=e[44]),z.useEffect(Re,ze);let Xe;e[45]!==ne||e[46]!==I||e[47]!==a||e[48]!==Y?(Xe=Qe=>{var ot;if(Y){if((ot=I[Qe])!=null&&ot.isDisabled)return}else return;a==null||a(Qe),ne()},e[45]=ne,e[46]=I,e[47]=a,e[48]=Y,e[49]=Xe):Xe=e[49];const Le=Xe;if(!Y&&!ee)return null;let ht;if(e[50]!==S||e[51]!==I||e[52]!==Y||e[53]!==Le||e[54]!==w){const Qe=+Y,ot=Y&&Object.keys(I).length>0?"visible":"hidden";let tt;e[56]!==Qe||e[57]!==ot||e[58]!==w?(tt={opacity:Qe,visibility:ot,minWidth:w},e[56]=Qe,e[57]=ot,e[58]=w,e[59]=tt):tt=e[59];let rt;e[60]!==S||e[61]!==I||e[62]!==Le?(rt=rr.map(I,(Mt,Bt)=>{const[Ft]=Mt,Jt={...S,...I[Ft]};let{content:pn,noDisplay:zt,tooltipDirection:vn,...Ht}=Jt;const wn=vn===void 0?ic.E:vn;return zt?null:(pn=Vr.getContent(Jt.content,{defKey:Ft,def:Jt}),z.createElement(Wi,{...Ht,key:Bt,className:bt.clsx(Q2.Content,"Label2","IsClickable",Ht.className),tooltipDirection:wn,onClick:ut=>{var at;Le==null||Le(Ft),(at=Ht.onClick)==null||at.call(Ht,ut)}},pn))}),e[60]=S,e[61]=I,e[62]=Le,e[63]=rt):rt=e[63];let dt;e[64]!==tt||e[65]!==rt?(dt=M.jsx("div",{ref:J,className:Q2.AFloatMenu,style:tt,onTransitionEnd:se,children:rt}),e[64]=tt,e[65]=rt,e[66]=dt):dt=e[66],ht=su.createPortal(dt,document.body),e[50]=S,e[51]=I,e[52]=Y,e[53]=Le,e[54]=w,e[55]=ht}else ht=e[55];return ht},f9=n=>n.defKey;function h9(n){try{const e=Number.parseInt(n);return isNaN(e)?void 0:e}catch{return}}const G0={parseInt:h9},d9=`${Number.MAX_SAFE_INTEGER}`.length-1,g9=n=>{const e=Vn.c(58);let t,r,i,o,l,a,u,g,m,x,w,_,S;if(e[0]!==n){const{unit:Be,unitMargin:ke,unitOptions:Re,useSelectUnit:ze,type:Xe,min:Le,max:ht,unitSelectWidth:Qe,unitOptionsRenderer:ot,useValue:tt,onEnterPress:rt,canAsterisk:dt,onFocus:Mt,...Bt}=n;g=Be,l=ke,m=Re,_=ze,a=Xe,o=Le,i=ht,w=Qe,x=ot,S=tt,r=rt,u=dt,t=Bt,e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=g,e[9]=m,e[10]=x,e[11]=w,e[12]=_,e[13]=S}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],g=e[8],m=e[9],x=e[10],w=e[11],_=e[12],S=e[13];const R=l===void 0?4:l,I=a===void 0?"Secondary":a,O=i!==void 0&&o!==void 0?Math.max(`${i}`.length+1,`${o}`.length+1):d9,[P,H]=Do(S,""),[W,Y]=z.useState(!1),[B,ee]=z.useState(""),D=z.useRef(null);let J;e:{if(!P||!H){J=String(P);break e}const Be=String(P),ke=G0.parseInt(Be);if(ke!==void 0){if(o!==void 0&&ke<o){const Re=`${o}`;H(Re),J=Re;break e}if(i!==void 0&&ke>i){const Re=`${i}`;H(Re),J=Re;break e}}J=Be}const fe=J;let Z;e[14]!==W||e[15]!==i||e[16]!==H?(Z=Be=>{if(W){if(i!==void 0&&Be!==""){const ke=G0.parseInt(Be);if(ke!==void 0&&ke>i){ee(`${i}`);return}}ee(Be)}else H&&H(Be)},e[14]=W,e[15]=i,e[16]=H,e[17]=Z):Z=e[17];const te=Z;let ne;e[18]!==fe?(ne=()=>{Y(!0),ee(fe)},e[18]=fe,e[19]=ne):ne=e[19];const ue=ne;let se;e[20]!==i||e[21]!==o||e[22]!==H?(se=Be=>{if(Y(!1),!H)return;const ke=Be.target.value;let Re=ke;if(ke===""||ke==="-")Re=o!==void 0?`${o}`:ke;else{const ze=G0.parseInt(ke);ze===void 0?Re=o!==void 0?`${o}`:ke:o!==void 0&&ze<o?Re=`${o}`:i!==void 0&&ze>i&&(Re=`${i}`)}Re!==ke&&(Be.target.value=Re),H(Re)},e[20]=i,e[21]=o,e[22]=H,e[23]=se):se=e[23];const j=se;let re;e[24]!==r?(re=Be=>{var ke;(ke=D.current)==null||ke.blur(),r==null||r(Be)},e[24]=r,e[25]=re):re=e[25];const ge=re,ve=o===void 0&&i===void 0?g??"number":`${o??""}~${i??""}`,[oe,K]=Do(_,(m==null?void 0:m[0])??"");let he;if(m){const Be=w||"fit-content";let ke;e[26]!==Be?(ke={maxWidth:Be},e[26]=Be,e[27]=ke):ke=e[27];let Re;e[28]!==K||e[29]!==oe?(Re=[oe,K],e[28]=K,e[29]=oe,e[30]=Re):Re=e[30];let ze;e[31]!==R?(ze={style:{color:"var(--label-normal)",marginLeft:4,marginRight:R}},e[31]=R,e[32]=ze):ze=e[32];let Xe;e[33]!==ke||e[34]!==Re||e[35]!==ze||e[36]!==m||e[37]!==x?(Xe=M.jsx(Ed,{className:ou.ANumInputUnitSelect,OptionRenderer:x,options:m,style:ke,type:"Raw",useSelect:Re,arrowProps:ze}),e[33]=ke,e[34]=Re,e[35]=ze,e[36]=m,e[37]=x,e[38]=Xe):Xe=e[38],he=Xe}else{let Be;e[39]!==g||e[40]!==R?(Be=g&&M.jsx("span",{style:{marginRight:R},children:g}),e[39]=g,e[40]=R,e[41]=Be):Be=e[41],he=Be}const Ae=he;let He;e[42]!==n.className?(He=bt.clsx(ou.ANumInput,n.className),e[42]=n.className,e[43]=He):He=e[43];const xe=W?B:fe;let Fe;e[44]!==te||e[45]!==xe?(Fe=[xe,te],e[44]=te,e[45]=xe,e[46]=Fe):Fe=e[46];let Me;return e[47]!==t||e[48]!==O||e[49]!==j||e[50]!==ge||e[51]!==ue||e[52]!==ve||e[53]!==Fe||e[54]!==He||e[55]!==I||e[56]!==Ae?(Me=M.jsx(ag,{...t,autoComplete:"off",className:He,inputRef:D,maxLength:O,placeholder:ve,RightAddon:Ae,type:I,useValue:Fe,onBlur:j,onEnterPress:ge,onFocus:ue}),e[47]=t,e[48]=O,e[49]=j,e[50]=ge,e[51]=ue,e[52]=ve,e[53]=Fe,e[54]=He,e[55]=I,e[56]=Ae,e[57]=Me):Me=e[57],Me},p9="_AListView_1nv5l_1",v9="_Row_1nv5l_10",b9="_Label_1nv5l_19",y9="_Content_1nv5l_29",h0={AListView:p9,Row:v9,Label:b9,Content:y9},m9=n=>{const e=Vn.c(50);let t,r,i,o,l,a,u,g,m,x,w,_,S,R,I,O,P,H,W;if(e[0]!==n){const{defs:D,defaultDef:J,item:fe,rowHeight:Z,labelWidth:te,noBorder:ne,onlyMiddleBorder:ue,rowGap:se,middleBorder:j,rowBottomBorder:re,outerBorder:ge,style:ve,labelClassName:oe,contentClassName:K,labelStyle:he,contentStyle:Ae,isPending:He,...xe}=n;g=fe,O=Z,w=te,I=se,P=ve,m=oe,i=K,x=he,o=Ae,u=He,S=ne||ue,r=S?"":re||"var(--AListView_border-thin)",R=S?"":ge||"var(--AListView_border-thick)",_=ne?"":j||"var(--AListView_border-thick)";let Fe;e[20]!==J?(Fe={content:w9,label:x9,...J},e[20]=J,e[21]=Fe):Fe=e[21],l=Fe;let Me;e[22]!==l||e[23]!==D?(Me={},rr.keys(D).forEach(Be=>{const ke=D[Be],Re={...l,...ke};Me[Be]=Re}),e[22]=l,e[23]=D,e[24]=Me):Me=e[24],a=Me,t=Wi,H=xe,W=bt.clsx(h0.AListView,xe.className),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=g,e[9]=m,e[10]=x,e[11]=w,e[12]=_,e[13]=S,e[14]=R,e[15]=I,e[16]=O,e[17]=P,e[18]=H,e[19]=W}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],g=e[8],m=e[9],x=e[10],w=e[11],_=e[12],S=e[13],R=e[14],I=e[15],O=e[16],P=e[17],H=e[18],W=e[19];let Y;e[25]!==r||e[26]!==P?(Y={...P,borderTop:r},e[25]=r,e[26]=P,e[27]=Y):Y=e[27];let B;e[28]!==r||e[29]!==i||e[30]!==o||e[31]!==l||e[32]!==a||e[33]!==u||e[34]!==g||e[35]!==m||e[36]!==x||e[37]!==w||e[38]!==_||e[39]!==S||e[40]!==R||e[41]!==I||e[42]!==O?(B=rr.map(a,(D,J)=>{const[fe]=D,Z={...l,...a[fe]},te=Vr.getContent(Z.label,{defKey:fe,item:g,def:Z}),ne=Vr.getContent(Z.content,{defKey:fe,item:g||{[fe]:""},def:Z}),ue=Vr.getContent(Z.bold||"label",{defKey:fe,item:g,def:Z}),se=Z.height??O,j=Z.height===void 0;return M.jsxs("div",{className:h0.Row,style:{minHeight:se,...!j&&{height:se,maxHeight:se},borderBottom:r,marginTop:J===0?0:typeof I=="number"?`${I}px`:I},children:[M.jsx("div",{className:bt.clsx(h0.Label,"NoSelect",ue!=="content"&&"Bold",m),style:{width:w,minWidth:w,maxWidth:w,borderLeft:R,paddingLeft:S?0:10,...x},children:M.jsx(nd,{children:te})}),M.jsx("div",{className:bt.clsx(h0.Content,ue!=="label"&&"Bold",i),style:{borderLeft:_,borderRight:R,...o},children:M.jsx(nd,{isPending:u,style:{width:"100%",padding:S?0:10},children:u?null:ne})})]},fe)}),e[28]=r,e[29]=i,e[30]=o,e[31]=l,e[32]=a,e[33]=u,e[34]=g,e[35]=m,e[36]=x,e[37]=w,e[38]=_,e[39]=S,e[40]=R,e[41]=I,e[42]=O,e[43]=B):B=e[43];let ee;return e[44]!==t||e[45]!==H||e[46]!==W||e[47]!==Y||e[48]!==B?(ee=M.jsx(t,{...H,className:W,style:Y,children:B}),e[44]=t,e[45]=H,e[46]=W,e[47]=Y,e[48]=B,e[49]=ee):ee=e[49],ee},x9=n=>n.defKey,w9=n=>{const{defKey:e,item:t}=n;if(t)if(rr.hasKey(t,e)){const r=t[e];return rr.isReactNode(r)?r:null}else return null;else return null},C9="_ALoadingBorder_kwc1g_1",_9="_ProgressBar_kwc1g_9",S9="_IsLoading_kwc1g_15",T9="_Cover_kwc1g_19",ep={ALoadingBorder:C9,ProgressBar:_9,IsLoading:S9,Cover:T9},Em=n=>{const e=Vn.c(15),{isLoading:t}=n,[r,i]=z.useState(!1),o=z.useRef(null);let l,a;e[0]!==t?(l=()=>{t?(i(!0),o.current&&clearTimeout(o.current)):o.current=setTimeout(()=>i(!1),300)},a=[t],e[0]=t,e[1]=l,e[2]=a):(l=e[1],a=e[2]),z.useEffect(l,a);let u;e[3]!==r?(u=bt.clsx(ep.ProgressBar,r&&ep.IsLoading),e[3]=r,e[4]=u):u=e[4];let g;e[5]!==u?(g=M.jsx("div",{className:u}),e[5]=u,e[6]=g):g=e[6];let m;e[7]!==t?(m=bt.clsx(ep.Cover,t&&ep.IsLoading),e[7]=t,e[8]=m):m=e[8];let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x={transition:"all 300ms"},e[9]=x):x=e[9];let w;e[10]!==m?(w=M.jsx("div",{className:m,style:x}),e[10]=m,e[11]=w):w=e[11];let _;return e[12]!==g||e[13]!==w?(_=M.jsxs("div",{className:ep.ALoadingBorder,children:[g,w]}),e[12]=g,e[13]=w,e[14]=_):_=e[14],_},A9="_Container_ez8dc_1",E9="_Option_ez8dc_7",R9="_RadioButton_ez8dc_14",I9="_InnerCircle_ez8dc_24",k9="_isChecked_ez8dc_29",c1={Container:A9,Option:E9,RadioButton:R9,InnerCircle:I9,isChecked:k9},M9=n=>{const{options:e,useSelect:t,selectDisabled:r,radius:i=23,innerRadius:o=i*.6,OptionRenderer:l=W3}=n,[a,u]=Do(t,e[0]);return M.jsx("div",{className:c1.Container,children:e.map((g,m)=>{const x=r==null?void 0:r(g),w=()=>x?null:u==null?void 0:u(g);return M.jsxs(vl,{className:bt.clsx(c1.Option,"IsClickable"),isDisabled:x,onClick:w,children:[M.jsx(L9,{innerRadius:o,isChecked:a===g,radius:i},m),M.jsx(l,{option:g})]},m)})})},W3=({option:n})=>n,L9=n=>{const e=Vn.c(15),{isChecked:t,radius:r,innerRadius:i}=n;let o;e[0]!==t?(o=bt.clsx(c1.RadioButton,t&&c1.isChecked),e[0]=t,e[1]=o):o=e[1];let l;e[2]!==r?(l={width:r,height:r},e[2]=r,e[3]=l):l=e[3];let a;e[4]!==t?(a=bt.clsx(c1.InnerCircle,t&&c1.isChecked),e[4]=t,e[5]=a):a=e[5];let u;e[6]!==i?(u={width:i,height:i},e[6]=i,e[7]=u):u=e[7];let g;e[8]!==a||e[9]!==u?(g=M.jsx(Wi,{className:a,style:u}),e[8]=a,e[9]=u,e[10]=g):g=e[10];let m;return e[11]!==o||e[12]!==l||e[13]!==g?(m=M.jsx(Wi,{className:o,style:l,children:g}),e[11]=o,e[12]=l,e[13]=g,e[14]=m):m=e[14],m},O9="_AMultiSelect_19uuu_1",P9="_Arrow_19uuu_15",D9="_Primary_19uuu_24",N9="_UnAvailable_19uuu_35",F9="_IsOpen_19uuu_35",B9="_Secondary_19uuu_42",z9="_Placeholder_19uuu_58",H9="_ValuesContainer_19uuu_63",W9="_Values_19uuu_63",U9="_Options_19uuu_82",G9="_Option_19uuu_82",Y9="_Selected_19uuu_124",V9="_CheckBox_19uuu_131",sf={AMultiSelect:O9,Arrow:P9,Primary:D9,UnAvailable:N9,IsOpen:F9,Secondary:B9,Placeholder:z9,ValuesContainer:H9,Values:W9,Options:U9,Option:G9,Selected:Y9,CheckBox:V9},Z9=n=>{const{options:e,useSelect:t,type:r="Primary",placeholder:i=Nr.AMultiSelect["Select(Placeholder)"],onClose:o,SelectedRenderer:l=K9,OptionRenderer:a=J9,minShowRows:u=2,maxShowRows:g=6,arrowProps:m,isAutoWidth:x=!1,...w}=n,_=z.useRef(null),S=z.useMemo(()=>w.abaseRef??_,[w.abaseRef]),R=z.useRef(null),[I,O]=Do(t,[]),[P,H]=z.useState(void 0),W=z.useRef(e),Y=z.useRef(null),[B,ee]=z.useState(!1),[D,J]=z.useState(!1),fe=z.useCallback(()=>J(!1),[]),Z=z.useCallback(()=>{w.isDisabled||w.isLoading||e.length<1||(J(!0),setTimeout(()=>ee(!0),0),setTimeout(()=>lb(R,S,e,u,g),0))},[S,w.isDisabled,w.isLoading,e,u,g]),te=z.useCallback(()=>{ee(!1),J(!0),o==null||o()},[o]),ne=z.useCallback(oe=>{var K;B?te():Z(),setTimeout(()=>lb(R,S,e,u,g),0),(K=w.onClick)==null||K.call(w,oe)},[S,w,e,B,te,Z,u,g]),ue=z.useCallback(()=>{lb(R,S,e,u,g)},[S,e,u,g]);z.useEffect(()=>{if(!B||!S.current)return;const oe=S.current;let K=oe.parentElement;for(;K;)K.addEventListener("scroll",ue),K=K.parentElement;return()=>{let he=oe.parentElement;for(;he;)he.removeEventListener("scroll",ue),he=he.parentElement}},[S,B,ue]),z.useEffect(()=>{if(B)return window.addEventListener("resize",ue),()=>window.removeEventListener("resize",ue)},[B,ue]);const se=z.useCallback(oe=>{oe[0].intersectionRatio===0&&te()},[te]);z.useEffect(()=>{if(!B)return;const oe=new IntersectionObserver(se,{threshold:0});return S.current&&oe.observe(S.current),()=>oe.disconnect()},[S,B,se]);const j=z.useCallback(oe=>{const K=oe.target,he=S.current,Ae=R.current;!he||!K||!Ae||!he.contains(K)&&!Ae.contains(K)&&te()},[S,te]),re=z.useMemo(()=>w.isDisabled||w.isLoading||e.length<1,[w.isDisabled,w.isLoading,e]);z.useEffect(()=>{if(B)return setTimeout(()=>document.addEventListener("mousedown",j),0),()=>document.removeEventListener("mousedown",j)},[B,j]);const ge=z.useCallback((oe,K)=>{oe.stopPropagation(),oe.preventDefault();let he=[...I];he.includes(K)?he=he.filter(Ae=>Ae!==K):he.push(K),O==null||O(he)},[I,O]),ve=z.useCallback(()=>{if(!x||!S.current)return;const oe=Mg.calculateOptimalSelectWidth({elementRef:S,options:e,selectedOptions:I,placeholder:i,optionRenderer:K=>a({option:K}),type:r,isMulti:!0});H(oe)},[x,S,e,I,i,a,r]);return z.useEffect(()=>x?((e!==W.current||P===void 0)&&(Y.current!==null&&cancelAnimationFrame(Y.current),Y.current=requestAnimationFrame(()=>{ve(),Y.current=null,W.current=[...e]})),()=>{Y.current!==null&&(cancelAnimationFrame(Y.current),Y.current=null)}):void 0,[x,e,ve,P]),z.useEffect(()=>()=>{typeof Mg.clearCache=="function"&&Mg.clearCache()},[]),M.jsxs(M.Fragment,{children:[M.jsxs(Wi,{...w,abaseRef:S,isDisabled:w.isDisabled||e.length<1,className:bt.clsx(w.className,sf.AMultiSelect,"NoSelect",B&&sf.IsOpen,re&&sf.UnAvailable,sf[r]),style:{padding:r==="Secondary"?"8px 8px 8px 0":0,width:P?`${P}px`:x?"100px":void 0,...w.style},onClick:ne,children:[M.jsx("div",{className:sf.ValuesContainer,children:M.jsx("div",{className:bt.clsx(sf.Values,I.length<1&&sf.Placeholder),children:M.jsx(l,{OptionRenderer:a,placeholder:i,selectedOptions:I})})}),M.jsx("div",{...m,className:bt.clsx(sf.Arrow,m==null?void 0:m.className),children:M.jsx(uo,{icon:"TriangleDown",style:{transform:B?"rotate(180deg)":"",transition:"var(--Transition)"}})})]}),e.length>0&&(B||D)&&su.createPortal(M.jsx("div",{ref:R,className:bt.clsx(sf.Options,sf[r]),style:{opacity:+B,visibility:B?"visible":"hidden",pointerEvents:B?void 0:"none",width:P?`${P}px`:x?"100px":void 0,borderRadius:S.current?window.getComputedStyle(S.current).borderRadius:void 0},onTransitionEnd:fe,children:e.map((oe,K)=>{var Ae;const he=I.includes(oe);return M.jsxs("div",{className:bt.clsx(sf.Option,he&&sf.Selected,"NoSelect",sf[r]),style:{height:(Ae=S.current)==null?void 0:Ae.getBoundingClientRect().height},onClick:He=>ge(He,oe),children:[M.jsx(w1,{className:sf.CheckBox,useCheck:[+he,void 0]}),M.jsx(a,{option:oe})]},K)})}),document.body)]})};function lb(n,e,t,r,i){if(!e.current||!n.current||!t||t.length<1)return;const o=e.current.getBoundingClientRect(),l=X9(o,t.length,r,i),a=window.getComputedStyle(e.current);n.current.style.top=`calc(${l.top??0}px - ${a.borderTopWidth})`,n.current.style.bottom=l.bottom?l.bottom+"px":"",n.current.style.left=l.left+"px",n.current.style.width||(n.current.style.minWidth=l.minWidth+"px"),n.current.style.minHeight=l.minHeight+"px",n.current.style.maxHeight=l.maxHeight+"px",n.current.style.visibility="visible"}function X9(n,e,t,r){const i={top:n.bottom,bottom:void 0,left:n.left,height:"fit-content",minWidth:n.width,minHeight:n.height*Math.min(t,e),maxHeight:n.height*r>window.innerHeight-n.bottom-10?window.innerHeight-n.bottom-10:n.height*r};return window.innerHeight-n.bottom-10<i.height&&(window.innerHeight-n.bottom-10<i.minHeight?(i.top=n.top-e*n.height,i.top<0&&(i.top=10,i.minHeight=n.top-10,i.height=n.top-10)):i.height=window.innerHeight-n.bottom-10),i}const K9=n=>{const e=Vn.c(3),{OptionRenderer:t,selectedOptions:r,placeholder:i}=n;if(r.length<1)return i;if(r.length===1){let o;return e[0]!==t||e[1]!==r[0]?(o=M.jsx(t,{option:r[0]}),e[0]=t,e[1]=r[0],e[2]=o):o=e[2],o}else return`${r.length} selected`},J9=n=>{const{option:e}=n;return rr.isReactNode(e)?e:null},Q9="_Container_10ion_1",q9="_Steps_10ion_9",j9="_Step_10ion_9",$9="_OutCircle_10ion_26",eI="_IsOver_10ion_37",tI="_InCircle_10ion_41",nI="_Line_10ion_54",rI="_Left_10ion_66",iI="_Right_10ion_69",oI="_ContentContainer_10ion_73",lI="_Content_10ion_73",ku={Container:Q9,Steps:q9,Step:j9,OutCircle:$9,IsOver:eI,InCircle:tI,Line:nI,Left:rI,Right:iI,ContentContainer:oI,Content:lI},sI=n=>{const e=Vn.c(26),{useSelect:t,steps:r,StepRenderer:i,ContentRenderer:o}=n,l=i===void 0?q2:i,a=o===void 0?q2:o;if(r.length===0)throw new Error("steps should have at least one element");const u=z.useRef(null),[g,m]=Do(t,r[0]);let x;e[0]!==m?(x=Y=>m==null?void 0:m(Y),e[0]=m,e[1]=x):x=e[1];const w=x,_=r.indexOf(g);let S;e[2]!==_||e[3]!==w||e[4]!==r[0]?(S=()=>{_<0&&w(r[0])},e[2]=_,e[3]=w,e[4]=r[0],e[5]=S):S=e[5];let R;e[6]!==_||e[7]!==w||e[8]!==r?(R=[_,r,w],e[6]=_,e[7]=w,e[8]=r,e[9]=R):R=e[9],z.useEffect(S,R);let I;e[10]!==l||e[11]!==_||e[12]!==w||e[13]!==r?(I=r.map((Y,B)=>{const ee=r.indexOf(Y),D=_>=B,J=_>B;return M.jsxs("div",{className:ku.Step,children:[B!==0&&M.jsx("div",{className:bt.clsx(ku.Line,ku.Left,D&&ku.IsOver)}),B!==r.length-1&&M.jsx("div",{className:bt.clsx(ku.Line,ku.Right,J&&ku.IsOver)}),M.jsx(Ic,{className:bt.clsx(ku.OutCircle,D&&ku.IsOver),type:"Raw",onClick:()=>w(Y),children:M.jsx("div",{className:bt.clsx(ku.InCircle,D&&ku.IsOver)})}),M.jsx(l,{step:Y,stepIdx:ee})]},B)}),e[10]=l,e[11]=_,e[12]=w,e[13]=r,e[14]=I):I=e[14];let O;e[15]!==I?(O=M.jsx("div",{className:ku.Steps,children:I}),e[15]=I,e[16]=O):O=e[16];let P;e[17]!==a||e[18]!==_||e[19]!==r?(P=r.map((Y,B)=>{const ee=r.indexOf(Y);return M.jsx("div",{className:ku.Content,style:B===0?{marginLeft:`${_*-100}%`}:{},children:M.jsx(a,{step:Y,stepIdx:ee})},B)}),e[17]=a,e[18]=_,e[19]=r,e[20]=P):P=e[20];let H;e[21]!==P?(H=M.jsx("div",{ref:u,className:ku.ContentContainer,children:P}),e[21]=P,e[22]=H):H=e[22];let W;return e[23]!==O||e[24]!==H?(W=M.jsxs("div",{className:ku.Container,children:[O,H]}),e[23]=O,e[24]=H,e[25]=W):W=e[25],W},q2=n=>{const{step:e}=n;return typeof e=="object"?rr.stringify(e):e},aI="_ATab_9eg6z_1",cI="_Addon_9eg6z_9",uI="_Option_9eg6z_14",fI="_Underline_9eg6z_26",hI="_IsSelected_9eg6z_26",dI="_IndicatorTrack_9eg6z_37",gI="_Indicator_9eg6z_37",pI="_Primary_9eg6z_54",vI="_Secondary_9eg6z_57",bI="_IsDisabled_9eg6z_63",yI="_Tertiary_9eg6z_77",mI="_Quaternary_9eg6z_101",Xh={ATab:aI,Addon:cI,Option:uI,Underline:fI,IsSelected:hI,IndicatorTrack:dI,Indicator:gI,Primary:pI,Secondary:vI,IsDisabled:bI,Tertiary:yI,Quaternary:mI},xI=["Primary","Secondary","Tertiary","Quaternary"],U3=n=>{const{options:e,useSelect:t,selectDisabled:r,type:i="Primary",tabProps:o,optionProps:l,optionWidth:a,OptionRenderer:u=wI,RightAddon:g,LeftAddon:m,color:x,selectedColor:w,underline:_,indicatorProps:S,indicatorTrackProps:R,height:I=40}=n;if(e.length===0)throw new Error("options should have at least one element");const O=z.useMemo(()=>e.findIndex(Me=>!(r!=null&&r(Me))),[e,r]),P=i==="Tertiary",H=i==="Secondary",W=P?I*.1:0,Y=H?8:0,B=z.useMemo(()=>W+Y,[W,Y]),ee=z.useMemo(()=>(Y-W)/e.length,[e.length,W,Y]),[D,J]=Do(t,e[O]),fe=z.useRef([]),Z=z.useCallback(Me=>J==null?void 0:J(Me),[J]),te=z.useMemo(()=>typeof a=="number"?a+"px":a,[a]),ne=z.useMemo(()=>e.indexOf(D),[e,D]),ue=z.useMemo(()=>`calc(${100/e.length}% + ${ee}px)`,[e.length,ee]),se=z.useMemo(()=>te||`calc(${ue} - ${B}px)`,[ue,B,te]),[j,re]=z.useState(0),[ge,ve]=z.useState(0),[oe,K]=z.useState(se),he=z.useRef(null),Ae=z.useRef(null),He=KC(Ae,he),xe=z.useMemo(()=>{let Me;switch(te){case void 0:Me=`calc(${ue} * ${ne})`;break;case"fit-content":Me=`calc(${j}px)`;break;default:Me=`calc((${te} + ${B}px) * ${ne})`;break}return Me},[te,ue,ne,j,B]),Fe=z.useMemo(()=>{switch(te){case void 0:return;case"fit-content":return`calc(${ge}px)`;default:return`calc((${te} + ${B}px - ${ee}px) * ${e.length})`}},[te,ee,B,e,ge]);return z.useEffect(()=>{var Be,ke;if(e.includes(D)||J==null||J(e[O]),te!=="fit-content"){K(se);return}let Me=0;fe.current.forEach((Re,ze)=>{ze<ne&&Re.current&&(Me+=Re.current.offsetWidth+B)}),re(Me),K(`calc(${((ke=(Be=fe.current[ne])==null?void 0:Be.current)==null?void 0:ke.offsetWidth)||0}px)`),ve(fe.current.reduce((Re,ze)=>{var Xe;return Re+((((Xe=ze.current)==null?void 0:Xe.offsetWidth)||0)+B-ee)},0))},[te,fe,e,D,J,O,ee,B,ne,se]),M.jsxs("div",{ref:he,...o,className:bt.clsx(Xh.ATab,"Headline2",Xh[i],o==null?void 0:o.className),style:{minHeight:I,height:I,maxHeight:I},children:[m&&M.jsx("div",{ref:Ae,className:Xh.Addon,children:m}),M.jsx("div",{...S,className:bt.clsx(Xh.Indicator,S==null?void 0:S.className),style:{minWidth:oe,left:xe,marginLeft:W,transform:`translate(${He??0}px, ${P?"-50%":"0"})`,height:P?I-W*2:void 0,...S==null?void 0:S.style}}),M.jsx("div",{...R,className:bt.clsx(Xh.IndicatorTrack,R==null?void 0:R.className),style:{width:Fe,marginLeft:P?He:0,height:I,...R==null?void 0:R.style}}),e.map((Me,Be)=>{const ke=r==null?void 0:r(Me);return fe.current[Be]||(fe.current[Be]=z.createRef()),M.jsx(Wi,{abaseRef:fe.current[Be],...l,isDisabled:ke,className:bt.clsx(Xh.Option,ke&&Xh.IsDiabled,Me===D&&Xh.IsSelected,"IsClickable",_&&Xh.Underline,l==null?void 0:l.className),style:{minWidth:se,maxWidth:se,marginLeft:W,marginRight:Y,"--color":Me===D&&w||x,height:I,...l==null?void 0:l.style},onClick:Re=>{!ke&&Z(Me),l&&l.onClick&&l.onClick(Re)},children:M.jsx(u,{option:Me})},Be)}),M.jsx(cs,{w:W}),g&&M.jsxs(M.Fragment,{children:[M.jsx(Hg,{}),M.jsx("div",{className:Xh.Addon,children:g})]})]})},wI=n=>{const{option:e}=n;if(typeof e=="string")return e;if(typeof e=="number")return e;if(typeof e=="object"){if(e===null)return"";const t=rr.keys(e);return"name"in t?e.name:"label"in t?e.label:"value"in t?e.value:JSON.stringify(e)}else return JSON.stringify(e)};function G3(...n){const e=Vn.c(3),t=n,r=z.useRef(!1);let i,o;e[0]!==t?(i=()=>{r.current||(r.current=!0,t.forEach(CI))},o=[t],e[0]=t,e[1]=i,e[2]=o):(i=e[1],o=e[2]),z.useEffect(i,o)}function CI(n){return n()}const Y3={String:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;if(t==="")return rr.keys(e).some(m=>{const x=e[m],w=Vr.getContent(x.asText,{defKey:m,def:x,item:n});if(w!==void 0)return w.toString().toLowerCase().includes(i.toLowerCase());const _=Vr.getContent(x.content,{defKey:m,def:x,item:n});return["string","number"].includes(typeof _)&&_!==void 0&&_!==null?_.toString().toLowerCase().includes(i.toLowerCase()):!1});const o=rr.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Vr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0)return u.toString().toLowerCase().includes(i.toLowerCase());const g=Vr.getContent(a.content,{defKey:l,def:a,item:n});return["string","number"].includes(typeof g)&&g!==void 0&&g!==null?g.toString().toLowerCase().includes(i.toLowerCase()):!1},Select:(n,e,t,r)=>{const{value:i}=r;if(i==null)return!1;const o=rr.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Vr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0)return i.toString().toLowerCase()===u.toString().toLowerCase();const g=Vr.getContent(a.content,{defKey:l,def:a,item:n});return["string","number"].includes(typeof g)&&g!==void 0&&g!==null?i.toString().toLowerCase()===g.toString().toLowerCase():!1},Date:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;const o=rr.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Vr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0){const m=Yn.toDate(u.toString());return m&&Yn.eq(m,i)}const g=Vr.getContent(a.content,{defKey:l,def:a,item:n});if(["string","number"].includes(typeof g)&&g!==void 0&&g!==null){const m=Yn.toDate(g.toString());return m&&Yn.eq(m,i)}return!1},DateRange:(n,e,t,r)=>{const{value:i}=r;if(i===void 0)return!1;const o=rr.keys(e),l=t;if(!o.includes(l))return!1;const a=e[l],u=Vr.getContent(a.asText,{defKey:l,def:a,item:n});if(u!==void 0){const m=Yn.toDate(u.toString());return m&&Yn.be(i.sDate,m,i.eDate)}const g=Vr.getContent(a.content,{defKey:l,def:a,item:n});if(["string","number"].includes(typeof g)&&g!==void 0&&g!==null){const m=Yn.toDate(g.toString());return m&&Yn.be(i.sDate,m,i.eDate)}return!1}},_I=(n,e,t)=>{let r=n;return rr.keys(t).forEach(o=>{const l=t[o];l.value===void 0||l.value===null||l.value===""||(r=r.filter(a=>{var u;return(u=l.predicate??Y3[l.type])==null?void 0:u(a,e,o,l)}))}),r},SI=(n,e,t)=>{if(!t)return n;const r=t.defKey,i=e[r];if(r===void 0)return n;const o=t.sortF??((l,a)=>{const u=Vr.getContent(i.content,{defKey:r,def:i,item:l}),g=Vr.getContent(i.content,{defKey:r,def:i,item:a});return typeof u=="string"&&typeof g=="string"?u<g?-1:u>g?1:0:typeof u=="number"&&typeof g=="number"?u-g:typeof u=="string"&&typeof g=="number"?-1:typeof u=="number"&&typeof g=="string"||u===void 0&&g!==void 0?1:u!==void 0&&g===void 0?-1:0});return typeof o=="function"&&o.length>=3?n.slice().sort((l,a)=>o(l,a,t.isAsc)):n.slice().sort((l,a)=>{const u=o(l,a);return t.isAsc?u:-u})},TI=(n,e,t)=>n.slice((e-1)*t,e*t),V3=(n,e)=>{const t=Math.max(Math.ceil(n/e),1);return Array.from({length:t},(r,i)=>i+1)},AI=(n,e,t,r)=>{const i=V3(e,t),o=Math.floor((n-1)/r),l=o*r+1,a=(o+1)*r,u=i.slice(l-1,a);return{pages:i,rangedPages:u}},EI=(n,e,t)=>{const r=[],i=Object.keys(t),o=[];i.forEach(w=>{const _=t[w],S=Vr.getContent(_.hContent,{defKey:w,def:_});if(S!==void 0){if(typeof S=="string"){o.push(S);return}else if(typeof S=="number"){o.push(S.toString());return}}const R=Vr.getContent(_.name,{defKey:w,def:_});if(R!==void 0&&typeof R=="string"){o.push(R);return}o.push(w)});const l=o.map(w=>`"${w.replaceAll('"','""')}"`);r.push(l.join(",")),e.forEach(w=>{const _=[];i.forEach(R=>{const I=t[R],O=Vr.getContent(I.content,{defKey:R,def:I,item:w});if(O!==void 0){if(typeof O=="string"){_.push(O);return}else if(typeof O=="number"){_.push(O.toString());return}}const P=w[R];typeof P=="string"?_.push(P):typeof P=="number"?_.push(P.toString()):_.push("")});const S=_.map(R=>`"${R.replaceAll('"','""')}"`);r.push(S.join(","))});const a=`${n}.csv`,u="\uFEFF"+r.join(`
286
286
  `),g=new Blob([u],{type:"text/csv;charset=UTF-8"}),m=URL.createObjectURL(g),x=document.createElement("a");x.href=m,x.download=a,x.click(),URL.revokeObjectURL(m)},RI=n=>{const e=rr.keys(n);if(e.length!==1)return;const t=e[0];if(t!=="")return;const r=n[t];if(r.type==="String")return r.value},II=n=>{const e=Object.entries(n);let t={};return e.forEach(([r,i])=>{!i||i.value===void 0||i.value===null||i.value===""||(i.type==="DateRange"?(t[i.sFilterKey]=i.value.sDate,t[i.eFilterKey]=i.value.eDate):t[i.filterKey??r]=i.value)}),t},kI=n=>{const e=rr.keys(n).filter(i=>i!=="");if(e.length!==1)return;const t=e[0],r=n[t];return!r||r.value===void 0||r.value===null||r.value===""?{selectedKey:t,value:void 0}:{selectedKey:t,value:r.value}},Sd={applyFilteration:_I,applySortation:SI,applyPagination:TI,getPages:V3,getRangedPages:AI,downloadCsv:EI,getSingleFilterValue:RI,getMultiFilterValues:II,getSelectFilterValue:kI},MI="_ATable_12zow_1",LI={ATable:MI};function Z3(n,e,t,r){const i=Vn.c(6);let o,l;i[0]!==e||i[1]!==n||i[2]!==t||i[3]!==r?(o=()=>{if(n)return n.addEventListener(e,t,r),()=>{n.removeEventListener(e,t,r)}},l=[n,e,t,r],i[0]=e,i[1]=n,i[2]=t,i[3]=r,i[4]=o,i[5]=l):(o=i[4],l=i[5]),z.useEffect(o,l)}const OI="_BodyHeader_ys4y0_1",PI="_TRow_ys4y0_7",DI="_OverflowSpace_ys4y0_11",NI="_BodyBody_ys4y0_16",FI="_IsSelected_ys4y0_35",BI="_IsSelectable_ys4y0_39",zI="_IsRowMarked_ys4y0_47",HI="_TH_ys4y0_52",WI="_TD_ys4y0_57",UI="_IsMarked_ys4y0_57",GI="_Resizer_ys4y0_76",YI="_IsMoving_ys4y0_88",VI="_IsResizable_ys4y0_91",ZI="_ResizerCenter_ys4y0_94",XI="_ResizerOut_ys4y0_100",KI="_ResizerIn_ys4y0_104",JI="_IsClicked_ys4y0_139",QI="_NoItems_ys4y0_146",qI="_Content_ys4y0_152",Zl={BodyHeader:OI,TRow:PI,OverflowSpace:DI,BodyBody:NI,IsSelected:FI,IsSelectable:BI,IsRowMarked:zI,TH:HI,TD:WI,IsMarked:UI,Resizer:GI,IsMoving:YI,IsResizable:VI,ResizerCenter:ZI,ResizerOut:XI,ResizerIn:KI,IsClicked:JI,NoItems:QI,Content:qI},$d=25,sb=50,jI=n=>{const e=Vn.c(119),{defs:t,isEqual:r,rProps:i,useSelect:o,isTableDisabled:l,isSelectMulti:a,selectDisabled:u,appliedFilteration:g,useSortation:m,pagination:x,pagedItems:w,noMarking:_,noDefHeader:S,isLoading:R,onScrollToSelectedReady:I,showRows:O,RowRenderer:P,isRowRendered:H,rowHeight:W,resources:Y}=n,B=P===void 0?tk:P;let ee;e[0]!==o?(ee=o??[],e[0]=o,e[1]=ee):ee=e[1];const[D,J]=ee;let fe;e[2]!==r||e[3]!==a||e[4]!==l||e[5]!==u||e[6]!==D||e[7]!==J?(fe=Se=>{l||!J||!D||u!=null&&u(Se)||(a?D.some(nt=>r(nt,Se))?J(D.filter(nt=>!r(nt,Se))):J([...D,Se]):J([Se]))},e[2]=r,e[3]=a,e[4]=l,e[5]=u,e[6]=D,e[7]=J,e[8]=fe):fe=e[8];const Z=fe;let te,ne;e[9]!==a||e[10]!==D||e[11]!==J?(te=()=>{a||!D||!J||D.length>1&&J([D[D.length-1]])},ne=[D,J,a],e[9]=a,e[10]=D,e[11]=J,e[12]=te,e[13]=ne):(te=e[12],ne=e[13]),z.useEffect(te,ne);let ue,se;e[14]!==u||e[15]!==D||e[16]!==J?(ue=()=>{if(!D||!J)return;D.filter(nt=>u==null?void 0:u(nt)).length>0&&J(D.filter(nt=>!(u!=null&&u(nt))))},se=[D,J,u],e[14]=u,e[15]=D,e[16]=J,e[17]=ue,e[18]=se):(ue=e[17],se=e[18]),z.useEffect(ue,se);const[j,re]=m;let ge;e[19]!==re||e[20]!==j?(ge=(Se,nt)=>{re&&((j==null?void 0:j.defKey)===Se?j.isAsc===!0?re({defKey:Se,isAsc:!1,sortF:nt}):j.isAsc===!1?re(void 0):re({defKey:Se,isAsc:!0,sortF:nt}):re({defKey:Se,isAsc:!0,sortF:nt}))},e[19]=re,e[20]=j,e[21]=ge):ge=e[21];const ve=ge;let oe;e[22]===Symbol.for("react.memo_cache_sentinel")?(oe={elem:null,row:null},e[22]=oe):oe=e[22];const[K,he]=z.useState(oe),Ae=z.useRef(null),He=z.useRef(null);let xe;e[23]===Symbol.for("react.memo_cache_sentinel")?(xe=()=>he({elem:Ae.current,row:He.current}),e[23]=xe):xe=e[23];const Fe=xe;let Me;e[24]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>Fe(),e[24]=Me):Me=e[24];let Be;e[25]!==w.length?(Be=[w.length,Fe],e[25]=w.length,e[26]=Be):Be=e[26],z.useEffect(Me,Be),Z3(window,"resize",Fe);const[ke,Re]=z.useState(W);let ze;e[27]!==K?(ze=()=>{const{row:Se}=K;Se!=null&&Re(Se.clientHeight)},e[27]=K,e[28]=ze):ze=e[28];let Xe;e[29]!==K||e[30]!==ke?(Xe=[K,ke],e[29]=K,e[30]=ke,e[31]=Xe):Xe=e[31],z.useEffect(ze,Xe);let Le;e:{const{elem:Se}=K;if(!Se){Le=0;break e}Le=Math.floor(Se.clientHeight/ke)}const ht=Le;let Qe;O?Qe=O:w.length<=ht?Qe=ht:Qe=w.length;const ot=Qe;let tt;O===void 0?tt=void 0:tt=O*ke;const rt=tt,dt=rt;let Mt;e:{const{elem:Se}=K;if(!Se){Mt=!1;break e}let nt;e[32]!==Se?(nt=Se.getBoundingClientRect(),e[32]=Se,e[33]=nt):nt=e[33],Mt=nt.height/ke<w.length}const Bt=Mt,[Ft,Jt]=z.useState();let pn;const{elem:zt}=K;!Ft||!zt?pn="100%":pn=zt.clientHeight+(H?0:50);const vn=pn,Ht=z.useRef(null);let wn;e[34]===Symbol.for("react.memo_cache_sentinel")?(wn={},e[34]=wn):wn=e[34];const[ut,at]=z.useState(wn);let gt;e[35]===Symbol.for("react.memo_cache_sentinel")?(gt={x:0,y:0},e[35]=gt):gt=e[35];const It=z.useRef(gt);let ln;e[36]===Symbol.for("react.memo_cache_sentinel")?(ln={},e[36]=ln):ln=e[36];const sn=z.useRef(ln);let nn;e[37]!==ut?(nn=rr.keys(ut),e[37]=ut,e[38]=nn):nn=e[38];const Ue=nn;let Ce;e[39]!==t?(Ce=(Se,nt)=>{const At=Ht.current;if(!At)return;const _n=[];At.childNodes.forEach(gr=>{gr.classList.contains(Zl.TH)&&_n.push(gr)});const Rn={};rr.keys(t).forEach((gr,Sn)=>{const qn=_n[Sn];if(!qn)return;const Tn=qn.getBoundingClientRect().width;Rn[gr]=Tn}),sn.current=Rn,Jt(nt),It.current={x:Se.clientX,y:Se.clientY};const Zn=gr=>{if(!Ht.current)return;const qn=gr.clientX-It.current.x,Tn=ek(t,nt,sn.current,qn);at(Tn)};document.addEventListener("mousemove",Zn);const ir=()=>{Jt(void 0),document.removeEventListener("mousemove",Zn),document.removeEventListener("mouseup",ir)};document.addEventListener("mouseup",ir)},e[39]=t,e[40]=Ce):Ce=e[40];const Ze=Ce;let Ct;e[41]===Symbol.for("react.memo_cache_sentinel")?(Ct=()=>{Jt(void 0),at({})},e[41]=Ct):Ct=e[41];const Qt=Ct;let Vt;e:{if(Ue.length===0){let nt;if(e[42]!==t){nt={};const At=rr.keys(t);for(let _n=0;_n<At.length;_n++){const Rn=At[_n],Zn=t[Rn],ir=Vr.getContent(Zn.colSpan,{defKey:Rn,def:Zn}),gr=Zn.width??80,Sn=Zn.minWidth??$d,qn=Zn.maxWidth,Tn={width:gr,minWidth:Sn,maxWidth:qn,flexGrow:ir??1};if(nt[Rn]=Tn,ir!==void 0){for(let dr=1;dr<Math.min(ir,At.length-_n);dr++){const li=t[At[_n+dr]],wo=li.width??80,fo=li.minWidth??$d,Br=li.maxWidth;Tn.width=Tn.width+wo,Tn.minWidth=Tn.minWidth+fo,Tn.maxWidth!==void 0&&(Br!==void 0?Tn.maxWidth=Tn.maxWidth+Br:Tn.maxWidth=void 0)}_n=_n+(ir-1)}}e[42]=t,e[43]=nt}else nt=e[43];Vt=nt;break e}let Se;if(e[44]!==t||e[45]!==ut){Se={};const nt=rr.keys(t);for(let At=0;At<nt.length;At++){const _n=nt[At],Rn=t[_n],Zn=ut[_n],ir=Vr.getContent(Rn.colSpan,{defKey:_n,def:Rn}),gr=Rn.minWidth??$d,Sn=Rn.maxWidth,qn={width:Zn,minWidth:gr,maxWidth:Sn,flexGrow:ir??1};if(Se[_n]=qn,ir!==void 0){for(let Tn=1;Tn<Math.min(ir,nt.length-At);Tn++){const dr=t[nt[At+Tn]],li=ut[nt[At+Tn]],wo=dr.minWidth??$d,fo=dr.maxWidth;qn.width=qn.width+li,qn.minWidth=qn.minWidth+wo,qn.maxWidth!==void 0&&(fo!==void 0?qn.maxWidth=qn.maxWidth+fo:qn.maxWidth=void 0)}At=At+(ir-1)}}e[44]=t,e[45]=ut,e[46]=Se}else Se=e[46];Vt=Se}const bn=Vt,hn=z.useRef(null);let ft;e[47]!==g?(ft=Sd.getSingleFilterValue(g),e[47]=g,e[48]=ft):ft=e[48];const Lt=ft;let _t;e[49]===Symbol.for("react.memo_cache_sentinel")?(_t=()=>{Ae.current&&Ae.current.scrollTo({top:0})},e[49]=_t):_t=e[49];let Wt;e[50]!==x.page?(Wt=[x.page],e[50]=x.page,e[51]=Wt):Wt=e[51],z.useEffect(_t,Wt);let an;e[52]!==D?(an=Se=>{const nt=Se===void 0?"center":Se;D&&D.length>0&&requestAnimationFrame(()=>{var At;return(At=He.current)==null?void 0:At.scrollIntoView({behavior:"auto",block:nt})})},e[52]=D,e[53]=an):an=e[53];const xt=an;let Ot,rn;e[54]!==I||e[55]!==xt?(Ot=()=>{I==null||I(xt)},rn=[I,xt],e[54]=I,e[55]=xt,e[56]=Ot,e[57]=rn):(Ot=e[56],rn=e[57]),z.useEffect(Ot,rn);let mn;e[58]!==R?(mn=M.jsx(Em,{isLoading:R}),e[58]=R,e[59]=mn):mn=e[59];let Cn;e[60]!==Ft?(Cn=bt.clsx(Zl.BodyHeader,Ft!==void 0&&Zl.IsClicked),e[60]=Ft,e[61]=Cn):Cn=e[61];const Xt=S||H?"none":"flex";let xn;e[62]!==Xt?(xn={display:Xt},e[62]=Xt,e[63]=xn):xn=e[63];let Nn;e[64]===Symbol.for("react.memo_cache_sentinel")?(Nn={minHeight:sb,maxHeight:sb},e[64]=Nn):Nn=e[64];let cr;e[65]!==Ft||e[66]!==t||e[67]!==ut||e[68]!==vn||e[69]!==Ze||e[70]!==ve||e[71]!==(j==null?void 0:j.defKey)||e[72]!==(j==null?void 0:j.isAsc)||e[73]!==Ue?(cr=rr.map(t,(Se,nt)=>{const[At]=Se,_n=t[At],Rn=Vr.getContent(_n.hContent,{defKey:At,def:_n}),Zn=_n.name,ir=nt===rr.keys(t).length-1,gr=_n.width??80,Sn=_n.minWidth??$d,qn=_n.maxWidth,Tn={width:gr,minWidth:Sn,maxWidth:qn,justifyContent:Vr.getContent(_n.hAlign,{defKey:At,def:_n})??"flex-start",...Vr.getContent(_n.hStyle,{defKey:At,def:_n})};Ue.includes(At)&&(Tn.width=ut[At]);const dr=_n.isSortable,li=(j==null?void 0:j.defKey)===At,wo=j==null?void 0:j.isAsc;return M.jsxs(z.Fragment,{children:[M.jsxs("div",{className:bt.clsx(Zl.TH,"Label1",dr?"IsClickable":"NoSelect"),style:Tn,onClick:()=>dr&&ve(At,_n.sortF),children:[M.jsx(nd,{children:Rn??Zn,className:Zl.Content}),dr&&M.jsx(uo,{icon:li?wo?"SortUp":"SortDown":"SortBoth",style:{width:16,height:16}})]}),!ir&&M.jsxs("div",{className:bt.sclsx(Zl,"Resizer","IsResizable","NoSelect",Ft!==void 0&&"IsMoving"),onDoubleClick:Qt,onMouseDown:fo=>Ze(fo,At),children:[M.jsx("div",{className:Zl.ResizerOut}),M.jsx("div",{className:Zl.ResizerIn}),M.jsx("div",{className:Zl.ResizerCenter,style:{height:vn}}),M.jsx("div",{className:Zl.ResizerIn}),M.jsx("div",{className:Zl.ResizerOut})]}),ir&&M.jsx(cs,{className:Zl.OverflowSpace,h:sb,style:{color:Tn.color,backgroundColor:Tn.backgroundColor,transition:Tn.transition},w:"var(--Scrollbar-width)"})]},At)}),e[65]=Ft,e[66]=t,e[67]=ut,e[68]=vn,e[69]=Ze,e[70]=ve,e[71]=j==null?void 0:j.defKey,e[72]=j==null?void 0:j.isAsc,e[73]=Ue,e[74]=cr):cr=e[74];let En;e[75]!==cr?(En=M.jsx("div",{ref:Ht,className:Zl.TRow,style:Nn,children:cr}),e[75]=cr,e[76]=En):En=e[76];let On;e[77]!==Cn||e[78]!==xn||e[79]!==En?(On=M.jsx("div",{ref:hn,className:Cn,style:xn,children:En}),e[77]=Cn,e[78]=xn,e[79]=En,e[80]=On):On=e[80];let $e;e[81]!==Ft?($e=bt.clsx(Zl.BodyBody,Ft!==void 0&&Zl.IsClicked),e[81]=Ft,e[82]=$e):$e=e[82];const $t=Bt?"scroll":"hidden";let on;e[83]!==dt||e[84]!==rt||e[85]!==$t?(on={overflowY:$t,minHeight:rt,maxHeight:dt},e[83]=dt,e[84]=rt,e[85]=$t,e[86]=on):on=e[86];let zn;e[87]!==B||e[88]!==t||e[89]!==W||e[90]!==Bt||e[91]!==r||e[92]!==H||e[93]!==l||e[94]!==_||e[95]!==Z||e[96]!==w||e[97]!==i||e[98]!==u||e[99]!==D||e[100]!==J||e[101]!==Lt||e[102]!==bn?(zn=w.map((Se,nt)=>{const At=Vr.getContent(i,{item:Se}),_n=J&&!l,Rn=D==null?void 0:D.some(Sn=>r(Sn,Se)),Zn=D&&(u==null?void 0:u(Se)),ir=typeof Zn=="string"?Zn:void 0,gr={...Se};return H&&rr.keys(t).forEach(Sn=>{const qn=t[Sn],Tn=Vr.getContent(qn.content,{defKey:Sn,def:qn,item:Se});let dr=!1;if(Lt&&!_){const li=Vr.getContent(qn.asText,{defKey:Sn,def:qn,item:Se});li!==void 0?dr=li.toString().toLowerCase().includes(Lt.toLowerCase()):["string","number"].includes(typeof Tn)&&Tn!==void 0&&Tn!==null&&(dr=Tn.toString().toLowerCase().includes(Lt.toLowerCase()))}gr[Sn]=M.jsx("span",{className:bt.clsx(dr&&Zl.IsRowMarked),children:gr[Sn]})}),M.jsx(Wi,{isDisabled:Zn,tooltip:ir,...At,abaseRef:Rn?He:void 0,className:bt.clsx(At==null?void 0:At.className,_n&&Zl.IsSelectable,Rn&&Zl.IsSelected),onClick:Sn=>{var qn;Z(Se),(qn=At==null?void 0:At.onClick)==null||qn.call(At,Sn)},children:M.jsx(B,{defs:t,isBodyBodyOverflowed:Bt,item:Se,markedItem:gr,noMarking:_,rowHeight:W,singleFilterValue:Lt,spanWidths:bn})},nt)}),e[87]=B,e[88]=t,e[89]=W,e[90]=Bt,e[91]=r,e[92]=H,e[93]=l,e[94]=_,e[95]=Z,e[96]=w,e[97]=i,e[98]=u,e[99]=D,e[100]=J,e[101]=Lt,e[102]=bn,e[103]=zn):zn=e[103];let $n;e[104]!==H||e[105]!==w.length||e[106]!==Y||e[107]!==ke||e[108]!==ot?($n=M.jsx($I,{isRowRendered:H,itemsLength:w.length,resources:Y,rowHeight:ke,showRows:ot}),e[104]=H,e[105]=w.length,e[106]=Y,e[107]=ke,e[108]=ot,e[109]=$n):$n=e[109];let Mn;e[110]!==$e||e[111]!==on||e[112]!==zn||e[113]!==$n?(Mn=M.jsxs("div",{ref:Ae,className:$e,style:on,children:[zn,$n]}),e[110]=$e,e[111]=on,e[112]=zn,e[113]=$n,e[114]=Mn):Mn=e[114];let Et;return e[115]!==mn||e[116]!==On||e[117]!==Mn?(Et=M.jsxs(M.Fragment,{children:[mn,On,Mn]}),e[115]=mn,e[116]=On,e[117]=Mn,e[118]=Et):Et=e[118],Et},$I=n=>{const e=Vn.c(13),{showRows:t,itemsLength:r,resources:i,isRowRendered:o,rowHeight:l}=n;let a;e:{if(r===0){a=t;break e}a=t-r}const u=a;let g;if(e[0]!==o||e[1]!==r||e[2]!==u||e[3]!==i||e[4]!==l||e[5]!==t){let m;e[7]!==o||e[8]!==r||e[9]!==i||e[10]!==l||e[11]!==t?(m=(x,w)=>M.jsx("div",{className:bt.clsx(Zl.TRow,"NoSelect"),style:{minHeight:l,maxHeight:l,...o&&{border:"none"}},children:r===0&&w===Math.floor(t/2)&&M.jsx(vl,{className:Zl.NoItems,children:i["No Items"]})},w),e[7]=o,e[8]=r,e[9]=i,e[10]=l,e[11]=t,e[12]=m):m=e[12],g=Array.from({length:u},m),e[0]=o,e[1]=r,e[2]=u,e[3]=i,e[4]=l,e[5]=t,e[6]=g}else g=e[6];return g};function ek(n,e,t,r){const i={...t},o=rr.keys(n).findIndex(g=>g===e)+1,l=Object.entries(n);let a=o-1,u=o;if(r<0){for(;r<0&&!(a<0||u>=l.length);){const[g,m]=[l[a][0],l[a][1]],[x,w]=[l[u][0],l[u][1]],_=m.minWidth??$d,S=w.maxWidth,R=i[g],I=i[x];let O=R-_;S!==void 0&&(O=Math.min(O,S-I));let P=-r;P=Math.min(P,O),R-P<=_&&a--,S!==void 0&&I+P>=S&&u++,i[g]=R-P,i[x]=I+P,r+=P}return i}else if(r>0){for(;r>0&&!(a<0||u>=l.length);){const[g,m]=[l[a][0],l[a][1]],[x,w]=[l[u][0],l[u][1]],_=w.minWidth??$d,S=m.maxWidth,R=i[x],I=i[g];let O=R-_;S!==void 0&&(O=Math.min(O,S-I));let P=r;P=Math.min(P,O),R-P<=_&&u++,S!==void 0&&I+P>=S&&a--,i[x]=R-P,i[g]=I+P,r-=P}return i}return i}const tk=n=>{const e=Vn.c(14),{defs:t,item:r,noMarking:i,spanWidths:o,singleFilterValue:l,isBodyBodyOverflowed:a,rowHeight:u}=n;let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=bt.clsx(Zl.TRow),e[0]=g):g=e[0];let m;e[1]!==u?(m={minHeight:u,maxHeight:u},e[1]=u,e[2]=m):m=e[2];let x;e[3]!==t||e[4]!==a||e[5]!==r||e[6]!==i||e[7]!==u||e[8]!==l||e[9]!==o?(x=rr.map(t,(_,S)=>{const[R]=_,I=o[R];if(I===void 0)return null;const O=S===rr.keys(t).length-1,P=t[R],H=Vr.getContent(P.content,{defKey:R,def:P,item:r}),W={width:I.width,minWidth:I.minWidth,maxWidth:I.maxWidth,flexGrow:I.flexGrow,justifyContent:Vr.getContent(P.align,{defKey:R,def:P,item:r})??"flex-start",...Vr.getContent(P.style,{defKey:R,def:P,item:r})};let Y=!1;if(l&&!i){const B=Vr.getContent(P.asText,{defKey:R,def:P,item:r});B!==void 0?Y=B.toString().toLowerCase().includes(l.toLowerCase()):["string","number"].includes(typeof H)&&H!==void 0&&H!==null&&(Y=H.toString().toLowerCase().includes(l.toLowerCase()))}return M.jsxs(z.Fragment,{children:[M.jsx("div",{className:bt.clsx(Zl.TD,"Label1",Y&&Zl.IsMarked),style:W,children:M.jsx(nd,{children:H,className:Zl.Content})}),!a&&O&&M.jsx(cs,{className:Zl.OverflowSpace,h:u,style:{color:W.color,backgroundColor:W.backgroundColor},w:"var(--Scrollbar-width)"})]},R)}),e[3]=t,e[4]=a,e[5]=r,e[6]=i,e[7]=u,e[8]=l,e[9]=o,e[10]=x):x=e[10];let w;return e[11]!==m||e[12]!==x?(w=M.jsx("div",{className:g,style:m,children:x}),e[11]=m,e[12]=x,e[13]=w):w=e[13],w},nk="_ATableFooter_w090q_1",rk="_Button_w090q_10",ik="_IsSelected_w090q_26",ok="_IsDisabled_w090q_31",Th={ATableFooter:nk,Button:rk,IsSelected:ik,IsDisabled:ok},lk=n=>{const e=Vn.c(35),{pages:t,rangedPages:r,pageF:i,pagination:o}=n,l=t[t.length-1];let a;e[0]!==o.page?(a=bt.clsx(Th.Button,o.page===1&&Th.IsDisabled),e[0]=o.page,e[1]=a):a=e[1];let u;e[2]!==i.moveFirst||e[3]!==a?(u=M.jsx(uo,{className:a,icon:"FirstPage",onClick:i.moveFirst}),e[2]=i.moveFirst,e[3]=a,e[4]=u):u=e[4];let g;e[5]!==o.page?(g=bt.clsx(Th.Button,o.page===1&&Th.IsDisabled),e[5]=o.page,e[6]=g):g=e[6];let m;e[7]!==i.movePrev||e[8]!==g?(m=M.jsx(uo,{className:g,icon:"NavigateBefore",onClick:i.movePrev}),e[7]=i.movePrev,e[8]=g,e[9]=m):m=e[9];let x;if(e[10]!==i||e[11]!==o.page||e[12]!==r){let O;e[14]!==i||e[15]!==o.page?(O=P=>M.jsx("div",{className:bt.clsx(Th.Button,"NoSelect",o.page===P&&Th.IsSelected),onClick:()=>i.move(P),children:P},P),e[14]=i,e[15]=o.page,e[16]=O):O=e[16],x=r.map(O),e[10]=i,e[11]=o.page,e[12]=r,e[13]=x}else x=e[13];let w;e[17]!==l||e[18]!==o.page?(w=bt.clsx(Th.Button,o.page===l&&Th.IsDisabled),e[17]=l,e[18]=o.page,e[19]=w):w=e[19];let _;e[20]!==i.moveNext||e[21]!==w?(_=M.jsx(uo,{className:w,icon:"NavigateNext",onClick:i.moveNext}),e[20]=i.moveNext,e[21]=w,e[22]=_):_=e[22];let S;e[23]!==l||e[24]!==o.page?(S=bt.clsx(Th.Button,o.page===l&&Th.IsDisabled),e[23]=l,e[24]=o.page,e[25]=S):S=e[25];let R;e[26]!==i.moveLast||e[27]!==S?(R=M.jsx(uo,{className:S,icon:"LastPage",onClick:i.moveLast}),e[26]=i.moveLast,e[27]=S,e[28]=R):R=e[28];let I;return e[29]!==u||e[30]!==m||e[31]!==x||e[32]!==_||e[33]!==R?(I=M.jsxs(vl,{className:Th.ATableFooter,children:[u,m,x,_,R]}),e[29]=u,e[30]=m,e[31]=x,e[32]=_,e[33]=R,e[34]=I):I=e[34],I},sk="_Filter_1b9j0_1",ak="_SelectFilter_1b9j0_11",ck="_MainFilter_1b9j0_15",uk="_IsOpen_1b9j0_26",fk="_SubFilters_1b9j0_30",hk="_Input_1b9j0_44",dk="_Main_1b9j0_15",gk="_Sub_1b9j0_30",pk="_Actions_1b9j0_62",vk="_Icon_1b9j0_67",bk="_LeftIcon_1b9j0_74",yk="_CircleAlertOutline_1b9j0_79",mk="_Rotate_1b9j0_87",oi={Filter:sk,SelectFilter:ak,MainFilter:ck,IsOpen:uk,SubFilters:fk,Input:hk,Main:dk,Sub:gk,Actions:pk,Icon:vk,LeftIcon:bk,CircleAlertOutline:yk,Rotate:mk},xk=n=>{const e=Vn.c(79),{defs:t,useFilteration:r,hasToggleFilteration:i,filterF:o,isRowRendered:l,isFilterSort:a,filterType:u,resources:g,placeholder:m}=n;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=[],e[0]=x):x=e[0];const[w,_]=z.useState(x),[S,R]=r,I=u==="Select";let O;e[1]!==S?(O=rr.keys(S).map(_k),e[1]=S,e[2]=O):O=e[2];const P=O,[H,W]=z.useState(I&&P.length>0?P[0]:null);let Y;e[3]!==S||e[4]!==R?(Y=(at,gt,It)=>{if(!R)return;const ln={...S};at.value=gt,R(ln),_(sn=>sn.map((nn,Ue)=>Ue===(It?It+1:0)?"":nn))},e[3]=S,e[4]=R,e[5]=Y):Y=e[5];const B=Y;let ee;if(e[6]!==t||e[7]!==S||e[8]!==I||e[9]!==H){ee=[];let at=rr.keys(S);if(I&&H){let gt;e[11]!==H?(gt=It=>It===H,e[11]=H,e[12]=gt):gt=e[12],at=at.filter(gt)}for(const gt of at)ee.push({key:gt,def:t[gt],filter:S[gt]});e[6]=t,e[7]=S,e[8]=I,e[9]=H,e[10]=ee}else ee=e[10];const D=ee,J=D.length>0?D[0]:null,fe=w.length>0?w[0]:"";let Z;e[13]!==D?(Z=D.length>1?D.slice(1):[],e[13]=D,e[14]=Z):Z=e[14];const te=Z;let ne;e[15]!==w?(ne=w.length>1?w.slice(1):[],e[15]=w,e[16]=ne):ne=e[16];const ue=ne,se=te.length>0,[j,re]=z.useState(!1),[ge,ve]=z.useState(!1),oe=z.useRef(null);let K;e[17]===Symbol.for("react.memo_cache_sentinel")?(K=()=>re(!1),e[17]=K):K=e[17];const he=K,Ae=z.useRef(null);let He;e[18]===Symbol.for("react.memo_cache_sentinel")?(He=()=>{ve(!1),re(!0),Ae.current&&(document.removeEventListener("mousedown",Ae.current),Ae.current=null)},e[18]=He):He=e[18];const xe=He;let Fe;e[19]===Symbol.for("react.memo_cache_sentinel")?(Fe=()=>{const at=gt=>{const It=document.getElementById("root"),ln=gt.target,sn=oe.current;!It||!sn||!ln||!sn.contains(ln)&&It.contains(ln)&&xe()};return Ae.current=at,at},e[19]=Fe):Fe=e[19];const Me=Fe;let Be;e[20]===Symbol.for("react.memo_cache_sentinel")?(Be=()=>{re(!0),ve(!0),setTimeout(()=>{const at=Me();document.addEventListener("mousedown",at)},0)},e[20]=Be):Be=e[20];const ke=Be,Re=ge?xe:ke;let ze;e[21]!==w||e[22]!==D?(ze=()=>{const at=D.map((gt,It)=>gt.filter.type==="String"&&gt.filter.validation?gt.filter.validation(gt.filter.value||""):gt.filter.type==="Date"&&gt.filter.validation||gt.filter.type==="DateRange"&&gt.filter.validation?gt.filter.validation(gt.filter.value):w[It]);return _(at),at.every(Sk)},e[21]=w,e[22]=D,e[23]=ze):ze=e[23];const Xe=ze;let Le;e[24]!==o||e[25]!==Xe?(Le=at=>{at.key==="Enter"?(Xe()&&o.apply(),at.stopPropagation()):at.key==="Escape"&&(ve(!1),at.currentTarget.focus(),at.currentTarget.blur(),at.stopPropagation())},e[24]=o,e[25]=Xe,e[26]=Le):Le=e[26];const ht=Le;let Qe;e[27]!==Re||e[28]!==Xe?(Qe={open:ke,close:xe,toggle:Re,validate:Xe},e[27]=Re,e[28]=Xe,e[29]=Qe):Qe=e[29];const ot=Qe;let tt;e[30]!==o?(tt=()=>{o.clear()},e[30]=o,e[31]=tt):tt=e[31];const rt=tt;let dt;e[32]!==o||e[33]!==S||e[34]!==R?(dt=at=>{if(!R||!at)return;W(at);const gt={...S};rr.keys(gt).forEach(It=>{if(It!==at&&gt[It])e:switch(gt[It].type){case"String":{gt[It].value="";break e}case"Select":{gt[It].value=null;break e}case"Date":{gt[It].value=void 0;break e}case"DateRange":gt[It].value=void 0}}),_([]),R(gt),o.clear(),setTimeout(()=>{var ln;const It=(ln=oe.current)==null?void 0:ln.querySelector("input");It&&It.focus()},0)},e[32]=o,e[33]=S,e[34]=R,e[35]=dt):dt=e[35];const Mt=dt;if(!J)return null;let Bt;e[36]!==t||e[37]!==P||e[38]!==S||e[39]!==Mt||e[40]!==I||e[41]!==H?(Bt=I&&M.jsx(Ed,{isAutoWidth:!0,className:bt.clsx(oi.SelectFilter),options:P,type:"Secondary",useSelect:[H,Mt],OptionRenderer:at=>{const{option:gt}=at,It=t[gt];let ln;if(It!=null&&It.hContent){const sn={defKey:gt,def:It};ln=typeof It.hContent=="function"?It.hContent(sn):It.hContent}else{const sn=S[gt],nn=(It==null?void 0:It.name)||(sn==null?void 0:sn.placeholder)||String(gt);ln=M.jsx("span",{children:nn})}return ln}}),e[36]=t,e[37]=P,e[38]=S,e[39]=Mt,e[40]=I,e[41]=H,e[42]=Bt):Bt=e[42];let Ft;e[43]===Symbol.for("react.memo_cache_sentinel")?(Ft=bt.clsx(oi.Filter),e[43]=Ft):Ft=e[43];const Jt=l?a?180:void 0:180,pn=l?a?300:void 0:300;let zt;e[44]!==Jt||e[45]!==pn?(zt={minWidth:Jt,maxWidth:pn},e[44]=Jt,e[45]=pn,e[46]=zt):zt=e[46];let vn;e[47]!==o||e[48]!==I||e[49]!==se||e[50]!==i||e[51]!==ge||e[52]!==fe||e[53]!==J||e[54]!==B||e[55]!==m||e[56]!==ot||e[57]!==g?(vn=M.jsx(wk,{errorMessage:fe,filterF:o,filterSet:J,hasSelectFilterType:I,hasSubFilters:se,hasToggleFilteration:i,isOpen:ge,placeholder:m,popupF:ot,resources:g,onChange:B}),e[47]=o,e[48]=I,e[49]=se,e[50]=i,e[51]=ge,e[52]=fe,e[53]=J,e[54]=B,e[55]=m,e[56]=ot,e[57]=g,e[58]=vn):vn=e[58];let Ht;e[59]!==o||e[60]!==I||e[61]!==ge||e[62]!==j||e[63]!==B||e[64]!==rt||e[65]!==m||e[66]!==g||e[67]!==ue||e[68]!==te||e[69]!==Xe?(Ht=!I&&M.jsx(Ck,{errorMessages:ue,filterF:o,isOpen:ge,isTransitioning:j,placeholder:m,resources:g,subFilterSets:te,validate:Xe,onChange:B,onClearClick:rt,onTransitionEnd:he}),e[59]=o,e[60]=I,e[61]=ge,e[62]=j,e[63]=B,e[64]=rt,e[65]=m,e[66]=g,e[67]=ue,e[68]=te,e[69]=Xe,e[70]=Ht):Ht=e[70];let wn;e[71]!==ht||e[72]!==zt||e[73]!==vn||e[74]!==Ht?(wn=M.jsxs("div",{ref:oe,className:Ft,tabIndex:-1,style:zt,onKeyDown:ht,onClick:Tk,children:[vn,Ht]}),e[71]=ht,e[72]=zt,e[73]=vn,e[74]=Ht,e[75]=wn):wn=e[75];let ut;return e[76]!==Bt||e[77]!==wn?(ut=M.jsxs(M.Fragment,{children:[Bt,wn]}),e[76]=Bt,e[77]=wn,e[78]=ut):ut=e[78],ut},wk=n=>{var _,S,R,I;const e=Vn.c(182),{filterSet:t,hasToggleFilteration:r,hasSelectFilterType:i,onChange:o,filterF:l,hasSubFilters:a,popupF:u,isOpen:g,resources:m,errorMessage:x,placeholder:w}=n;if(t.filter.type==="String"){const O=t.filter.value??"";let P;e[0]!==t.filter||e[1]!==o?(P=oe=>o(t.filter,oe),e[0]=t.filter,e[1]=o,e[2]=P):P=e[2];let H;e[3]!==O||e[4]!==P?(H=[O,P],e[3]=O,e[4]=P,e[5]=H):H=e[5];const W=H,Y=w??t.filter.placeholder??((_=t.def)==null?void 0:_.name),B=t.filter.icon,ee=t.filter.iconTooltip??Y;let D;e[6]!==g?(D=bt.clsx(oi.MainFilter,g&&oi.IsOpen),e[6]=g,e[7]=D):D=e[7];const J=B??"Type";let fe;e[8]!==ee||e[9]!==g||e[10]!==J?(fe=M.jsx(Jh,{icon:J,isOpen:g,tooltip:ee}),e[8]=ee,e[9]=g,e[10]=J,e[11]=fe):fe=e[11];const Z=t.filter.autoFocus;let te;e[12]===Symbol.for("react.memo_cache_sentinel")?(te=bt.clsx(oi.Input,oi.Main),e[12]=te):te=e[12];let ne;e[13]!==l||e[14]!==r||e[15]!==g||e[16]!==u||e[17]!==m?(ne=r&&M.jsx(d0,{isOpen:g,filterF:l,popupF:u,resources:m}),e[13]=l,e[14]=r,e[15]=g,e[16]=u,e[17]=m,e[18]=ne):ne=e[18];const ue=Y??m["Search(Placeholder)"],se=x?"Error":"Primary";let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j={style:{width:"100%",boxSizing:"border-box"}},e[19]=j):j=e[19];let re;e[20]!==x||e[21]!==l||e[22]!==i||e[23]!==a||e[24]!==g||e[25]!==u||e[26]!==m?(re=M.jsx(g0,{errorMessage:x,filterF:l,hasSelectFilterType:i,hasSubFilters:a,isOpen:g,popupF:u,resources:m}),e[20]=x,e[21]=l,e[22]=i,e[23]=a,e[24]=g,e[25]=u,e[26]=m,e[27]=re):re=e[27];let ge;e[28]!==t.filter.autoFocus||e[29]!==t.filter.dataList||e[30]!==t.filter.maxLength||e[31]!==t.filter.pattern||e[32]!==se||e[33]!==re||e[34]!==ne||e[35]!==ue||e[36]!==W?(ge=M.jsx(ag,{autoFocus:Z,className:te,dataList:t.filter.dataList,LeftAddon:ne,maxLength:t.filter.maxLength,pattern:t.filter.pattern,placeholder:ue,type:se,useValue:W,wrapProps:j,RightAddon:re}),e[28]=t.filter.autoFocus,e[29]=t.filter.dataList,e[30]=t.filter.maxLength,e[31]=t.filter.pattern,e[32]=se,e[33]=re,e[34]=ne,e[35]=ue,e[36]=W,e[37]=ge):ge=e[37];let ve;return e[38]!==ge||e[39]!==D||e[40]!==fe?(ve=M.jsxs("div",{className:D,children:[fe,ge]}),e[38]=ge,e[39]=D,e[40]=fe,e[41]=ve):ve=e[41],ve}else if(t.filter.type==="Select"){const O=t.filter.value??null;let P;e[42]!==l||e[43]!==t.filter||e[44]!==i||e[45]!==o||e[46]!==u?(P=se=>{o(t.filter,se),i&&setTimeout(()=>{u.validate()&&l.apply()},0)},e[42]=l,e[43]=t.filter,e[44]=i,e[45]=o,e[46]=u,e[47]=P):P=e[47];let H;e[48]!==O||e[49]!==P?(H=[O,P],e[48]=O,e[49]=P,e[50]=H):H=e[50];const W=H,Y=w??t.filter.placeholder??((S=t.def)==null?void 0:S.name),B=t.filter.icon,ee=t.filter.iconTooltip??Y;let D;e[51]!==g?(D=bt.clsx(oi.MainFilter,g&&oi.IsOpen),e[51]=g,e[52]=D):D=e[52];const J=B??"Menu";let fe;e[53]!==ee||e[54]!==g||e[55]!==J?(fe=M.jsx(Jh,{icon:J,isOpen:g,tooltip:ee}),e[53]=ee,e[54]=g,e[55]=J,e[56]=fe):fe=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=bt.clsx(oi.Input,oi.Main),e[57]=Z):Z=e[57];let te;e[58]!==l||e[59]!==t.filter.placeholder||e[60]!==i||e[61]!==a||e[62]!==r||e[63]!==g||e[64]!==Y||e[65]!==u||e[66]!==m?(te=se=>{const{OptionRenderer:j,selectedOption:re}=se;return re===null?Y||t.filter.placeholder:M.jsxs(M.Fragment,{children:[r&&M.jsx(d0,{isOpen:g,filterF:l,popupF:u,resources:m}),M.jsx(j,{option:re}),M.jsx(g0,{filterF:l,hasSelectFilterType:i,hasSubFilters:a,hideSearchButton:!0,isOpen:g,popupF:u,resources:m})]})},e[58]=l,e[59]=t.filter.placeholder,e[60]=i,e[61]=a,e[62]=r,e[63]=g,e[64]=Y,e[65]=u,e[66]=m,e[67]=te):te=e[67];let ne;e[68]!==t.filter.OptionRenderer||e[69]!==t.filter.options||e[70]!==Y||e[71]!==te||e[72]!==W?(ne=M.jsx(Ed,{className:Z,OptionRenderer:t.filter.OptionRenderer,options:t.filter.options,placeholder:Y,useSelect:W,SelectedRenderer:te}),e[68]=t.filter.OptionRenderer,e[69]=t.filter.options,e[70]=Y,e[71]=te,e[72]=W,e[73]=ne):ne=e[73];let ue;return e[74]!==D||e[75]!==fe||e[76]!==ne?(ue=M.jsxs("div",{className:D,children:[fe,ne]}),e[74]=D,e[75]=fe,e[76]=ne,e[77]=ue):ue=e[77],ue}else if(t.filter.type==="Date"){let O;e[78]!==t.filter||e[79]!==o?(O=he=>o(t.filter,he),e[78]=t.filter,e[79]=o,e[80]=O):O=e[80];let P;e[81]!==t.filter.value||e[82]!==O?(P=[t.filter.value,O],e[81]=t.filter.value,e[82]=O,e[83]=P):P=e[83];const H=P,W=w??t.filter.placeholder??((R=t.def)==null?void 0:R.name),Y=t.filter.icon,B=t.filter.iconTooltip??W;let ee;e[84]!==g?(ee=bt.clsx(oi.MainFilter,g&&oi.IsOpen),e[84]=g,e[85]=ee):ee=e[85];const D=Y??"CalendarDay";let J;e[86]!==B||e[87]!==g||e[88]!==D?(J=M.jsx(Jh,{icon:D,isOpen:g,tooltip:B}),e[86]=B,e[87]=g,e[88]=D,e[89]=J):J=e[89];let fe;e[90]===Symbol.for("react.memo_cache_sentinel")?(fe=bt.clsx(oi.DatePicker,oi.Input,oi.Main),e[90]=fe):fe=e[90];let Z;e[91]!==l||e[92]!==r||e[93]!==g||e[94]!==u||e[95]!==m?(Z=r&&M.jsx(d0,{isOpen:g,filterF:l,popupF:u,resources:m}),e[91]=l,e[92]=r,e[93]=g,e[94]=u,e[95]=m,e[96]=Z):Z=e[96];let te;e[97]!==r||e[98]!==g?(te=!r&&M.jsx(cs,{w:g?0:6}),e[97]=r,e[98]=g,e[99]=te):te=e[99];const ne=Y??"CalendarDay",ue=!g;let se;e[100]!==B||e[101]!==ne||e[102]!==ue?(se=M.jsx(Jh,{icon:ne,isOpen:ue,tooltip:B}),e[100]=B,e[101]=ne,e[102]=ue,e[103]=se):se=e[103];const j=g?8:0;let re;e[104]!==j?(re=M.jsx(cs,{w:j}),e[104]=j,e[105]=re):re=e[105];let ge;e[106]!==se||e[107]!==re||e[108]!==Z||e[109]!==te?(ge=M.jsxs(M.Fragment,{children:[Z,te,se,re]}),e[106]=se,e[107]=re,e[108]=Z,e[109]=te,e[110]=ge):ge=e[110];let ve;e[111]!==l||e[112]!==i||e[113]!==a||e[114]!==g||e[115]!==u||e[116]!==m?(ve=M.jsx(g0,{filterF:l,hasSelectFilterType:i,hasSubFilters:a,isOpen:g,popupF:u,resources:m}),e[111]=l,e[112]=i,e[113]=a,e[114]=g,e[115]=u,e[116]=m,e[117]=ve):ve=e[117];let oe;e[118]!==t.filter.maxDate||e[119]!==t.filter.minDate||e[120]!==W||e[121]!==ge||e[122]!==ve||e[123]!==H?(oe=M.jsx(Tm,{className:fe,maxDate:t.filter.maxDate,minDate:t.filter.minDate,placeholder:W,type:"Raw",useDate:H,LeftAddon:ge,RightAddon:ve}),e[118]=t.filter.maxDate,e[119]=t.filter.minDate,e[120]=W,e[121]=ge,e[122]=ve,e[123]=H,e[124]=oe):oe=e[124];let K;return e[125]!==oe||e[126]!==ee||e[127]!==J?(K=M.jsxs("div",{className:ee,children:[J,oe]}),e[125]=oe,e[126]=ee,e[127]=J,e[128]=K):K=e[128],K}else if(t.filter.type==="DateRange"){let O;e[129]!==t.filter||e[130]!==o?(O=He=>o(t.filter,He),e[129]=t.filter,e[130]=o,e[131]=O):O=e[131];let P;e[132]!==t.filter.value||e[133]!==O?(P=[t.filter.value,O],e[132]=t.filter.value,e[133]=O,e[134]=P):P=e[134];const H=P,{noDefaultChoices:W,noClearButton:Y}=t.filter,B=w??t.filter.placeholder??((I=t.def)==null?void 0:I.name),ee=t.filter.icon,D=t.filter.iconTooltip??B;let J;e[135]!==g?(J=bt.clsx(oi.MainFilter,g&&oi.IsOpen),e[135]=g,e[136]=J):J=e[136];const fe=ee??"CalendarDay";let Z;e[137]!==D||e[138]!==g||e[139]!==fe?(Z=M.jsx(Jh,{icon:fe,isOpen:g,tooltip:D}),e[137]=D,e[138]=g,e[139]=fe,e[140]=Z):Z=e[140];let te;e[141]===Symbol.for("react.memo_cache_sentinel")?(te=bt.clsx(oi.DatePicker,oi.Input,oi.Main),e[141]=te):te=e[141];let ne;e[142]!==l||e[143]!==r||e[144]!==g||e[145]!==u||e[146]!==m?(ne=r&&M.jsx(d0,{isOpen:g,filterF:l,popupF:u,resources:m}),e[142]=l,e[143]=r,e[144]=g,e[145]=u,e[146]=m,e[147]=ne):ne=e[147];let ue;e[148]!==r||e[149]!==g?(ue=!r&&M.jsx(cs,{w:g?0:6}),e[148]=r,e[149]=g,e[150]=ue):ue=e[150];const se=ee??"CalendarDay",j=!g;let re;e[151]!==D||e[152]!==se||e[153]!==j?(re=M.jsx(Jh,{icon:se,isOpen:j,tooltip:D}),e[151]=D,e[152]=se,e[153]=j,e[154]=re):re=e[154];const ge=g?8:0;let ve;e[155]!==ge?(ve=M.jsx(cs,{w:ge}),e[155]=ge,e[156]=ve):ve=e[156];let oe;e[157]!==re||e[158]!==ve||e[159]!==ne||e[160]!==ue?(oe=M.jsxs(M.Fragment,{children:[ne,ue,re,ve]}),e[157]=re,e[158]=ve,e[159]=ne,e[160]=ue,e[161]=oe):oe=e[161];let K;e[162]!==l||e[163]!==i||e[164]!==a||e[165]!==g||e[166]!==u||e[167]!==m?(K=M.jsx(g0,{filterF:l,hasSelectFilterType:i,hasSubFilters:a,isOpen:g,popupF:u,resources:m}),e[162]=l,e[163]=i,e[164]=a,e[165]=g,e[166]=u,e[167]=m,e[168]=K):K=e[168];let he;e[169]!==t.filter.maxDate||e[170]!==t.filter.minDate||e[171]!==Y||e[172]!==W||e[173]!==B||e[174]!==oe||e[175]!==K||e[176]!==H?(he=M.jsx(_m,{className:te,maxDate:t.filter.maxDate,minDate:t.filter.minDate,noClearButton:Y,noDefaultChoices:W,placeholder:B,type:"Raw",useDateRange:H,LeftAddon:oe,RightAddon:K}),e[169]=t.filter.maxDate,e[170]=t.filter.minDate,e[171]=Y,e[172]=W,e[173]=B,e[174]=oe,e[175]=K,e[176]=H,e[177]=he):he=e[177];let Ae;return e[178]!==he||e[179]!==J||e[180]!==Z?(Ae=M.jsxs("div",{className:J,children:[Z,he]}),e[178]=he,e[179]=J,e[180]=Z,e[181]=Ae):Ae=e[181],Ae}return null},d0=n=>{const e=Vn.c(10),{filterF:t,popupF:r,resources:i,isOpen:o}=n,l=o?0:24,a=o?0:8;let u;e[0]!==l||e[1]!==a?(u={width:l,marginLeft:a},e[0]=l,e[1]=a,e[2]=u):u=e[2];const g=i["Toggle Filter"];let m;e[3]!==t||e[4]!==r?(m=w=>{w.currentTarget.classList.add(oi.Rotate),t.toggle(),r.close(),w.stopPropagation()},e[3]=t,e[4]=r,e[5]=m):m=e[5];let x;return e[6]!==u||e[7]!==g||e[8]!==m?(x=M.jsx(Ba,{className:oi.Icon,icon:"Convert",style:u,tooltip:g,type:"Raw",onMouseDown:Ak,onClick:m}),e[6]=u,e[7]=g,e[8]=m,e[9]=x):x=e[9],x},g0=n=>{const e=Vn.c(29),{hasSubFilters:t,popupF:r,isOpen:i,resources:o,errorMessage:l,hideSearchButton:a,hasSelectFilterType:u,filterF:g}=n;let m;e[0]!==r?(m=Y=>{Y.stopPropagation(),r.open()},e[0]=r,e[1]=m):m=e[1];const x=m;let w;e[2]!==r?(w=Y=>{Y.stopPropagation(),r.close()},e[2]=r,e[3]=w):w=e[3];const _=w;let S;e[4]!==g||e[5]!==r?(S=Y=>{Y.stopPropagation(),r.validate()&&g.apply()},e[4]=g,e[5]=r,e[6]=S):S=e[6];const R=S;let I;e[7]!==l?(I=l&&M.jsx(Ba,{className:oi.CircleAlertOutline,icon:"CircleAlertOutline",iconSize:"xs",tooltip:l,type:"Raw"}),e[7]=l,e[8]=I):I=e[8];let O;e[9]!==u||e[10]!==t||e[11]!==i||e[12]!==x?(O=t&&!u&&M.jsx(Ba,{className:oi.Icon,icon:"ListAdd",type:"Raw",style:{opacity:+!i,visibility:+!i?"visible":"hidden",marginRight:-24,pointerEvents:i?"none":void 0},onClick:x}),e[9]=u,e[10]=t,e[11]=i,e[12]=x,e[13]=O):O=e[13];let P;e[14]!==u||e[15]!==t||e[16]!==i||e[17]!==_?(P=t&&!u&&M.jsx(Ba,{className:oi.Icon,icon:"ListRemove",type:"Raw",style:{opacity:+i,visibility:+i?"visible":"hidden",marginRight:i?-24:0,pointerEvents:i?void 0:"none"},onClick:_}),e[14]=u,e[15]=t,e[16]=i,e[17]=_,e[18]=P):P=e[18];let H;e[19]!==a||e[20]!==i||e[21]!==R||e[22]!==o?(H=!a&&M.jsx(Ba,{className:oi.Icon,icon:"Search",tooltip:o["Search(Button)"],type:"Raw",style:{opacity:+!i,visibility:+!i?"visible":"hidden",pointerEvents:i?"none":void 0,marginRight:4},onClick:R}),e[19]=a,e[20]=i,e[21]=R,e[22]=o,e[23]=H):H=e[23];let W;return e[24]!==I||e[25]!==O||e[26]!==P||e[27]!==H?(W=M.jsxs(z.Fragment,{children:[I,O,P,H]}),e[24]=I,e[25]=O,e[26]=P,e[27]=H,e[28]=W):W=e[28],W},Ck=n=>{const e=Vn.c(31),{subFilterSets:t,onChange:r,onClearClick:i,isOpen:o,isTransitioning:l,onTransitionEnd:a,resources:u,errorMessages:g,placeholder:m,filterF:x,validate:w}=n;if(!o&&!l)return null;const _=+o,S=+o?"visible":"hidden";let R;e[0]!==_||e[1]!==S?(R={opacity:_,visibility:S},e[0]=_,e[1]=S,e[2]=R):R=e[2];let I;if(e[3]!==g||e[4]!==m||e[5]!==r||e[6]!==u||e[7]!==t){let D;e[9]!==g||e[10]!==m||e[11]!==r||e[12]!==u?(D=(J,fe)=>{var Z,te,ne,ue;if(J.filter.type==="String"){const se=[J.filter.value??"",oe=>r(J.filter,oe,fe)],j=g[fe],re=m??J.filter.placeholder??((Z=J.def)==null?void 0:Z.name),ge=J.filter.icon,ve=J.filter.iconTooltip??re;return M.jsxs(vl,{style:{marginBottom:6},children:[M.jsx(Jh,{icon:ge??"Type",tooltip:ve}),M.jsx(ag,{autoFocus:J.filter.autoFocus,className:bt.clsx(oi.Input,oi.Sub),dataList:J.filter.dataList,maxLength:J.filter.maxLength,pattern:J.filter.pattern,placeholder:re??u["Search(Placeholder)"],type:j?"Error":"Secondary",useValue:se,wrapProps:{style:{width:"100%"}},RightAddon:j&&M.jsx(Ba,{className:oi.CircleAlertOutline,icon:"CircleAlertOutline",iconSize:"xs",tooltip:j,type:"Raw"})}),M.jsx(cs,{h:8})]},fe)}else if(J.filter.type==="Select"){const se=[J.filter.value??null,ve=>r(J.filter,ve)],j=m??J.filter.placeholder??((te=J.def)==null?void 0:te.name),re=J.filter.icon,ge=J.filter.iconTooltip??j;return M.jsxs(vl,{style:{marginBottom:6},children:[M.jsx(Jh,{icon:re??"Menu",tooltip:ge}),M.jsx(Ed,{arrowProps:{style:{marginRight:4}},className:bt.clsx(oi.Input,oi.Sub),OptionRenderer:J.filter.OptionRenderer,options:J.filter.options,placeholder:j,type:"Secondary",useSelect:se}),M.jsx(cs,{h:8})]},fe)}else if(J.filter.type==="Date"){const se=[J.filter.value,ve=>r(J.filter,ve)],j=m??J.filter.placeholder??((ne=J.def)==null?void 0:ne.name),re=J.filter.icon,ge=J.filter.iconTooltip??j;return M.jsxs(vl,{style:{marginBottom:6},children:[M.jsx(Jh,{icon:re??"CalendarDay",tooltip:ge}),M.jsx(Tm,{className:bt.clsx(oi.DatePicker,oi.Input,oi.Sub),LeftAddon:M.jsx(cs,{w:12}),maxDate:J.filter.maxDate,minDate:J.filter.minDate,placeholder:j,type:"Raw",useDate:se}),M.jsx(cs,{h:8})]},fe)}else if(J.filter.type==="DateRange"){const se=[J.filter.value,K=>r(J.filter,K)],{noDefaultChoices:j,noClearButton:re}=J.filter,ge=m??J.filter.placeholder??((ue=J.def)==null?void 0:ue.name),ve=J.filter.icon,oe=J.filter.iconTooltip??ge;return M.jsxs(vl,{style:{marginBottom:6},children:[M.jsx(Jh,{icon:ve??"CalendarDay",tooltip:oe}),M.jsx(_m,{className:bt.clsx(oi.DatePicker,oi.Input,oi.Sub),LeftAddon:M.jsx(cs,{w:12}),maxDate:J.filter.maxDate,minDate:J.filter.minDate,noClearButton:re,noDefaultChoices:j,placeholder:ge,type:"Raw",useDateRange:se})]},fe)}else return null},e[9]=g,e[10]=m,e[11]=r,e[12]=u,e[13]=D):D=e[13],I=t.map(D),e[3]=g,e[4]=m,e[5]=r,e[6]=u,e[7]=t,e[8]=I}else I=e[8];const O=u["Clear(Button)"];let P;e[14]!==i||e[15]!==O?(P=M.jsx(Ic,{type:"Secondary",onClick:i,children:O}),e[14]=i,e[15]=O,e[16]=P):P=e[16];let H;e[17]!==x||e[18]!==w?(H=()=>{w()&&x.apply()},e[17]=x,e[18]=w,e[19]=H):H=e[19];const W=u["Search(Button)"];let Y;e[20]!==H||e[21]!==W?(Y=M.jsx(Ic,{onClick:H,children:W}),e[20]=H,e[21]=W,e[22]=Y):Y=e[22];let B;e[23]!==P||e[24]!==Y?(B=M.jsxs(vl,{className:oi.Actions,children:[P,Y]}),e[23]=P,e[24]=Y,e[25]=B):B=e[25];let ee;return e[26]!==a||e[27]!==R||e[28]!==I||e[29]!==B?(ee=M.jsxs("div",{className:oi.SubFilters,style:R,onTransitionEnd:a,children:[I,B]}),e[26]=a,e[27]=R,e[28]=I,e[29]=B,e[30]=ee):ee=e[30],ee},Jh=n=>{const e=Vn.c(8),{icon:t,tooltip:r,isOpen:i}=n,o=i===void 0?!0:i,l=o?24:0,a=o?4:0,u=+o;let g;e[0]!==l||e[1]!==a||e[2]!==u?(g={width:l,marginRight:a,opacity:u},e[0]=l,e[1]=a,e[2]=u,e[3]=g):g=e[3];let m;return e[4]!==t||e[5]!==g||e[6]!==r?(m=M.jsx(Ba,{className:oi.LeftIcon,icon:t,tooltip:r,type:"Raw",style:g}),e[4]=t,e[5]=g,e[6]=r,e[7]=m):m=e[7],m};function _k(n){return String(n)}function Sk(n){return!n}function Tk(n){n.preventDefault(),n.stopPropagation()}function Ak(n){return n.currentTarget.classList.remove(oi.Rotate)}const Ek="_ATableHeader_1hzfz_1",Rk="_LeftHeaderContent_1hzfz_11",Ik="_RightHeaderContent_1hzfz_19",kk="_TopRightAddon_1hzfz_27",Mk="_HItem_1hzfz_32",Ag={ATableHeader:Ek,LeftHeaderContent:Rk,RightHeaderContent:Ik,TopRightAddon:kk,HItem:Mk},Lk=n=>{const{defs:e,title:t,totalCount:r,useCheck:i,useFilteration:o,hasToggleFilteration:l,filterF:a,noFilter:u,noCount:g,isFiltered:m,TopLeftAddon:x,TopRightAddon:w,useSortation:_,resources:S=Nr.ATable,filterType:R,placeholder:I}=n,[O]=z.useMemo(()=>i||[],[i]),P=z.useMemo(()=>m?S["Searched n items"](r):S["Total n items"](r),[S,m,r]),[H]=o,[W,Y]=_,[B,ee]=z.useState(!1),D=z.useMemo(()=>{const re=rr.values(H).filter(oe=>oe.type==="DateRange"),ge=rr.keys(H).filter(oe=>re.includes(H[oe])),ve=rr.keys(e).filter(oe=>e[oe].isSortable);return ge.length>0?(ge.length>1&&ee(!0),ve.map(K=>ge.includes(K)?[K+"_Asc",K+"_Desc"]:K).flat()):ve},[e,H]),J=z.useMemo(()=>n.isRowRendered&&D.length>0,[D.length,n.isRowRendered]),fe=z.useCallback((re,ge)=>{Y&&(W==null?void 0:W.defKey)===re&&(W.isAsc===!0?Y({defKey:re,isAsc:!1,sortF:ge}):Y({defKey:re,isAsc:!0,sortF:ge}))},[W,Y]),Z=z.useRef(null),[te,ne]=z.useState(),[ue,se]=z.useState(W?W.defKey:D[0]),j=z.useMemo(()=>{if(!te)return{};const re=e[te];return{SortUp:{onClick:()=>{Y==null||Y({defKey:te,isAsc:!0,sortF:re.sortF}),se(te)},content:()=>S["Sort up"]},SortDown:{onClick:()=>{Y==null||Y({defKey:te,isAsc:!1,sortF:re.sortF}),se(te)},content:()=>S["Sort down"]}}},[Y,te,e,S]);return M.jsxs(M.Fragment,{children:[M.jsxs("div",{className:bt.clsx(Ag.ATableHeader),children:[M.jsxs("div",{className:bt.clsx(Ag.LeftHeaderContent,"NoSelect"),children:[M.jsxs(vl,{style:{marginBottom:J?8:0},children:[t&&M.jsx("div",{className:bt.clsx(Ag.HItem),style:{whiteSpace:"nowrap"},children:t}),!g&&M.jsxs("div",{className:bt.clsx(Ag.HItem),style:{maxHeight:14,...J&&{minHeight:14,color:"var(--label-neutral)"}},children:[P,O&&O.length>0&&M.jsxs(M.Fragment,{children:[" / ",S["Checked n items"](O.length)]})]})]}),J&&M.jsx(U3,{options:D,optionWidth:"fit-content",tabProps:{style:{marginRight:8}},type:"Tertiary",useSelect:[ue,()=>{}],optionProps:{style:{cursor:"default"},onClick:re=>{var oe;const ge=re.currentTarget.textContent;if(ge===S[ge])return;re.currentTarget.querySelector("svg")===null&&((oe=Z.current)==null||oe.open(re.currentTarget))}},OptionRenderer:re=>{const ge=/_Asc|_Desc/.test(re.option),ve=(W==null?void 0:W.defKey)===re.option,oe=ue===re.option,K=W==null?void 0:W.isAsc,he=()=>{if(ge){ne(void 0),se(re.option);const[xe,Fe]=re.option.split("_"),Me=Fe==="Asc";Y==null||Y({defKey:xe,isAsc:Me,sortF:e[xe].sortF})}else oe?fe(re.option,e[re.option].sortF):ne(re.option)},He=ge?(xe=>{const[Fe,Me]=xe.split("_");return(B?Fe+" ":"")+S[Me]})(re.option):S["Sort by x"](re.option);return M.jsxs(vl,{className:bt.clsx(!(ge&&oe)&&"IsClickable"),style:{height:"100%"},onClick:he,children:[He,oe&&!ge&&M.jsx(uo,{icon:ve?K?"RowSortUp":"RowSortDown":"RowSortBoth",style:{marginRight:-5,marginLeft:4}})]},re.option)}})]}),M.jsx(Hg,{}),M.jsxs("div",{className:bt.clsx(Ag.RightHeaderContent,"NoSelect"),children:[x&&M.jsx("div",{className:bt.clsx(Ag.HItem),children:x}),!u&&M.jsx(xk,{defs:e,filterF:a,filterType:R,hasToggleFilteration:l,isFilterSort:D.length>0,isRowRendered:n.isRowRendered,placeholder:I,resources:S,useFilteration:o}),w&&M.jsx(vl,{children:w,className:bt.clsx(Ag.TopRightAddon)})]})]}),M.jsx(H3,{actionRef:Z,defs:j,position:O1.S,width:100,onClose:()=>ne(void 0)})]})},j2={page:1,pageSize:50,pageRange:10},Ok=n=>{const e=Vn.c(258),{defs:t,pk:r,defaultDef:i,rProps:o,useSelect:l,isSelectMulti:a,selectDisabled:u,useCheck:g,checkDisabled:m,isLoading:x,isDisabled:w,title:_,entireItems:S,onStateChange:R,pagedItems:I,totalCount:O,useFilteration:P,useToggleFilteration:H,filterType:W,placeholder:Y,rowHeight:B,usePagination:ee,useSortation:D,showRows:J,noHeader:fe,noDefHeader:Z,noFooter:te,noFilter:ne,noCount:ue,noMarking:se,noStateChangeOnMount:j,TopLeftAddon:re,TopRightAddon:ge,actionRef:ve,RowRenderer:oe,resources:K}=n,he=W===void 0?"Default":W,Ae=B===void 0?40:B;let He;e[0]!==K?(He={...Nr.ATable,...K},e[0]=K,e[1]=He):He=e[1];const xe=He,Fe=z.useRef(null);let Me;e[2]!==r?(Me=(Ne,mt)=>r!==void 0?Array.isArray(r)?r.every(Bn=>fh.isEqual(Ne[Bn],mt[Bn])):fh.isEqual(Ne[r],mt[r]):fh.isEqual(Ne,mt),e[2]=r,e[3]=Me):Me=e[3];const Be=Me;let ke;e[4]!==i?(ke={content:Pk,...i},e[4]=i,e[5]=ke):ke=e[5];const Re=ke;let ze;e[6]!==Re||e[7]!==t?(ze={},rr.keys(t).forEach(Ne=>{const mt=t[Ne],Bn={...Re,...mt};ze[Ne]=Bn}),e[6]=Re,e[7]=t,e[8]=ze):ze=e[8];const Xe=ze;let Le;e[9]!==P?(Le=fh.cloneDeep(P),e[9]=P,e[10]=Le):Le=e[10];const ht=xe["Search(Placeholder)"];let Qe;e[11]!==ht?(Qe={"":{type:"String",placeholder:ht,value:""}},e[11]=ht,e[12]=Qe):Qe=e[12];const[ot,tt]=Do(Le,Qe);let rt;e[13]!==H?(rt=fh.cloneDeep(H),e[13]=H,e[14]=rt):rt=e[14];const[dt,Mt]=Do(rt,void 0),[Bt,Ft]=z.useState(!1),Jt=z.useRef(void 0),pn=z.useRef(void 0);let zt,vn;e[15]!==ot?(vn=()=>{Jt.current===void 0&&(Jt.current=fh.cloneDeep(ot))},zt=[ot],e[15]=ot,e[16]=zt,e[17]=vn):(zt=e[16],vn=e[17]),z.useEffect(vn,zt);let Ht,wn;e[18]!==dt?(Ht=()=>{pn.current===void 0&&dt&&(pn.current=fh.cloneDeep(dt))},wn=[dt],e[18]=dt,e[19]=Ht,e[20]=wn):(Ht=e[19],wn=e[20]),z.useEffect(Ht,wn);let ut;e:{if(Bt&&dt){let mt;e[21]!==Mt||e[22]!==dt?(mt=[dt,Mt],e[21]=Mt,e[22]=dt,e[23]=mt):mt=e[23],ut=mt;break e}let Ne;e[24]!==ot||e[25]!==tt?(Ne=[ot,tt],e[24]=ot,e[25]=tt,e[26]=Ne):Ne=e[26],ut=Ne}const[at,gt]=ut,[It,ln]=z.useState(at);let sn;e:{if(!S){let mt;e[27]===Symbol.for("react.memo_cache_sentinel")?(mt=[],e[27]=mt):mt=e[27],sn=mt;break e}let Ne;e[28]!==It||e[29]!==Xe||e[30]!==S?(Ne=Sd.applyFilteration(S,Xe,It),e[28]=It,e[29]=Xe,e[30]=S,e[31]=Ne):Ne=e[31],sn=Ne}const nn=sn;let Ue;e:{for(const Ne in It){const mt=It[Ne];if(mt.value!==void 0&&mt.value!==null&&mt.value!==""){Ue=!0;break e}}Ue=!1}const Ce=Ue,[Ze,Ct]=Do(D,void 0);let Qt;e[32]!==Xe||e[33]!==nn||e[34]!==Ze?(Qt=Sd.applySortation(nn,Xe,Ze),e[32]=Xe,e[33]=nn,e[34]=Ze,e[35]=Qt):Qt=e[35];const Vt=Qt;let bn;e:{if(I!==void 0){let Ne;e[36]!==Xe||e[37]!==I||e[38]!==Ze?(Ne=Sd.applySortation(I,Xe,Ze),e[36]=Xe,e[37]=I,e[38]=Ze,e[39]=Ne):Ne=e[39],bn=Ne;break e}bn=void 0}const hn=bn,[ft,Lt]=z.useState(!1),_t=x??ft,[Wt,an]=Do(ee,j2);let xt;e[40]!==Wt?(xt={...j2,...Wt},e[40]=Wt,e[41]=xt):xt=e[41];const Ot=xt;let rn;if(e[42]!==S||e[43]!==Ot||e[44]!==O||e[45]!==_t||e[46]!==Vt||e[47]!==hn){const Ne={...Ot};if(hn!==void 0){const mt=O??hn.length,Bn=Sd.getPages(mt,Ne.pageSize);Ne.page<1&&(Ne.page=1),O!==void 0&&!_t&&Ne.page>Bn.length&&(Ne.page=Bn.length),rn={pagedItems:hn,totalCount:mt,pagination:Ne}}else if(S!==void 0){const mt=O??Vt.length,Bn=Sd.getPages(mt,Ne.pageSize);Ne.page>Bn.length?Ne.page=Bn.length:Ne.page<1&&(Ne.page=1);const mr=Sd.applyPagination(Vt,Ne.page,Ne.pageSize);let si;e[49]!==mr||e[50]!==Ne||e[51]!==mt?(si={pagedItems:mr,totalCount:mt,pagination:Ne},e[49]=mr,e[50]=Ne,e[51]=mt,e[52]=si):si=e[52],rn=si}else{let mt;e[53]===Symbol.for("react.memo_cache_sentinel")?(mt=[],e[53]=mt):mt=e[53];const Bn=O??0;let mr;e[54]!==Ot||e[55]!==Bn?(mr={pagedItems:mt,totalCount:Bn,pagination:Ot},e[54]=Ot,e[55]=Bn,e[56]=mr):mr=e[56],rn=mr}e[42]=S,e[43]=Ot,e[44]=O,e[45]=_t,e[46]=Vt,e[47]=hn,e[48]=rn}else rn=e[48];const{pagedItems:mn,totalCount:Cn,pagination:Xt}=rn;let xn;e[57]!==Xt.page||e[58]!==Xt.pageRange||e[59]!==Xt.pageSize||e[60]!==Cn?(xn=Sd.getRangedPages(Xt.page,Cn,Xt.pageSize,Xt.pageRange),e[57]=Xt.page,e[58]=Xt.pageRange,e[59]=Xt.pageSize,e[60]=Cn,e[61]=xn):xn=e[61];const{pages:Nn,rangedPages:cr}=xn;let En;e[62]!==g?(En=g??[],e[62]=g,e[63]=En):En=e[63];const[On,$e]=En;let $t;if(e[64]!==On||e[65]!==Be||e[66]!==mn){let Ne;e[68]!==On||e[69]!==Be?(Ne=mt=>On==null?void 0:On.some(Bn=>Be(Bn,mt)),e[68]=On,e[69]=Be,e[70]=Ne):Ne=e[70],$t=mn.filter(Ne),e[64]=On,e[65]=Be,e[66]=mn,e[67]=$t}else $t=e[67];const on=$t;let zn;if(e[71]!==m||e[72]!==mn){let Ne;e[74]!==m?(Ne=mt=>!(m!=null&&m(mt)),e[74]=m,e[75]=Ne):Ne=e[75],zn=mn.filter(Ne),e[71]=m,e[72]=mn,e[73]=zn}else zn=e[73];const $n=zn;let Mn;e[76]!==Be||e[77]!==$n||e[78]!==on?(Mn=$n.length>0&&$n.every(Ne=>on.some(mt=>Be(mt,Ne))),e[76]=Be,e[77]=$n,e[78]=on,e[79]=Mn):Mn=e[79];const Et=Mn;let Se;e:{if(Et){Se=!1;break e}let Ne;if(e[80]!==Be||e[81]!==$n||e[82]!==on){let mt;e[84]!==Be||e[85]!==on?(mt=Bn=>on.some(mr=>Be(mr,Bn)),e[84]=Be,e[85]=on,e[86]=mt):mt=e[86],Ne=$n.some(mt),e[80]=Be,e[81]=$n,e[82]=on,e[83]=Ne}else Ne=e[83];Se=Ne}const nt=Se;let At;e[87]!==On||e[88]!==w||e[89]!==Be||e[90]!==Et||e[91]!==nt||e[92]!==$n||e[93]!==$e?(At=()=>{!On||!$e||w||$e(Et||nt?On.filter(Ne=>!$n.some(mt=>Be(mt,Ne))):[...On,...$n])},e[87]=On,e[88]=w,e[89]=Be,e[90]=Et,e[91]=nt,e[92]=$n,e[93]=$e,e[94]=At):At=e[94];const _n=At;let Rn;e[95]!==On||e[96]!==w||e[97]!==Be||e[98]!==$e?(Rn=Ne=>{!On||!$e||w||(On.some(mt=>Be(mt,Ne))?$e(On.filter(mt=>!Be(mt,Ne))):$e([...On,Ne]))},e[95]=On,e[96]=w,e[97]=Be,e[98]=$e,e[99]=Rn):Rn=e[99];const Zn=Rn;let ir,gr;e[100]!==m||e[101]!==On||e[102]!==$e?(ir=()=>{if(!$e||!On||!m)return;On.filter(mt=>m(mt)).length>0&&$e(On.filter(mt=>!m(mt)))},gr=[m,On,$e],e[100]=m,e[101]=On,e[102]=$e,e[103]=ir,e[104]=gr):(ir=e[103],gr=e[104]),z.useEffect(ir,gr);let Sn;e[105]!==On||e[106]!==Et||e[107]!==nt||e[108]!==_n?(Sn=On&&M.jsx(w1,{isIndeterminate:nt,useCheck:[Et,_n]}),e[105]=On,e[106]=Et,e[107]=nt,e[108]=_n,e[109]=Sn):Sn=e[109];let qn;e[110]!==m||e[111]!==On||e[112]!==Be||e[113]!==Zn?(qn=Ne=>{const{item:mt}=Ne,Bn=m==null?void 0:m(mt),mr=typeof Bn=="string"?Bn:void 0,si=On==null?void 0:On.some(qi=>Be(qi,mt));return M.jsx(w1,{isDisabled:Bn,style:{zIndex:1},tooltip:mr,useCheck:[si,()=>Zn(mt)],onClick:Dk})},e[110]=m,e[111]=On,e[112]=Be,e[113]=Zn,e[114]=qn):qn=e[114];let Tn;e[115]!==Sn||e[116]!==qn?(Tn={hContent:Sn,content:qn,minWidth:32,maxWidth:32},e[115]=Sn,e[116]=qn,e[117]=Tn):Tn=e[117];const dr=Tn;let li;e:{if(!g){li=Xe;break e}let Ne;e[118]!==dr||e[119]!==Xe?(Ne={checkDef:dr,...Xe},e[118]=dr,e[119]=Xe,e[120]=Ne):Ne=e[120],li=Ne}const wo=li;let fo;e[121]!==R||e[122]!==an||e[123]!==Ct?(fo=async Ne=>{R&&(Lt(!0),await R(Ne),Lt(!1)),an==null||an(Ne.pagination),Ct==null||Ct(Ne.sortation),ln(Ne.filteration)},e[121]=R,e[122]=an,e[123]=Ct,e[124]=fo):fo=e[124];const Br=fo;let al;e[125]===Symbol.for("react.memo_cache_sentinel")?(al=Ne=>{var mt;(mt=Fe.current)==null||mt.call(Fe,Ne)},e[125]=al):al=e[125];const ho=al;let Si,Jl;e[126]!==ve||e[127]!==S||e[128]!==at||e[129]!==Br||e[130]!==Xt||e[131]!==gt||e[132]!==Ze?(Si=()=>{if(!ve)return;const Ne=Bn=>{const mr={entireItems:S,filteration:at,pagination:Xt,sortation:Ze},si=Bn?Bn(mr):mr;Br(si)},mt=Bn=>{const mr={...Xt,page:1},si=Bn?Bn(at):at;gt==null||gt(si),Br({entireItems:S,filteration:si,pagination:mr,sortation:Ze})};ve.current={fireOnStateChange:Ne,applyFilteration:mt,scrollToSelected:ho}},Jl=[ve,Br,S,gt,at,Xt,Ze,ho],e[126]=ve,e[127]=S,e[128]=at,e[129]=Br,e[130]=Xt,e[131]=gt,e[132]=Ze,e[133]=Si,e[134]=Jl):(Si=e[133],Jl=e[134]),z.useEffect(Si,Jl);let No;e[135]!==It||e[136]!==S||e[137]!==Br||e[138]!==Nn||e[139]!==Xt.page||e[140]!==Xt.pageSize||e[141]!==Ze?(No=Ne=>{Ne.page===Xt.page&&Ne.pageSize===Xt.pageSize||(Ne.page<1?Ne.page=1:Ne.page>Nn[Nn.length-1]&&(Ne.page=Nn[Nn.length-1]),Br({entireItems:S,filteration:It,pagination:Ne,sortation:Ze}))},e[135]=It,e[136]=S,e[137]=Br,e[138]=Nn,e[139]=Xt.page,e[140]=Xt.pageSize,e[141]=Ze,e[142]=No):No=e[142];const Ao=No;let jr;e[143]!==gt?(jr=Ne=>{gt&&gt(Ne)},e[143]=gt,e[144]=jr):jr=e[144];const dn=jr;let Pn;e[145]!==It||e[146]!==S||e[147]!==Br||e[148]!==Xt?(Pn=Ne=>{Br({entireItems:S,filteration:It,pagination:Xt,sortation:Ne})},e[145]=It,e[146]=S,e[147]=Br,e[148]=Xt,e[149]=Pn):Pn=e[149];const Er=Pn;let ur;e[150]!==Ao||e[151]!==Xt?(ur=Ne=>{Ao({...Xt,page:Ne})},e[150]=Ao,e[151]=Xt,e[152]=ur):ur=e[152];const Fn=ur;let zr;e[153]!==Fn||e[154]!==Xt.page?(zr=()=>{Fn(Xt.page-1)},e[153]=Fn,e[154]=Xt.page,e[155]=zr):zr=e[155];const Lr=zr;let hi;e[156]!==Fn||e[157]!==Xt.page?(hi=()=>{Fn(Xt.page+1)},e[156]=Fn,e[157]=Xt.page,e[158]=hi):hi=e[158];const Ui=hi;let Fr;e[159]!==Fn?(Fr=()=>{Fn(1)},e[159]=Fn,e[160]=Fr):Fr=e[160];const Xo=Fr;let Co;e[161]!==Fn||e[162]!==Nn?(Co=()=>{Fn(Nn[Nn.length-1])},e[161]=Fn,e[162]=Nn,e[163]=Co):Co=e[163];const Fo=Co;let Ti;e[164]!==Fn||e[165]!==Xo||e[166]!==Fo||e[167]!==Ui||e[168]!==Lr?(Ti={move:Fn,movePrev:Lr,moveNext:Ui,moveFirst:Xo,moveLast:Fo},e[164]=Fn,e[165]=Xo,e[166]=Fo,e[167]=Ui,e[168]=Lr,e[169]=Ti):Ti=e[169];const $r=Ti;let xr;e[170]!==S||e[171]!==at||e[172]!==Br||e[173]!==Xt||e[174]!==Ze?(xr=()=>{const Ne={...Xt,page:1};Br({entireItems:S,filteration:at,pagination:Ne,sortation:Ze})},e[170]=S,e[171]=at,e[172]=Br,e[173]=Xt,e[174]=Ze,e[175]=xr):xr=e[175];const bl=xr;let mi;e[176]!==Bt?(mi=()=>{Ft(!Bt)},e[176]=Bt,e[177]=mi):mi=e[177];const oo=mi;let Ko;e[178]!==ot||e[179]!==Bt||e[180]!==gt||e[181]!==Mt||e[182]!==dt?(Ko=()=>{if(Bt&&dt){const Ne=pn.current;Ne?Mt==null||Mt(ex(dt,Ne)):Mt==null||Mt($2(dt))}else{const Ne=Jt.current;Ne?gt==null||gt(ex(ot,Ne)):gt==null||gt($2(ot))}},e[178]=ot,e[179]=Bt,e[180]=gt,e[181]=Mt,e[182]=dt,e[183]=Ko):Ko=e[183];const Bo=Ko;let Gi;e[184]!==bl||e[185]!==Bo||e[186]!==oo?(Gi={apply:bl,toggle:oo,clear:Bo},e[184]=bl,e[185]=Bo,e[186]=oo,e[187]=Gi):Gi=e[187];const zo=Gi;let go;e[188]!==S||e[189]!==at||e[190]!==j||e[191]!==Br||e[192]!==Xt||e[193]!==Ze?(go=()=>{j||Br({entireItems:S,filteration:at,pagination:Xt,sortation:Ze})},e[188]=S,e[189]=at,e[190]=j,e[191]=Br,e[192]=Xt,e[193]=Ze,e[194]=go):go=e[194],G3(go);let po;e[195]!==Xe?(po=rr.map(Xe,mt=>{const[Bn]=mt;return Xe[Bn].minWidth??$d}).reduce(Nk,0),e[195]=Xe,e[196]=po):po=e[196];const Ho=po,jn=oe!==void 0;let vo;e[197]!==Ho?(vo={minWidth:Ho},e[197]=Ho,e[198]=vo):vo=e[198];let di;e[199]!==re||e[200]!==ge||e[201]!==On||e[202]!==Xe||e[203]!==zo||e[204]!==he||e[205]!==at||e[206]!==Ce||e[207]!==jn||e[208]!==ue||e[209]!==ne||e[210]!==fe||e[211]!==dn||e[212]!==Er||e[213]!==Y||e[214]!==xe||e[215]!==$e||e[216]!==Ze||e[217]!==_||e[218]!==dt||e[219]!==Cn||e[220]!==g?(di=!fe&&M.jsx(Lk,{defs:Xe,filterF:zo,filterType:he,hasToggleFilteration:dt!==void 0,isFiltered:Ce,isRowRendered:jn,noCount:ue,noFilter:ne,placeholder:Y,resources:xe,title:_,TopLeftAddon:re,TopRightAddon:ge,totalCount:Cn,useCheck:g&&On?[On,$e]:void 0,useFilteration:[at,dn],useSortation:[Ze,Er]}),e[199]=re,e[200]=ge,e[201]=On,e[202]=Xe,e[203]=zo,e[204]=he,e[205]=at,e[206]=Ce,e[207]=jn,e[208]=ue,e[209]=ne,e[210]=fe,e[211]=dn,e[212]=Er,e[213]=Y,e[214]=xe,e[215]=$e,e[216]=Ze,e[217]=_,e[218]=dt,e[219]=Cn,e[220]=g,e[221]=di):di=e[221];let Eo;e[222]!==Er||e[223]!==Ze?(Eo=[Ze,Er],e[222]=Er,e[223]=Ze,e[224]=Eo):Eo=e[224];let er;e[225]===Symbol.for("react.memo_cache_sentinel")?(er=Ne=>Fe.current=Ne,e[225]=er):er=e[225];let wr;e[226]!==oe||e[227]!==It||e[228]!==wo||e[229]!==w||e[230]!==Be||e[231]!==_t||e[232]!==jn||e[233]!==a||e[234]!==Z||e[235]!==se||e[236]!==mn||e[237]!==Xt||e[238]!==o||e[239]!==xe||e[240]!==Ae||e[241]!==u||e[242]!==J||e[243]!==Eo||e[244]!==l?(wr=M.jsx(jI,{appliedFilteration:It,defs:wo,isEqual:Be,isLoading:_t,isRowRendered:jn,isSelectMulti:a,isTableDisabled:w,noDefHeader:Z,noMarking:se,pagedItems:mn,pagination:Xt,resources:xe,rowHeight:Ae,RowRenderer:oe,rProps:o,selectDisabled:u,showRows:J,useSelect:l,useSortation:Eo,onScrollToSelectedReady:er}),e[226]=oe,e[227]=It,e[228]=wo,e[229]=w,e[230]=Be,e[231]=_t,e[232]=jn,e[233]=a,e[234]=Z,e[235]=se,e[236]=mn,e[237]=Xt,e[238]=o,e[239]=xe,e[240]=Ae,e[241]=u,e[242]=J,e[243]=Eo,e[244]=l,e[245]=wr):wr=e[245];let me;e[246]!==te||e[247]!==$r||e[248]!==Nn||e[249]!==Xt||e[250]!==cr?(me=!te&&M.jsx(lk,{pageF:$r,pages:Nn,pagination:Xt,rangedPages:cr}),e[246]=te,e[247]=$r,e[248]=Nn,e[249]=Xt,e[250]=cr,e[251]=me):me=e[251];let st;return e[252]!==w||e[253]!==vo||e[254]!==di||e[255]!==wr||e[256]!==me?(st=M.jsxs(Wi,{className:LI.ATable,isDisabled:w,style:vo,children:[di,wr,me]}),e[252]=w,e[253]=vo,e[254]=di,e[255]=wr,e[256]=me,e[257]=st):st=e[257],st},Pk=n=>{const{defKey:e,item:t}=n;if(rr.hasKey(t,e)){const r=t[e];return rr.isReactNode(r)?r:null}else return null};function $2(n){const e={...n};for(const t in e)e[t].value=void 0;return e}function ex(n,e){const t={...n};for(const r in t){const i=e[r];i&&"value"in i?t[r].value=i.value:t[r].value=void 0}return t}function Dk(n){return n.stopPropagation()}function Nk(n,e){return n+e}const Fk="_AText_1asz6_1",Bk={AText:Fk},X3=n=>{const e=Vn.c(12),{text:t,styled:r,style:i}=n;let o;if(e[0]!==i||e[1]!==r||e[2]!==t){e:{if(t)if(r)if(i){if(r===!0)if(i==="bold"){let g;e[4]!==t?(g=M.jsx("b",{children:t}),e[4]=t,e[5]=g):g=e[5],o=g;break e}else{let g;e[6]!==i||e[7]!==t?(g=M.jsx("span",{style:i,children:t}),e[6]=i,e[7]=t,e[8]=g):g=e[8],o=g;break e}else if(typeof r=="string"){const g=t.split(r);if(i==="bold"){o=g.map((m,x)=>M.jsxs(z.Fragment,{children:[p0(m),x<g.length-1?M.jsx("b",{children:p0(r)}):""]},x));break e}o=g.map((m,x)=>M.jsxs(z.Fragment,{children:[p0(m),x<g.length-1&&M.jsx("span",{style:i,children:p0(r)})]},x));break e}}else{o=t;break e}else{o=t;break e}else{o="";break e}o=void 0}e[0]=i,e[1]=r,e[2]=t,e[3]=o}else o=e[3];const l=o;let a;e[9]===Symbol.for("react.memo_cache_sentinel")?(a=bt.clsx("Body1Reading",Bk.AText,"NoSelect"),e[9]=a):a=e[9];let u;return e[10]!==l?(u=M.jsx("div",{className:a,children:l}),e[10]=l,e[11]=u):u=e[11],u};function p0(n){const e=n.split(`
287
287
  `);return e.map((t,r)=>M.jsxs(z.Fragment,{children:[t,r!==e.length-1&&M.jsx("br",{})]},r))}const zk="_Base_cpm4t_7",Hk="_ATextArea_cpm4t_11",Wk="_Primary_cpm4t_34",Uk="_UnAvailable_cpm4t_39",Gk="_Secondary_cpm4t_47",Yk="_ReadOnly_cpm4t_59",v0={Base:zk,ATextArea:Hk,Primary:Wk,UnAvailable:Uk,Secondary:Gk,ReadOnly:Yk,Error:"_Error_cpm4t_66"},Vk=["Primary","Secondary","ReadOnly","Error"],Zk=n=>{const e=Vn.c(60);let t,r,i,o,l,a,u,g,m,x,w,_,S;if(e[0]!==n){const{onEnterPress:xe,errorMessage:Fe,type:Me,textAreaRef:Be,useValue:ke,rows:Re,isReadonly:ze,placeholder:Xe,maxLength:Le,tabIndex:ht,autoFocus:Qe,textAreaProps:ot,...tt}=n;a=xe,r=Fe,_=Be,S=ke,g=Re,i=ze,u=Xe,l=Le,x=ht,t=Qe,w=ot,o=Me===void 0?"Primary":Me,m=zg(tt),e[0]=n,e[1]=t,e[2]=r,e[3]=i,e[4]=o,e[5]=l,e[6]=a,e[7]=u,e[8]=g,e[9]=m,e[10]=x,e[11]=w,e[12]=_,e[13]=S}else t=e[1],r=e[2],i=e[3],o=e[4],l=e[5],a=e[6],u=e[7],g=e[8],m=e[9],x=e[10],w=e[11],_=e[12],S=e[13];const[R,I]=m;let O,P,H,W;e[14]!==R?({wrapId:P,wrapProps:H,labelProps:O,...W}=R,e[14]=R,e[15]=O,e[16]=P,e[17]=H,e[18]=W):(O=e[15],P=e[16],H=e[17],W=e[18]);let Y;Xk(r)?Y="Error":Y=o;const B=Y;let ee;B==="ReadOnly"?ee=!0:ee=i;const D=ee,J=I.isDisabled||I.isLoading,[fe,Z]=Do(S,"");let te;e[19]!==Z?(te=xe=>{Z&&Z(xe)},e[19]=Z,e[20]=te):te=e[20];const ne=te;let ue;e[21]!==ne||e[22]!==w||e[23]!==J?(ue=xe=>{var Fe;J||(ne(xe.target.value),(Fe=w==null?void 0:w.onChange)==null||Fe.call(w,xe))},e[21]=ne,e[22]=w,e[23]=J,e[24]=ue):ue=e[24];const se=ue;let j;e[25]!==a||e[26]!==w||e[27]!==J?(j=xe=>{var Fe;if(!J){if((Fe=w==null?void 0:w.onKeyDown)==null||Fe.call(w,xe),xe.key==="Tab"){const Me=xe.currentTarget.selectionStart,Be=xe.currentTarget.selectionEnd;xe.currentTarget.value=xe.currentTarget.value.substring(0,Me)+" "+xe.currentTarget.value.substring(Be),xe.currentTarget.selectionStart=xe.currentTarget.selectionEnd=Me+1,xe.preventDefault()}else xe.key==="Enter"&&(a==null||a(xe.currentTarget.value),xe.stopPropagation());xe.key!=="Escape"&&xe.stopPropagation()}},e[25]=a,e[26]=w,e[27]=J,e[28]=j):j=e[28];const re=j;let ge;e[29]!==O||e[30]!==P||e[31]!==H||e[32]!==W?(ge={wrapId:P,wrapProps:H,labelProps:O,...W},e[29]=O,e[30]=P,e[31]=H,e[32]=W,e[33]=ge):ge=e[33];let ve;e[34]!==I.className?(ve=bt.clsx(v0.Base,I.className),e[34]=I.className,e[35]=ve):ve=e[35];let oe;e[36]!==(w==null?void 0:w.className)||e[37]!==B||e[38]!==J?(oe=bt.clsx(v0.ATextArea,v0[B],J&&v0.UnAvailable,w==null?void 0:w.className),e[36]=w==null?void 0:w.className,e[37]=B,e[38]=J,e[39]=oe):oe=e[39];const K=I.isDisabled||I.isLoading?-1:x;let he;e[40]!==t||e[41]!==D||e[42]!==l||e[43]!==se||e[44]!==re||e[45]!==u||e[46]!==g||e[47]!==K||e[48]!==oe||e[49]!==w||e[50]!==_||e[51]!==fe?(he=M.jsx("textarea",{...w,ref:_,autoFocus:t,className:oe,maxLength:l,placeholder:u,readOnly:D,rows:g,tabIndex:K,value:fe,onChange:se,onKeyDown:re}),e[40]=t,e[41]=D,e[42]=l,e[43]=se,e[44]=re,e[45]=u,e[46]=g,e[47]=K,e[48]=oe,e[49]=w,e[50]=_,e[51]=fe,e[52]=he):he=e[52];let Ae;e[53]!==I||e[54]!==he||e[55]!==ve?(Ae=M.jsx(Wi,{...I,className:ve,children:he}),e[53]=I,e[54]=he,e[55]=ve,e[56]=Ae):Ae=e[56];let He;return e[57]!==Ae||e[58]!==ge?(He=M.jsx(sg,{...ge,children:Ae}),e[57]=Ae,e[58]=ge,e[59]=He):He=e[59],He};function Xk(n){return Array.isArray(n)?n.filter(Boolean).length>0:!!n}/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */const{entries:K3,setPrototypeOf:tx,isFrozen:Kk,getPrototypeOf:Jk,getOwnPropertyDescriptor:Qk}=Object;let{freeze:Ou,seal:bh,create:My}=Object,{apply:Ly,construct:Oy}=typeof Reflect<"u"&&Reflect;Ou||(Ou=function(e){return e});bh||(bh=function(e){return e});Ly||(Ly=function(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return e.apply(t,i)});Oy||(Oy=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return new e(...r)});const b0=Pu(Array.prototype.forEach),qk=Pu(Array.prototype.lastIndexOf),nx=Pu(Array.prototype.pop),tp=Pu(Array.prototype.push),jk=Pu(Array.prototype.splice),Y0=Pu(String.prototype.toLowerCase),ab=Pu(String.prototype.toString),cb=Pu(String.prototype.match),np=Pu(String.prototype.replace),$k=Pu(String.prototype.indexOf),e7=Pu(String.prototype.trim),Rh=Pu(Object.prototype.hasOwnProperty),Mu=Pu(RegExp.prototype.test),rp=t7(TypeError);function Pu(n){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return Ly(n,e,r)}}function t7(n){return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Oy(n,t)}}function Mi(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Y0;tx&&tx(n,null);let r=e.length;for(;r--;){let i=e[r];if(typeof i=="string"){const o=t(i);o!==i&&(Kk(e)||(e[r]=o),i=o)}n[i]=!0}return n}function n7(n){for(let e=0;e<n.length;e++)Rh(n,e)||(n[e]=null);return n}function _d(n){const e=My(null);for(const[t,r]of K3(n))Rh(n,t)&&(Array.isArray(r)?e[t]=n7(r):r&&typeof r=="object"&&r.constructor===Object?e[t]=_d(r):e[t]=r);return e}function ip(n,e){for(;n!==null;){const r=Qk(n,e);if(r){if(r.get)return Pu(r.get);if(typeof r.value=="function")return Pu(r.value)}n=Jk(n)}function t(){return null}return t}const rx=Ou(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ub=Ou(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),fb=Ou(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),r7=Ou(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hb=Ou(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),i7=Ou(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ix=Ou(["#text"]),ox=Ou(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),db=Ou(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),lx=Ou(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),y0=Ou(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),o7=bh(/\{\{[\w\W]*|[\w\W]*\}\}/gm),l7=bh(/<%[\w\W]*|[\w\W]*%>/gm),s7=bh(/\$\{[\w\W]*/gm),a7=bh(/^data-[\-\w.\u00B7-\uFFFF]+$/),c7=bh(/^aria-[\-\w]+$/),J3=bh(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),u7=bh(/^(?:\w+script|data):/i),f7=bh(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q3=bh(/^html$/i),h7=bh(/^[a-z][.\w]*(-[.\w]+)+$/i);var sx=Object.freeze({__proto__:null,ARIA_ATTR:c7,ATTR_WHITESPACE:f7,CUSTOM_ELEMENT:h7,DATA_ATTR:a7,DOCTYPE_NAME:Q3,ERB_EXPR:l7,IS_ALLOWED_URI:J3,IS_SCRIPT_OR_DATA:u7,MUSTACHE_EXPR:o7,TMPLIT_EXPR:s7});const op={element:1,text:3,progressingInstruction:7,comment:8,document:9},d7=function(){return typeof window>"u"?null:window},g7=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(r=t.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return e.createPolicy(o,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},ax=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function q3(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d7();const e=Et=>q3(Et);if(e.version="3.3.0",e.removed=[],!n||!n.document||n.document.nodeType!==op.document||!n.Element)return e.isSupported=!1,e;let{document:t}=n;const r=t,i=r.currentScript,{DocumentFragment:o,HTMLTemplateElement:l,Node:a,Element:u,NodeFilter:g,NamedNodeMap:m=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:x,DOMParser:w,trustedTypes:_}=n,S=u.prototype,R=ip(S,"cloneNode"),I=ip(S,"remove"),O=ip(S,"nextSibling"),P=ip(S,"childNodes"),H=ip(S,"parentNode");if(typeof l=="function"){const Et=t.createElement("template");Et.content&&Et.content.ownerDocument&&(t=Et.content.ownerDocument)}let W,Y="";const{implementation:B,createNodeIterator:ee,createDocumentFragment:D,getElementsByTagName:J}=t,{importNode:fe}=r;let Z=ax();e.isSupported=typeof K3=="function"&&typeof H=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:te,ERB_EXPR:ne,TMPLIT_EXPR:ue,DATA_ATTR:se,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:re,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:ve}=sx;let{IS_ALLOWED_URI:oe}=sx,K=null;const he=Mi({},[...rx,...ub,...fb,...hb,...ix]);let Ae=null;const He=Mi({},[...ox,...db,...lx,...y0]);let xe=Object.seal(My(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Fe=null,Me=null;const Be=Object.seal(My(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ke=!0,Re=!0,ze=!1,Xe=!0,Le=!1,ht=!0,Qe=!1,ot=!1,tt=!1,rt=!1,dt=!1,Mt=!1,Bt=!0,Ft=!1;const Jt="user-content-";let pn=!0,zt=!1,vn={},Ht=null;const wn=Mi({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ut=null;const at=Mi({},["audio","video","img","source","image","track"]);let gt=null;const It=Mi({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ln="http://www.w3.org/1998/Math/MathML",sn="http://www.w3.org/2000/svg",nn="http://www.w3.org/1999/xhtml";let Ue=nn,Ce=!1,Ze=null;const Ct=Mi({},[ln,sn,nn],ab);let Qt=Mi({},["mi","mo","mn","ms","mtext"]),Vt=Mi({},["annotation-xml"]);const bn=Mi({},["title","style","font","a","script"]);let hn=null;const ft=["application/xhtml+xml","text/html"],Lt="text/html";let _t=null,Wt=null;const an=t.createElement("form"),xt=function(Se){return Se instanceof RegExp||Se instanceof Function},Ot=function(){let Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Wt&&Wt===Se)){if((!Se||typeof Se!="object")&&(Se={}),Se=_d(Se),hn=ft.indexOf(Se.PARSER_MEDIA_TYPE)===-1?Lt:Se.PARSER_MEDIA_TYPE,_t=hn==="application/xhtml+xml"?ab:Y0,K=Rh(Se,"ALLOWED_TAGS")?Mi({},Se.ALLOWED_TAGS,_t):he,Ae=Rh(Se,"ALLOWED_ATTR")?Mi({},Se.ALLOWED_ATTR,_t):He,Ze=Rh(Se,"ALLOWED_NAMESPACES")?Mi({},Se.ALLOWED_NAMESPACES,ab):Ct,gt=Rh(Se,"ADD_URI_SAFE_ATTR")?Mi(_d(It),Se.ADD_URI_SAFE_ATTR,_t):It,ut=Rh(Se,"ADD_DATA_URI_TAGS")?Mi(_d(at),Se.ADD_DATA_URI_TAGS,_t):at,Ht=Rh(Se,"FORBID_CONTENTS")?Mi({},Se.FORBID_CONTENTS,_t):wn,Fe=Rh(Se,"FORBID_TAGS")?Mi({},Se.FORBID_TAGS,_t):_d({}),Me=Rh(Se,"FORBID_ATTR")?Mi({},Se.FORBID_ATTR,_t):_d({}),vn=Rh(Se,"USE_PROFILES")?Se.USE_PROFILES:!1,ke=Se.ALLOW_ARIA_ATTR!==!1,Re=Se.ALLOW_DATA_ATTR!==!1,ze=Se.ALLOW_UNKNOWN_PROTOCOLS||!1,Xe=Se.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Le=Se.SAFE_FOR_TEMPLATES||!1,ht=Se.SAFE_FOR_XML!==!1,Qe=Se.WHOLE_DOCUMENT||!1,rt=Se.RETURN_DOM||!1,dt=Se.RETURN_DOM_FRAGMENT||!1,Mt=Se.RETURN_TRUSTED_TYPE||!1,tt=Se.FORCE_BODY||!1,Bt=Se.SANITIZE_DOM!==!1,Ft=Se.SANITIZE_NAMED_PROPS||!1,pn=Se.KEEP_CONTENT!==!1,zt=Se.IN_PLACE||!1,oe=Se.ALLOWED_URI_REGEXP||J3,Ue=Se.NAMESPACE||nn,Qt=Se.MATHML_TEXT_INTEGRATION_POINTS||Qt,Vt=Se.HTML_INTEGRATION_POINTS||Vt,xe=Se.CUSTOM_ELEMENT_HANDLING||{},Se.CUSTOM_ELEMENT_HANDLING&&xt(Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xe.tagNameCheck=Se.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&xt(Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xe.attributeNameCheck=Se.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Se.CUSTOM_ELEMENT_HANDLING&&typeof Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(xe.allowCustomizedBuiltInElements=Se.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(Re=!1),dt&&(rt=!0),vn&&(K=Mi({},ix),Ae=[],vn.html===!0&&(Mi(K,rx),Mi(Ae,ox)),vn.svg===!0&&(Mi(K,ub),Mi(Ae,db),Mi(Ae,y0)),vn.svgFilters===!0&&(Mi(K,fb),Mi(Ae,db),Mi(Ae,y0)),vn.mathMl===!0&&(Mi(K,hb),Mi(Ae,lx),Mi(Ae,y0))),Se.ADD_TAGS&&(typeof Se.ADD_TAGS=="function"?Be.tagCheck=Se.ADD_TAGS:(K===he&&(K=_d(K)),Mi(K,Se.ADD_TAGS,_t))),Se.ADD_ATTR&&(typeof Se.ADD_ATTR=="function"?Be.attributeCheck=Se.ADD_ATTR:(Ae===He&&(Ae=_d(Ae)),Mi(Ae,Se.ADD_ATTR,_t))),Se.ADD_URI_SAFE_ATTR&&Mi(gt,Se.ADD_URI_SAFE_ATTR,_t),Se.FORBID_CONTENTS&&(Ht===wn&&(Ht=_d(Ht)),Mi(Ht,Se.FORBID_CONTENTS,_t)),pn&&(K["#text"]=!0),Qe&&Mi(K,["html","head","body"]),K.table&&(Mi(K,["tbody"]),delete Fe.tbody),Se.TRUSTED_TYPES_POLICY){if(typeof Se.TRUSTED_TYPES_POLICY.createHTML!="function")throw rp('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Se.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw rp('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');W=Se.TRUSTED_TYPES_POLICY,Y=W.createHTML("")}else W===void 0&&(W=g7(_,i)),W!==null&&typeof Y=="string"&&(Y=W.createHTML(""));Ou&&Ou(Se),Wt=Se}},rn=Mi({},[...ub,...fb,...r7]),mn=Mi({},[...hb,...i7]),Cn=function(Se){let nt=H(Se);(!nt||!nt.tagName)&&(nt={namespaceURI:Ue,tagName:"template"});const At=Y0(Se.tagName),_n=Y0(nt.tagName);return Ze[Se.namespaceURI]?Se.namespaceURI===sn?nt.namespaceURI===nn?At==="svg":nt.namespaceURI===ln?At==="svg"&&(_n==="annotation-xml"||Qt[_n]):!!rn[At]:Se.namespaceURI===ln?nt.namespaceURI===nn?At==="math":nt.namespaceURI===sn?At==="math"&&Vt[_n]:!!mn[At]:Se.namespaceURI===nn?nt.namespaceURI===sn&&!Vt[_n]||nt.namespaceURI===ln&&!Qt[_n]?!1:!mn[At]&&(bn[At]||!rn[At]):!!(hn==="application/xhtml+xml"&&Ze[Se.namespaceURI]):!1},Xt=function(Se){tp(e.removed,{element:Se});try{H(Se).removeChild(Se)}catch{I(Se)}},xn=function(Se,nt){try{tp(e.removed,{attribute:nt.getAttributeNode(Se),from:nt})}catch{tp(e.removed,{attribute:null,from:nt})}if(nt.removeAttribute(Se),Se==="is")if(rt||dt)try{Xt(nt)}catch{}else try{nt.setAttribute(Se,"")}catch{}},Nn=function(Se){let nt=null,At=null;if(tt)Se="<remove></remove>"+Se;else{const Zn=cb(Se,/^[\r\n\t ]+/);At=Zn&&Zn[0]}hn==="application/xhtml+xml"&&Ue===nn&&(Se='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Se+"</body></html>");const _n=W?W.createHTML(Se):Se;if(Ue===nn)try{nt=new w().parseFromString(_n,hn)}catch{}if(!nt||!nt.documentElement){nt=B.createDocument(Ue,"template",null);try{nt.documentElement.innerHTML=Ce?Y:_n}catch{}}const Rn=nt.body||nt.documentElement;return Se&&At&&Rn.insertBefore(t.createTextNode(At),Rn.childNodes[0]||null),Ue===nn?J.call(nt,Qe?"html":"body")[0]:Qe?nt.documentElement:Rn},cr=function(Se){return ee.call(Se.ownerDocument||Se,Se,g.SHOW_ELEMENT|g.SHOW_COMMENT|g.SHOW_TEXT|g.SHOW_PROCESSING_INSTRUCTION|g.SHOW_CDATA_SECTION,null)},En=function(Se){return Se instanceof x&&(typeof Se.nodeName!="string"||typeof Se.textContent!="string"||typeof Se.removeChild!="function"||!(Se.attributes instanceof m)||typeof Se.removeAttribute!="function"||typeof Se.setAttribute!="function"||typeof Se.namespaceURI!="string"||typeof Se.insertBefore!="function"||typeof Se.hasChildNodes!="function")},On=function(Se){return typeof a=="function"&&Se instanceof a};function $e(Et,Se,nt){b0(Et,At=>{At.call(e,Se,nt,Wt)})}const $t=function(Se){let nt=null;if($e(Z.beforeSanitizeElements,Se,null),En(Se))return Xt(Se),!0;const At=_t(Se.nodeName);if($e(Z.uponSanitizeElement,Se,{tagName:At,allowedTags:K}),ht&&Se.hasChildNodes()&&!On(Se.firstElementChild)&&Mu(/<[/\w!]/g,Se.innerHTML)&&Mu(/<[/\w!]/g,Se.textContent)||Se.nodeType===op.progressingInstruction||ht&&Se.nodeType===op.comment&&Mu(/<[/\w]/g,Se.data))return Xt(Se),!0;if(!(Be.tagCheck instanceof Function&&Be.tagCheck(At))&&(!K[At]||Fe[At])){if(!Fe[At]&&zn(At)&&(xe.tagNameCheck instanceof RegExp&&Mu(xe.tagNameCheck,At)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(At)))return!1;if(pn&&!Ht[At]){const _n=H(Se)||Se.parentNode,Rn=P(Se)||Se.childNodes;if(Rn&&_n){const Zn=Rn.length;for(let ir=Zn-1;ir>=0;--ir){const gr=R(Rn[ir],!0);gr.__removalCount=(Se.__removalCount||0)+1,_n.insertBefore(gr,O(Se))}}}return Xt(Se),!0}return Se instanceof u&&!Cn(Se)||(At==="noscript"||At==="noembed"||At==="noframes")&&Mu(/<\/no(script|embed|frames)/i,Se.innerHTML)?(Xt(Se),!0):(Le&&Se.nodeType===op.text&&(nt=Se.textContent,b0([te,ne,ue],_n=>{nt=np(nt,_n," ")}),Se.textContent!==nt&&(tp(e.removed,{element:Se.cloneNode()}),Se.textContent=nt)),$e(Z.afterSanitizeElements,Se,null),!1)},on=function(Se,nt,At){if(Bt&&(nt==="id"||nt==="name")&&(At in t||At in an))return!1;if(!(Re&&!Me[nt]&&Mu(se,nt))){if(!(ke&&Mu(j,nt))){if(!(Be.attributeCheck instanceof Function&&Be.attributeCheck(nt,Se))){if(!Ae[nt]||Me[nt]){if(!(zn(Se)&&(xe.tagNameCheck instanceof RegExp&&Mu(xe.tagNameCheck,Se)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(Se))&&(xe.attributeNameCheck instanceof RegExp&&Mu(xe.attributeNameCheck,nt)||xe.attributeNameCheck instanceof Function&&xe.attributeNameCheck(nt,Se))||nt==="is"&&xe.allowCustomizedBuiltInElements&&(xe.tagNameCheck instanceof RegExp&&Mu(xe.tagNameCheck,At)||xe.tagNameCheck instanceof Function&&xe.tagNameCheck(At))))return!1}else if(!gt[nt]){if(!Mu(oe,np(At,ge,""))){if(!((nt==="src"||nt==="xlink:href"||nt==="href")&&Se!=="script"&&$k(At,"data:")===0&&ut[Se])){if(!(ze&&!Mu(re,np(At,ge,"")))){if(At)return!1}}}}}}}return!0},zn=function(Se){return Se!=="annotation-xml"&&cb(Se,ve)},$n=function(Se){$e(Z.beforeSanitizeAttributes,Se,null);const{attributes:nt}=Se;if(!nt||En(Se))return;const At={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae,forceKeepAttr:void 0};let _n=nt.length;for(;_n--;){const Rn=nt[_n],{name:Zn,namespaceURI:ir,value:gr}=Rn,Sn=_t(Zn),qn=gr;let Tn=Zn==="value"?qn:e7(qn);if(At.attrName=Sn,At.attrValue=Tn,At.keepAttr=!0,At.forceKeepAttr=void 0,$e(Z.uponSanitizeAttribute,Se,At),Tn=At.attrValue,Ft&&(Sn==="id"||Sn==="name")&&(xn(Zn,Se),Tn=Jt+Tn),ht&&Mu(/((--!?|])>)|<\/(style|title|textarea)/i,Tn)){xn(Zn,Se);continue}if(Sn==="attributename"&&cb(Tn,"href")){xn(Zn,Se);continue}if(At.forceKeepAttr)continue;if(!At.keepAttr){xn(Zn,Se);continue}if(!Xe&&Mu(/\/>/i,Tn)){xn(Zn,Se);continue}Le&&b0([te,ne,ue],li=>{Tn=np(Tn,li," ")});const dr=_t(Se.nodeName);if(!on(dr,Sn,Tn)){xn(Zn,Se);continue}if(W&&typeof _=="object"&&typeof _.getAttributeType=="function"&&!ir)switch(_.getAttributeType(dr,Sn)){case"TrustedHTML":{Tn=W.createHTML(Tn);break}case"TrustedScriptURL":{Tn=W.createScriptURL(Tn);break}}if(Tn!==qn)try{ir?Se.setAttributeNS(ir,Zn,Tn):Se.setAttribute(Zn,Tn),En(Se)?Xt(Se):nx(e.removed)}catch{xn(Zn,Se)}}$e(Z.afterSanitizeAttributes,Se,null)},Mn=function Et(Se){let nt=null;const At=cr(Se);for($e(Z.beforeSanitizeShadowDOM,Se,null);nt=At.nextNode();)$e(Z.uponSanitizeShadowNode,nt,null),$t(nt),$n(nt),nt.content instanceof o&&Et(nt.content);$e(Z.afterSanitizeShadowDOM,Se,null)};return e.sanitize=function(Et){let Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},nt=null,At=null,_n=null,Rn=null;if(Ce=!Et,Ce&&(Et="<!-->"),typeof Et!="string"&&!On(Et))if(typeof Et.toString=="function"){if(Et=Et.toString(),typeof Et!="string")throw rp("dirty is not a string, aborting")}else throw rp("toString is not a function");if(!e.isSupported)return Et;if(ot||Ot(Se),e.removed=[],typeof Et=="string"&&(zt=!1),zt){if(Et.nodeName){const gr=_t(Et.nodeName);if(!K[gr]||Fe[gr])throw rp("root node is forbidden and cannot be sanitized in-place")}}else if(Et instanceof a)nt=Nn("<!---->"),At=nt.ownerDocument.importNode(Et,!0),At.nodeType===op.element&&At.nodeName==="BODY"||At.nodeName==="HTML"?nt=At:nt.appendChild(At);else{if(!rt&&!Le&&!Qe&&Et.indexOf("<")===-1)return W&&Mt?W.createHTML(Et):Et;if(nt=Nn(Et),!nt)return rt?null:Mt?Y:""}nt&&tt&&Xt(nt.firstChild);const Zn=cr(zt?Et:nt);for(;_n=Zn.nextNode();)$t(_n),$n(_n),_n.content instanceof o&&Mn(_n.content);if(zt)return Et;if(rt){if(dt)for(Rn=D.call(nt.ownerDocument);nt.firstChild;)Rn.appendChild(nt.firstChild);else Rn=nt;return(Ae.shadowroot||Ae.shadowrootmode)&&(Rn=fe.call(r,Rn,!0)),Rn}let ir=Qe?nt.outerHTML:nt.innerHTML;return Qe&&K["!doctype"]&&nt.ownerDocument&&nt.ownerDocument.doctype&&nt.ownerDocument.doctype.name&&Mu(Q3,nt.ownerDocument.doctype.name)&&(ir="<!DOCTYPE "+nt.ownerDocument.doctype.name+`>
288
288
  `+ir),Le&&b0([te,ne,ue],gr=>{ir=np(ir,gr," ")}),W&&Mt?W.createHTML(ir):ir},e.setConfig=function(){let Et=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ot(Et),ot=!0},e.clearConfig=function(){Wt=null,ot=!1},e.isValidAttribute=function(Et,Se,nt){Wt||Ot({});const At=_t(Et),_n=_t(Se);return on(At,_n,nt)},e.addHook=function(Et,Se){typeof Se=="function"&&tp(Z[Et],Se)},e.removeHook=function(Et,Se){if(Se!==void 0){const nt=qk(Z[Et],Se);return nt===-1?void 0:jk(Z[Et],nt,1)[0]}return nx(Z[Et])},e.removeHooks=function(Et){Z[Et]=[]},e.removeAllHooks=function(){Z=ax()},e}var p7=q3(),m0={exports:{}},gb,cx;function v7(){if(cx)return gb;cx=1;var n=-1,e=1,t=0;function r(Z,te,ne,ue,se){if(Z===te)return Z?[[t,Z]]:[];if(ne!=null){var j=J(Z,te,ne);if(j)return j}var re=a(Z,te),ge=Z.substring(0,re);Z=Z.substring(re),te=te.substring(re),re=g(Z,te);var ve=Z.substring(Z.length-re);Z=Z.substring(0,Z.length-re),te=te.substring(0,te.length-re);var oe=i(Z,te);return ge&&oe.unshift([t,ge]),ve&&oe.push([t,ve]),P(oe,se),ue&&x(oe),oe}function i(Z,te){var ne;if(!Z)return[[e,te]];if(!te)return[[n,Z]];var ue=Z.length>te.length?Z:te,se=Z.length>te.length?te:Z,j=ue.indexOf(se);if(j!==-1)return ne=[[e,ue.substring(0,j)],[t,se],[e,ue.substring(j+se.length)]],Z.length>te.length&&(ne[0][0]=ne[2][0]=n),ne;if(se.length===1)return[[n,Z],[e,te]];var re=m(Z,te);if(re){var ge=re[0],ve=re[1],oe=re[2],K=re[3],he=re[4],Ae=r(ge,oe),He=r(ve,K);return Ae.concat([[t,he]],He)}return o(Z,te)}function o(Z,te){for(var ne=Z.length,ue=te.length,se=Math.ceil((ne+ue)/2),j=se,re=2*se,ge=new Array(re),ve=new Array(re),oe=0;oe<re;oe++)ge[oe]=-1,ve[oe]=-1;ge[j+1]=0,ve[j+1]=0;for(var K=ne-ue,he=K%2!==0,Ae=0,He=0,xe=0,Fe=0,Me=0;Me<se;Me++){for(var Be=-Me+Ae;Be<=Me-He;Be+=2){var ke=j+Be,Re;Be===-Me||Be!==Me&&ge[ke-1]<ge[ke+1]?Re=ge[ke+1]:Re=ge[ke-1]+1;for(var ze=Re-Be;Re<ne&&ze<ue&&Z.charAt(Re)===te.charAt(ze);)Re++,ze++;if(ge[ke]=Re,Re>ne)He+=2;else if(ze>ue)Ae+=2;else if(he){var Xe=j+K-Be;if(Xe>=0&&Xe<re&&ve[Xe]!==-1){var Le=ne-ve[Xe];if(Re>=Le)return l(Z,te,Re,ze)}}}for(var ht=-Me+xe;ht<=Me-Fe;ht+=2){var Xe=j+ht,Le;ht===-Me||ht!==Me&&ve[Xe-1]<ve[Xe+1]?Le=ve[Xe+1]:Le=ve[Xe-1]+1;for(var Qe=Le-ht;Le<ne&&Qe<ue&&Z.charAt(ne-Le-1)===te.charAt(ue-Qe-1);)Le++,Qe++;if(ve[Xe]=Le,Le>ne)Fe+=2;else if(Qe>ue)xe+=2;else if(!he){var ke=j+K-ht;if(ke>=0&&ke<re&&ge[ke]!==-1){var Re=ge[ke],ze=j+Re-ke;if(Le=ne-Le,Re>=Le)return l(Z,te,Re,ze)}}}}return[[n,Z],[e,te]]}function l(Z,te,ne,ue){var se=Z.substring(0,ne),j=te.substring(0,ue),re=Z.substring(ne),ge=te.substring(ue),ve=r(se,j),oe=r(re,ge);return ve.concat(oe)}function a(Z,te){if(!Z||!te||Z.charAt(0)!==te.charAt(0))return 0;for(var ne=0,ue=Math.min(Z.length,te.length),se=ue,j=0;ne<se;)Z.substring(j,se)==te.substring(j,se)?(ne=se,j=ne):ue=se,se=Math.floor((ue-ne)/2+ne);return H(Z.charCodeAt(se-1))&&se--,se}function u(Z,te){var ne=Z.length,ue=te.length;if(ne==0||ue==0)return 0;ne>ue?Z=Z.substring(ne-ue):ne<ue&&(te=te.substring(0,ne));var se=Math.min(ne,ue);if(Z==te)return se;for(var j=0,re=1;;){var ge=Z.substring(se-re),ve=te.indexOf(ge);if(ve==-1)return j;re+=ve,(ve==0||Z.substring(se-re)==te.substring(0,re))&&(j=re,re++)}}function g(Z,te){if(!Z||!te||Z.slice(-1)!==te.slice(-1))return 0;for(var ne=0,ue=Math.min(Z.length,te.length),se=ue,j=0;ne<se;)Z.substring(Z.length-se,Z.length-j)==te.substring(te.length-se,te.length-j)?(ne=se,j=ne):ue=se,se=Math.floor((ue-ne)/2+ne);return W(Z.charCodeAt(Z.length-se))&&se--,se}function m(Z,te){var ne=Z.length>te.length?Z:te,ue=Z.length>te.length?te:Z;if(ne.length<4||ue.length*2<ne.length)return null;function se(He,xe,Fe){for(var Me=He.substring(Fe,Fe+Math.floor(He.length/4)),Be=-1,ke="",Re,ze,Xe,Le;(Be=xe.indexOf(Me,Be+1))!==-1;){var ht=a(He.substring(Fe),xe.substring(Be)),Qe=g(He.substring(0,Fe),xe.substring(0,Be));ke.length<Qe+ht&&(ke=xe.substring(Be-Qe,Be)+xe.substring(Be,Be+ht),Re=He.substring(0,Fe-Qe),ze=He.substring(Fe+ht),Xe=xe.substring(0,Be-Qe),Le=xe.substring(Be+ht))}return ke.length*2>=He.length?[Re,ze,Xe,Le,ke]:null}var j=se(ne,ue,Math.ceil(ne.length/4)),re=se(ne,ue,Math.ceil(ne.length/2)),ge;if(!j&&!re)return null;re?j?ge=j[4].length>re[4].length?j:re:ge=re:ge=j;var ve,oe,K,he;Z.length>te.length?(ve=ge[0],oe=ge[1],K=ge[2],he=ge[3]):(K=ge[0],he=ge[1],ve=ge[2],oe=ge[3]);var Ae=ge[4];return[ve,oe,K,he,Ae]}function x(Z){for(var te=!1,ne=[],ue=0,se=null,j=0,re=0,ge=0,ve=0,oe=0;j<Z.length;)Z[j][0]==t?(ne[ue++]=j,re=ve,ge=oe,ve=0,oe=0,se=Z[j][1]):(Z[j][0]==e?ve+=Z[j][1].length:oe+=Z[j][1].length,se&&se.length<=Math.max(re,ge)&&se.length<=Math.max(ve,oe)&&(Z.splice(ne[ue-1],0,[n,se]),Z[ne[ue-1]+1][0]=e,ue--,ue--,j=ue>0?ne[ue-1]:-1,re=0,ge=0,ve=0,oe=0,se=null,te=!0)),j++;for(te&&P(Z),O(Z),j=1;j<Z.length;){if(Z[j-1][0]==n&&Z[j][0]==e){var K=Z[j-1][1],he=Z[j][1],Ae=u(K,he),He=u(he,K);Ae>=He?(Ae>=K.length/2||Ae>=he.length/2)&&(Z.splice(j,0,[t,he.substring(0,Ae)]),Z[j-1][1]=K.substring(0,K.length-Ae),Z[j+1][1]=he.substring(Ae),j++):(He>=K.length/2||He>=he.length/2)&&(Z.splice(j,0,[t,K.substring(0,He)]),Z[j-1][0]=e,Z[j-1][1]=he.substring(0,he.length-He),Z[j+1][0]=n,Z[j+1][1]=K.substring(He),j++),j++}j++}}var w=/[^a-zA-Z0-9]/,_=/\s/,S=/[\r\n]/,R=/\n\r?\n$/,I=/^\r?\n\r?\n/;function O(Z){function te(He,xe){if(!He||!xe)return 6;var Fe=He.charAt(He.length-1),Me=xe.charAt(0),Be=Fe.match(w),ke=Me.match(w),Re=Be&&Fe.match(_),ze=ke&&Me.match(_),Xe=Re&&Fe.match(S),Le=ze&&Me.match(S),ht=Xe&&He.match(R),Qe=Le&&xe.match(I);return ht||Qe?5:Xe||Le?4:Be&&!Re&&ze?3:Re||ze?2:Be||ke?1:0}for(var ne=1;ne<Z.length-1;){if(Z[ne-1][0]==t&&Z[ne+1][0]==t){var ue=Z[ne-1][1],se=Z[ne][1],j=Z[ne+1][1],re=g(ue,se);if(re){var ge=se.substring(se.length-re);ue=ue.substring(0,ue.length-re),se=ge+se.substring(0,se.length-re),j=ge+j}for(var ve=ue,oe=se,K=j,he=te(ue,se)+te(se,j);se.charAt(0)===j.charAt(0);){ue+=se.charAt(0),se=se.substring(1)+j.charAt(0),j=j.substring(1);var Ae=te(ue,se)+te(se,j);Ae>=he&&(he=Ae,ve=ue,oe=se,K=j)}Z[ne-1][1]!=ve&&(ve?Z[ne-1][1]=ve:(Z.splice(ne-1,1),ne--),Z[ne][1]=oe,K?Z[ne+1][1]=K:(Z.splice(ne+1,1),ne--))}ne++}}function P(Z,te){Z.push([t,""]);for(var ne=0,ue=0,se=0,j="",re="",ge;ne<Z.length;){if(ne<Z.length-1&&!Z[ne][1]){Z.splice(ne,1);continue}switch(Z[ne][0]){case e:se++,re+=Z[ne][1],ne++;break;case n:ue++,j+=Z[ne][1],ne++;break;case t:var ve=ne-se-ue-1;if(te){if(ve>=0&&B(Z[ve][1])){var oe=Z[ve][1].slice(-1);if(Z[ve][1]=Z[ve][1].slice(0,-1),j=oe+j,re=oe+re,!Z[ve][1]){Z.splice(ve,1),ne--;var K=ve-1;Z[K]&&Z[K][0]===e&&(se++,re=Z[K][1]+re,K--),Z[K]&&Z[K][0]===n&&(ue++,j=Z[K][1]+j,K--),ve=K}}if(Y(Z[ne][1])){var oe=Z[ne][1].charAt(0);Z[ne][1]=Z[ne][1].slice(1),j+=oe,re+=oe}}if(ne<Z.length-1&&!Z[ne][1]){Z.splice(ne,1);break}if(j.length>0||re.length>0){j.length>0&&re.length>0&&(ge=a(re,j),ge!==0&&(ve>=0?Z[ve][1]+=re.substring(0,ge):(Z.splice(0,0,[t,re.substring(0,ge)]),ne++),re=re.substring(ge),j=j.substring(ge)),ge=g(re,j),ge!==0&&(Z[ne][1]=re.substring(re.length-ge)+Z[ne][1],re=re.substring(0,re.length-ge),j=j.substring(0,j.length-ge)));var he=se+ue;j.length===0&&re.length===0?(Z.splice(ne-he,he),ne=ne-he):j.length===0?(Z.splice(ne-he,he,[e,re]),ne=ne-he+1):re.length===0?(Z.splice(ne-he,he,[n,j]),ne=ne-he+1):(Z.splice(ne-he,he,[n,j],[e,re]),ne=ne-he+2)}ne!==0&&Z[ne-1][0]===t?(Z[ne-1][1]+=Z[ne][1],Z.splice(ne,1)):ne++,se=0,ue=0,j="",re="";break}}Z[Z.length-1][1]===""&&Z.pop();var Ae=!1;for(ne=1;ne<Z.length-1;)Z[ne-1][0]===t&&Z[ne+1][0]===t&&(Z[ne][1].substring(Z[ne][1].length-Z[ne-1][1].length)===Z[ne-1][1]?(Z[ne][1]=Z[ne-1][1]+Z[ne][1].substring(0,Z[ne][1].length-Z[ne-1][1].length),Z[ne+1][1]=Z[ne-1][1]+Z[ne+1][1],Z.splice(ne-1,1),Ae=!0):Z[ne][1].substring(0,Z[ne+1][1].length)==Z[ne+1][1]&&(Z[ne-1][1]+=Z[ne+1][1],Z[ne][1]=Z[ne][1].substring(Z[ne+1][1].length)+Z[ne+1][1],Z.splice(ne+1,1),Ae=!0)),ne++;Ae&&P(Z,te)}function H(Z){return Z>=55296&&Z<=56319}function W(Z){return Z>=56320&&Z<=57343}function Y(Z){return W(Z.charCodeAt(0))}function B(Z){return H(Z.charCodeAt(Z.length-1))}function ee(Z){for(var te=[],ne=0;ne<Z.length;ne++)Z[ne][1].length>0&&te.push(Z[ne]);return te}function D(Z,te,ne,ue){return B(Z)||Y(ue)?null:ee([[t,Z],[n,te],[e,ne],[t,ue]])}function J(Z,te,ne){var ue=typeof ne=="number"?{index:ne,length:0}:ne.oldRange,se=typeof ne=="number"?null:ne.newRange,j=Z.length,re=te.length;if(ue.length===0&&(se===null||se.length===0)){var ge=ue.index,ve=Z.slice(0,ge),oe=Z.slice(ge),K=se?se.index:null;e:{var he=ge+re-j;if(K!==null&&K!==he||he<0||he>re)break e;var Ae=te.slice(0,he),He=te.slice(he);if(He!==oe)break e;var xe=Math.min(ge,he),Fe=ve.slice(0,xe),Me=Ae.slice(0,xe);if(Fe!==Me)break e;var Be=ve.slice(xe),ke=Ae.slice(xe);return D(Fe,Be,ke,oe)}e:{if(K!==null&&K!==ge)break e;var Re=ge,Ae=te.slice(0,Re),He=te.slice(Re);if(Ae!==ve)break e;var ze=Math.min(j-Re,re-Re),Xe=oe.slice(oe.length-ze),Le=He.slice(He.length-ze);if(Xe!==Le)break e;var Be=oe.slice(0,oe.length-ze),ke=He.slice(0,He.length-ze);return D(ve,Be,ke,Xe)}}if(ue.length>0&&se&&se.length===0)e:{var Fe=Z.slice(0,ue.index),Xe=Z.slice(ue.index+ue.length),xe=Fe.length,ze=Xe.length;if(re<xe+ze)break e;var Me=te.slice(0,xe),Le=te.slice(re-ze);if(Fe!==Me||Xe!==Le)break e;var Be=Z.slice(xe,j-ze),ke=te.slice(xe,re-ze);return D(Fe,Be,ke,Xe)}return null}function fe(Z,te,ne,ue){return r(Z,te,ne,ue,!0)}return fe.INSERT=e,fe.DELETE=n,fe.EQUAL=t,gb=fe,gb}var vp={exports:{}};vp.exports;var ux;function j3(){return ux||(ux=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",i=9007199254740991,o="[object Arguments]",l="[object Array]",a="[object Boolean]",u="[object Date]",g="[object Error]",m="[object Function]",x="[object GeneratorFunction]",w="[object Map]",_="[object Number]",S="[object Object]",R="[object Promise]",I="[object RegExp]",O="[object Set]",P="[object String]",H="[object Symbol]",W="[object WeakMap]",Y="[object ArrayBuffer]",B="[object DataView]",ee="[object Float32Array]",D="[object Float64Array]",J="[object Int8Array]",fe="[object Int16Array]",Z="[object Int32Array]",te="[object Uint8Array]",ne="[object Uint8ClampedArray]",ue="[object Uint16Array]",se="[object Uint32Array]",j=/[\\^$.*+?()[\]{}|]/g,re=/\w*$/,ge=/^\[object .+?Constructor\]$/,ve=/^(?:0|[1-9]\d*)$/,oe={};oe[o]=oe[l]=oe[Y]=oe[B]=oe[a]=oe[u]=oe[ee]=oe[D]=oe[J]=oe[fe]=oe[Z]=oe[w]=oe[_]=oe[S]=oe[I]=oe[O]=oe[P]=oe[H]=oe[te]=oe[ne]=oe[ue]=oe[se]=!0,oe[g]=oe[m]=oe[W]=!1;var K=typeof jh=="object"&&jh&&jh.Object===Object&&jh,he=typeof self=="object"&&self&&self.Object===Object&&self,Ae=K||he||Function("return this")(),He=e&&!e.nodeType&&e,xe=He&&!0&&n&&!n.nodeType&&n,Fe=xe&&xe.exports===He;function Me(me,st){return me.set(st[0],st[1]),me}function Be(me,st){return me.add(st),me}function ke(me,st){for(var Ne=-1,mt=me?me.length:0;++Ne<mt&&st(me[Ne],Ne,me)!==!1;);return me}function Re(me,st){for(var Ne=-1,mt=st.length,Bn=me.length;++Ne<mt;)me[Bn+Ne]=st[Ne];return me}function ze(me,st,Ne,mt){for(var Bn=-1,mr=me?me.length:0;++Bn<mr;)Ne=st(Ne,me[Bn],Bn,me);return Ne}function Xe(me,st){for(var Ne=-1,mt=Array(me);++Ne<me;)mt[Ne]=st(Ne);return mt}function Le(me,st){return me==null?void 0:me[st]}function ht(me){var st=!1;if(me!=null&&typeof me.toString!="function")try{st=!!(me+"")}catch{}return st}function Qe(me){var st=-1,Ne=Array(me.size);return me.forEach(function(mt,Bn){Ne[++st]=[Bn,mt]}),Ne}function ot(me,st){return function(Ne){return me(st(Ne))}}function tt(me){var st=-1,Ne=Array(me.size);return me.forEach(function(mt){Ne[++st]=mt}),Ne}var rt=Array.prototype,dt=Function.prototype,Mt=Object.prototype,Bt=Ae["__core-js_shared__"],Ft=(function(){var me=/[^.]+$/.exec(Bt&&Bt.keys&&Bt.keys.IE_PROTO||"");return me?"Symbol(src)_1."+me:""})(),Jt=dt.toString,pn=Mt.hasOwnProperty,zt=Mt.toString,vn=RegExp("^"+Jt.call(pn).replace(j,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ht=Fe?Ae.Buffer:void 0,wn=Ae.Symbol,ut=Ae.Uint8Array,at=ot(Object.getPrototypeOf,Object),gt=Object.create,It=Mt.propertyIsEnumerable,ln=rt.splice,sn=Object.getOwnPropertySymbols,nn=Ht?Ht.isBuffer:void 0,Ue=ot(Object.keys,Object),Ce=hi(Ae,"DataView"),Ze=hi(Ae,"Map"),Ct=hi(Ae,"Promise"),Qt=hi(Ae,"Set"),Vt=hi(Ae,"WeakMap"),bn=hi(Object,"create"),hn=mi(Ce),ft=mi(Ze),Lt=mi(Ct),_t=mi(Qt),Wt=mi(Vt),an=wn?wn.prototype:void 0,xt=an?an.valueOf:void 0;function Ot(me){var st=-1,Ne=me?me.length:0;for(this.clear();++st<Ne;){var mt=me[st];this.set(mt[0],mt[1])}}function rn(){this.__data__=bn?bn(null):{}}function mn(me){return this.has(me)&&delete this.__data__[me]}function Cn(me){var st=this.__data__;if(bn){var Ne=st[me];return Ne===r?void 0:Ne}return pn.call(st,me)?st[me]:void 0}function Xt(me){var st=this.__data__;return bn?st[me]!==void 0:pn.call(st,me)}function xn(me,st){var Ne=this.__data__;return Ne[me]=bn&&st===void 0?r:st,this}Ot.prototype.clear=rn,Ot.prototype.delete=mn,Ot.prototype.get=Cn,Ot.prototype.has=Xt,Ot.prototype.set=xn;function Nn(me){var st=-1,Ne=me?me.length:0;for(this.clear();++st<Ne;){var mt=me[st];this.set(mt[0],mt[1])}}function cr(){this.__data__=[]}function En(me){var st=this.__data__,Ne=qn(st,me);if(Ne<0)return!1;var mt=st.length-1;return Ne==mt?st.pop():ln.call(st,Ne,1),!0}function On(me){var st=this.__data__,Ne=qn(st,me);return Ne<0?void 0:st[Ne][1]}function $e(me){return qn(this.__data__,me)>-1}function $t(me,st){var Ne=this.__data__,mt=qn(Ne,me);return mt<0?Ne.push([me,st]):Ne[mt][1]=st,this}Nn.prototype.clear=cr,Nn.prototype.delete=En,Nn.prototype.get=On,Nn.prototype.has=$e,Nn.prototype.set=$t;function on(me){var st=-1,Ne=me?me.length:0;for(this.clear();++st<Ne;){var mt=me[st];this.set(mt[0],mt[1])}}function zn(){this.__data__={hash:new Ot,map:new(Ze||Nn),string:new Ot}}function $n(me){return Lr(this,me).delete(me)}function Mn(me){return Lr(this,me).get(me)}function Et(me){return Lr(this,me).has(me)}function Se(me,st){return Lr(this,me).set(me,st),this}on.prototype.clear=zn,on.prototype.delete=$n,on.prototype.get=Mn,on.prototype.has=Et,on.prototype.set=Se;function nt(me){this.__data__=new Nn(me)}function At(){this.__data__=new Nn}function _n(me){return this.__data__.delete(me)}function Rn(me){return this.__data__.get(me)}function Zn(me){return this.__data__.has(me)}function ir(me,st){var Ne=this.__data__;if(Ne instanceof Nn){var mt=Ne.__data__;if(!Ze||mt.length<t-1)return mt.push([me,st]),this;Ne=this.__data__=new on(mt)}return Ne.set(me,st),this}nt.prototype.clear=At,nt.prototype.delete=_n,nt.prototype.get=Rn,nt.prototype.has=Zn,nt.prototype.set=ir;function gr(me,st){var Ne=Gi(me)||Bo(me)?Xe(me.length,String):[],mt=Ne.length,Bn=!!mt;for(var mr in me)pn.call(me,mr)&&!(Bn&&(mr=="length"||Ti(mr,mt)))&&Ne.push(mr);return Ne}function Sn(me,st,Ne){var mt=me[st];(!(pn.call(me,st)&&Ko(mt,Ne))||Ne===void 0&&!(st in me))&&(me[st]=Ne)}function qn(me,st){for(var Ne=me.length;Ne--;)if(Ko(me[Ne][0],st))return Ne;return-1}function Tn(me,st){return me&&ur(st,Eo(st),me)}function dr(me,st,Ne,mt,Bn,mr,si){var qi;if(mt&&(qi=mr?mt(me,Bn,mr,si):mt(me)),qi!==void 0)return qi;if(!vo(me))return me;var Yi=Gi(me);if(Yi){if(qi=Xo(me),!st)return Er(me,qi)}else{var lo=Fr(me),Ll=lo==m||lo==x;if(po(me))return ho(me,st);if(lo==S||lo==o||Ll&&!mr){if(ht(me))return mr?me:{};if(qi=Co(Ll?{}:me),!st)return Fn(me,Tn(qi,me))}else{if(!oe[lo])return mr?me:{};qi=Fo(me,lo,dr,st)}}si||(si=new nt);var Ql=si.get(me);if(Ql)return Ql;if(si.set(me,qi),!Yi)var sc=Ne?zr(me):Eo(me);return ke(sc||me,function(cl,za){sc&&(za=cl,cl=me[za]),Sn(qi,za,dr(cl,st,Ne,mt,za,me,si))}),qi}function li(me){return vo(me)?gt(me):{}}function wo(me,st,Ne){var mt=st(me);return Gi(me)?mt:Re(mt,Ne(me))}function fo(me){return zt.call(me)}function Br(me){if(!vo(me)||xr(me))return!1;var st=Ho(me)||ht(me)?vn:ge;return st.test(mi(me))}function al(me){if(!bl(me))return Ue(me);var st=[];for(var Ne in Object(me))pn.call(me,Ne)&&Ne!="constructor"&&st.push(Ne);return st}function ho(me,st){if(st)return me.slice();var Ne=new me.constructor(me.length);return me.copy(Ne),Ne}function Si(me){var st=new me.constructor(me.byteLength);return new ut(st).set(new ut(me)),st}function Jl(me,st){var Ne=st?Si(me.buffer):me.buffer;return new me.constructor(Ne,me.byteOffset,me.byteLength)}function No(me,st,Ne){var mt=st?Ne(Qe(me),!0):Qe(me);return ze(mt,Me,new me.constructor)}function Ao(me){var st=new me.constructor(me.source,re.exec(me));return st.lastIndex=me.lastIndex,st}function jr(me,st,Ne){var mt=st?Ne(tt(me),!0):tt(me);return ze(mt,Be,new me.constructor)}function dn(me){return xt?Object(xt.call(me)):{}}function Pn(me,st){var Ne=st?Si(me.buffer):me.buffer;return new me.constructor(Ne,me.byteOffset,me.length)}function Er(me,st){var Ne=-1,mt=me.length;for(st||(st=Array(mt));++Ne<mt;)st[Ne]=me[Ne];return st}function ur(me,st,Ne,mt){Ne||(Ne={});for(var Bn=-1,mr=st.length;++Bn<mr;){var si=st[Bn],qi=void 0;Sn(Ne,si,qi===void 0?me[si]:qi)}return Ne}function Fn(me,st){return ur(me,Ui(me),st)}function zr(me){return wo(me,Eo,Ui)}function Lr(me,st){var Ne=me.__data__;return $r(st)?Ne[typeof st=="string"?"string":"hash"]:Ne.map}function hi(me,st){var Ne=Le(me,st);return Br(Ne)?Ne:void 0}var Ui=sn?ot(sn,Object):er,Fr=fo;(Ce&&Fr(new Ce(new ArrayBuffer(1)))!=B||Ze&&Fr(new Ze)!=w||Ct&&Fr(Ct.resolve())!=R||Qt&&Fr(new Qt)!=O||Vt&&Fr(new Vt)!=W)&&(Fr=function(me){var st=zt.call(me),Ne=st==S?me.constructor:void 0,mt=Ne?mi(Ne):void 0;if(mt)switch(mt){case hn:return B;case ft:return w;case Lt:return R;case _t:return O;case Wt:return W}return st});function Xo(me){var st=me.length,Ne=me.constructor(st);return st&&typeof me[0]=="string"&&pn.call(me,"index")&&(Ne.index=me.index,Ne.input=me.input),Ne}function Co(me){return typeof me.constructor=="function"&&!bl(me)?li(at(me)):{}}function Fo(me,st,Ne,mt){var Bn=me.constructor;switch(st){case Y:return Si(me);case a:case u:return new Bn(+me);case B:return Jl(me,mt);case ee:case D:case J:case fe:case Z:case te:case ne:case ue:case se:return Pn(me,mt);case w:return No(me,mt,Ne);case _:case P:return new Bn(me);case I:return Ao(me);case O:return jr(me,mt,Ne);case H:return dn(me)}}function Ti(me,st){return st=st??i,!!st&&(typeof me=="number"||ve.test(me))&&me>-1&&me%1==0&&me<st}function $r(me){var st=typeof me;return st=="string"||st=="number"||st=="symbol"||st=="boolean"?me!=="__proto__":me===null}function xr(me){return!!Ft&&Ft in me}function bl(me){var st=me&&me.constructor,Ne=typeof st=="function"&&st.prototype||Mt;return me===Ne}function mi(me){if(me!=null){try{return Jt.call(me)}catch{}try{return me+""}catch{}}return""}function oo(me){return dr(me,!0,!0)}function Ko(me,st){return me===st||me!==me&&st!==st}function Bo(me){return go(me)&&pn.call(me,"callee")&&(!It.call(me,"callee")||zt.call(me)==o)}var Gi=Array.isArray;function zo(me){return me!=null&&jn(me.length)&&!Ho(me)}function go(me){return di(me)&&zo(me)}var po=nn||wr;function Ho(me){var st=vo(me)?zt.call(me):"";return st==m||st==x}function jn(me){return typeof me=="number"&&me>-1&&me%1==0&&me<=i}function vo(me){var st=typeof me;return!!me&&(st=="object"||st=="function")}function di(me){return!!me&&typeof me=="object"}function Eo(me){return zo(me)?gr(me):al(me)}function er(){return[]}function wr(){return!1}n.exports=oo})(vp,vp.exports)),vp.exports}var pb,fx;function $3(){return fx||(fx=1,pb=function n(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,i,o;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(i=r;i--!==0;)if(!n(e[i],t[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[i]))return!1;for(i=r;i--!==0;){var l=o[i];if(!n(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}),pb}var x0={},hx;function b7(){if(hx)return x0;hx=1,Object.defineProperty(x0,"__esModule",{value:!0});const n=j3(),e=$3();var t;return(function(r){function i(u={},g={},m=!1){typeof u!="object"&&(u={}),typeof g!="object"&&(g={});let x=n(g);m||(x=Object.keys(x).reduce((w,_)=>(x[_]!=null&&(w[_]=x[_]),w),{}));for(const w in u)u[w]!==void 0&&g[w]===void 0&&(x[w]=u[w]);return Object.keys(x).length>0?x:void 0}r.compose=i;function o(u={},g={}){typeof u!="object"&&(u={}),typeof g!="object"&&(g={});const m=Object.keys(u).concat(Object.keys(g)).reduce((x,w)=>(e(u[w],g[w])||(x[w]=g[w]===void 0?null:g[w]),x),{});return Object.keys(m).length>0?m:void 0}r.diff=o;function l(u={},g={}){u=u||{};const m=Object.keys(g).reduce((x,w)=>(g[w]!==u[w]&&u[w]!==void 0&&(x[w]=g[w]),x),{});return Object.keys(u).reduce((x,w)=>(u[w]!==g[w]&&g[w]===void 0&&(x[w]=null),x),m)}r.invert=l;function a(u,g,m=!1){if(typeof u!="object")return g;if(typeof g!="object")return;if(!m)return g;const x=Object.keys(g).reduce((w,_)=>(u[_]===void 0&&(w[_]=g[_]),w),{});return Object.keys(x).length>0?x:void 0}r.transform=a})(t||(t={})),x0.default=t,x0}var w0={},dx;function e_(){if(dx)return w0;dx=1,Object.defineProperty(w0,"__esModule",{value:!0});var n;return(function(e){function t(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}e.length=t})(n||(n={})),w0.default=n,w0}var C0={},gx;function y7(){if(gx)return C0;gx=1,Object.defineProperty(C0,"__esModule",{value:!0});const n=e_();class e{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const i=this.ops[this.index];if(i){const o=this.offset,l=n.default.length(i);if(r>=l-o?(r=l-o,this.index+=1,this.offset=0):this.offset+=r,typeof i.delete=="number")return{delete:r};{const a={};return i.attributes&&(a.attributes=i.attributes),typeof i.retain=="number"?a.retain=r:typeof i.retain=="object"&&i.retain!==null?a.retain=i.retain:typeof i.insert=="string"?a.insert=i.insert.substr(o,r):a.insert=i.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 r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,i=this.index,o=this.next(),l=this.ops.slice(this.index);return this.offset=r,this.index=i,[o].concat(l)}}else return[]}}return C0.default=e,C0}var px;function m7(){return px||(px=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=v7(),r=j3(),i=$3(),o=b7();e.AttributeMap=o.default;const l=e_();e.Op=l.default;const a=y7();e.OpIterator=a.default;const u="\0",g=(x,w)=>{if(typeof x!="object"||x===null)throw new Error(`cannot retain a ${typeof x}`);if(typeof w!="object"||w===null)throw new Error(`cannot retain a ${typeof w}`);const _=Object.keys(x)[0];if(!_||_!==Object.keys(w)[0])throw new Error(`embed types not matched: ${_} != ${Object.keys(w)[0]}`);return[_,x[_],w[_]]};class m{constructor(w){Array.isArray(w)?this.ops=w:w!=null&&Array.isArray(w.ops)?this.ops=w.ops:this.ops=[]}static registerEmbed(w,_){this.handlers[w]=_}static unregisterEmbed(w){delete this.handlers[w]}static getHandler(w){const _=this.handlers[w];if(!_)throw new Error(`no handlers for embed type "${w}"`);return _}insert(w,_){const S={};return typeof w=="string"&&w.length===0?this:(S.insert=w,_!=null&&typeof _=="object"&&Object.keys(_).length>0&&(S.attributes=_),this.push(S))}delete(w){return w<=0?this:this.push({delete:w})}retain(w,_){if(typeof w=="number"&&w<=0)return this;const S={retain:w};return _!=null&&typeof _=="object"&&Object.keys(_).length>0&&(S.attributes=_),this.push(S)}push(w){let _=this.ops.length,S=this.ops[_-1];if(w=r(w),typeof S=="object"){if(typeof w.delete=="number"&&typeof S.delete=="number")return this.ops[_-1]={delete:S.delete+w.delete},this;if(typeof S.delete=="number"&&w.insert!=null&&(_-=1,S=this.ops[_-1],typeof S!="object"))return this.ops.unshift(w),this;if(i(w.attributes,S.attributes)){if(typeof w.insert=="string"&&typeof S.insert=="string")return this.ops[_-1]={insert:S.insert+w.insert},typeof w.attributes=="object"&&(this.ops[_-1].attributes=w.attributes),this;if(typeof w.retain=="number"&&typeof S.retain=="number")return this.ops[_-1]={retain:S.retain+w.retain},typeof w.attributes=="object"&&(this.ops[_-1].attributes=w.attributes),this}}return _===this.ops.length?this.ops.push(w):this.ops.splice(_,0,w),this}chop(){const w=this.ops[this.ops.length-1];return w&&typeof w.retain=="number"&&!w.attributes&&this.ops.pop(),this}filter(w){return this.ops.filter(w)}forEach(w){this.ops.forEach(w)}map(w){return this.ops.map(w)}partition(w){const _=[],S=[];return this.forEach(R=>{(w(R)?_:S).push(R)}),[_,S]}reduce(w,_){return this.ops.reduce(w,_)}changeLength(){return this.reduce((w,_)=>_.insert?w+l.default.length(_):_.delete?w-_.delete:w,0)}length(){return this.reduce((w,_)=>w+l.default.length(_),0)}slice(w=0,_=1/0){const S=[],R=new a.default(this.ops);let I=0;for(;I<_&&R.hasNext();){let O;I<w?O=R.next(w-I):(O=R.next(_-I),S.push(O)),I+=l.default.length(O)}return new m(S)}compose(w){const _=new a.default(this.ops),S=new a.default(w.ops),R=[],I=S.peek();if(I!=null&&typeof I.retain=="number"&&I.attributes==null){let P=I.retain;for(;_.peekType()==="insert"&&_.peekLength()<=P;)P-=_.peekLength(),R.push(_.next());I.retain-P>0&&S.next(I.retain-P)}const O=new m(R);for(;_.hasNext()||S.hasNext();)if(S.peekType()==="insert")O.push(S.next());else if(_.peekType()==="delete")O.push(_.next());else{const P=Math.min(_.peekLength(),S.peekLength()),H=_.next(P),W=S.next(P);if(W.retain){const Y={};if(typeof H.retain=="number")Y.retain=typeof W.retain=="number"?P:W.retain;else if(typeof W.retain=="number")H.retain==null?Y.insert=H.insert:Y.retain=H.retain;else{const ee=H.retain==null?"insert":"retain",[D,J,fe]=g(H[ee],W.retain),Z=m.getHandler(D);Y[ee]={[D]:Z.compose(J,fe,ee==="retain")}}const B=o.default.compose(H.attributes,W.attributes,typeof H.retain=="number");if(B&&(Y.attributes=B),O.push(Y),!S.hasNext()&&i(O.ops[O.ops.length-1],Y)){const ee=new m(_.rest());return O.concat(ee).chop()}}else typeof W.delete=="number"&&(typeof H.retain=="number"||typeof H.retain=="object"&&H.retain!==null)&&O.push(W)}return O.chop()}concat(w){const _=new m(this.ops.slice());return w.ops.length>0&&(_.push(w.ops[0]),_.ops=_.ops.concat(w.ops.slice(1))),_}diff(w,_){if(this.ops===w.ops)return new m;const S=[this,w].map(H=>H.map(W=>{if(W.insert!=null)return typeof W.insert=="string"?W.insert:u;const Y=H===w?"on":"with";throw new Error("diff() called "+Y+" non-document")}).join("")),R=new m,I=t(S[0],S[1],_,!0),O=new a.default(this.ops),P=new a.default(w.ops);return I.forEach(H=>{let W=H[1].length;for(;W>0;){let Y=0;switch(H[0]){case t.INSERT:Y=Math.min(P.peekLength(),W),R.push(P.next(Y));break;case t.DELETE:Y=Math.min(W,O.peekLength()),O.next(Y),R.delete(Y);break;case t.EQUAL:Y=Math.min(O.peekLength(),P.peekLength(),W);const B=O.next(Y),ee=P.next(Y);i(B.insert,ee.insert)?R.retain(Y,o.default.diff(B.attributes,ee.attributes)):R.push(ee).delete(Y);break}W-=Y}}),R.chop()}eachLine(w,_=`
@@ -477,7 +477,7 @@ received: ${n.quality}
477
477
  received: ${n.imageType}
478
478
  -> using default image/jpeg`),n.imageType="image/jpeg")}function Cz(n,e){n.keepImageTypes??(n.keepImageTypes=[]),n.keepImageTypes&&!Array.isArray(n.keepImageTypes)&&(e.warn(`quill.imageCompressor: [config error] 'keepImageTypes' is required to be a "array", received: ${n.keepImageTypes} -> using default []`),n.keepImageTypes=[]),n.ignoreImageTypes??(n.ignoreImageTypes=[]),n.ignoreImageTypes&&!Array.isArray(n.ignoreImageTypes)&&(e.warn(`quill.imageCompressor: [config error] 'ignoreImageTypes' is required to be a "array", received: ${n.ignoreImageTypes} -> using default []`),n.ignoreImageTypes=[])}function _z(n,e){n.handleOnPaste&&typeof n.handleOnPaste!="boolean"&&typeof n.handleOnPaste!="function"&&(e.warn(`quill.imageCompressor: [config error] 'handlePaste' is required to be a "boolean" or a "function", received: ${n.ignoreImageTypes} -> using default true`),n.handleOnPaste=!0),n.insertIntoEditor&&typeof n.insertIntoEditor!="function"&&(e.warn(`quill.imageCompressor: [config error] 'insertIntoEditor' is required to be a "function", received: ${n.insertIntoEditor} -> using default undefined`),n.insertIntoEditor=void 0)}function Lw(n){return!!/^image\/(gif|jpe?g|a?png|svg|webp|bmp)/i.exec(n)}class Sz{constructor(e,t,r,i){Te(this,"localDrag",!1);this.quill=e,this.onNewDataUrl=t,this.logger=r,this.handleOnPaste=i,this.quill.root.addEventListener("dragstart",o=>this.handleDragStart(o),!1),this.quill.root.addEventListener("dragend",o=>this.handleDragEnd(o),!1),this.quill.root.addEventListener("drop",o=>this.handleDrop(o),!0),this.handleOnPaste!==!1&&this.quill.root.addEventListener("paste",o=>this.handlePaste(o),!0)}handleDragStart(e){this.localDrag=!0}handleDragEnd(e){this.localDrag=!1}async handleDrop(e){var l,a,u,g;if(this.localDrag)return;e.preventDefault();const t=document.getSelection();if(t&&document.caretPositionFromPoint){const m=document.caretPositionFromPoint(e.clientX,e.clientY);m&&t.setBaseAndExtent(m.offsetNode,m.offset,m.offsetNode,m.offset)}this.logger.log("handleDrop",{evt:e});const r=(l=e.dataTransfer)==null?void 0:l.files,i=Array.from(r||[]).filter(m=>Lw(m.type));if(i.length>0){e.stopPropagation(),this.logger.log("handleDrop","found files",{evt:e,files:r,imageFiles:i}),await this.pasteFilesIntoQuill(i);return}if((a=e.dataTransfer)!=null&&a.items){e.stopPropagation(),this.logger.log("handleDrop","found items",{evt:e,files:r,imageFiles:i}),await this.handleDataTransferList((u=e.dataTransfer)==null?void 0:u.items,e);return}const o=(g=e.dataTransfer)==null?void 0:g.getData("URL");if(this.logger.log("handleDrop","trying getData('URL')",{draggedUrl:o}),o){const m=await(await fetch(o)).blob();this.logger.log("handleDrop","blob from drag event",{evt:e,files:r,imageFiles:i}),await this.pasteFilesIntoQuill([m])}}async handlePaste(e){var t;typeof this.handleOnPaste=="function"&&!this.handleOnPaste(e)||await this.handleDataTransferList((t=e.clipboardData)==null?void 0:t.items,e)}async handleDataTransferList(e,t){const r=Array.from(e||[]),i=r.filter(a=>a.kind==="file"&&Lw(a.type)),o=r.map(a=>({type:a.type,kind:a.kind}));if(this.logger.log("handleDataTransferList",{fileTypes:o,imageCount:i.length}),!i.length)return;t.preventDefault(),t.stopPropagation();const l=i.map(a=>a.getAsFile());await this.pasteFilesIntoQuill(l)}async pasteFilesIntoQuill(e){this.logger.log(" pasteFilesIntoQuill",`pasting ${e.length} images...`),await Promise.all(e.map(async(t,r)=>{if(!t)return;const i=await R4(t);this.logger.log(" pasteFilesIntoQuill",`pasting image (${r})`),this.onNewDataUrl(i)})),this.logger.log(" pasteFilesIntoQuill","done")}}class Fp{constructor(e,t){Te(this,"quill");Te(this,"range");Te(this,"options");Te(this,"imageDrop");Te(this,"fileHolder");Te(this,"Logger");this.quill=e,this.options=t||{};const r=!!t.debug,i=!!t.suppressErrorLogging;this.Logger=new pz(r,i),yz(t,this.Logger);const o=async a=>{this.Logger.log("onImageDrop",{dataUrl:a});const u=await this.downscaleImageFromUrl(a);this.insertToEditor(u,Fp.b64toBlob(u))};this.imageDrop=new Sz(e,o,this.Logger,typeof this.options.handleOnPaste=="function"?this.options.handleOnPaste:this.options.handleOnPaste!==!1),this.Logger.log("fileChanged",{options:t,quill:e,debug:r});const l=this.quill.getModule("toolbar");l?l.addHandler("image",()=>this.selectLocalImage()):this.Logger.error("Quill toolbar module not found! need { toolbar: // options } in Quill.modules for image icon to sit in")}static b64toBlob(e){const t=atob(e.split(",")[1]),r=e.slice(5).split(";")[0],i=new ArrayBuffer(t.length);let o=new Uint8Array(i);for(let l=0;l<t.length;l++)o[l]=t.charCodeAt(l);return new Blob([i],{type:r})}destroy(){this.imageDrop&&console.warn("ImageDrop instance cleanup")}selectLocalImage(e){this.range=this.quill.getSelection(),this.fileHolder=document.createElement("input"),this.fileHolder.setAttribute("type","file"),this.fileHolder.setAttribute("accept","image/*"),this.fileHolder.setAttribute("style","visibility:hidden"),this.fileHolder.onchange=()=>this.fileChanged().then(()=>e&&e()),document.body.appendChild(this.fileHolder),this.fileHolder.click(),window.requestAnimationFrame(()=>{this.fileHolder&&document.body.removeChild(this.fileHolder)})}async fileChanged(e){var l;const t=e||((l=this.fileHolder)==null?void 0:l.files);if(!(t!=null&&t.length))return;const r=t[0];if(this.Logger.log("fileChanged",{file:r}),!r)return;const i=await R4(r),o=await this.downscaleImageFromUrl(i);this.insertToEditor(o,Fp.b64toBlob(o))}async downscaleImageFromUrl(e){const t=await bz(this.Logger,e,{maxWidth:this.options.maxWidth,maxHeight:this.options.maxHeight,imageType:this.options.imageType,keepImageTypes:this.options.keepImageTypes,ignoreImageTypes:this.options.ignoreImageTypes,imageQuality:this.options.quality});return this.Logger.log("downscaleImageFromUrl",{dataUrl:e,dataUrlCompressed:t}),t}insertToEditor(e,t){if(this.options.insertIntoEditor)this.options.insertIntoEditor(e,t,this.quill);else{this.Logger.log("insertToEditor",{url:e}),this.range=this.quill.getSelection();const r=this.range;if(!r)return;this.logFileSize(e),this.quill.insertEmbed(r.index,"image",`${e}`,"user"),r.index++,this.quill.setSelection(r,"api")}}logFileSize(e){const i=(Math.round((e.length-"data:image/png;base64,".length)*3/4)/1024).toFixed(0);this.Logger.log("estimated img size: "+i+" kb")}}window.imageCompressor=Fp;const Bp={OVERLAY:"ql-image-resizer-overlay",HANDLE:"ql-image-resizer-handle",DISPLAY:"ql-image-resizer-display",TOOLBAR:"ql-image-resizer-toolbar",TOOLBAR_BUTTON:"ql-image-resizer-toolbar-button"},Zd={BACKSPACE:8,DELETE:46,LEFT:37,UP:38,RIGHT:39,DOWN:40},D0=(n,e)=>{const t=n?"top":"bottom",r=e?"left":"right",i=n===e?"nwse-resize":"nesw-resize";return{[t]:"-5px",[r]:"-5px",cursor:i}},Tz={tl:D0(!0,!0),tr:D0(!0,!1),bl:D0(!1,!0),br:D0(!1,!1)},Az={modules:["DisplaySize","Toolbar","Resize","Keyboard"],embedTags:["VIDEO","IFRAME"],tools:["left","center","right","justify"],contentOptions:[{attribute:["width"],limit:{minWidth:100},blotName:"image"},{attribute:["width","height"],limit:{minWidth:200,ratio:.5625},blotName:"video"}]},Ez=Ke.import("formats/image");class q0 extends Ez{static get ATTRIBUTES(){return["alt","height","width","class","style","data-align"]}static formats(e){return this.ATTRIBUTES.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)??""),t),{})}format(e,t){this.constructor.ATTRIBUTES.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}Te(q0,"blotName","image"),Te(q0,"tagName","img"),Te(q0,"scope",Qn.INLINE);Ke.register("formats/image",q0,!0);class Xp{constructor(e){Te(this,"resizer");Te(this,"quill");Te(this,"overlay");Te(this,"activeEle");Te(this,"blot");Te(this,"options");Te(this,"requestUpdate");this.resizer=e,this.quill=e.quill,this.overlay=e.overlay,this.activeEle=e.activeEle,this.blot=e.blot,this.options=e.options,this.requestUpdate=()=>e.onUpdate(!0)}onCreate(){}onDestroy(){}onUpdate(){}}class Rz extends Xp{constructor(){super(...arguments);Te(this,"display")}onCreate(){var t;this.display=document.createElement("div"),this.display.className=af[Bp.DISPLAY],(t=this.overlay)==null||t.appendChild(this.display)}onUpdate(){if(!this.display||!this.activeEle)return;const[t,r]=[this.activeEle.offsetWidth,this.activeEle.offsetHeight];this.display.innerHTML=`${t} &times; ${r}`,this.positionDisplay(t,r)}positionDisplay(t,r){var a;if(!this.display)return;const i=this.display.getBoundingClientRect(),o=t>120&&r>30,l=((a=this.activeEle)==null?void 0:a.style.float)==="right";Object.assign(this.display.style,{right:o?"4px":l?"auto":`-${i.width+4}px`,bottom:o?"4px":`-${i.height+4}px`,left:o?"auto":l?`-${i.width+4}px`:"auto"})}}class Iz extends Xp{constructor(){super(...arguments);Te(this,"boxes",[]);Te(this,"dragBox",null);Te(this,"dragStartX",0);Te(this,"dragStartY",0);Te(this,"contentOption");Te(this,"preDragSize",{width:0,height:0});Te(this,"naturalSize",[0,0]);Te(this,"handleDragProxy",null);Te(this,"handleMouseupProxy",null);Te(this,"handleMousedown",t=>{!this.blot||!this.activeEle||(this.dragBox=t.target,this.dragStartX=t.clientX,this.dragStartY=t.clientY,this.preDragSize={width:this.activeEle.offsetWidth,height:this.activeEle.offsetHeight},this.naturalSize=this.getNaturalSize(),this.setCursor(window.getComputedStyle(this.dragBox).cursor),this.handleDragProxy=this.handleDrag.bind(this),this.handleMouseupProxy=this.handleMouseup.bind(this),document.addEventListener("mousemove",this.handleDragProxy,!0),document.addEventListener("mouseup",this.handleMouseupProxy,!0))});Te(this,"handleMouseup",t=>{if(!this.activeEle||!this.blot||!this.contentOption)return;const r=this.calcSize(t,this.contentOption.limit);Object.assign(this.activeEle,r),Object.assign(this.activeEle.style,{width:null,height:null}),this.setCursor(""),this.removeEventListeners()});Te(this,"handleDrag",t=>{!this.activeEle||!this.blot||!this.contentOption||(Object.assign(this.activeEle.style,this.calcSize(t,{...this.contentOption.limit,unit:!0})),this.requestUpdate())});Te(this,"handleDoubleClick",t=>{if(!this.blot||!this.activeEle||!this.contentOption)return;t.stopPropagation();const[r,i]=this.naturalSize,o={};this.contentOption.attribute.includes("width")&&(o.width=r),this.contentOption.attribute.includes("height")&&(o.height=i);const l=this.applyConstraints(o,this.contentOption.limit);Object.assign(this.activeEle,l),this.requestUpdate()})}onCreate(){!this.blot||!this.options.contentOptions||(this.contentOption=this.options.contentOptions.find(t=>t.blotName===this.blot.statics.blotName),this.boxes=[],["tl","tr","br","bl"].forEach(this.addBox.bind(this)))}onDestroy(){this.setCursor("")}addBox(t){var i;const r=document.createElement("div");r.className=`${af[Bp.HANDLE]} ${t}`,r.addEventListener("mousedown",this.handleMousedown,!1),r.addEventListener("dblclick",this.handleDoubleClick,!1),Object.assign(r.style,Tz[t]),(i=this.overlay)==null||i.appendChild(r),this.boxes.push(r)}removeEventListeners(){this.handleDragProxy&&(document.removeEventListener("mousemove",this.handleDragProxy,!0),this.handleDragProxy=null),this.handleMouseupProxy&&(document.removeEventListener("mouseup",this.handleMouseupProxy,!0),this.handleMouseupProxy=null)}calcSize(t,r={}){var u;if(!this.dragBox||!this.activeEle)return{};const i=t.clientX-this.dragStartX,o=t.clientY-this.dragStartY,l=this.dragBox===this.boxes[0]||this.dragBox===this.boxes[3]?-1:1,a={};return(u=this.contentOption)!=null&&u.attribute?this.contentOption.attribute.forEach(g=>a[g]=this.preDragSize[g]):a.width=this.preDragSize.width,a.width&&(a.width=Math.round(this.preDragSize.width+i*l)),a.height&&(a.height=Math.round(this.preDragSize.height+o*l)),this.applyConstraints(a,r)}applyConstraints(t,r={}){const i=typeof t.width=="string"?parseInt(t.width,10):t.width||0,o=typeof t.height=="string"?parseInt(t.height,10):t.height||0;let l=i,a=o;if(r.ratio){l=this.applyLimit(l,r.minWidth,r.maxWidth),a=l*r.ratio;const g=this.applyLimit(a,r.minHeight,r.maxHeight);g!==a&&(a=g,l=a/r.ratio)}else i&&(l=this.applyLimit(l,r.minWidth,r.maxWidth)),o&&(a=this.applyLimit(a,r.minHeight,r.maxHeight));const u={};return t.width!==void 0&&(u.width=r.unit?`${l}px`:l),t.height!==void 0&&(u.height=r.unit?`${a}px`:a),u}applyLimit(t,r,i){let o=t;return r!==void 0&&(o=Math.max(r,o)),i!==void 0&&(o=Math.min(i,o)),o}getNaturalSize(){if(!this.activeEle)return[0,0];const t=this.activeEle.getAttribute("data-size");if(!t){const r=this.activeEle,i=[r.offsetWidth,r.offsetHeight];return r.setAttribute("data-size",i.join(",")),i}return t.split(",").map(Number)}setCursor(t){[document.body,this.activeEle].forEach(r=>r&&(r.style.cursor=t))}}const jd=class jd extends Xp{constructor(){super(...arguments);Te(this,"keyboardProxy",null)}static injectInit(t){var i;const r=(i=t.keyboard)==null?void 0:i.bindings;r&&[jd.keys.LEFT,jd.keys.RIGHT].forEach(o=>(r[o]||[]).unshift(jd.makeArrowHandler(o)))}static makeArrowHandler(t){const r=t===jd.keys.LEFT;return{key:t,shiftKey:!1,altKey:null,[r?"prefix":"suffix"]:/^$/,handler(i){const o=this.quill;if(!o.resizer)return!0;let l=i.index;const a=t===jd.keys.RIGHT,[u]=o.getLine(l+(r?-1:0));if(!u)return!0;if(o.resizer.judgeShow(u))return!1;const g=o.getIndex(u);if(a&&g+u.length()-1===l)return!0;a&&(l+=i.length+1);const[m]=o.getLeaf(l);if(!m)return!0;const x=m.offset(m.parent),w=m.constructor&&"scope"in m.constructor&&m.constructor.scope===Qn.BLOCK_BLOT;if(r&&(w&&l===x||l===0||l===g))return!0;let _=m;if(r&&x===0){const[S]=o.getLeaf(l-1);S&&(_=S)}return!_||!o.resizer.judgeShow(_)}}}onCreate(){this.keyboardProxy=this.keyboardHandle.bind(this),document.addEventListener("keydown",this.keyboardProxy,!0)}onDestroy(){this.keyboardProxy&&document.removeEventListener("keydown",this.keyboardProxy,!0)}keyboardHandle(t){if(t.defaultPrevented||t.shiftKey||t.ctrlKey||t.altKey||!this.activeEle)return;const r=t.keyCode;let i=this.blot.offset(this.quill.scroll),o=null,l=!1;r===Zd.BACKSPACE||r===Zd.DELETE?(this.handleDelete(),l=!0):r>=Zd.LEFT&&r<=Zd.DOWN&&([i,o]=this.handleArrowKeys(r,i),l=!0),l&&(t.stopPropagation(),t.preventDefault()),!(o&&this.resizer.judgeShow(o,o.domNode))&&(this.quill.setSelection(i),this.resizer.hide())}handleDelete(){this.blot&&(this.blot.deleteAt(0,1),this.blot.parent.optimize({}))}handleArrowKeys(t,r){let i=null;return t===Zd.RIGHT?r+=this.blot.length()||1:t===Zd.UP?(r=this.getOtherLineIndex(-1),i=this.quill.getLeaf(r)[0]):t===Zd.DOWN&&(r=this.getOtherLineIndex(1),i=this.quill.getLeaf(r)[0]),[r,i]}getOtherLineIndex(t){if(!this.blot)return 0;const r=this.blot.offset(this.quill.scroll),[i]=this.quill.getLine(r);if(!i)return r;const o=this.blot.offset(i)+1,l=t>0?i.next:i.prev;if(!l)return r;let a=l.length();return l.statics.blotName==="block"&&a--,l.offset(this.quill.scroll)+Math.min(a,o)}};Te(jd,"keys",Zd);let vv=jd;const f1=class f1 extends Xp{constructor(t){super(t);Te(this,"toolbar");Te(this,"blot");this.blot=t.blot}createStyleTool(t,r){const i={left:{float:"left"},right:{float:"right"},center:{display:"block",margin:"0 auto",float:"none"},justify:{display:"block",float:"none",margin:"0",width:"100%"}};return{icon:t,apply:o=>{const l=i[r];Object.assign(o.style,l),o.setAttribute("data-align",r)},isApplied:o=>{const l=o.style;switch(r){case"center":return l.float==="none";case"justify":return l.display==="block"&&l.width==="100%";case"left":case"right":return l.float===r;default:return!1}}}}onCreate(){var t;this.toolbar=document.createElement("div"),this.toolbar.className=af[Bp.TOOLBAR],(t=this.overlay)==null||t.appendChild(this.toolbar),Object.keys(f1.Tools).forEach(r=>{const i=r;f1.Tools[i]=this.createStyleTool(f1.Tools[i].icon,i)}),this._addToolbarButtons()}_addToolbarButtons(){if(!this.toolbar||!this.activeEle)return;const{Tools:t}=this.constructor;this.options.tools.forEach(r=>{const i=r,o=t[i];if(!o)return;const l=document.createElement("button");l.type="button",l.className=af[Bp.TOOLBAR_BUTTON],l.innerHTML=a1.renderToString(M.jsx(uo,{icon:o.icon,size:"xs"})),l.setAttribute("data-tool",i),o.isApplied&&o.isApplied.call(this,this.activeEle)&&(l.style.backgroundColor="var(--AEditor_Addon_Secondary_color)"),this.addButtonClickHandler(l,o),this.toolbar.appendChild(l)})}addButtonClickHandler(t,r){!this.activeEle||!this.blot||t.addEventListener("click",i=>{var l;if(i.stopPropagation(),r.handler&&r.handler.call(this,i,t,this.activeEle)!==!0)return;const o=r.isApplied&&r.isApplied.call(this,this.activeEle);return this.toolbar&&Array.from(this.toolbar.querySelectorAll("button")).forEach(a=>a.style.backgroundColor=""),o?(this.activeEle.style.cssText="",this.activeEle.setAttribute("data-align","")):(t.style.backgroundColor="var(--AEditor_Addon_Secondary_color)",(l=r.apply)==null||l.call(r,this.activeEle)),this.requestUpdate(),!1})}};Te(f1,"Tools",{left:{icon:"AlignLeft"},center:{icon:"AlignCenter"},right:{icon:"AlignRight"},justify:{icon:"AlignJustify"}});let cm=f1;class I4{constructor(e,t={}){Te(this,"quill");Te(this,"options");Te(this,"moduleClasses");Te(this,"modules",[]);Te(this,"blot");Te(this,"selectedBlots",[]);Te(this,"embedClassName","");Te(this,"activeEle");Te(this,"overlay");Te(this,"updateFromModule",!1);Te(this,"hideProxy",null);Te(this,"updateOverlayPositionProxy",null);var i;e.resizer=this,this.quill=e;const r=t.modules?[...t.modules]:null;this.options={...Az,...t},r&&(this.options.modules=r),document.execCommand("enableObjectResizing",!1,"false"),this.moduleClasses=this.options.modules,this.quill.root.addEventListener("mousedown",this.handleClick.bind(this),!1),this.quill.on("text-change",this.handleChange.bind(this)),this.quill.container.style.position=this.quill.container.style.position||"relative",this.quill.on("selection-change",this.addBlotsSelectedClass.bind(this)),vv.injectInit(this.quill),(i=this.options.embedTags)!=null&&i.length&&this.initializeEmbed()}initializeModules(){this.modules.forEach(e=>e.onDestroy()),this.modules=[],this.modules=this.moduleClasses.map(e=>new(this.constructor.Modules[e]||e)(this)),this.modules.forEach(e=>e.onCreate()),this.repositionElements(),this.modules.forEach(e=>e.onUpdate())}initializeEmbed(){if(!this.options.embedTags.length)return;this.embedClassName=`ql-${Array.from({length},()=>[Math.floor(Math.random()*62)]).join("")}`;const e=[""].concat(this.options.embedTags).join(`, .${this.embedClassName} `).slice(2)+"{pointer-events: none;}",t=document.createElement("style");t.textContent=e,this.quill.container.appendChild(t),this.quill.root.classList.add(this.embedClassName)}onUpdate(e){this.updateFromModule=!!e,this.repositionElements(),this.modules.forEach(t=>t.onUpdate())}handleClick(e){if(this.overlay&&(e.target===this.overlay||this.overlay.contains(e.target)))return;let t=e.target;if(t=this.getEventTarget(e,t),t!=null&&t.tagName){const r=this.quill.scroll.find(t);if(r&&this.judgeShow(r,t)){e.preventDefault();return}}this.activeEle&&this.hide()}getEventTarget(e,t){var o;const r=(o=this.options.embedTags)==null?void 0:o.join();if(!r)return t;const i=this.quill.root;return(t===i||t.querySelectorAll(r).length)&&(i.classList.remove(this.embedClassName),t=document.elementFromPoint(e.clientX,e.clientY),i.classList.add(this.embedClassName)),t}judgeShow(e,t){if(!e||!this.options.contentOptions)return!1;!t&&e.domNode&&(t=e.domNode);const r=this.options.contentOptions.find(o=>o.blotName===e.statics.blotName);if(!r)return!1;if(this.activeEle===t)return!0;const i=r.limit||{};return!i.minWidth||i.minWidth&&t.offsetWidth>=i.minWidth?(this.activeEle&&this.hide(),this.activeEle=t,this.blot=e,this.showOverlay(),this.initializeModules(),!0):!1}handleChange(e,t,r){if(this.updateFromModule){this.updateFromModule=!1;return}r!=="user"||!this.overlay||!this.activeEle||this.onUpdate()}showOverlay(){this.overlay&&this.hideOverlay(),this.quill.setSelection(null),[document.body,this.quill.root].forEach(e=>e.style.userSelect="none"),this.overlay=document.createElement("div"),this.overlay.className=`${af[Bp.OVERLAY]}`,this.overlay.addEventListener("wheel",e=>{e.preventDefault(),e.stopPropagation(),this.quill.root.scrollTop+=e.deltaY*.5},{passive:!1}),this.quill.container.appendChild(this.overlay),this.hideProxy=()=>this.activeEle&&this.hide(),this.updateOverlayPositionProxy=()=>this.overlay&&(this.overlay.style.marginTop=-1*this.quill.root.scrollTop+"px"),this.quill.root.addEventListener("input",this.hideProxy,!0),this.quill.root.addEventListener("scroll",this.updateOverlayPositionProxy),this.repositionElements()}hideOverlay(){this.overlay&&(this.quill.container.removeChild(this.overlay),this.overlay=void 0,this.hideProxy&&this.quill.root.removeEventListener("input",this.hideProxy,!0),this.updateOverlayPositionProxy&&this.quill.root.removeEventListener("scroll",this.updateOverlayPositionProxy),[document.body,this.quill.root].forEach(e=>e.style.userSelect=""))}repositionElements(){if(!this.overlay||!this.activeEle)return;const e=this.quill.container,t=this.activeEle.getBoundingClientRect(),r=e.getBoundingClientRect();Object.assign(this.overlay.style,{left:`${t.left-r.left-1+e.scrollLeft}px`,top:`${t.top-r.top+this.quill.root.scrollTop}px`,width:`${t.width}px`,height:`${t.height}px`,marginTop:-1*this.quill.root.scrollTop+"px"})}addBlotsSelectedClass(e){if(!e){this.selectedBlots=[];return}try{const t=i=>{var o;return["image","iframe","video"].includes((o=i.statics)==null?void 0:o.blotName)},r=this.quill.scroll.descendants(t,e.index,e.length);this.selectedBlots=r.filter(i=>!i.statics||!this.options.contentOptions?!1:!!this.options.contentOptions.find(o=>o.blotName===i.statics.blotName))}catch{}}hide(){this.hideOverlay(),this.modules.forEach(e=>e.onDestroy()),this.modules=[],this.activeEle=void 0,this.blot=void 0}}Te(I4,"Modules",{Base:Xp,DisplaySize:Rz,Toolbar:cm,Resize:Iz,Keyboard:vv});const N0=Ke.import("delta"),kz=Ke.import("modules/clipboard");function Mz(n){let e=Number.parseFloat(n.getAttribute("width")||String(Ss.colDefaultWidth));if(Number.isNaN(e)){const t=n.style.width;e=t?Number.parseFloat(t):n.offsetWidth}return e}function Lz(n,e){const t=new Array(e).fill(Ss.colDefaultWidth),r=Array.from(n.querySelectorAll("tr"));for(const i of r){const o=Array.from(i.querySelectorAll("td"));for(const[l,a]of o.entries())if(l<e){const u=Mz(a);t[l]=u||t[l]}else break}return t}class Oz extends kz{constructor(t,r){super(t,r);Te(this,"tableId",Na());Te(this,"rowId",Na());Te(this,"colIds",[]);Te(this,"rowspanCount",[]);Te(this,"cellCount",0);Te(this,"colCount",0);Te(this,"STYLE_PROPERTIES",["color","background","background-color","mso-pattern","border","border-color","border-top","border-right","border-bottom","border-left"]);this.quill=t,this.addMatcher("table",this.matchTable.bind(this)),this.addMatcher("colgroup",this.matchColgroup.bind(this)),this.addMatcher("col",this.matchCol.bind(this)),this.addMatcher("tr",this.matchTr.bind(this)),this.addMatcher("td",this.matchTd.bind(this)),this.addMatcher("th",this.matchTd.bind(this)),this.addMatcher("caption",this.matchCaption.bind(this))}matchTable(t,r){if(r.ops.length===0)return r;const i=[],o=[];let l=-1;for(let g=0;g<r.ops.length;g++){const{attributes:m,insert:x}=r.ops[g],{table:w,[je.tableCell]:_,...S}=m||{},R=ng.isObject(x)&&x[je.tableCol];R?o.push({insert:x}):i.push({attributes:S,insert:x}),!(S!=null&&S[je.tableCellInner])&&!R&&(l=g)}const u=Lz(t,this.colIds.length).reduce((g,m,x)=>(o[x]?g.push(o[x]):g.push({insert:{[je.tableCol]:{tableId:this.tableId,colId:this.colIds[x],width:m,full:!0}}}),g),[]);return i.splice(l+1,0,...u),this.tableId=Na(),this.colIds=[],this.rowspanCount=[],this.cellCount=0,this.colCount=0,new N0(i)}matchColgroup(t,r){const i=[];for(let o=0;o<r.ops.length;o++){const l=r.ops[o];l&&ng.isObject(l.insert)&&l.insert[je.tableCol]&&i.push(l)}return new N0(i)}matchCol(t){this.colIds[this.colCount]=Na();const r=new N0().insert({[je.tableCol]:Object.assign(kg.value(t),{tableId:this.tableId,colId:this.colIds[this.colCount]})});return this.colCount+=1,r}matchTr(t,r){this.rowId=Na(),this.cellCount=0;for(const[i,o]of this.rowspanCount.entries())o.rowspan>0&&(o.rowspan-=1),o.rowspan<=0&&(this.rowspanCount[i]={rowspan:0,colspan:0});return r}matchTd(t,r){const i=t,o=Nf.formats(i);if(!this.colIds[this.cellCount]||!this.rowspanCount[this.cellCount])for(let m=this.cellCount;m>=0;m--)this.colIds[m]||(this.colIds[m]=Na()),this.rowspanCount[m]||(this.rowspanCount[m]={rowspan:0,colspan:0});const{colspan:l}=this.rowspanCount[this.cellCount];this.cellCount+=l,o.rowspan>0&&(this.rowspanCount[this.cellCount]={rowspan:o.rowspan,colspan:o.colspan});const a=this.colIds[this.cellCount];this.cellCount+=o.colspan;const u=Object.assign(o,{tableId:this.tableId,rowId:this.rowId,colId:a});this.handleBorderNoneStyles(i,u);const g=[];for(const m of r.ops){const{attributes:x={},...w}=m,{[je.tableCell]:_,...S}=x;g.push({...w,attributes:{...S,[je.tableCellInner]:u}})}return(g.length<=0||!ng.isString(g[g.length-1].insert)||!g[g.length-1].insert.endsWith(`
479
479
  `))&&g.push({insert:`
480
- `,attributes:{[je.tableCellInner]:u}}),new N0(g)}handleBorderNoneStyles(t,r){if(!(r!=null&&r.style))return;["border",...["top","right","bottom","left"].flatMap(o=>[`border-${o}`,`border-${o}-style`])].filter(o=>t.style[o]==="none").forEach(o=>r.style=r.style.replaceAll(new RegExp(`${o}:none;?`,"g"),""))}convert({html:t,text:r},i={}){if(t){const a=new DOMParser().parseFromString(t,"text/html");this.preprocessTableHtml(a),this.mergeClassStylesToInline(a),t=a.body.innerHTML}const o=super.convert({html:t,text:r},i);if(i[je.tableCellInner])for(const l of o.ops){if(ng.isObject(l.insert)&&l.insert[je.tableCol]){l.insert="";continue}l.attributes||(l.attributes={}),l.attributes[je.tableCellInner]=i[je.tableCellInner]}return o}parseStyleWithFilter(t,r){if(!t)return{};const i={};let o="",l="",a=!0,u=0;for(let g=0;g<t.length;g++){const m=t[g];m===":"&&a?(o=t.substring(u,g).trim(),u=g+1,a=!1):m===";"&&(!a&&o&&(l=t.substring(u,g).trim(),(!r||r(o))&&(i[o]=l)),u=g+1,a=!0)}return!a&&o&&u<t.length&&(l=t.substring(u).trim(),(!r||r(o))&&(i[o]=l)),i}mergeClassStylesToInline(t){var r;try{const i=t.querySelectorAll("td[class], th[class]");if(i.length===0)return;const o=new Set;for(const m of i)(m.getAttribute("class")||"").split(/\s+/).filter(Boolean).forEach(w=>o.add(w));if(o.size===0)return;const l=t.querySelectorAll("style");if(l.length===0)return;const a=Array.from(l).map(m=>m.textContent||"").join("");if(!a)return;const u={},g=m=>this.STYLE_PROPERTIES.some(x=>m.startsWith(x));for(const m of o){const x=new RegExp(`\\.${m}[^{]*{([^}]*)}`,"g");let w;for(;(w=x.exec(a))!==null;){const _=w[1],S=this.parseStyleWithFilter(_),R={};let I=!1;for(const O in S)g(O)&&(R[O]=S[O],I=!0);I&&(u[m]=R)}}if(Object.keys(u).length===0)return;for(let m=0;m<i.length;m++){const x=i[m],w=((r=x.getAttribute("class"))==null?void 0:r.split(/\s+/).filter(Boolean))||[],_=x.getAttribute("style")||"",S=this.parseStyleWithFilter(_);let R=!1;for(const I of w){const O=u[I];if(O)for(const P in O)S[P]||(S[P]=O[P],R=!0)}if(R){let I="";for(const O in S)I+=O+":"+S[O]+";";I&&x.setAttribute("style",I)}x.removeAttribute("class")}}catch(i){console.error("스타일 처리 오류",i)}}matchCaption(t,r){for(let i=0;i<r.ops.length;i++){const o=r.ops[i],{attributes:l}=o;l&&l[je.tableCaption]&&(l[je.tableCaption].tableId=this.tableId,o.attributes=l)}return r}preprocessTableHtml(t){try{const r=t.querySelectorAll("table");for(const i of Array.from(r))i.querySelectorAll("tr").length!==0&&(this.cleanupTableStyles(i),this.applyRowspanHeights(i),this.fixRowspanCells(i));this.mergeClassStylesToInline(t)}catch(r){console.error("테이블 전처리 오류",r)}}cleanupTableStyles(t){const r=t.querySelectorAll("td, th, tr, colgroup");for(const i of r){const o=i;o.removeAttribute("height");const l=o.getAttribute("style");if(l){const a=l.replace(/height\s*:[^;]*;?/gi,"").trim();o.setAttribute("style",a||"")}}}applyRowspanHeights(t){const i=t.querySelectorAll("td, th");t.style.borderCollapse="collapse";for(const o of i){const l=o,u=parseInt(l.getAttribute("rowspan")||"1")*24,g=l.getAttribute("style")||"",m=g+(g?"; ":"")+`height: ${u}px`;l.setAttribute("style",m)}}fixRowspanCells(t){const r=t.querySelectorAll("tr");if(r.length<=1)return;const i=[],o=new Map;for(let l=0;l<r.length;l++){const u=r[l].querySelectorAll("td, th");if(u.length===0&&l<r.length-1){i.push(l);continue}for(const g of Array.from(u)){const m=parseInt(g.getAttribute("rowspan")||"1");if(m>1)for(let x=1;x<m;x++){const w=l+x;if(w>=r.length)break;o.has(w)||o.set(w,[]),o.get(w).push(g)}}}i.length>0&&this.processEmptyRows(i,r,o)}processEmptyRows(t,r,i){for(const o of t){const l=i.get(o);if(l)for(const a of l){const u=parseInt(a.getAttribute("rowspan")||"1");u>1&&a.setAttribute("rowspan",(u-1).toString())}}for(const o of t.reverse())r[o].remove()}}class Pz extends E4{fixUnusuaDeletelTable(){}mergeCells(e){if(!this.table||!this.tableSelection)return;const t=this.tableSelection.selectedTds||[];if(t.length>1&&(e=t),!e||e.length<=1)return;const r=Kl(e[0],je.tableMain),i=r.getRows(),o=e.map(w=>{if(!w||!w.parent||!w.parent.domNode)return null;const _=w.parent.domNode;if(!_)return null;const S=i.findIndex(O=>O.rowId===w.rowId);if(S===-1)return null;const R=w.getColumnIndex();if(R===-1)return null;const I=_.getBoundingClientRect();return!I||I.width===0||I.height===0?null:{td:w,rowIndex:S,colIndex:R,rowspan:w.rowspan,colspan:w.colspan,visualLeft:I.left,visualRight:I.right,visualTop:I.top,visualBottom:I.bottom}}).filter(Boolean);if(o.length<=1)return;o.sort((w,_)=>w.visualTop-_.visualTop||w.visualLeft-_.visualLeft);const l=o[0],a=l.td,u=Math.max(...o.map(w=>w.rowIndex+w.rowspan-1)),g=Math.max(...o.map(w=>w.colIndex+w.colspan-1)),m=u-l.rowIndex+1,x=g-l.colIndex+1;for(const w of o)w.td!==a&&(w.td.moveChildren(a),w.td.parent.remove());a.rowspan=m,a.colspan=x,this.fixTableByRemove(r)}}Ke.register({"modules/imageCompress":Fp,"modules/resize":I4,"modules/tableUp":Pz,"modules/magicUrl":aF,"formats/divider":am,"modules/clipboard":Oz,"modules/copy":hz,"modules/toggleFullscreen":o4},!0);const u1={KB:1024,QUALITY:.7,IMAGE_SIZES:new Map},Dz={getCharLength:n=>Array.from(n).length,calculateTextSize:n=>{if(!n.ops||n.ops.length===0)return 0;let e=0;for(const t of n.ops)if(typeof t.insert=="string")e+=new TextEncoder().encode(t.insert).length-1;else if(typeof t.insert=="object"&&t.insert.image){const r=t.insert.image;r&&(e+=u1.IMAGE_SIZES.get(r)||Math.ceil(r.length*u1.QUALITY))}return e}},Nz=n=>{const{type:e="Primary",editorRef:t,useValue:r,useError:i,placeholder:o,tabIndex:l,autoFocus:a,editorProps:u,style:g,minHeight:m,maxHeight:x,contentHeight:w,contentMaxHeight:_=1e3,toolbarSize:S="Med",toolbarType:R="Default",readOnly:I,limitPosition:O="Bottom",maxLength:P,size:H=100,editorClassName:W,editorStyle:Y,noImageResize:B,...ee}=n,[{wrapId:D,wrapProps:J,labelProps:fe,...Z},te]=zg(ee),ne=z.useMemo(()=>e==="ReadOnly"||I,[e,I]),ue=z.useMemo(()=>w?20:0,[w]),[se,j]=z.useState(S==="Med"?40:50),re=z.useMemo(()=>ne?0:se,[ne,se]),[ge,ve]=z.useMemo(()=>!i||ne||O==="Top"?[0,0]:[20,6],[i,ne,O]),oe=z.useMemo(()=>ge+ve,[ge,ve]),[K,he]=z.useState(w),[Ae,He]=z.useState(!1),[xe,Fe]=z.useState(!1),Me=z.useRef(null),Be=z.useRef(0),ke=z.useRef(0),Re=z.useMemo(()=>Z.label?24:0,[Z.label]),ze=z.useMemo(()=>R==="Title",[R]),Xe=z.useMemo(()=>w||m||ze,[w,m,ze]),Le=z.useMemo(()=>Xe?"fit-content":x?x+Re:`calc(100% - ${Re}px)`,[Xe,x,Re]),ht=z.useMemo(()=>{if(w){if(K)switch(e){case"ReadOnly":return K;case"Raw":return K+oe;default:return K+re+oe}}else return},[w,K,e,re,oe]),Qe=z.useMemo(()=>{if(!(!x||x<=re+oe))switch(e){case"ReadOnly":return x;case"Raw":return x-oe;default:return x-re-oe}},[e,re,oe,x]),ot=z.useMemo(()=>{if(m&&w){const ft=Math.min(m-re-oe,w);return ne?ft:ft+re+oe}else return m||(w?void 0:`calc(100% - ${Re}px)`)},[m,w,Re,re,oe,ne]),tt=z.useMemo(()=>(Array.isArray(Z.errorMessage)?Z.errorMessage.some(Boolean):!!Z.errorMessage)?"Error":e,[Z.errorMessage,e]),rt=z.useCallback(ft=>{let Lt=ft;Lt=p7.sanitize(ft);const _t=document.createElement("div");return _t.innerHTML=Lt,new Ke(_t,{readOnly:!0}).getContents()},[]),[dt,Mt]=Do(r,""),[Bt,Ft]=z.useState(()=>rt(dt));z.useEffect(()=>{Mt===void 0&&Ft(rt(dt))},[rt,Mt,dt]);const Jt=z.useMemo(()=>M.jsx(Fz,{htmlDelta:Bt,isReadonly:ne,limit:H*u1.KB,useError:i}),[Bt,ne,H,i]),pn=z.useRef(null),zt=z.useRef([]),[vn,Ht]=z.useState(!0);z.useEffect(()=>{const ft=setTimeout(()=>Ht(!1),0);return()=>{clearTimeout(ft),zt.current.forEach(Lt=>Lt()),zt.current=[]}},[]);const wn=z.useCallback((ft,Lt)=>{if(!w)return Lt;const _t=m?m-re-oe:w,Wt=Math.max(_t,0),an=x?x-re-oe:_;return Math.min(an,Math.max(Wt,Lt+ft))},[w,m,re,oe,x,_]),ut=z.useCallback(ft=>{if(!Ae||!w)return;const Lt=ft.clientY-ke.current,_t=wn(Lt,Be.current);K!==_t&&he(_t),ft.preventDefault(),ft.stopPropagation()},[Ae,w,wn,K]),at=z.useCallback(ft=>{He(!1),Fe(!1),document.removeEventListener("mousemove",ut),document.removeEventListener("mouseup",at),ft.preventDefault(),ft.stopPropagation()},[ut]),gt=z.useCallback(ft=>{if(!w)return;if(ft.detail===2){he(w);return}K===void 0?(he(w),Be.current=w):Be.current=K,He(!0),Fe(!0),ke.current=ft.clientY;const Lt=Wt=>{if(!w)return;const an=Wt.clientY-ke.current,xt=wn(an,Be.current);he(xt),Wt.preventDefault(),Wt.stopPropagation()},_t=Wt=>{He(!1),Fe(!1),document.removeEventListener("mousemove",Lt),document.removeEventListener("mouseup",_t),Wt.preventDefault(),Wt.stopPropagation()};document.addEventListener("mousemove",Lt),document.addEventListener("mouseup",_t),ft.preventDefault(),ft.stopPropagation()},[w,K,wn]),It=z.useCallback((ft,Lt,_t,Wt)=>{if(_t!=="user"&&_t!=="api")return;const an=Wt.getContents(),xt=Wt.getLength()-1,Ot=P!==void 0&&xt>P,rn=cr=>cr.replace(/\s{2,}/g,En=>"&nbsp;".repeat(En.length)),mn=ft.replace(/^<p><br><\/p>$/,"").trim(),Cn=rn(mn);if(!Ot){Ft(an),Mt==null||Mt(Cn);return}const Xt=ln(an,P);Ft(Xt);const xn=new Ke(document.createElement("div"));xn.setContents(Xt);const Nn=rn(xn.root.innerHTML.replace(/^<p><br><\/p>$/,"").trim());Mt==null||Mt(Nn)},[P,Mt]),ln=(ft,Lt)=>{var an,xt,Ot;if(!ft.ops)return ft;const _t=new Jn;let Wt=0;for(const rn of ft.ops){if(Wt>=Lt)break;if(rn.insert&&typeof rn.insert=="string"){const mn=rn.insert,Cn=Lt-Wt;if(mn.length<=Cn)(an=_t.ops)==null||an.push(rn),Wt+=mn.length;else{const Xt={...rn,insert:mn.substring(0,Cn)};(xt=_t.ops)==null||xt.push(Xt),Wt+=Cn;break}}else Wt<Lt&&((Ot=_t.ops)==null||Ot.push(rn),Wt+=1)}return _t},sn=z.useCallback(ft=>{var an,xt;const Lt=ft.getEditor().container;if(!Lt)return null;const _t=(an=Lt.closest(".AEditorContainer"))==null?void 0:an.querySelector(".ql-toolbar");return _t||((xt=Lt.parentElement)==null?void 0:xt.querySelector(".ql-toolbar"))||null},[]),nn=z.useCallback((ft,Lt,_t,Wt)=>{if(!ft)return;const an=_t;ft.addEventListener(Lt,an,Wt),zt.current.push(()=>ft.removeEventListener(Lt,an,Wt))},[]),Ue=z.useCallback((ft,Lt,_t)=>{const Wt=Lt.getFormat();ft.forEach(an=>{if(Wt[an]){const xt=Wt[an],Ot=`.ql-${an}`,rn=_t.querySelector(`${Ot} .ql-picker-label`),mn=_t.querySelectorAll(`${Ot} .ql-picker-item`),Cn=Array.from(mn).find(Xt=>Xt.getAttribute("data-value")===xt);Cn&&(Cn.classList.add("ql-selected"),rn==null||rn.classList.add("ql-active"))}})},[]),Ce=z.useCallback(ft=>{if(!ft.length)return;const Wt=ft[0].target.getBoundingClientRect(),an=Math.ceil(Wt.height);j(xt=>Math.abs(xt-an)<.1?xt:an)},[]),Ze=z.useCallback((ft,Lt)=>{if(ft.key!=="Backspace")return;const _t=Lt.getSelection(!1);if(!_t||_t.length>0)return;const Wt=_t.index;if(Wt<=0)return;const[an]=Lt.getLine(Wt);if(an&&Wt===Lt.getIndex(an)||Lt.getFormat(Wt,1).link)return;const xt=Lt.getFormat(Wt-1,1);if(xt.link){ft.preventDefault();let Ot=Wt-1;for(;Ot>0&&Lt.getFormat(Ot-1,1).link===xt.link;)Ot--;const[rn]=Lt.scroll.descendant(mn=>{var Cn;return((Cn=mn==null?void 0:mn.statics)==null?void 0:Cn.blotName)==="link"},Ot);if(rn!=null&&rn.domNode){const mn=(rn.domNode.textContent||"").length;Lt.removeFormat(Ot,mn)}}},[]),Ct=z.useCallback(()=>({clipboard:{matchers:[["img",()=>!1],["table",()=>!1],["iframe",()=>!1],["video",()=>!1],["h1, h2, h3, h4, h5, h6",()=>!1],["blockquote",()=>!1],["hr",()=>!1]]},copy:{isTitleMode:!0},keyboard:{bindings:{enter:{key:"Enter",handler:()=>!1},newline:{key:"Enter",shiftKey:!0,handler:()=>!1},tab:{key:"Tab",handler:()=>!1},"remove-newline":{key:"Backspace",collapsed:!0,format:["blockquote","list","code-block"],offset:0,handler:function(ft){const{blockquote:Lt,list:_t,["code-block"]:Wt}=ft.getFormat();return Lt||_t||Wt?(ft.format("blockquote",!1),ft.format("list",!1),ft.format("code-block",!1),!1):!0}}}},magicUrl:!0,toolbar:{container:[["bold","italic","underline","strike",{color:[]},{background:[]},"clean"]]}}),[]),Qt=z.useCallback(()=>({clipboard:{},copy:{},keyboard:{},magicUrl:!0,toggleFullscreen:{type:tt,maximize:a1.renderToString(M.jsx(uo,{icon:"Maximize",size:S==="Med"?"sm":"md"})),minimize:a1.renderToString(M.jsx(uo,{icon:"Minimize",size:S==="Med"?"sm":"md"}))},imageCompress:{quality:u1.QUALITY,imageType:"image/jpeg",maxWidth:1500,maxHeight:1500,debug:!1,handleOnPaste:ft=>{var Lt,_t;try{const Wt=(Lt=ft.clipboardData)==null?void 0:Lt.items;if(!Wt)return!0;const an=Array.from(Wt).some(rn=>{const mn=rn.type.toLowerCase();return mn.includes("Excel")||mn.includes("text/html")}),xt=(_t=ft.clipboardData)==null?void 0:_t.getData("text/html"),Ot=xt&&(xt.includes("<table")||xt.includes("<tbody")||xt.includes("<td"));return!(an||Ot)}catch(Wt){return console.warn("Error in handleOnPaste:",Wt),!0}},insertIntoEditor:(ft,Lt,_t)=>{u1.IMAGE_SIZES.has(ft)||u1.IMAGE_SIZES.set(ft,Lt.size);const Wt=_t.getSelection();Wt&&_t.insertEmbed(Wt.index,"image",ft,Ke.sources.USER)}},...!ne&&{...!B&&{resize:{}},table:!1,tableUp:{fullSwitch:!1,icon:a1.renderToString(M.jsx(uo,{icon:"Table",size:S==="Med"?"sm":"md",strokeWidth:2.5})),resize:ZB,resizeScale:XB,customSelect:ez,selection:JB,fixUnusuaDeletelTable:!1,selectionOptions:{tableMenu:YB,tableMenuOptions:{localstorageKey:"used-color",tipText:!0,tools:[io.InsertCaption,io.InsertTop,io.InsertRight,io.InsertBottom,io.InsertLeft,io.Break,io.MergeCell,io.SplitCell,io.Break,io.DeleteRow,io.DeleteColumn,io.DeleteTable,io.Break,io.BackgroundColor,io.BorderColor,io.Break,io.CopyCell,io.CutCell,io.Break,io.SwitchWidth]}},texts:{fullCheckboxText:Nr.AEditor["Insert Full Width Table"],customBtnText:Nr.AEditor.Custom,confirmText:Nr.AEditor.Confirm,cancelText:Nr.AEditor.Cancel,rowText:Nr.AEditor.Row,colText:Nr.AEditor.Column,CopyCell:Nr.AEditor["Copy Cell"],CutCell:Nr.AEditor["Cut Cell"],notPositiveNumberError:Nr.AEditor["Not Positive Number Error"],custom:Nr.AEditor.Custom,clear:Nr.AEditor.Clear,transparent:Nr.AEditor.Transparent,perWidthInsufficient:Nr.AEditor.perWidthInsufficient,InsertTop:Nr.AEditor["Insert Row Top"],InsertRight:Nr.AEditor["Insert Column Right"],InsertBottom:Nr.AEditor["Insert Row Bottom"],InsertLeft:Nr.AEditor["Insert Column Left"],MergeCell:Nr.AEditor["Merge Cell"],SplitCell:Nr.AEditor["Split Cell"],DeleteRow:Nr.AEditor["Delete Row"],DeleteColumn:Nr.AEditor["Delete Column"],DeleteTable:Nr.AEditor["Delete Table"],BackgroundColor:Nr.AEditor["Set Background Color"],BorderColor:Nr.AEditor["Set Border Color"],SwitchWidth:Nr.AEditor["Switch Table Width"],InsertCaption:Nr.AEditor["Insert Table Caption"]}},toolbar:{container:[[{header:[1,2,3,!1,4]}],["bold","italic","underline","strike","blockquote","divider",{[E4.toolName]:[]},{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],handlers:{divider:function(){const ft=this.quill,Lt=ft.getSelection(!0);if(!Lt)return;const _t=Math.min(Lt.index+1,ft.getLength()-1);ft.insertEmbed(_t,"divider",!0,Ke.sources.USER),setTimeout(()=>ft.setSelection(Math.min(_t+1,ft.getLength()-1),0,Ke.sources.SILENT),0)}}}}}),[ne,B,S,tt]),Vt=z.useMemo(()=>ze?Ct():Qt(),[ze,Ct,Qt]),bn=z.useCallback(ft=>{if(!ft)return;const Lt=ft.getEditor();if(!Lt)return;const _t=Lt.root,Wt=sn(ft);_t&&W&&_t.classList.add(...W.split(" ")),_t&&Y&&Object.entries(Y).forEach(([xt,Ot])=>{const rn=xt.replace(/([A-Z])/g,mn=>`-${mn[0].toLowerCase()}`);_t.style[rn]=Ot}),nn(_t,"keydown",xt=>Ze(xt,Lt));const an=new ResizeObserver(Ce);if(Wt){an.observe(Wt),zt.current.push(()=>an.disconnect());const xt=["header","color","background"];xt.forEach(Ot=>{const rn=Wt.querySelector(`.ql-${Ot} .ql-picker-label`);rn&&nn(rn,"click",()=>Ue(xt,Lt,Wt))})}},[sn,W,Y,nn,Ce,Ze,Ue]),hn=z.useCallback(ft=>{if(zt.current.forEach(_t=>_t()),zt.current=[],pn.current=ft,!ft){ng.isFunction(t)?t(null):t!=null&&t.current&&(t.current=null);return}const Lt=ft;Lt.copyContent=_t=>{ft.getEditor().getModule("copy").copyContent(_t)},ng.isFunction(t)?t(Lt):t&&(t.current=Lt),bn(ft)},[t,bn]);return M.jsx(sg,{wrapId:D,...Z,label:M.jsxs(vl,{style:{gap:4},children:[Z.label,O==="Top"&&Jt]}),labelProps:{...fe,style:{minHeight:Z.label?20:void 0,marginBottom:Z.label?4:0,...fe==null?void 0:fe.style}},wrapProps:{...J,className:bt.clsx(J==null?void 0:J.className,!Xe&&af.AEditorWrapper),style:{...J==null?void 0:J.style,height:Le}},children:M.jsxs(Wi,{...te,className:bt.clsx(te.className,af.AEditorContainer,vn&&"NoTransition"),style:{...g,height:ht,minHeight:ot},children:[M.jsx(Pv,{...u,ref:hn,preserveWhitespace:!0,modules:Vt,placeholder:o,readOnly:ne,theme:"snow",value:Bt,className:bt.clsx(u==null?void 0:u.className,af.AEditor,af[tt],ze&&"Title",vn&&"NoTransition"),style:{...u==null?void 0:u.style,maxHeight:Qe?Qe+re:void 0,"--icon-size":`${S==="Med"?20:24}px`,"--editor-padding":ze?"8px 12px":"12px","--toolbar-padding":`${S==="Med"?7.5:12.5}px`,"--content-height":ze?"fit-content":K?`${K}px`:"100%","--content-max-height":Qe?`${Qe}px`:"100%","--default-text":`'${Nr.AEditor.Default}'`,"--visit-url-text":`'${Nr.AEditor["Visit URL:"]}'`,"--enter-link-text":`'${Nr.AEditor["Enter link:"]}'`,"--enter-video-text":`'${Nr.AEditor["Enter video:"]}'`,"--edit-text":`'${Nr.AEditor.Edit}'`,"--save-text":`'${Nr.AEditor.Save}'`,"--remove-text":`'${Nr.AEditor.Remove}'`,"--arrow-background":`url("data:image/svg+xml,${encodeURIComponent(a1.renderToString(M.jsx(uo,{icon:"EditorArrow"})))}`,"--title-color-picker-row":ze?1:4,"--title-header-font-size":`${S==="Med"?12:14}px`},onChange:It}),w&&M.jsxs(M.Fragment,{children:[M.jsx("div",{ref:Me,className:bt.clsx(af.Resizer,vn&&"NoTransition"),style:{height:ue,bottom:i&&!ne?oe:0},onMouseDown:gt}),M.jsx("div",{children:`${Math.round(K)}px`,className:bt.clsx(af.Indicator,"NoSelect","Label1",vn&&"NoTransition"),style:{height:ue,bottom:i&&!ne?oe:0,display:xe?"flex":"none"}})]}),M.jsx("div",{children:Jt,className:bt.clsx(af.LimitContainer,"NoSelect",vn&&"NoTransition"),style:{marginTop:ve,minHeight:ge,display:O==="Bottom"?"flex":"none"}})]})})},Fz=n=>{const e=Vn.c(17),{htmlDelta:t,limit:r,useError:i,isReadonly:o}=n,[l,a]=Do(i,!1),u=Dz.calculateTextSize(t);let g,m;if(e[0]!==u||e[1]!==r||e[2]!==a?(g=()=>{a&&a(u>r)},m=[u,r,a],e[0]=u,e[1]=r,e[2]=a,e[3]=g,e[4]=m):(g=e[3],m=e[4]),z.useEffect(g,m),!i||o)return null;let x;e[5]!==l?(x=bt.clsx(l&&af.Error),e[5]=l,e[6]=x):x=e[6];let w;e[7]!==u?(w=Lg(u),e[7]=u,e[8]=w):w=e[8];let _;e[9]!==x||e[10]!==w?(_=M.jsx("span",{className:x,children:w}),e[9]=x,e[10]=w,e[11]=_):_=e[11];let S;e[12]!==r?(S=Lg(r),e[12]=r,e[13]=S):S=e[13];let R;return e[14]!==_||e[15]!==S?(R=M.jsxs(nd,{className:af.Limit,children:["(",_," / ",S,")"]}),e[14]=_,e[15]=S,e[16]=R):R=e[16],R};function Bz(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return z.useMemo(()=>r=>{e.forEach(i=>i(r))},e)}const zv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function N1(n){const e=Object.prototype.toString.call(n);return e==="[object Window]"||e==="[object global]"}function jm(n){return"nodeType"in n}function uf(n){var e,t;return n?N1(n)?n:jm(n)&&(e=(t=n.ownerDocument)==null?void 0:t.defaultView)!=null?e:window:window}function $m(n){const{Document:e}=uf(n);return n instanceof e}function Kp(n){return N1(n)?!1:n instanceof uf(n).HTMLElement}function k4(n){return n instanceof uf(n).SVGElement}function F1(n){return n?N1(n)?n.document:jm(n)?$m(n)?n:Kp(n)||k4(n)?n.ownerDocument:document:document:document}const ld=zv?z.useLayoutEffect:z.useEffect;function e2(n){const e=z.useRef(n);return ld(()=>{e.current=n}),z.useCallback(function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function zz(){const n=z.useRef(null),e=z.useCallback((r,i)=>{n.current=setInterval(r,i)},[]),t=z.useCallback(()=>{n.current!==null&&(clearInterval(n.current),n.current=null)},[]);return[e,t]}function zp(n,e){e===void 0&&(e=[n]);const t=z.useRef(n);return ld(()=>{t.current!==n&&(t.current=n)},e),t}function Jp(n,e){const t=z.useRef();return z.useMemo(()=>{const r=n(t.current);return t.current=r,r},[...e])}function bv(n){const e=e2(n),t=z.useRef(null),r=z.useCallback(i=>{i!==t.current&&(e==null||e(i,t.current)),t.current=i},[]);return[t,r]}function um(n){const e=z.useRef();return z.useEffect(()=>{e.current=n},[n]),e.current}let Pb={};function Qp(n,e){return z.useMemo(()=>{if(e)return e;const t=Pb[n]==null?0:Pb[n]+1;return Pb[n]=t,n+"-"+t},[n,e])}function M4(n){return function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((o,l)=>{const a=Object.entries(l);for(const[u,g]of a){const m=o[u];m!=null&&(o[u]=m+n*g)}return o},{...e})}}const m1=M4(1),yv=M4(-1);function Hz(n){return"clientX"in n&&"clientY"in n}function t2(n){if(!n)return!1;const{KeyboardEvent:e}=uf(n.target);return e&&n instanceof e}function Wz(n){if(!n)return!1;const{TouchEvent:e}=uf(n.target);return e&&n instanceof e}function fm(n){if(Wz(n)){if(n.touches&&n.touches.length){const{clientX:e,clientY:t}=n.touches[0];return{x:e,y:t}}else if(n.changedTouches&&n.changedTouches.length){const{clientX:e,clientY:t}=n.changedTouches[0];return{x:e,y:t}}}return Hz(n)?{x:n.clientX,y:n.clientY}:null}const Hp=Object.freeze({Translate:{toString(n){if(!n)return;const{x:e,y:t}=n;return"translate3d("+(e?Math.round(e):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;const{scaleX:e,scaleY:t}=n;return"scaleX("+e+") scaleY("+t+")"}},Transform:{toString(n){if(n)return[Hp.Translate.toString(n),Hp.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:e,duration:t,easing:r}=n;return e+" "+t+"ms "+r}}}),Ow="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Uz(n){return n.matches(Ow)?n:n.querySelector(Ow)}const Gz={display:"none"};function Yz(n){let{id:e,value:t}=n;return z.createElement("div",{id:e,style:Gz},t)}function Vz(n){let{id:e,announcement:t,ariaLiveType:r="assertive"}=n;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:i,role:"status","aria-live":r,"aria-atomic":!0},t)}function Zz(){const[n,e]=z.useState("");return{announce:z.useCallback(r=>{r!=null&&e(r)},[]),announcement:n}}const L4=z.createContext(null);function Xz(n){const e=z.useContext(L4);z.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(n)},[n,e])}function Kz(){const[n]=z.useState(()=>new Set),e=z.useCallback(r=>(n.add(r),()=>n.delete(r)),[n]);return[z.useCallback(r=>{let{type:i,event:o}=r;n.forEach(l=>{var a;return(a=l[i])==null?void 0:a.call(l,o)})},[n]),e]}const Jz={draggable:`
480
+ `,attributes:{[je.tableCellInner]:u}}),new N0(g)}handleBorderNoneStyles(t,r){if(!(r!=null&&r.style))return;["border",...["top","right","bottom","left"].flatMap(o=>[`border-${o}`,`border-${o}-style`])].filter(o=>t.style[o]==="none").forEach(o=>r.style=r.style.replaceAll(new RegExp(`${o}:none;?`,"g"),""))}convert({html:t,text:r},i={}){if(t){const a=new DOMParser().parseFromString(t,"text/html");this.preprocessTableHtml(a),this.mergeClassStylesToInline(a),t=a.body.innerHTML}const o=super.convert({html:t,text:r},i);if(i[je.tableCellInner])for(const l of o.ops){if(ng.isObject(l.insert)&&l.insert[je.tableCol]){l.insert="";continue}l.attributes||(l.attributes={}),l.attributes[je.tableCellInner]=i[je.tableCellInner]}return o}parseStyleWithFilter(t,r){if(!t)return{};const i={};let o="",l="",a=!0,u=0;for(let g=0;g<t.length;g++){const m=t[g];m===":"&&a?(o=t.substring(u,g).trim(),u=g+1,a=!1):m===";"&&(!a&&o&&(l=t.substring(u,g).trim(),(!r||r(o))&&(i[o]=l)),u=g+1,a=!0)}return!a&&o&&u<t.length&&(l=t.substring(u).trim(),(!r||r(o))&&(i[o]=l)),i}mergeClassStylesToInline(t){var r;try{const i=t.querySelectorAll("td[class], th[class]");if(i.length===0)return;const o=new Set;for(const m of i)(m.getAttribute("class")||"").split(/\s+/).filter(Boolean).forEach(w=>o.add(w));if(o.size===0)return;const l=t.querySelectorAll("style");if(l.length===0)return;const a=Array.from(l).map(m=>m.textContent||"").join("");if(!a)return;const u={},g=m=>this.STYLE_PROPERTIES.some(x=>m.startsWith(x));for(const m of o){const x=new RegExp(`\\.${m}[^{]*{([^}]*)}`,"g");let w;for(;(w=x.exec(a))!==null;){const _=w[1],S=this.parseStyleWithFilter(_),R={};let I=!1;for(const O in S)g(O)&&(R[O]=S[O],I=!0);I&&(u[m]=R)}}if(Object.keys(u).length===0)return;for(let m=0;m<i.length;m++){const x=i[m],w=((r=x.getAttribute("class"))==null?void 0:r.split(/\s+/).filter(Boolean))||[],_=x.getAttribute("style")||"",S=this.parseStyleWithFilter(_);let R=!1;for(const I of w){const O=u[I];if(O)for(const P in O)S[P]||(S[P]=O[P],R=!0)}if(R){let I="";for(const O in S)I+=O+":"+S[O]+";";I&&x.setAttribute("style",I)}x.removeAttribute("class")}}catch(i){console.error("스타일 처리 오류",i)}}matchCaption(t,r){for(let i=0;i<r.ops.length;i++){const o=r.ops[i],{attributes:l}=o;l&&l[je.tableCaption]&&(l[je.tableCaption].tableId=this.tableId,o.attributes=l)}return r}preprocessTableHtml(t){try{const r=t.querySelectorAll("table");for(const i of Array.from(r))i.querySelectorAll("tr").length!==0&&(this.cleanupTableStyles(i),this.applyRowspanHeights(i),this.fixRowspanCells(i));this.mergeClassStylesToInline(t)}catch(r){console.error("테이블 전처리 오류",r)}}cleanupTableStyles(t){const r=t.querySelectorAll("td, th, tr, colgroup");for(const i of r){const o=i;o.removeAttribute("height");const l=o.getAttribute("style");if(l){const a=l.replace(/height\s*:[^;]*;?/gi,"").trim();o.setAttribute("style",a||"")}}}applyRowspanHeights(t){const i=t.querySelectorAll("td, th");t.style.borderCollapse="collapse";for(const o of i){const l=o,u=parseInt(l.getAttribute("rowspan")||"1")*24,g=l.getAttribute("style")||"",m=g+(g?"; ":"")+`height: ${u}px`;l.setAttribute("style",m)}}fixRowspanCells(t){const r=t.querySelectorAll("tr");if(r.length<=1)return;const i=[],o=new Map;for(let l=0;l<r.length;l++){const u=r[l].querySelectorAll("td, th");if(u.length===0&&l<r.length-1){i.push(l);continue}for(const g of Array.from(u)){const m=parseInt(g.getAttribute("rowspan")||"1");if(m>1)for(let x=1;x<m;x++){const w=l+x;if(w>=r.length)break;o.has(w)||o.set(w,[]),o.get(w).push(g)}}}i.length>0&&this.processEmptyRows(i,r,o)}processEmptyRows(t,r,i){for(const o of t){const l=i.get(o);if(l)for(const a of l){const u=parseInt(a.getAttribute("rowspan")||"1");u>1&&a.setAttribute("rowspan",(u-1).toString())}}for(const o of t.reverse())r[o].remove()}}class Pz extends E4{fixUnusuaDeletelTable(){}mergeCells(e){if(!this.table||!this.tableSelection)return;const t=this.tableSelection.selectedTds||[];if(t.length>1&&(e=t),!e||e.length<=1)return;const r=Kl(e[0],je.tableMain),i=r.getRows(),o=e.map(w=>{if(!w||!w.parent||!w.parent.domNode)return null;const _=w.parent.domNode;if(!_)return null;const S=i.findIndex(O=>O.rowId===w.rowId);if(S===-1)return null;const R=w.getColumnIndex();if(R===-1)return null;const I=_.getBoundingClientRect();return!I||I.width===0||I.height===0?null:{td:w,rowIndex:S,colIndex:R,rowspan:w.rowspan,colspan:w.colspan,visualLeft:I.left,visualRight:I.right,visualTop:I.top,visualBottom:I.bottom}}).filter(Boolean);if(o.length<=1)return;o.sort((w,_)=>w.visualTop-_.visualTop||w.visualLeft-_.visualLeft);const l=o[0],a=l.td,u=Math.max(...o.map(w=>w.rowIndex+w.rowspan-1)),g=Math.max(...o.map(w=>w.colIndex+w.colspan-1)),m=u-l.rowIndex+1,x=g-l.colIndex+1;for(const w of o)w.td!==a&&(w.td.moveChildren(a),w.td.parent.remove());a.rowspan=m,a.colspan=x,this.fixTableByRemove(r)}}Ke.register({"modules/imageCompress":Fp,"modules/resize":I4,"modules/tableUp":Pz,"modules/magicUrl":aF,"formats/divider":am,"modules/clipboard":Oz,"modules/copy":hz,"modules/toggleFullscreen":o4},!0);const u1={KB:1024,QUALITY:.7,IMAGE_SIZES:new Map},Dz={getCharLength:n=>Array.from(n).length,calculateTextSize:n=>{if(!n.ops||n.ops.length===0)return 0;let e=0;for(const t of n.ops)if(typeof t.insert=="string")e+=new TextEncoder().encode(t.insert).length-1;else if(typeof t.insert=="object"&&t.insert.image){const r=t.insert.image;r&&(e+=u1.IMAGE_SIZES.get(r)||Math.ceil(r.length*u1.QUALITY))}return e}},Nz=n=>{const{type:e="Primary",editorRef:t,useValue:r,useError:i,placeholder:o,tabIndex:l,autoFocus:a,editorProps:u,style:g,minHeight:m,maxHeight:x,contentHeight:w,contentMaxHeight:_=1e3,toolbarSize:S="Med",toolbarType:R="Default",readOnly:I,limitPosition:O="Bottom",maxLength:P,size:H=100,editorClassName:W,editorStyle:Y,noImageResize:B,...ee}=n,[{wrapId:D,wrapProps:J,labelProps:fe,...Z},te]=zg(ee),ne=z.useMemo(()=>e==="ReadOnly"||I,[e,I]),ue=z.useMemo(()=>w?20:0,[w]),[se,j]=z.useState(S==="Med"?40:50),re=z.useMemo(()=>ne?0:se,[ne,se]),[ge,ve]=z.useMemo(()=>!i||ne||O==="Top"?[0,0]:[20,6],[i,ne,O]),oe=z.useMemo(()=>ge+ve,[ge,ve]),[K,he]=z.useState(w),[Ae,He]=z.useState(!1),[xe,Fe]=z.useState(!1),Me=z.useRef(null),Be=z.useRef(0),ke=z.useRef(0),Re=z.useMemo(()=>Z.label?24:0,[Z.label]),ze=z.useMemo(()=>R==="Title",[R]),Xe=z.useMemo(()=>!!w||ze,[w,ze]),Le=z.useMemo(()=>Xe?"fit-content":x?x+Re:`calc(100% - ${Re}px)`,[Xe,x,Re]),ht=z.useMemo(()=>{if(w){if(K)switch(e){case"ReadOnly":return K;case"Raw":return K+oe;default:return K+re+oe}}else return},[w,K,e,re,oe]),Qe=z.useMemo(()=>{if(!(!x||x<=re+oe))switch(e){case"ReadOnly":return x;case"Raw":return x-oe;default:return x-re-oe}},[e,re,oe,x]),ot=z.useMemo(()=>{if(m&&w){const ft=Math.min(m-re-oe,w);return ne?ft:ft+re+oe}else return m||(w?void 0:`calc(100% - ${Re}px)`)},[m,w,Re,re,oe,ne]),tt=z.useMemo(()=>(Array.isArray(Z.errorMessage)?Z.errorMessage.some(Boolean):!!Z.errorMessage)?"Error":e,[Z.errorMessage,e]),rt=z.useCallback(ft=>{let Lt=ft;Lt=p7.sanitize(ft);const _t=document.createElement("div");return _t.innerHTML=Lt,new Ke(_t,{readOnly:!0}).getContents()},[]),[dt,Mt]=Do(r,""),[Bt,Ft]=z.useState(()=>rt(dt));z.useEffect(()=>{Mt===void 0&&Ft(rt(dt))},[rt,Mt,dt]);const Jt=z.useMemo(()=>M.jsx(Fz,{htmlDelta:Bt,isReadonly:ne,limit:H*u1.KB,useError:i}),[Bt,ne,H,i]),pn=z.useRef(null),zt=z.useRef([]),[vn,Ht]=z.useState(!0);z.useEffect(()=>{const ft=setTimeout(()=>Ht(!1),0);return()=>{clearTimeout(ft),zt.current.forEach(Lt=>Lt()),zt.current=[]}},[]);const wn=z.useCallback((ft,Lt)=>{if(!w)return Lt;const _t=m?m-re-oe:w,Wt=Math.max(_t,0),an=x?x-re-oe:_;return Math.min(an,Math.max(Wt,Lt+ft))},[w,m,re,oe,x,_]),ut=z.useCallback(ft=>{if(!Ae||!w)return;const Lt=ft.clientY-ke.current,_t=wn(Lt,Be.current);K!==_t&&he(_t),ft.preventDefault(),ft.stopPropagation()},[Ae,w,wn,K]),at=z.useCallback(ft=>{He(!1),Fe(!1),document.removeEventListener("mousemove",ut),document.removeEventListener("mouseup",at),ft.preventDefault(),ft.stopPropagation()},[ut]),gt=z.useCallback(ft=>{if(!w)return;if(ft.detail===2){he(w);return}K===void 0?(he(w),Be.current=w):Be.current=K,He(!0),Fe(!0),ke.current=ft.clientY;const Lt=Wt=>{if(!w)return;const an=Wt.clientY-ke.current,xt=wn(an,Be.current);he(xt),Wt.preventDefault(),Wt.stopPropagation()},_t=Wt=>{He(!1),Fe(!1),document.removeEventListener("mousemove",Lt),document.removeEventListener("mouseup",_t),Wt.preventDefault(),Wt.stopPropagation()};document.addEventListener("mousemove",Lt),document.addEventListener("mouseup",_t),ft.preventDefault(),ft.stopPropagation()},[w,K,wn]),It=z.useCallback((ft,Lt,_t,Wt)=>{if(_t!=="user"&&_t!=="api")return;const an=Wt.getContents(),xt=Wt.getLength()-1,Ot=P!==void 0&&xt>P,rn=cr=>cr.replace(/\s{2,}/g,En=>"&nbsp;".repeat(En.length)),mn=ft.replace(/^<p><br><\/p>$/,"").trim(),Cn=rn(mn);if(!Ot){Ft(an),Mt==null||Mt(Cn);return}const Xt=ln(an,P);Ft(Xt);const xn=new Ke(document.createElement("div"));xn.setContents(Xt);const Nn=rn(xn.root.innerHTML.replace(/^<p><br><\/p>$/,"").trim());Mt==null||Mt(Nn)},[P,Mt]),ln=(ft,Lt)=>{var an,xt,Ot;if(!ft.ops)return ft;const _t=new Jn;let Wt=0;for(const rn of ft.ops){if(Wt>=Lt)break;if(rn.insert&&typeof rn.insert=="string"){const mn=rn.insert,Cn=Lt-Wt;if(mn.length<=Cn)(an=_t.ops)==null||an.push(rn),Wt+=mn.length;else{const Xt={...rn,insert:mn.substring(0,Cn)};(xt=_t.ops)==null||xt.push(Xt),Wt+=Cn;break}}else Wt<Lt&&((Ot=_t.ops)==null||Ot.push(rn),Wt+=1)}return _t},sn=z.useCallback(ft=>{var an,xt;const Lt=ft.getEditor().container;if(!Lt)return null;const _t=(an=Lt.closest(".AEditorContainer"))==null?void 0:an.querySelector(".ql-toolbar");return _t||((xt=Lt.parentElement)==null?void 0:xt.querySelector(".ql-toolbar"))||null},[]),nn=z.useCallback((ft,Lt,_t,Wt)=>{if(!ft)return;const an=_t;ft.addEventListener(Lt,an,Wt),zt.current.push(()=>ft.removeEventListener(Lt,an,Wt))},[]),Ue=z.useCallback((ft,Lt,_t)=>{const Wt=Lt.getFormat();ft.forEach(an=>{if(Wt[an]){const xt=Wt[an],Ot=`.ql-${an}`,rn=_t.querySelector(`${Ot} .ql-picker-label`),mn=_t.querySelectorAll(`${Ot} .ql-picker-item`),Cn=Array.from(mn).find(Xt=>Xt.getAttribute("data-value")===xt);Cn&&(Cn.classList.add("ql-selected"),rn==null||rn.classList.add("ql-active"))}})},[]),Ce=z.useCallback(ft=>{if(!ft.length)return;const Wt=ft[0].target.getBoundingClientRect(),an=Math.ceil(Wt.height);j(xt=>Math.abs(xt-an)<.1?xt:an)},[]),Ze=z.useCallback((ft,Lt)=>{if(ft.key!=="Backspace")return;const _t=Lt.getSelection(!1);if(!_t||_t.length>0)return;const Wt=_t.index;if(Wt<=0)return;const[an]=Lt.getLine(Wt);if(an&&Wt===Lt.getIndex(an)||Lt.getFormat(Wt,1).link)return;const xt=Lt.getFormat(Wt-1,1);if(xt.link){ft.preventDefault();let Ot=Wt-1;for(;Ot>0&&Lt.getFormat(Ot-1,1).link===xt.link;)Ot--;const[rn]=Lt.scroll.descendant(mn=>{var Cn;return((Cn=mn==null?void 0:mn.statics)==null?void 0:Cn.blotName)==="link"},Ot);if(rn!=null&&rn.domNode){const mn=(rn.domNode.textContent||"").length;Lt.removeFormat(Ot,mn)}}},[]),Ct=z.useCallback(()=>({clipboard:{matchers:[["img",()=>!1],["table",()=>!1],["iframe",()=>!1],["video",()=>!1],["h1, h2, h3, h4, h5, h6",()=>!1],["blockquote",()=>!1],["hr",()=>!1]]},copy:{isTitleMode:!0},keyboard:{bindings:{enter:{key:"Enter",handler:()=>!1},newline:{key:"Enter",shiftKey:!0,handler:()=>!1},tab:{key:"Tab",handler:()=>!1},"remove-newline":{key:"Backspace",collapsed:!0,format:["blockquote","list","code-block"],offset:0,handler:function(ft){const{blockquote:Lt,list:_t,["code-block"]:Wt}=ft.getFormat();return Lt||_t||Wt?(ft.format("blockquote",!1),ft.format("list",!1),ft.format("code-block",!1),!1):!0}}}},magicUrl:!0,toolbar:{container:[["bold","italic","underline","strike",{color:[]},{background:[]},"clean"]]}}),[]),Qt=z.useCallback(()=>({clipboard:{},copy:{},keyboard:{},magicUrl:!0,toggleFullscreen:{type:tt,maximize:a1.renderToString(M.jsx(uo,{icon:"Maximize",size:S==="Med"?"sm":"md"})),minimize:a1.renderToString(M.jsx(uo,{icon:"Minimize",size:S==="Med"?"sm":"md"}))},imageCompress:{quality:u1.QUALITY,imageType:"image/jpeg",maxWidth:1500,maxHeight:1500,debug:!1,handleOnPaste:ft=>{var Lt,_t;try{const Wt=(Lt=ft.clipboardData)==null?void 0:Lt.items;if(!Wt)return!0;const an=Array.from(Wt).some(rn=>{const mn=rn.type.toLowerCase();return mn.includes("Excel")||mn.includes("text/html")}),xt=(_t=ft.clipboardData)==null?void 0:_t.getData("text/html"),Ot=xt&&(xt.includes("<table")||xt.includes("<tbody")||xt.includes("<td"));return!(an||Ot)}catch(Wt){return console.warn("Error in handleOnPaste:",Wt),!0}},insertIntoEditor:(ft,Lt,_t)=>{u1.IMAGE_SIZES.has(ft)||u1.IMAGE_SIZES.set(ft,Lt.size);const Wt=_t.getSelection();Wt&&_t.insertEmbed(Wt.index,"image",ft,Ke.sources.USER)}},...!ne&&{...!B&&{resize:{}},table:!1,tableUp:{fullSwitch:!1,icon:a1.renderToString(M.jsx(uo,{icon:"Table",size:S==="Med"?"sm":"md",strokeWidth:2.5})),resize:ZB,resizeScale:XB,customSelect:ez,selection:JB,fixUnusuaDeletelTable:!1,selectionOptions:{tableMenu:YB,tableMenuOptions:{localstorageKey:"used-color",tipText:!0,tools:[io.InsertCaption,io.InsertTop,io.InsertRight,io.InsertBottom,io.InsertLeft,io.Break,io.MergeCell,io.SplitCell,io.Break,io.DeleteRow,io.DeleteColumn,io.DeleteTable,io.Break,io.BackgroundColor,io.BorderColor,io.Break,io.CopyCell,io.CutCell,io.Break,io.SwitchWidth]}},texts:{fullCheckboxText:Nr.AEditor["Insert Full Width Table"],customBtnText:Nr.AEditor.Custom,confirmText:Nr.AEditor.Confirm,cancelText:Nr.AEditor.Cancel,rowText:Nr.AEditor.Row,colText:Nr.AEditor.Column,CopyCell:Nr.AEditor["Copy Cell"],CutCell:Nr.AEditor["Cut Cell"],notPositiveNumberError:Nr.AEditor["Not Positive Number Error"],custom:Nr.AEditor.Custom,clear:Nr.AEditor.Clear,transparent:Nr.AEditor.Transparent,perWidthInsufficient:Nr.AEditor.perWidthInsufficient,InsertTop:Nr.AEditor["Insert Row Top"],InsertRight:Nr.AEditor["Insert Column Right"],InsertBottom:Nr.AEditor["Insert Row Bottom"],InsertLeft:Nr.AEditor["Insert Column Left"],MergeCell:Nr.AEditor["Merge Cell"],SplitCell:Nr.AEditor["Split Cell"],DeleteRow:Nr.AEditor["Delete Row"],DeleteColumn:Nr.AEditor["Delete Column"],DeleteTable:Nr.AEditor["Delete Table"],BackgroundColor:Nr.AEditor["Set Background Color"],BorderColor:Nr.AEditor["Set Border Color"],SwitchWidth:Nr.AEditor["Switch Table Width"],InsertCaption:Nr.AEditor["Insert Table Caption"]}},toolbar:{container:[[{header:[1,2,3,!1,4]}],["bold","italic","underline","strike","blockquote","divider",{[E4.toolName]:[]},{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],handlers:{divider:function(){const ft=this.quill,Lt=ft.getSelection(!0);if(!Lt)return;const _t=Math.min(Lt.index+1,ft.getLength()-1);ft.insertEmbed(_t,"divider",!0,Ke.sources.USER),setTimeout(()=>ft.setSelection(Math.min(_t+1,ft.getLength()-1),0,Ke.sources.SILENT),0)}}}}}),[ne,B,S,tt]),Vt=z.useMemo(()=>ze?Ct():Qt(),[ze,Ct,Qt]),bn=z.useCallback(ft=>{if(!ft)return;const Lt=ft.getEditor();if(!Lt)return;const _t=Lt.root,Wt=sn(ft);_t&&W&&_t.classList.add(...W.split(" ")),_t&&Y&&Object.entries(Y).forEach(([xt,Ot])=>{const rn=xt.replace(/([A-Z])/g,mn=>`-${mn[0].toLowerCase()}`);_t.style[rn]=Ot}),nn(_t,"keydown",xt=>Ze(xt,Lt));const an=new ResizeObserver(Ce);if(Wt){an.observe(Wt),zt.current.push(()=>an.disconnect());const xt=["header","color","background"];xt.forEach(Ot=>{const rn=Wt.querySelector(`.ql-${Ot} .ql-picker-label`);rn&&nn(rn,"click",()=>Ue(xt,Lt,Wt))})}},[sn,W,Y,nn,Ce,Ze,Ue]),hn=z.useCallback(ft=>{if(zt.current.forEach(_t=>_t()),zt.current=[],pn.current=ft,!ft){ng.isFunction(t)?t(null):t!=null&&t.current&&(t.current=null);return}const Lt=ft;Lt.copyContent=_t=>{ft.getEditor().getModule("copy").copyContent(_t)},ng.isFunction(t)?t(Lt):t&&(t.current=Lt),bn(ft)},[t,bn]);return M.jsx(sg,{wrapId:D,...Z,label:M.jsxs(vl,{style:{gap:4},children:[Z.label,O==="Top"&&Jt]}),labelProps:{...fe,style:{minHeight:Z.label?20:void 0,marginBottom:Z.label?4:0,...fe==null?void 0:fe.style}},wrapProps:{...J,className:bt.clsx(J==null?void 0:J.className,!Xe&&af.AEditorWrapper),style:{...J==null?void 0:J.style,height:Le}},children:M.jsxs(Wi,{...te,className:bt.clsx(te.className,af.AEditorContainer,vn&&"NoTransition"),style:{...g,height:ht,minHeight:ot},children:[M.jsx(Pv,{...u,ref:hn,preserveWhitespace:!0,modules:Vt,placeholder:o,readOnly:ne,theme:"snow",value:Bt,className:bt.clsx(u==null?void 0:u.className,af.AEditor,af[tt],ze&&"Title",vn&&"NoTransition"),style:{...u==null?void 0:u.style,maxHeight:Qe?Qe+re:void 0,"--icon-size":`${S==="Med"?20:24}px`,"--editor-padding":ze?"8px 12px":"12px","--toolbar-padding":`${S==="Med"?7.5:12.5}px`,"--content-height":ze?"fit-content":K?`${K}px`:"100%","--content-max-height":Qe?`${Qe}px`:"100%","--default-text":`'${Nr.AEditor.Default}'`,"--visit-url-text":`'${Nr.AEditor["Visit URL:"]}'`,"--enter-link-text":`'${Nr.AEditor["Enter link:"]}'`,"--enter-video-text":`'${Nr.AEditor["Enter video:"]}'`,"--edit-text":`'${Nr.AEditor.Edit}'`,"--save-text":`'${Nr.AEditor.Save}'`,"--remove-text":`'${Nr.AEditor.Remove}'`,"--arrow-background":`url("data:image/svg+xml,${encodeURIComponent(a1.renderToString(M.jsx(uo,{icon:"EditorArrow"})))}`,"--title-color-picker-row":ze?1:4,"--title-header-font-size":`${S==="Med"?12:14}px`},onChange:It}),w&&M.jsxs(M.Fragment,{children:[M.jsx("div",{ref:Me,className:bt.clsx(af.Resizer,vn&&"NoTransition"),style:{height:ue,bottom:i&&!ne?oe:0},onMouseDown:gt}),M.jsx("div",{children:`${Math.round(K)}px`,className:bt.clsx(af.Indicator,"NoSelect","Label1",vn&&"NoTransition"),style:{height:ue,bottom:i&&!ne?oe:0,display:xe?"flex":"none"}})]}),M.jsx("div",{children:Jt,className:bt.clsx(af.LimitContainer,"NoSelect",vn&&"NoTransition"),style:{marginTop:ve,minHeight:ge,display:O==="Bottom"?"flex":"none"}})]})})},Fz=n=>{const e=Vn.c(17),{htmlDelta:t,limit:r,useError:i,isReadonly:o}=n,[l,a]=Do(i,!1),u=Dz.calculateTextSize(t);let g,m;if(e[0]!==u||e[1]!==r||e[2]!==a?(g=()=>{a&&a(u>r)},m=[u,r,a],e[0]=u,e[1]=r,e[2]=a,e[3]=g,e[4]=m):(g=e[3],m=e[4]),z.useEffect(g,m),!i||o)return null;let x;e[5]!==l?(x=bt.clsx(l&&af.Error),e[5]=l,e[6]=x):x=e[6];let w;e[7]!==u?(w=Lg(u),e[7]=u,e[8]=w):w=e[8];let _;e[9]!==x||e[10]!==w?(_=M.jsx("span",{className:x,children:w}),e[9]=x,e[10]=w,e[11]=_):_=e[11];let S;e[12]!==r?(S=Lg(r),e[12]=r,e[13]=S):S=e[13];let R;return e[14]!==_||e[15]!==S?(R=M.jsxs(nd,{className:af.Limit,children:["(",_," / ",S,")"]}),e[14]=_,e[15]=S,e[16]=R):R=e[16],R};function Bz(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return z.useMemo(()=>r=>{e.forEach(i=>i(r))},e)}const zv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function N1(n){const e=Object.prototype.toString.call(n);return e==="[object Window]"||e==="[object global]"}function jm(n){return"nodeType"in n}function uf(n){var e,t;return n?N1(n)?n:jm(n)&&(e=(t=n.ownerDocument)==null?void 0:t.defaultView)!=null?e:window:window}function $m(n){const{Document:e}=uf(n);return n instanceof e}function Kp(n){return N1(n)?!1:n instanceof uf(n).HTMLElement}function k4(n){return n instanceof uf(n).SVGElement}function F1(n){return n?N1(n)?n.document:jm(n)?$m(n)?n:Kp(n)||k4(n)?n.ownerDocument:document:document:document}const ld=zv?z.useLayoutEffect:z.useEffect;function e2(n){const e=z.useRef(n);return ld(()=>{e.current=n}),z.useCallback(function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function zz(){const n=z.useRef(null),e=z.useCallback((r,i)=>{n.current=setInterval(r,i)},[]),t=z.useCallback(()=>{n.current!==null&&(clearInterval(n.current),n.current=null)},[]);return[e,t]}function zp(n,e){e===void 0&&(e=[n]);const t=z.useRef(n);return ld(()=>{t.current!==n&&(t.current=n)},e),t}function Jp(n,e){const t=z.useRef();return z.useMemo(()=>{const r=n(t.current);return t.current=r,r},[...e])}function bv(n){const e=e2(n),t=z.useRef(null),r=z.useCallback(i=>{i!==t.current&&(e==null||e(i,t.current)),t.current=i},[]);return[t,r]}function um(n){const e=z.useRef();return z.useEffect(()=>{e.current=n},[n]),e.current}let Pb={};function Qp(n,e){return z.useMemo(()=>{if(e)return e;const t=Pb[n]==null?0:Pb[n]+1;return Pb[n]=t,n+"-"+t},[n,e])}function M4(n){return function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return r.reduce((o,l)=>{const a=Object.entries(l);for(const[u,g]of a){const m=o[u];m!=null&&(o[u]=m+n*g)}return o},{...e})}}const m1=M4(1),yv=M4(-1);function Hz(n){return"clientX"in n&&"clientY"in n}function t2(n){if(!n)return!1;const{KeyboardEvent:e}=uf(n.target);return e&&n instanceof e}function Wz(n){if(!n)return!1;const{TouchEvent:e}=uf(n.target);return e&&n instanceof e}function fm(n){if(Wz(n)){if(n.touches&&n.touches.length){const{clientX:e,clientY:t}=n.touches[0];return{x:e,y:t}}else if(n.changedTouches&&n.changedTouches.length){const{clientX:e,clientY:t}=n.changedTouches[0];return{x:e,y:t}}}return Hz(n)?{x:n.clientX,y:n.clientY}:null}const Hp=Object.freeze({Translate:{toString(n){if(!n)return;const{x:e,y:t}=n;return"translate3d("+(e?Math.round(e):0)+"px, "+(t?Math.round(t):0)+"px, 0)"}},Scale:{toString(n){if(!n)return;const{scaleX:e,scaleY:t}=n;return"scaleX("+e+") scaleY("+t+")"}},Transform:{toString(n){if(n)return[Hp.Translate.toString(n),Hp.Scale.toString(n)].join(" ")}},Transition:{toString(n){let{property:e,duration:t,easing:r}=n;return e+" "+t+"ms "+r}}}),Ow="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Uz(n){return n.matches(Ow)?n:n.querySelector(Ow)}const Gz={display:"none"};function Yz(n){let{id:e,value:t}=n;return z.createElement("div",{id:e,style:Gz},t)}function Vz(n){let{id:e,announcement:t,ariaLiveType:r="assertive"}=n;const i={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return z.createElement("div",{id:e,style:i,role:"status","aria-live":r,"aria-atomic":!0},t)}function Zz(){const[n,e]=z.useState("");return{announce:z.useCallback(r=>{r!=null&&e(r)},[]),announcement:n}}const L4=z.createContext(null);function Xz(n){const e=z.useContext(L4);z.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(n)},[n,e])}function Kz(){const[n]=z.useState(()=>new Set),e=z.useCallback(r=>(n.add(r),()=>n.delete(r)),[n]);return[z.useCallback(r=>{let{type:i,event:o}=r;n.forEach(l=>{var a;return(a=l[i])==null?void 0:a.call(l,o)})},[n]),e]}const Jz={draggable:`
481
481
  To pick up a draggable item, press the space bar.
482
482
  While dragging, use the arrow keys to move the item.
483
483
  Press space again to drop the item in its new position, or press escape to cancel.
package/dist/index.es.js CHANGED
@@ -32499,11 +32499,13 @@ const db = {
32499
32499
  defKey: ue,
32500
32500
  item: g,
32501
32501
  def: V
32502
- });
32502
+ }), le = V.height ?? O, q = V.height === void 0;
32503
32503
  return /* @__PURE__ */ L.jsxs("div", { className: w0.Row, style: {
32504
- height: V.height ?? O,
32505
- minHeight: V.height ?? O,
32506
- maxHeight: V.height ?? O,
32504
+ minHeight: le,
32505
+ ...!q && {
32506
+ height: le,
32507
+ maxHeight: le
32508
+ },
32507
32509
  borderBottom: r,
32508
32510
  marginTop: K === 0 ? 0 : typeof I == "number" ? `${I}px` : I
32509
32511
  }, children: [
@@ -32522,7 +32524,7 @@ const db = {
32522
32524
  }, children: /* @__PURE__ */ L.jsx(kd, { isPending: u, style: {
32523
32525
  width: "100%",
32524
32526
  padding: T ? 0 : 10
32525
- }, children: te }) })
32527
+ }, children: u ? null : te }) })
32526
32528
  ] }, ue);
32527
32529
  }), e[28] = r, e[29] = i, e[30] = o, e[31] = l, e[32] = a, e[33] = u, e[34] = g, e[35] = m, e[36] = x, e[37] = w, e[38] = _, e[39] = T, e[40] = R, e[41] = I, e[42] = O, e[43] = B) : B = e[43];
32528
32530
  let $;
@@ -48969,7 +48971,7 @@ const d1 = {
48969
48971
  wrapProps: K,
48970
48972
  labelProps: ue,
48971
48973
  ...V
48972
- }, ee] = F1($), te = St(() => e === "ReadOnly" || I, [e, I]), ce = St(() => w ? 20 : 0, [w]), [le, q] = yn(T === "Med" ? 40 : 50), ne = St(() => te ? 0 : le, [te, le]), [de, pe] = St(() => !i || te || O === "Top" ? [0, 0] : [20, 6], [i, te, O]), ie = St(() => de + pe, [de, pe]), [X, fe] = yn(w), [Se, ze] = yn(!1), [me, Ne] = yn(!1), ke = xn(null), Fe = xn(0), Ie = xn(0), Ee = St(() => V.label ? 24 : 0, [V.label]), Be = St(() => R === "Title", [R]), Ze = St(() => w || m || Be, [w, m, Be]), Le = St(() => Ze ? "fit-content" : x ? x + Ee : `calc(100% - ${Ee}px)`, [Ze, x, Ee]), ft = St(() => {
48974
+ }, ee] = F1($), te = St(() => e === "ReadOnly" || I, [e, I]), ce = St(() => w ? 20 : 0, [w]), [le, q] = yn(T === "Med" ? 40 : 50), ne = St(() => te ? 0 : le, [te, le]), [de, pe] = St(() => !i || te || O === "Top" ? [0, 0] : [20, 6], [i, te, O]), ie = St(() => de + pe, [de, pe]), [X, fe] = yn(w), [Se, ze] = yn(!1), [me, Ne] = yn(!1), ke = xn(null), Fe = xn(0), Ie = xn(0), Ee = St(() => V.label ? 24 : 0, [V.label]), Be = St(() => R === "Title", [R]), Ze = St(() => !!w || Be, [w, Be]), Le = St(() => Ze ? "fit-content" : x ? x + Ee : `calc(100% - ${Ee}px)`, [Ze, x, Ee]), ft = St(() => {
48973
48975
  if (w) {
48974
48976
  if (X)
48975
48977
  switch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ados-rcm",
3
- "version": "1.1.690",
3
+ "version": "1.1.692",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",