ados-rcm 1.1.616 → 1.1.617

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
@@ -162,7 +162,7 @@ Error generating stack: `+y.message+`
162
162
 
163
163
  ${B["Invalid file(s)"]}: ${Nt}${At?`
164
164
 
165
- `+At:""}`)}Qe.length>0&&j([...z||[],...Qe])}},[j,te,n,t,B,z,f]),Se=S.useCallback(()=>{var Xe;return(Xe=se.current)==null?void 0:Xe.click()},[]),Ae=S.useCallback(Xe=>{const Qe=Xe.target.files;Qe!=null&&Qe.length&&(Oe(Qe),ve())},[Oe,ve]),Ie=S.useCallback(Xe=>{if(a==null||a(Xe),!j||!z)return;const Qe=Fu.getFileKey(Xe),dt=z.filter(mt=>Fu.getFileKey(mt)!==Qe);j(dt),ve()},[a,j,z,ve]),Ye=S.useCallback(()=>{j&&(j([]),ve())},[j,ve]),Ne=S.useCallback(Xe=>{if(!o)return Promise.resolve();const Qe=Fu.getFileKey(Xe);return ie.current[Qe]==="Loading"?Promise.resolve():(de(Qe,"Loading"),new Promise(dt=>{o(Xe,mt=>{de(Qe,mt),dt()})}))},[o,de]),We=S.useCallback(async()=>{if(z!=null&&z.length){if(U){const Xe={...ie.current};z.forEach(Qe=>{Xe[Fu.getFileKey(Qe)]="Loading"}),ie.current=Xe,U(Xe)}if(w){w(z,Xe=>{if(U){const Qe={...ie.current,...Xe};ie.current=Qe,U(Qe)}});return}for(const Xe of z){if(!o)continue;const Qe=Fu.getFileKey(Xe);await new Promise(dt=>{o(Xe,mt=>{if(U){const Fe={...ie.current};Fe[Qe]=mt,ie.current=Fe,U(Fe)}dt()})})}}},[z,o,w,U]),Ve=S.useCallback(()=>{!(z!=null&&z.length)||!i||i(z)},[z,i]),Ce=S.useMemo(()=>{const Xe=Qe=>(Qe.preventDefault(),Qe.stopPropagation(),Qe);return{onDragEnter:Qe=>{Xe(Qe),!V&&!m&&Q(!0)},onDragOver:Qe=>{Xe(Qe),!V&&!m&&Qe.dataTransfer&&(Qe.dataTransfer.dropEffect="copy")},onDragLeave:Qe=>{var mt;Xe(Qe);const dt=(mt=ne.current)==null?void 0:mt.contains(Qe.relatedTarget);(!Qe.relatedTarget||!dt)&&Q(!1)},onDrop:Qe=>{var dt;Xe(Qe),Q(!1),!V&&!m&&((dt=Qe.dataTransfer.files)!=null&&dt.length)&&Oe(Qe.dataTransfer.files)}}},[V,m,Oe]),Pe=S.useMemo(()=>{const Xe=Ke.clsx(Tn.ButtonRenderer,"NoSelect");return{upload:Qe=>C.jsx(ho,{className:Xe,icon:"X",iconSize:"sm",style:{color:"var(--AFileUploader_text_color)"},tooltip:B.Delete,type:"Raw",onClick:()=>Ie(Qe)}),loading:()=>C.jsx(ho,{className:Xe,icon:"Spinner",iconSize:"sm",type:"Raw"}),error:Qe=>C.jsx($k,{baseClass:Xe,errorClass:Tn.ErrorColor,errorCursorClass:Tn.ErrorCursor,file:Qe,resources:B,onDownload:Ne}),download:Qe=>C.jsx(ho,{className:Xe,icon:"FileDownload",iconSize:"sm",style:{color:"var(--AFileUploader_brand_color)"},tooltip:B.Download,type:"Raw",onClick:()=>Ne(Qe)}),view:()=>null}},[B,Ie,Ne]),He=S.useCallback((Xe,Qe)=>{const dt=Ee(Xe),mt=Be(Xe),Fe=()=>c==="Upload"?Pe.upload(Xe):c==="View"?Pe.view():dt?Pe.loading():mt?Pe.error(Xe):Pe.download(Xe);return C.jsx(_v,{ButtonRenderer:Fe,className:Ke.clsx(Tn.FileChip,mt&&Tn.ErrorBorder),label:C.jsx("div",{className:Tn.FileChipContent,children:C.jsxs(kn,{className:Tn.FileNameContainer,children:[C.jsx(tl,{children:Xe.name,className:Ke.clsx(mt&&Tn.ErrorColor)}),C.jsx("span",{children:qu(Xe.size),className:Tn.FileSize})]})})},Qe)},[Ee,Be,c,Pe]),Je=S.useCallback(()=>C.jsx("div",{className:Ke.clsx(Tn.FileBox,V&&Tn.ErrorBorder,V&&Tn.ErrorColor,V&&Tn.ErrorCursor,we&&Tn.Disabled,G&&!(z!=null&&z.length)&&Tn.FileBoxFullSize),...Ce,ref:ne,children:G?C.jsxs(kn,{className:Ke.clsx("NoSelect"),style:{gap:4,display:z!=null&&z.length?"flex":"none"},children:[C.jsx(en,{icon:"FileDownload"}),C.jsx("span",{children:B["Drop file to select"]})]}):C.jsxs(Go,{className:Ke.clsx(Tn.SelectRenderer,"NoSelect"),isDisabled:V||m||we,type:"Raw",onClick:Se,children:[B["Insert File"],f&&` ${(z==null?void 0:z.length)||0} / ${f}`]})}),[V,we,G,z==null?void 0:z.length,Ce,B,m,Se,f]),wt=S.useMemo(()=>{const Xe=c==="Upload",Qe=c==="View",dt=Xe?B["Delete All"]:B["Download All"],mt=Xe?Ye:We,Fe=(z==null?void 0:z.some(rt=>Ee(rt)))||!1;return C.jsxs(kn,{className:Tn.LabelContainer,children:[I.label,c==="Upload"&&C.jsxs(tl,{className:Ke.clsx(Tn.TotalFileSize,"NoSelect"),children:["(",C.jsx("span",{className:Ke.clsx(V&&Tn.ErrorColor),children:qu(be)})," / ",qu(u),")"]}),!Qe&&C.jsx("span",{children:dt,className:Ke.clsx(Tn.LabelButton,"Label1",(oe||Fe)&&Tn.Disabled,Xe&&Tn.Delete),onClick:!oe&&!Fe?mt:void 0}),i&&C.jsx("span",{children:B["Download List"]||"Download List",className:Ke.clsx(Tn.LabelButton,"Label1",!(z!=null&&z.length)&&Tn.Disabled),style:{marginLeft:"auto"},onClick:z!=null&&z.length?Ve:void 0})]})},[c,B,Ye,We,z,I.label,V,be,u,oe,i,Ve,Ee]);return c!=="Upload"&&!(z!=null&&z.length)?null:C.jsxs(Vc,{wrapId:A,wrapProps:R,labelProps:O,...I,label:wt,children:[C.jsx("input",{ref:se,multiple:!0,accept:t||"",style:{display:"none"},type:"file",onChange:Ae}),C.jsxs(Yr,{...F,className:Ke.clsx(Tn.AFileUploader,v),children:[C.jsxs(kn,{className:Tn.ChipsContainer,children:[c==="Upload"&&Je(),z==null?void 0:z.map(He)]}),c==="Upload"&&C.jsx(Yr,{className:Ke.clsx(Tn.DropIdle,"Title1","NoSelect"),style:{color:G?"var(--AFileUploader_brand_color)":"var(--AFileUploader_disabled_color)",opacity:G?1:.4},...Ce,abaseRef:ne,onClick:Xe=>Xe.preventDefault(),children:!(z!=null&&z.length)&&C.jsxs(kn,{style:{gap:4},children:[C.jsx(en,{icon:"FileDownload",size:"2xl"}),C.jsx("span",{children:B["Drop file to select"]})]})})]})]})},Uk="_AFloatMenu_xco8u_1",Wk="_Content_xco8u_10",T0={AFloatMenu:Uk,Content:Wk},mC=r=>{const{defs:e,defaultDef:t,actionRef:n,offset:o,onClose:i,onClick:a,onPaperClick:c,position:u=bf.ES,width:f=137}=r,p=S.useMemo(()=>({content:Vk,...t}),[t]),m=S.useMemo(()=>{const P={};return lr.keys(e).forEach(U=>{const G=e[U],Q={...p,...G};Q.noDisplay||(P[U]=Q)}),P},[p,e]),[g,v]=S.useState(null),w=S.useCallback(P=>{Aw(P,O,u,o),v(P)},[u,o]),[T,_]=S.useState(!1),[A,R]=S.useState(!1),O=S.useRef(null),I=S.useCallback(P=>{R(!0),setTimeout(()=>_(!0),0),setTimeout(()=>w(P),0)},[w]),F=S.useCallback(()=>{_(!1),R(!0),i==null||i()},[i]),B=S.useCallback(()=>R(!1),[]),z=S.useCallback(async P=>{const U=document.getElementById("root"),G=P.target,Q=O.current;!U||!Q||!G||!Q.contains(G)&&U.contains(G)&&(await(c==null?void 0:c(P)),F())},[F,c]);S.useEffect(()=>{if(T)return setTimeout(()=>document.addEventListener("mousedown",z),0),()=>document.removeEventListener("mousedown",z)},[T,z]);const j=S.useCallback(()=>{g&&w(g)},[w,g]);S.useEffect(()=>{if(!T||!g)return;let P=g.parentElement;for(;P;)P.addEventListener("scroll",j),P=P.parentElement;return()=>{let U=g.parentElement;for(;U;)U.removeEventListener("scroll",j),U=U.parentElement}},[g,T,j]),S.useEffect(()=>{if(T)return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[T,j]);const V=S.useCallback(P=>{P[0].intersectionRatio===0&&F()},[F]);S.useEffect(()=>{if(!T)return;const P=new IntersectionObserver(V,{threshold:0});return O.current&&P.observe(O.current),()=>P.disconnect()},[O,T,V]),S.useEffect(()=>{n&&(n.current={open:I,close:F})},[n,I,F]);const ue=S.useCallback(P=>{var U;if(T){if((U=m[P])!=null&&U.isDisabled)return}else return;a==null||a(P),F()},[T,a,F,m]);return!T&&!A?null:Ls.createPortal(C.jsx("div",{ref:O,className:T0.AFloatMenu,style:{opacity:+T,visibility:T&&Object.keys(m).length>0?"visible":"hidden",minWidth:f},onTransitionEnd:B,children:lr.map(m,([P],U)=>{const G={...p,...m[P]};let{content:Q,noDisplay:re,tooltipDirection:ie=Io.E,...se}=G;return re?null:(Q=Er.getContent(G.content,{defKey:P,def:G}),S.createElement(Yr,{...se,key:U,className:Ke.clsx(T0.Content,"Label2","IsClickable",se.className),tooltipDirection:ie,onClick:ne=>{var be;ue==null||ue(P),(be=se.onClick)==null||be.call(se,ne)}},Q))})}),document.body)},Vk=r=>r.defKey;function Gk(r){try{const e=Number.parseInt(r);return isNaN(e)?void 0:e}catch{return}}const vC={parseInt:Gk},Yk=`${Number.MAX_SAFE_INTEGER}`.length-1,Zk=r=>{const{unit:e,unitMargin:t=4,unitOptions:n,useSelectUnit:o,type:i="Secondary",min:a,max:c,unitSelectWidth:u,unitOptionsRenderer:f,useValue:p,onEnterPress:m,canAsterisk:g=!1,onFocus:v,...w}=r,T=S.useMemo(()=>c!==void 0&&a!==void 0?Math.max(`${c}`.length+1,`${a}`.length+1):Yk,[a,c]),[_,A]=vn(p,""),R=S.useCallback(V=>{if(A)if(g&&V.startsWith("*"))A("*");else if(V==="")A("");else if(V==="-")A("-");else{V=V.replace(/[^0-9-]/g,"");try{const ue=vC.parseInt(V);ue!==void 0&&(a!==void 0&&ue<a?A(`${a}`):c!==void 0&&ue>c?A(`${c}`):A(`${ue}`))}catch(ue){console.error("ANumInput : ",ue)}}},[A,g,a,c]),O=S.useRef(null),I=S.useCallback(V=>{var ue;(ue=O.current)==null||ue.blur(),m==null||m(V)},[m]),F=S.useMemo(()=>a===void 0&&c===void 0?e??"number":`${a??""}~${c??""}`,[a,c,e]),[B,z]=vn(o,(n==null?void 0:n[0])??""),j=S.useMemo(()=>n?C.jsx(zl,{className:Jo.ANumInputUnitSelect,OptionRenderer:f,options:n,style:{maxWidth:u||"fit-content"},type:"Raw",useSelect:[B,z],arrowProps:{style:{color:"var(--label-normal)",marginLeft:4,marginRight:t}}}):e?C.jsx("span",{style:{marginRight:t},children:e}):null,[n,f,u,B,z,t,e]);return C.jsx(Gc,{...w,autoComplete:"off",className:Ke.clsx(Jo.ANumInput,r.className),inputRef:O,maxLength:T,placeholder:F,RightAddon:j,type:i,useValue:[_,R],onEnterPress:I})},Kk="_AListView_1nv5l_1",Xk="_Row_1nv5l_10",Jk="_Label_1nv5l_19",Qk="_Content_1nv5l_29",up={AListView:Kk,Row:Xk,Label:Jk,Content:Qk},eI=r=>{const{defs:e,defaultDef:t,item:n,rowHeight:o,labelWidth:i,noBorder:a,onlyMiddleBorder:c,rowGap:u,middleBorder:f,rowBottomBorder:p,outerBorder:m,style:g,labelClassName:v,contentClassName:w,labelStyle:T,contentStyle:_,...A}=r,R=a||c,O=R?"":p||"var(--AListView_border-thin)",I=R?"":m||"var(--AListView_border-thick)",F=a?"":f||"var(--AListView_border-thick)",B=S.useMemo(()=>({content:rI,label:tI,...t}),[t]),z=S.useMemo(()=>{const j={};return lr.keys(e).forEach(V=>{const ue=e[V],P={...B,...ue};j[V]=P}),j},[B,e]);return C.jsx(Yr,{...A,className:Ke.clsx(up.AListView,A.className),style:{...g,borderTop:O},children:lr.map(z,([j],V)=>{const ue={...B,...z[j]},P=Er.getContent(ue.label,{defKey:j,item:n,def:ue}),U=Er.getContent(ue.content,{defKey:j,item:n||{[j]:""},def:ue}),G=Er.getContent(ue.bold||"label",{defKey:j,item:n,def:ue});return C.jsxs("div",{className:up.Row,style:{height:ue.fixedHeight?o:void 0,minHeight:ue.fixedHeight?o:void 0,maxHeight:ue.fixedHeight?o:void 0,borderBottom:O,marginTop:V===0?0:typeof u=="number"?`${u}px`:u},children:[C.jsx("div",{className:Ke.clsx(up.Label,"NoSelect",G!=="content"&&"Bold",v),style:{width:i,minWidth:i,maxWidth:i,borderLeft:I,paddingLeft:R?0:10,...T},children:C.jsx(tl,{children:P})}),C.jsx("div",{className:Ke.clsx(up.Content,G!=="label"&&"Bold",w),style:{borderLeft:F,borderRight:I,..._},children:C.jsx(tl,{style:{width:"100%",padding:R?0:10},children:U})})]},j)})})},tI=r=>r.defKey,rI=r=>{const{defKey:e,item:t}=r;if(t)if(lr.hasKey(t,e)){const n=t[e];return lr.isReactNode(n)?n:null}else return null;else return null},nI="_ALoadingBorder_kwc1g_1",oI="_ProgressBar_kwc1g_9",iI="_IsLoading_kwc1g_15",sI="_Cover_kwc1g_19",Zf={ALoadingBorder:nI,ProgressBar:oI,IsLoading:iI,Cover:sI},Iv=r=>{const{isLoading:e}=r,[t,n]=S.useState(!1),o=S.useRef(null);return S.useEffect(()=>{e?(n(!0),o.current&&clearTimeout(o.current)):o.current=setTimeout(()=>n(!1),300)},[e]),C.jsxs("div",{className:Zf.ALoadingBorder,children:[C.jsx("div",{className:Ke.clsx(Zf.ProgressBar,t&&Zf.IsLoading)}),C.jsx("div",{className:Ke.clsx(Zf.Cover,e&&Zf.IsLoading),style:{transition:"all 300ms"}})]})},aI="_Container_ez8dc_1",lI="_Option_ez8dc_7",cI="_RadioButton_ez8dc_14",uI="_InnerCircle_ez8dc_24",dI="_isChecked_ez8dc_29",Yd={Container:aI,Option:lI,RadioButton:cI,InnerCircle:uI,isChecked:dI},fI=r=>{const{options:e,useSelect:t,selectDisabled:n,radius:o=23,innerRadius:i=o*.6,OptionRenderer:a=yC}=r,[c,u]=vn(t,e[0]);return C.jsx("div",{className:Yd.Container,children:e.map((f,p)=>{const m=n==null?void 0:n(f),g=()=>m?null:u==null?void 0:u(f);return C.jsxs(kn,{className:Ke.clsx(Yd.Option,"IsClickable"),isDisabled:m,onClick:g,children:[C.jsx(hI,{innerRadius:i,isChecked:c===f,radius:o},p),C.jsx(a,{option:f})]},p)})})},yC=({option:r})=>r,hI=({isChecked:r,radius:e,innerRadius:t})=>C.jsx(Yr,{className:Ke.clsx(Yd.RadioButton,r&&Yd.isChecked),style:{width:e,height:e},children:C.jsx(Yr,{className:Ke.clsx(Yd.InnerCircle,r&&Yd.isChecked),style:{width:t,height:t}})}),pI="_AMultiSelect_19uuu_1",gI="_Arrow_19uuu_15",mI="_Primary_19uuu_24",vI="_UnAvailable_19uuu_35",yI="_IsOpen_19uuu_35",bI="_Secondary_19uuu_42",xI="_Placeholder_19uuu_58",wI="_ValuesContainer_19uuu_63",CI="_Values_19uuu_63",SI="_Options_19uuu_82",_I="_Option_19uuu_82",AI="_Selected_19uuu_124",EI="_CheckBox_19uuu_131",Mi={AMultiSelect:pI,Arrow:gI,Primary:mI,UnAvailable:vI,IsOpen:yI,Secondary:bI,Placeholder:xI,ValuesContainer:wI,Values:CI,Options:SI,Option:_I,Selected:AI,CheckBox:EI},TI=r=>{const{options:e,useSelect:t,type:n="Primary",placeholder:o=wr.AMultiSelect["Select(Placeholder)"],onClose:i,SelectedRenderer:a=kI,OptionRenderer:c=II,minShowRows:u=2,maxShowRows:f=6,arrowProps:p,isAutoWidth:m=!1,...g}=r,v=S.useRef(null),w=S.useMemo(()=>g.abaseRef??v,[g.abaseRef]),T=S.useRef(null),[_,A]=vn(t,[]),[R,O]=S.useState(void 0),I=S.useRef(e),F=S.useRef(null),[B,z]=S.useState(!1),[j,V]=S.useState(!1),ue=S.useCallback(()=>V(!1),[]),P=S.useCallback(()=>{g.isDisabled||g.isLoading||e.length<1||(V(!0),setTimeout(()=>z(!0),0),setTimeout(()=>fm(T,w,e,u,f),0))},[w,g.isDisabled,g.isLoading,e,u,f]),U=S.useCallback(()=>{z(!1),V(!0),i==null||i()},[i]),G=S.useCallback(te=>{var de;B?U():P(),setTimeout(()=>fm(T,w,e,u,f),0),(de=g.onClick)==null||de.call(g,te)},[w,g,e,B,U,P,u,f]),Q=S.useCallback(()=>{fm(T,w,e,u,f)},[w,e,u,f]);S.useEffect(()=>{if(!B||!w.current)return;const te=w.current;let de=te.parentElement;for(;de;)de.addEventListener("scroll",Q),de=de.parentElement;return()=>{let ge=te.parentElement;for(;ge;)ge.removeEventListener("scroll",Q),ge=ge.parentElement}},[w,B,Q]),S.useEffect(()=>{if(B)return window.addEventListener("resize",Q),()=>window.removeEventListener("resize",Q)},[B,Q]);const re=S.useCallback(te=>{te[0].intersectionRatio===0&&U()},[U]);S.useEffect(()=>{if(!B)return;const te=new IntersectionObserver(re,{threshold:0});return w.current&&te.observe(w.current),()=>te.disconnect()},[w,B,re]);const ie=S.useCallback(te=>{const de=te.target,ge=w.current,Ee=T.current;!ge||!de||!Ee||!ge.contains(de)&&!Ee.contains(de)&&U()},[w,U]),se=S.useMemo(()=>g.isDisabled||g.isLoading||e.length<1,[g.isDisabled,g.isLoading,e]);S.useEffect(()=>{if(B)return setTimeout(()=>document.addEventListener("mousedown",ie),0),()=>document.removeEventListener("mousedown",ie)},[B,ie]);const ne=S.useCallback((te,de)=>{te.stopPropagation(),te.preventDefault();let ge=[..._];ge.includes(de)?ge=ge.filter(Ee=>Ee!==de):ge.push(de),A==null||A(ge)},[_,A]),be=S.useCallback(()=>{if(!m||!w.current)return;const te=$u.calculateOptimalSelectWidth({elementRef:w,options:e,selectedOptions:_,placeholder:o,optionRenderer:de=>c({option:de}),type:n,isMulti:!0});O(te)},[m,w,e,_,o,c,n]);return S.useEffect(()=>m?((e!==I.current||R===void 0)&&(F.current!==null&&cancelAnimationFrame(F.current),F.current=requestAnimationFrame(()=>{be(),F.current=null,I.current=[...e]})),()=>{F.current!==null&&(cancelAnimationFrame(F.current),F.current=null)}):void 0,[m,e,be,R]),S.useEffect(()=>()=>{typeof $u.clearCache=="function"&&$u.clearCache()},[]),C.jsxs(C.Fragment,{children:[C.jsxs(Yr,{...g,abaseRef:w,isDisabled:g.isDisabled||e.length<1,className:Ke.clsx(g.className,Mi.AMultiSelect,"NoSelect",B&&Mi.IsOpen,se&&Mi.UnAvailable,Mi[n]),style:{padding:n==="Secondary"?"8px 8px 8px 0":0,width:R?`${R}px`:m?"100px":void 0,...g.style},onClick:G,children:[C.jsx("div",{className:Mi.ValuesContainer,children:C.jsx("div",{className:Ke.clsx(Mi.Values,_.length<1&&Mi.Placeholder),children:C.jsx(a,{OptionRenderer:c,placeholder:o,selectedOptions:_})})}),C.jsx("div",{...p,className:Ke.clsx(Mi.Arrow,p==null?void 0:p.className),children:C.jsx(en,{icon:"TriangleDown",style:{transform:B?"rotate(180deg)":"",transition:"var(--Transition)"}})})]}),e.length>0&&(B||j)&&Ls.createPortal(C.jsx("div",{ref:T,className:Ke.clsx(Mi.Options,Mi[n]),style:{opacity:+B,visibility:B?"visible":"hidden",pointerEvents:B?void 0:"none",width:R?`${R}px`:m?"100px":void 0,borderRadius:w.current?window.getComputedStyle(w.current).borderRadius:void 0},onTransitionEnd:ue,children:e.map((te,de)=>{var Ee;const ge=_.includes(te);return C.jsxs("div",{className:Ke.clsx(Mi.Option,ge&&Mi.Selected,"NoSelect",Mi[n]),style:{height:(Ee=w.current)==null?void 0:Ee.getBoundingClientRect().height},onClick:Be=>ne(Be,te),children:[C.jsx(af,{className:Mi.CheckBox,useCheck:[+ge,void 0]}),C.jsx(c,{option:te})]},de)})}),document.body)]})};function fm(r,e,t,n,o){if(!e.current||!r.current||!t||t.length<1)return;const i=e.current.getBoundingClientRect(),a=RI(i,t.length,n,o),c=window.getComputedStyle(e.current);r.current.style.top=`calc(${a.top??0}px - ${c.borderTopWidth})`,r.current.style.bottom=a.bottom?a.bottom+"px":"",r.current.style.left=a.left+"px",r.current.style.width||(r.current.style.minWidth=a.minWidth+"px"),r.current.style.minHeight=a.minHeight+"px",r.current.style.maxHeight=a.maxHeight+"px",r.current.style.visibility="visible"}function RI(r,e,t,n){const o={top:r.bottom,bottom:void 0,left:r.left,height:"fit-content",minWidth:r.width,minHeight:r.height*Math.min(t,e),maxHeight:r.height*n>window.innerHeight-r.bottom-10?window.innerHeight-r.bottom-10:r.height*n};return window.innerHeight-r.bottom-10<o.height&&(window.innerHeight-r.bottom-10<o.minHeight?(o.top=r.top-e*r.height,o.top<0&&(o.top=10,o.minHeight=r.top-10,o.height=r.top-10)):o.height=window.innerHeight-r.bottom-10),o}const kI=r=>{const{OptionRenderer:e,selectedOptions:t,placeholder:n}=r;return t.length<1?n:t.length===1?C.jsx(e,{option:t[0]}):`${t.length} selected`},II=r=>{const{option:e}=r;return lr.isReactNode(e)?e:null},MI="_Container_10ion_1",LI="_Steps_10ion_9",DI="_Step_10ion_9",OI="_OutCircle_10ion_26",NI="_IsOver_10ion_37",PI="_InCircle_10ion_41",BI="_Line_10ion_54",FI="_Left_10ion_66",jI="_Right_10ion_69",zI="_ContentContainer_10ion_73",HI="_Content_10ion_73",hi={Container:MI,Steps:LI,Step:DI,OutCircle:OI,IsOver:NI,InCircle:PI,Line:BI,Left:FI,Right:jI,ContentContainer:zI,Content:HI},$I=r=>{const{useSelect:e,steps:t,StepRenderer:n=R0,ContentRenderer:o=R0}=r;if(t.length===0)throw new Error("steps should have at least one element");const i=S.useRef(null),[a,c]=vn(e,t[0]),u=S.useCallback(p=>c==null?void 0:c(p),[c]),f=S.useMemo(()=>t.indexOf(a),[a,t]);return S.useEffect(()=>{f<0&&u(t[0])},[f,t,u]),C.jsxs("div",{className:hi.Container,children:[C.jsx("div",{className:hi.Steps,children:t.map((p,m)=>{const g=t.indexOf(p),v=f>=m,w=f>m;return C.jsxs("div",{className:hi.Step,children:[m!==0&&C.jsx("div",{className:Ke.clsx(hi.Line,hi.Left,v&&hi.IsOver)}),m!==t.length-1&&C.jsx("div",{className:Ke.clsx(hi.Line,hi.Right,w&&hi.IsOver)}),C.jsx(Go,{className:Ke.clsx(hi.OutCircle,v&&hi.IsOver),type:"Raw",onClick:()=>u(p),children:C.jsx("div",{className:Ke.clsx(hi.InCircle,v&&hi.IsOver)})}),C.jsx(n,{step:p,stepIdx:g})]},m)})}),C.jsx("div",{ref:i,className:hi.ContentContainer,children:t.map((p,m)=>{const g=t.indexOf(p);return C.jsx("div",{className:hi.Content,style:m===0?{marginLeft:`${f*-100}%`}:{},children:C.jsx(o,{step:p,stepIdx:g})},m)})})]})},R0=r=>{const{step:e}=r;return typeof e=="object"?lr.stringify(e):e},qI="_ATab_9eg6z_1",UI="_Addon_9eg6z_9",WI="_Option_9eg6z_14",VI="_Underline_9eg6z_26",GI="_IsSelected_9eg6z_26",YI="_IndicatorTrack_9eg6z_37",ZI="_Indicator_9eg6z_37",KI="_Primary_9eg6z_54",XI="_Secondary_9eg6z_57",JI="_IsDisabled_9eg6z_63",QI="_Tertiary_9eg6z_77",e8="_Quaternary_9eg6z_101",Va={ATab:qI,Addon:UI,Option:WI,Underline:VI,IsSelected:GI,IndicatorTrack:YI,Indicator:ZI,Primary:KI,Secondary:XI,IsDisabled:JI,Tertiary:QI,Quaternary:e8},t8=["Primary","Secondary","Tertiary","Quaternary"],bC=r=>{const{options:e,useSelect:t,selectDisabled:n,type:o="Primary",tabProps:i,optionProps:a,optionWidth:c,OptionRenderer:u=r8,RightAddon:f,LeftAddon:p,color:m,selectedColor:g,underline:v,indicatorProps:w,indicatorTrackProps:T,height:_=40}=r;if(e.length===0)throw new Error("options should have at least one element");const A=S.useMemo(()=>e.findIndex(we=>!(n!=null&&n(we))),[e,n]),R=o==="Tertiary",O=o==="Secondary",I=R?_*.1:0,F=O?8:0,B=S.useMemo(()=>I+F,[I,F]),z=S.useMemo(()=>(F-I)/e.length,[e.length,I,F]),[j,V]=vn(t,e[A]),ue=S.useRef([]),P=S.useCallback(we=>V==null?void 0:V(we),[V]),U=S.useMemo(()=>typeof c=="number"?c+"px":c,[c]),G=S.useMemo(()=>e.indexOf(j),[e,j]),Q=S.useMemo(()=>`calc(${100/e.length}% + ${z}px)`,[e.length,z]),re=S.useMemo(()=>U||`calc(${Q} - ${B}px)`,[Q,B,U]),[ie,se]=S.useState(0),[ne,be]=S.useState(0),[te,de]=S.useState(re),ge=S.useRef(null),Ee=S.useRef(null),Be=_w(Ee,ge),oe=S.useMemo(()=>{let we;switch(U){case void 0:we=`calc(${Q} * ${G})`;break;case"fit-content":we=`calc(${ie}px)`;break;default:we=`calc((${U} + ${B}px) * ${G})`;break}return we},[U,Q,G,ie,B]),ve=S.useMemo(()=>{switch(U){case void 0:return;case"fit-content":return`calc(${ne}px)`;default:return`calc((${U} + ${B}px - ${z}px) * ${e.length})`}},[U,z,B,e,ne]);return S.useEffect(()=>{var Oe,Se;if(e.includes(j)||V==null||V(e[A]),U!=="fit-content"){de(re);return}let we=0;ue.current.forEach((Ae,Ie)=>{Ie<G&&Ae.current&&(we+=Ae.current.offsetWidth+B)}),se(we),de(`calc(${((Se=(Oe=ue.current[G])==null?void 0:Oe.current)==null?void 0:Se.offsetWidth)||0}px)`),be(ue.current.reduce((Ae,Ie)=>{var Ye;return Ae+((((Ye=Ie.current)==null?void 0:Ye.offsetWidth)||0)+B-z)},0))},[U,ue,e,j,V,A,z,B,G,re]),C.jsxs("div",{ref:ge,...i,className:Ke.clsx(Va.ATab,"Headline2",Va[o],i==null?void 0:i.className),style:{minHeight:_,height:_,maxHeight:_},children:[p&&C.jsx("div",{ref:Ee,className:Va.Addon,children:p}),C.jsx("div",{...w,className:Ke.clsx(Va.Indicator,w==null?void 0:w.className),style:{minWidth:te,left:oe,marginLeft:I,transform:`translate(${Be??0}px, ${R?"-50%":"0"})`,height:R?_-I*2:void 0,...w==null?void 0:w.style}}),C.jsx("div",{...T,className:Ke.clsx(Va.IndicatorTrack,T==null?void 0:T.className),style:{width:ve,marginLeft:R?Be:0,height:_,...T==null?void 0:T.style}}),e.map((we,Oe)=>{const Se=n==null?void 0:n(we);return ue.current[Oe]||(ue.current[Oe]=S.createRef()),C.jsx(Yr,{abaseRef:ue.current[Oe],...a,isDisabled:Se,className:Ke.clsx(Va.Option,Se&&Va.IsDiabled,we===j&&Va.IsSelected,"IsClickable",v&&Va.Underline,a==null?void 0:a.className),style:{minWidth:re,maxWidth:re,marginLeft:I,marginRight:F,"--color":we===j&&g||m,height:_,...a==null?void 0:a.style},onClick:Ae=>{!Se&&P(we),a&&a.onClick&&a.onClick(Ae)},children:C.jsx(u,{option:we})},Oe)}),C.jsx(zn,{w:I}),f&&C.jsxs(C.Fragment,{children:[C.jsx(Xu,{}),C.jsx("div",{className:Va.Addon,children:f})]})]})},r8=r=>{const{option:e}=r;if(typeof e=="string")return e;if(typeof e=="number")return e;if(typeof e=="object"){if(e===null)return"";const t=lr.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 xC(...r){const e=S.useRef(!1);S.useEffect(()=>{e.current||(e.current=!0,r.forEach(t=>t()))},[r])}const wC={String:(r,e,t,n)=>{const{value:o}=n;if(o===void 0)return!1;if(t==="")return lr.keys(e).some(p=>{const m=e[p],g=Er.getContent(m.asText,{defKey:p,def:m,item:r});if(g!==void 0)return g.toString().toLowerCase().includes(o.toLowerCase());const v=Er.getContent(m.content,{defKey:p,def:m,item:r});return["string","number"].includes(typeof v)&&v!==void 0&&v!==null?v.toString().toLowerCase().includes(o.toLowerCase()):!1});const i=lr.keys(e),a=t;if(!i.includes(a))return!1;const c=e[a],u=Er.getContent(c.asText,{defKey:a,def:c,item:r});if(u!==void 0)return u.toString().toLowerCase().includes(o.toLowerCase());const f=Er.getContent(c.content,{defKey:a,def:c,item:r});return["string","number"].includes(typeof f)&&f!==void 0&&f!==null?f.toString().toLowerCase().includes(o.toLowerCase()):!1},Select:(r,e,t,n)=>{const{value:o}=n;if(o==null)return!1;const i=lr.keys(e),a=t;if(!i.includes(a))return!1;const c=e[a],u=Er.getContent(c.asText,{defKey:a,def:c,item:r});if(u!==void 0)return o.toString().toLowerCase()===u.toString().toLowerCase();const f=Er.getContent(c.content,{defKey:a,def:c,item:r});return["string","number"].includes(typeof f)&&f!==void 0&&f!==null?o.toString().toLowerCase()===f.toString().toLowerCase():!1},Date:(r,e,t,n)=>{const{value:o}=n;if(o===void 0)return!1;const i=lr.keys(e),a=t;if(!i.includes(a))return!1;const c=e[a],u=Er.getContent(c.asText,{defKey:a,def:c,item:r});if(u!==void 0){const p=er.toDate(u.toString());return p&&er.eq(p,o)}const f=Er.getContent(c.content,{defKey:a,def:c,item:r});if(["string","number"].includes(typeof f)&&f!==void 0&&f!==null){const p=er.toDate(f.toString());return p&&er.eq(p,o)}return!1},DateRange:(r,e,t,n)=>{const{value:o}=n;if(o===void 0)return!1;const i=lr.keys(e),a=t;if(!i.includes(a))return!1;const c=e[a],u=Er.getContent(c.asText,{defKey:a,def:c,item:r});if(u!==void 0){const p=er.toDate(u.toString());return p&&er.be(o.sDate,p,o.eDate)}const f=Er.getContent(c.content,{defKey:a,def:c,item:r});if(["string","number"].includes(typeof f)&&f!==void 0&&f!==null){const p=er.toDate(f.toString());return p&&er.be(o.sDate,p,o.eDate)}return!1}},n8=(r,e,t)=>{let n=r;return lr.keys(t).forEach(i=>{const a=t[i];a.value===void 0||a.value===null||a.value===""||(n=n.filter(c=>{var u;return(u=a.predicate??wC[a.type])==null?void 0:u(c,e,i,a)}))}),n},o8=(r,e,t)=>{if(!t)return r;const n=t.defKey,o=e[n];if(n===void 0)return r;const i=t.sortF??((a,c)=>{const u=Er.getContent(o.content,{defKey:n,def:o,item:a}),f=Er.getContent(o.content,{defKey:n,def:o,item:c});return typeof u=="string"&&typeof f=="string"?u<f?-1:u>f?1:0:typeof u=="number"&&typeof f=="number"?u-f:typeof u=="string"&&typeof f=="number"?-1:typeof u=="number"&&typeof f=="string"||u===void 0&&f!==void 0?1:u!==void 0&&f===void 0?-1:0});return typeof i=="function"&&i.length>=3?r.slice().sort((a,c)=>i(a,c,t.isAsc)):r.slice().sort((a,c)=>{const u=i(a,c);return t.isAsc?u:-u})},i8=(r,e,t)=>r.slice((e-1)*t,e*t),CC=(r,e)=>{const t=Math.max(Math.ceil(r/e),1);return Array.from({length:t},(n,o)=>o+1)},s8=(r,e,t,n)=>{const o=CC(e,t),i=Math.floor((r-1)/n),a=i*n+1,c=(i+1)*n,u=o.slice(a-1,c);return{pages:o,rangedPages:u}},a8=(r,e,t)=>{const n=[],o=Object.keys(t),i=[];o.forEach(g=>{const v=t[g],w=Er.getContent(v.hContent,{defKey:g,def:v});if(w!==void 0){if(typeof w=="string"){i.push(w);return}else if(typeof w=="number"){i.push(w.toString());return}}const T=Er.getContent(v.name,{defKey:g,def:v});if(T!==void 0&&typeof T=="string"){i.push(T);return}i.push(g)});const a=i.map(g=>`"${g.replaceAll('"','""')}"`);n.push(a.join(",")),e.forEach(g=>{const v=[];o.forEach(T=>{const _=t[T],A=Er.getContent(_.content,{defKey:T,def:_,item:g});if(A!==void 0){if(typeof A=="string"){v.push(A);return}else if(typeof A=="number"){v.push(A.toString());return}}const R=g[T];typeof R=="string"?v.push(R):typeof R=="number"?v.push(R.toString()):v.push("")});const w=v.map(T=>`"${T.replaceAll('"','""')}"`);n.push(w.join(","))});const c=`${r}.csv`,u="\uFEFF"+n.join(`
165
+ `+At:""}`)}Qe.length>0&&j([...z||[],...Qe])}},[j,te,n,t,B,z,f]),Se=S.useCallback(()=>{var Xe;return(Xe=se.current)==null?void 0:Xe.click()},[]),Ae=S.useCallback(Xe=>{const Qe=Xe.target.files;Qe!=null&&Qe.length&&(Oe(Qe),ve())},[Oe,ve]),Ie=S.useCallback(Xe=>{if(a==null||a(Xe),!j||!z)return;const Qe=Fu.getFileKey(Xe),dt=z.filter(mt=>Fu.getFileKey(mt)!==Qe);j(dt),ve()},[a,j,z,ve]),Ye=S.useCallback(()=>{j&&(j([]),ve())},[j,ve]),Ne=S.useCallback(Xe=>{if(!o)return Promise.resolve();const Qe=Fu.getFileKey(Xe);return ie.current[Qe]==="Loading"?Promise.resolve():(de(Qe,"Loading"),new Promise(dt=>{o(Xe,mt=>{de(Qe,mt),dt()})}))},[o,de]),We=S.useCallback(async()=>{if(z!=null&&z.length){if(U){const Xe={...ie.current};z.forEach(Qe=>{Xe[Fu.getFileKey(Qe)]="Loading"}),ie.current=Xe,U(Xe)}if(w){w(z,Xe=>{if(U){const Qe={...ie.current,...Xe};ie.current=Qe,U(Qe)}});return}for(const Xe of z){if(!o)continue;const Qe=Fu.getFileKey(Xe);await new Promise(dt=>{o(Xe,mt=>{if(U){const Fe={...ie.current};Fe[Qe]=mt,ie.current=Fe,U(Fe)}dt()})})}}},[z,o,w,U]),Ve=S.useCallback(()=>{!(z!=null&&z.length)||!i||i(z)},[z,i]),Ce=S.useMemo(()=>{const Xe=Qe=>(Qe.preventDefault(),Qe.stopPropagation(),Qe);return{onDragEnter:Qe=>{Xe(Qe),!V&&!m&&Q(!0)},onDragOver:Qe=>{Xe(Qe),!V&&!m&&Qe.dataTransfer&&(Qe.dataTransfer.dropEffect="copy")},onDragLeave:Qe=>{var mt;Xe(Qe);const dt=(mt=ne.current)==null?void 0:mt.contains(Qe.relatedTarget);(!Qe.relatedTarget||!dt)&&Q(!1)},onDrop:Qe=>{var dt;Xe(Qe),Q(!1),!V&&!m&&((dt=Qe.dataTransfer.files)!=null&&dt.length)&&Oe(Qe.dataTransfer.files)}}},[V,m,Oe]),Pe=S.useMemo(()=>{const Xe=Ke.clsx(Tn.ButtonRenderer,"NoSelect");return{upload:Qe=>C.jsx(ho,{className:Xe,icon:"X",iconSize:"sm",style:{color:"var(--AFileUploader_text_color)"},tooltip:B.Delete,type:"Raw",onClick:()=>Ie(Qe)}),loading:()=>C.jsx(ho,{className:Xe,icon:"Spinner",iconSize:"sm",type:"Raw"}),error:Qe=>C.jsx($k,{baseClass:Xe,errorClass:Tn.ErrorColor,errorCursorClass:Tn.ErrorCursor,file:Qe,resources:B,onDownload:Ne}),download:Qe=>C.jsx(ho,{className:Xe,icon:"FileDownload",iconSize:"sm",style:{color:"var(--AFileUploader_brand_color)"},tooltip:B.Download,type:"Raw",onClick:()=>Ne(Qe)}),view:()=>null}},[B,Ie,Ne]),He=S.useCallback((Xe,Qe)=>{const dt=Ee(Xe),mt=Be(Xe),Fe=()=>c==="Upload"?Pe.upload(Xe):c==="View"?Pe.view():dt?Pe.loading():mt?Pe.error(Xe):Pe.download(Xe);return C.jsx(_v,{ButtonRenderer:Fe,className:Ke.clsx(Tn.FileChip,mt&&Tn.ErrorBorder),label:C.jsx("div",{className:Tn.FileChipContent,children:C.jsxs(kn,{className:Tn.FileNameContainer,children:[C.jsx(tl,{children:Xe.name,className:Ke.clsx(mt&&Tn.ErrorColor)}),C.jsx("span",{children:qu(Xe.size),className:Tn.FileSize})]})})},Qe)},[Ee,Be,c,Pe]),Je=S.useCallback(()=>C.jsx("div",{className:Ke.clsx(Tn.FileBox,V&&Tn.ErrorBorder,V&&Tn.ErrorColor,V&&Tn.ErrorCursor,we&&Tn.Disabled,G&&!(z!=null&&z.length)&&Tn.FileBoxFullSize),...Ce,ref:ne,children:G?C.jsxs(kn,{className:Ke.clsx("NoSelect"),style:{gap:4,display:z!=null&&z.length?"flex":"none"},children:[C.jsx(en,{icon:"FileDownload"}),C.jsx("span",{children:B["Drop file to select"]})]}):C.jsxs(Go,{className:Ke.clsx(Tn.SelectRenderer,"NoSelect"),isDisabled:V||m||we,type:"Raw",onClick:Se,children:[B["Insert File"],f&&` ${(z==null?void 0:z.length)||0} / ${f}`]})}),[V,we,G,z==null?void 0:z.length,Ce,B,m,Se,f]),wt=S.useMemo(()=>{const Xe=c==="Upload",Qe=c==="View",dt=Xe?B["Delete All"]:B["Download All"],mt=Xe?Ye:We,Fe=(z==null?void 0:z.some(rt=>Ee(rt)))||!1;return C.jsxs(kn,{className:Tn.LabelContainer,children:[I.label,c==="Upload"&&C.jsxs(tl,{className:Ke.clsx(Tn.TotalFileSize,"NoSelect"),children:["(",C.jsx("span",{className:Ke.clsx(V&&Tn.ErrorColor),children:qu(be)})," / ",qu(u),")"]}),!Qe&&C.jsx("span",{children:dt,className:Ke.clsx(Tn.LabelButton,"Label1",(oe||Fe)&&Tn.Disabled,Xe&&Tn.Delete),onClick:!oe&&!Fe?mt:void 0}),i&&C.jsx("span",{children:B["Download List"]||"Download List",className:Ke.clsx(Tn.LabelButton,"Label1",!(z!=null&&z.length)&&Tn.Disabled),style:{marginLeft:"auto"},onClick:z!=null&&z.length?Ve:void 0})]})},[c,B,Ye,We,z,I.label,V,be,u,oe,i,Ve,Ee]);return c!=="Upload"&&!(z!=null&&z.length)?null:C.jsxs(Vc,{wrapId:A,wrapProps:R,labelProps:O,...I,label:wt,children:[C.jsx("input",{ref:se,multiple:!0,accept:t||"",style:{display:"none"},type:"file",onChange:Ae}),C.jsxs(Yr,{...F,className:Ke.clsx(Tn.AFileUploader,v),children:[C.jsxs(kn,{className:Tn.ChipsContainer,children:[c==="Upload"&&Je(),z==null?void 0:z.map(He)]}),c==="Upload"&&C.jsx(Yr,{className:Ke.clsx(Tn.DropIdle,"Title1","NoSelect"),style:{color:G?"var(--AFileUploader_brand_color)":"var(--AFileUploader_disabled_color)",opacity:G?1:.4},...Ce,abaseRef:ne,onClick:Xe=>Xe.preventDefault(),children:!(z!=null&&z.length)&&C.jsxs(kn,{style:{gap:4},children:[C.jsx(en,{icon:"FileDownload",size:"2xl"}),C.jsx("span",{children:B["Drop file to select"]})]})})]})]})},Uk="_AFloatMenu_xco8u_1",Wk="_Content_xco8u_10",T0={AFloatMenu:Uk,Content:Wk},mC=r=>{const{defs:e,defaultDef:t,actionRef:n,offset:o,onClose:i,onClick:a,onPaperClick:c,position:u=bf.ES,width:f=137}=r,p=S.useMemo(()=>({content:Vk,...t}),[t]),m=S.useMemo(()=>{const P={};return lr.keys(e).forEach(U=>{const G=e[U],Q={...p,...G};Q.noDisplay||(P[U]=Q)}),P},[p,e]),[g,v]=S.useState(null),w=S.useCallback(P=>{Aw(P,O,u,o),v(P)},[u,o]),[T,_]=S.useState(!1),[A,R]=S.useState(!1),O=S.useRef(null),I=S.useCallback(P=>{R(!0),setTimeout(()=>_(!0),0),setTimeout(()=>w(P),0)},[w]),F=S.useCallback(()=>{_(!1),R(!0),i==null||i()},[i]),B=S.useCallback(()=>R(!1),[]),z=S.useCallback(async P=>{const U=document.getElementById("root"),G=P.target,Q=O.current;!U||!Q||!G||!Q.contains(G)&&U.contains(G)&&(await(c==null?void 0:c(P)),F())},[F,c]);S.useEffect(()=>{if(T)return setTimeout(()=>document.addEventListener("mousedown",z),0),()=>document.removeEventListener("mousedown",z)},[T,z]);const j=S.useCallback(()=>{g&&w(g)},[w,g]);S.useEffect(()=>{if(!T||!g)return;let P=g.parentElement;for(;P;)P.addEventListener("scroll",j),P=P.parentElement;return()=>{let U=g.parentElement;for(;U;)U.removeEventListener("scroll",j),U=U.parentElement}},[g,T,j]),S.useEffect(()=>{if(T)return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[T,j]);const V=S.useCallback(P=>{P[0].intersectionRatio===0&&F()},[F]);S.useEffect(()=>{if(!T)return;const P=new IntersectionObserver(V,{threshold:0});return O.current&&P.observe(O.current),()=>P.disconnect()},[O,T,V]),S.useEffect(()=>{n&&(n.current={open:I,close:F})},[n,I,F]);const ue=S.useCallback(P=>{var U;if(T){if((U=m[P])!=null&&U.isDisabled)return}else return;a==null||a(P),F()},[T,a,F,m]);return!T&&!A?null:Ls.createPortal(C.jsx("div",{ref:O,className:T0.AFloatMenu,style:{opacity:+T,visibility:T&&Object.keys(m).length>0?"visible":"hidden",minWidth:f},onTransitionEnd:B,children:lr.map(m,([P],U)=>{const G={...p,...m[P]};let{content:Q,noDisplay:re,tooltipDirection:ie=Io.E,...se}=G;return re?null:(Q=Er.getContent(G.content,{defKey:P,def:G}),S.createElement(Yr,{...se,key:U,className:Ke.clsx(T0.Content,"Label2","IsClickable",se.className),tooltipDirection:ie,onClick:ne=>{var be;ue==null||ue(P),(be=se.onClick)==null||be.call(se,ne)}},Q))})}),document.body)},Vk=r=>r.defKey;function Gk(r){try{const e=Number.parseInt(r);return isNaN(e)?void 0:e}catch{return}}const vC={parseInt:Gk},Yk=`${Number.MAX_SAFE_INTEGER}`.length-1,Zk=r=>{const{unit:e,unitMargin:t=4,unitOptions:n,useSelectUnit:o,type:i="Secondary",min:a,max:c,unitSelectWidth:u,unitOptionsRenderer:f,useValue:p,onEnterPress:m,canAsterisk:g=!1,onFocus:v,...w}=r,T=S.useMemo(()=>c!==void 0&&a!==void 0?Math.max(`${c}`.length+1,`${a}`.length+1):Yk,[a,c]),[_,A]=vn(p,""),R=S.useCallback(V=>{if(A)if(g&&V.startsWith("*"))A("*");else if(V==="")A(a!==void 0?`${a}`:"");else if(V==="-")A("-");else{V=V.replace(/[^0-9-]/g,"");try{const ue=vC.parseInt(V);ue!==void 0&&(a!==void 0&&ue<a?A(`${a}`):c!==void 0&&ue>c?A(`${c}`):A(`${ue}`))}catch(ue){console.error("ANumInput : ",ue)}}},[A,g,a,c]),O=S.useRef(null),I=S.useCallback(V=>{var ue;(ue=O.current)==null||ue.blur(),m==null||m(V)},[m]),F=S.useMemo(()=>a===void 0&&c===void 0?e??"number":`${a??""}~${c??""}`,[a,c,e]),[B,z]=vn(o,(n==null?void 0:n[0])??""),j=S.useMemo(()=>n?C.jsx(zl,{className:Jo.ANumInputUnitSelect,OptionRenderer:f,options:n,style:{maxWidth:u||"fit-content"},type:"Raw",useSelect:[B,z],arrowProps:{style:{color:"var(--label-normal)",marginLeft:4,marginRight:t}}}):e?C.jsx("span",{style:{marginRight:t},children:e}):null,[n,f,u,B,z,t,e]);return C.jsx(Gc,{...w,autoComplete:"off",className:Ke.clsx(Jo.ANumInput,r.className),inputRef:O,maxLength:T,placeholder:F,RightAddon:j,type:i,useValue:[_,R],onEnterPress:I})},Kk="_AListView_1nv5l_1",Xk="_Row_1nv5l_10",Jk="_Label_1nv5l_19",Qk="_Content_1nv5l_29",up={AListView:Kk,Row:Xk,Label:Jk,Content:Qk},eI=r=>{const{defs:e,defaultDef:t,item:n,rowHeight:o,labelWidth:i,noBorder:a,onlyMiddleBorder:c,rowGap:u,middleBorder:f,rowBottomBorder:p,outerBorder:m,style:g,labelClassName:v,contentClassName:w,labelStyle:T,contentStyle:_,...A}=r,R=a||c,O=R?"":p||"var(--AListView_border-thin)",I=R?"":m||"var(--AListView_border-thick)",F=a?"":f||"var(--AListView_border-thick)",B=S.useMemo(()=>({content:rI,label:tI,...t}),[t]),z=S.useMemo(()=>{const j={};return lr.keys(e).forEach(V=>{const ue=e[V],P={...B,...ue};j[V]=P}),j},[B,e]);return C.jsx(Yr,{...A,className:Ke.clsx(up.AListView,A.className),style:{...g,borderTop:O},children:lr.map(z,([j],V)=>{const ue={...B,...z[j]},P=Er.getContent(ue.label,{defKey:j,item:n,def:ue}),U=Er.getContent(ue.content,{defKey:j,item:n||{[j]:""},def:ue}),G=Er.getContent(ue.bold||"label",{defKey:j,item:n,def:ue});return C.jsxs("div",{className:up.Row,style:{height:ue.fixedHeight?o:void 0,minHeight:ue.fixedHeight?o:void 0,maxHeight:ue.fixedHeight?o:void 0,borderBottom:O,marginTop:V===0?0:typeof u=="number"?`${u}px`:u},children:[C.jsx("div",{className:Ke.clsx(up.Label,"NoSelect",G!=="content"&&"Bold",v),style:{width:i,minWidth:i,maxWidth:i,borderLeft:I,paddingLeft:R?0:10,...T},children:C.jsx(tl,{children:P})}),C.jsx("div",{className:Ke.clsx(up.Content,G!=="label"&&"Bold",w),style:{borderLeft:F,borderRight:I,..._},children:C.jsx(tl,{style:{width:"100%",padding:R?0:10},children:U})})]},j)})})},tI=r=>r.defKey,rI=r=>{const{defKey:e,item:t}=r;if(t)if(lr.hasKey(t,e)){const n=t[e];return lr.isReactNode(n)?n:null}else return null;else return null},nI="_ALoadingBorder_kwc1g_1",oI="_ProgressBar_kwc1g_9",iI="_IsLoading_kwc1g_15",sI="_Cover_kwc1g_19",Zf={ALoadingBorder:nI,ProgressBar:oI,IsLoading:iI,Cover:sI},Iv=r=>{const{isLoading:e}=r,[t,n]=S.useState(!1),o=S.useRef(null);return S.useEffect(()=>{e?(n(!0),o.current&&clearTimeout(o.current)):o.current=setTimeout(()=>n(!1),300)},[e]),C.jsxs("div",{className:Zf.ALoadingBorder,children:[C.jsx("div",{className:Ke.clsx(Zf.ProgressBar,t&&Zf.IsLoading)}),C.jsx("div",{className:Ke.clsx(Zf.Cover,e&&Zf.IsLoading),style:{transition:"all 300ms"}})]})},aI="_Container_ez8dc_1",lI="_Option_ez8dc_7",cI="_RadioButton_ez8dc_14",uI="_InnerCircle_ez8dc_24",dI="_isChecked_ez8dc_29",Yd={Container:aI,Option:lI,RadioButton:cI,InnerCircle:uI,isChecked:dI},fI=r=>{const{options:e,useSelect:t,selectDisabled:n,radius:o=23,innerRadius:i=o*.6,OptionRenderer:a=yC}=r,[c,u]=vn(t,e[0]);return C.jsx("div",{className:Yd.Container,children:e.map((f,p)=>{const m=n==null?void 0:n(f),g=()=>m?null:u==null?void 0:u(f);return C.jsxs(kn,{className:Ke.clsx(Yd.Option,"IsClickable"),isDisabled:m,onClick:g,children:[C.jsx(hI,{innerRadius:i,isChecked:c===f,radius:o},p),C.jsx(a,{option:f})]},p)})})},yC=({option:r})=>r,hI=({isChecked:r,radius:e,innerRadius:t})=>C.jsx(Yr,{className:Ke.clsx(Yd.RadioButton,r&&Yd.isChecked),style:{width:e,height:e},children:C.jsx(Yr,{className:Ke.clsx(Yd.InnerCircle,r&&Yd.isChecked),style:{width:t,height:t}})}),pI="_AMultiSelect_19uuu_1",gI="_Arrow_19uuu_15",mI="_Primary_19uuu_24",vI="_UnAvailable_19uuu_35",yI="_IsOpen_19uuu_35",bI="_Secondary_19uuu_42",xI="_Placeholder_19uuu_58",wI="_ValuesContainer_19uuu_63",CI="_Values_19uuu_63",SI="_Options_19uuu_82",_I="_Option_19uuu_82",AI="_Selected_19uuu_124",EI="_CheckBox_19uuu_131",Mi={AMultiSelect:pI,Arrow:gI,Primary:mI,UnAvailable:vI,IsOpen:yI,Secondary:bI,Placeholder:xI,ValuesContainer:wI,Values:CI,Options:SI,Option:_I,Selected:AI,CheckBox:EI},TI=r=>{const{options:e,useSelect:t,type:n="Primary",placeholder:o=wr.AMultiSelect["Select(Placeholder)"],onClose:i,SelectedRenderer:a=kI,OptionRenderer:c=II,minShowRows:u=2,maxShowRows:f=6,arrowProps:p,isAutoWidth:m=!1,...g}=r,v=S.useRef(null),w=S.useMemo(()=>g.abaseRef??v,[g.abaseRef]),T=S.useRef(null),[_,A]=vn(t,[]),[R,O]=S.useState(void 0),I=S.useRef(e),F=S.useRef(null),[B,z]=S.useState(!1),[j,V]=S.useState(!1),ue=S.useCallback(()=>V(!1),[]),P=S.useCallback(()=>{g.isDisabled||g.isLoading||e.length<1||(V(!0),setTimeout(()=>z(!0),0),setTimeout(()=>fm(T,w,e,u,f),0))},[w,g.isDisabled,g.isLoading,e,u,f]),U=S.useCallback(()=>{z(!1),V(!0),i==null||i()},[i]),G=S.useCallback(te=>{var de;B?U():P(),setTimeout(()=>fm(T,w,e,u,f),0),(de=g.onClick)==null||de.call(g,te)},[w,g,e,B,U,P,u,f]),Q=S.useCallback(()=>{fm(T,w,e,u,f)},[w,e,u,f]);S.useEffect(()=>{if(!B||!w.current)return;const te=w.current;let de=te.parentElement;for(;de;)de.addEventListener("scroll",Q),de=de.parentElement;return()=>{let ge=te.parentElement;for(;ge;)ge.removeEventListener("scroll",Q),ge=ge.parentElement}},[w,B,Q]),S.useEffect(()=>{if(B)return window.addEventListener("resize",Q),()=>window.removeEventListener("resize",Q)},[B,Q]);const re=S.useCallback(te=>{te[0].intersectionRatio===0&&U()},[U]);S.useEffect(()=>{if(!B)return;const te=new IntersectionObserver(re,{threshold:0});return w.current&&te.observe(w.current),()=>te.disconnect()},[w,B,re]);const ie=S.useCallback(te=>{const de=te.target,ge=w.current,Ee=T.current;!ge||!de||!Ee||!ge.contains(de)&&!Ee.contains(de)&&U()},[w,U]),se=S.useMemo(()=>g.isDisabled||g.isLoading||e.length<1,[g.isDisabled,g.isLoading,e]);S.useEffect(()=>{if(B)return setTimeout(()=>document.addEventListener("mousedown",ie),0),()=>document.removeEventListener("mousedown",ie)},[B,ie]);const ne=S.useCallback((te,de)=>{te.stopPropagation(),te.preventDefault();let ge=[..._];ge.includes(de)?ge=ge.filter(Ee=>Ee!==de):ge.push(de),A==null||A(ge)},[_,A]),be=S.useCallback(()=>{if(!m||!w.current)return;const te=$u.calculateOptimalSelectWidth({elementRef:w,options:e,selectedOptions:_,placeholder:o,optionRenderer:de=>c({option:de}),type:n,isMulti:!0});O(te)},[m,w,e,_,o,c,n]);return S.useEffect(()=>m?((e!==I.current||R===void 0)&&(F.current!==null&&cancelAnimationFrame(F.current),F.current=requestAnimationFrame(()=>{be(),F.current=null,I.current=[...e]})),()=>{F.current!==null&&(cancelAnimationFrame(F.current),F.current=null)}):void 0,[m,e,be,R]),S.useEffect(()=>()=>{typeof $u.clearCache=="function"&&$u.clearCache()},[]),C.jsxs(C.Fragment,{children:[C.jsxs(Yr,{...g,abaseRef:w,isDisabled:g.isDisabled||e.length<1,className:Ke.clsx(g.className,Mi.AMultiSelect,"NoSelect",B&&Mi.IsOpen,se&&Mi.UnAvailable,Mi[n]),style:{padding:n==="Secondary"?"8px 8px 8px 0":0,width:R?`${R}px`:m?"100px":void 0,...g.style},onClick:G,children:[C.jsx("div",{className:Mi.ValuesContainer,children:C.jsx("div",{className:Ke.clsx(Mi.Values,_.length<1&&Mi.Placeholder),children:C.jsx(a,{OptionRenderer:c,placeholder:o,selectedOptions:_})})}),C.jsx("div",{...p,className:Ke.clsx(Mi.Arrow,p==null?void 0:p.className),children:C.jsx(en,{icon:"TriangleDown",style:{transform:B?"rotate(180deg)":"",transition:"var(--Transition)"}})})]}),e.length>0&&(B||j)&&Ls.createPortal(C.jsx("div",{ref:T,className:Ke.clsx(Mi.Options,Mi[n]),style:{opacity:+B,visibility:B?"visible":"hidden",pointerEvents:B?void 0:"none",width:R?`${R}px`:m?"100px":void 0,borderRadius:w.current?window.getComputedStyle(w.current).borderRadius:void 0},onTransitionEnd:ue,children:e.map((te,de)=>{var Ee;const ge=_.includes(te);return C.jsxs("div",{className:Ke.clsx(Mi.Option,ge&&Mi.Selected,"NoSelect",Mi[n]),style:{height:(Ee=w.current)==null?void 0:Ee.getBoundingClientRect().height},onClick:Be=>ne(Be,te),children:[C.jsx(af,{className:Mi.CheckBox,useCheck:[+ge,void 0]}),C.jsx(c,{option:te})]},de)})}),document.body)]})};function fm(r,e,t,n,o){if(!e.current||!r.current||!t||t.length<1)return;const i=e.current.getBoundingClientRect(),a=RI(i,t.length,n,o),c=window.getComputedStyle(e.current);r.current.style.top=`calc(${a.top??0}px - ${c.borderTopWidth})`,r.current.style.bottom=a.bottom?a.bottom+"px":"",r.current.style.left=a.left+"px",r.current.style.width||(r.current.style.minWidth=a.minWidth+"px"),r.current.style.minHeight=a.minHeight+"px",r.current.style.maxHeight=a.maxHeight+"px",r.current.style.visibility="visible"}function RI(r,e,t,n){const o={top:r.bottom,bottom:void 0,left:r.left,height:"fit-content",minWidth:r.width,minHeight:r.height*Math.min(t,e),maxHeight:r.height*n>window.innerHeight-r.bottom-10?window.innerHeight-r.bottom-10:r.height*n};return window.innerHeight-r.bottom-10<o.height&&(window.innerHeight-r.bottom-10<o.minHeight?(o.top=r.top-e*r.height,o.top<0&&(o.top=10,o.minHeight=r.top-10,o.height=r.top-10)):o.height=window.innerHeight-r.bottom-10),o}const kI=r=>{const{OptionRenderer:e,selectedOptions:t,placeholder:n}=r;return t.length<1?n:t.length===1?C.jsx(e,{option:t[0]}):`${t.length} selected`},II=r=>{const{option:e}=r;return lr.isReactNode(e)?e:null},MI="_Container_10ion_1",LI="_Steps_10ion_9",DI="_Step_10ion_9",OI="_OutCircle_10ion_26",NI="_IsOver_10ion_37",PI="_InCircle_10ion_41",BI="_Line_10ion_54",FI="_Left_10ion_66",jI="_Right_10ion_69",zI="_ContentContainer_10ion_73",HI="_Content_10ion_73",hi={Container:MI,Steps:LI,Step:DI,OutCircle:OI,IsOver:NI,InCircle:PI,Line:BI,Left:FI,Right:jI,ContentContainer:zI,Content:HI},$I=r=>{const{useSelect:e,steps:t,StepRenderer:n=R0,ContentRenderer:o=R0}=r;if(t.length===0)throw new Error("steps should have at least one element");const i=S.useRef(null),[a,c]=vn(e,t[0]),u=S.useCallback(p=>c==null?void 0:c(p),[c]),f=S.useMemo(()=>t.indexOf(a),[a,t]);return S.useEffect(()=>{f<0&&u(t[0])},[f,t,u]),C.jsxs("div",{className:hi.Container,children:[C.jsx("div",{className:hi.Steps,children:t.map((p,m)=>{const g=t.indexOf(p),v=f>=m,w=f>m;return C.jsxs("div",{className:hi.Step,children:[m!==0&&C.jsx("div",{className:Ke.clsx(hi.Line,hi.Left,v&&hi.IsOver)}),m!==t.length-1&&C.jsx("div",{className:Ke.clsx(hi.Line,hi.Right,w&&hi.IsOver)}),C.jsx(Go,{className:Ke.clsx(hi.OutCircle,v&&hi.IsOver),type:"Raw",onClick:()=>u(p),children:C.jsx("div",{className:Ke.clsx(hi.InCircle,v&&hi.IsOver)})}),C.jsx(n,{step:p,stepIdx:g})]},m)})}),C.jsx("div",{ref:i,className:hi.ContentContainer,children:t.map((p,m)=>{const g=t.indexOf(p);return C.jsx("div",{className:hi.Content,style:m===0?{marginLeft:`${f*-100}%`}:{},children:C.jsx(o,{step:p,stepIdx:g})},m)})})]})},R0=r=>{const{step:e}=r;return typeof e=="object"?lr.stringify(e):e},qI="_ATab_9eg6z_1",UI="_Addon_9eg6z_9",WI="_Option_9eg6z_14",VI="_Underline_9eg6z_26",GI="_IsSelected_9eg6z_26",YI="_IndicatorTrack_9eg6z_37",ZI="_Indicator_9eg6z_37",KI="_Primary_9eg6z_54",XI="_Secondary_9eg6z_57",JI="_IsDisabled_9eg6z_63",QI="_Tertiary_9eg6z_77",e8="_Quaternary_9eg6z_101",Va={ATab:qI,Addon:UI,Option:WI,Underline:VI,IsSelected:GI,IndicatorTrack:YI,Indicator:ZI,Primary:KI,Secondary:XI,IsDisabled:JI,Tertiary:QI,Quaternary:e8},t8=["Primary","Secondary","Tertiary","Quaternary"],bC=r=>{const{options:e,useSelect:t,selectDisabled:n,type:o="Primary",tabProps:i,optionProps:a,optionWidth:c,OptionRenderer:u=r8,RightAddon:f,LeftAddon:p,color:m,selectedColor:g,underline:v,indicatorProps:w,indicatorTrackProps:T,height:_=40}=r;if(e.length===0)throw new Error("options should have at least one element");const A=S.useMemo(()=>e.findIndex(we=>!(n!=null&&n(we))),[e,n]),R=o==="Tertiary",O=o==="Secondary",I=R?_*.1:0,F=O?8:0,B=S.useMemo(()=>I+F,[I,F]),z=S.useMemo(()=>(F-I)/e.length,[e.length,I,F]),[j,V]=vn(t,e[A]),ue=S.useRef([]),P=S.useCallback(we=>V==null?void 0:V(we),[V]),U=S.useMemo(()=>typeof c=="number"?c+"px":c,[c]),G=S.useMemo(()=>e.indexOf(j),[e,j]),Q=S.useMemo(()=>`calc(${100/e.length}% + ${z}px)`,[e.length,z]),re=S.useMemo(()=>U||`calc(${Q} - ${B}px)`,[Q,B,U]),[ie,se]=S.useState(0),[ne,be]=S.useState(0),[te,de]=S.useState(re),ge=S.useRef(null),Ee=S.useRef(null),Be=_w(Ee,ge),oe=S.useMemo(()=>{let we;switch(U){case void 0:we=`calc(${Q} * ${G})`;break;case"fit-content":we=`calc(${ie}px)`;break;default:we=`calc((${U} + ${B}px) * ${G})`;break}return we},[U,Q,G,ie,B]),ve=S.useMemo(()=>{switch(U){case void 0:return;case"fit-content":return`calc(${ne}px)`;default:return`calc((${U} + ${B}px - ${z}px) * ${e.length})`}},[U,z,B,e,ne]);return S.useEffect(()=>{var Oe,Se;if(e.includes(j)||V==null||V(e[A]),U!=="fit-content"){de(re);return}let we=0;ue.current.forEach((Ae,Ie)=>{Ie<G&&Ae.current&&(we+=Ae.current.offsetWidth+B)}),se(we),de(`calc(${((Se=(Oe=ue.current[G])==null?void 0:Oe.current)==null?void 0:Se.offsetWidth)||0}px)`),be(ue.current.reduce((Ae,Ie)=>{var Ye;return Ae+((((Ye=Ie.current)==null?void 0:Ye.offsetWidth)||0)+B-z)},0))},[U,ue,e,j,V,A,z,B,G,re]),C.jsxs("div",{ref:ge,...i,className:Ke.clsx(Va.ATab,"Headline2",Va[o],i==null?void 0:i.className),style:{minHeight:_,height:_,maxHeight:_},children:[p&&C.jsx("div",{ref:Ee,className:Va.Addon,children:p}),C.jsx("div",{...w,className:Ke.clsx(Va.Indicator,w==null?void 0:w.className),style:{minWidth:te,left:oe,marginLeft:I,transform:`translate(${Be??0}px, ${R?"-50%":"0"})`,height:R?_-I*2:void 0,...w==null?void 0:w.style}}),C.jsx("div",{...T,className:Ke.clsx(Va.IndicatorTrack,T==null?void 0:T.className),style:{width:ve,marginLeft:R?Be:0,height:_,...T==null?void 0:T.style}}),e.map((we,Oe)=>{const Se=n==null?void 0:n(we);return ue.current[Oe]||(ue.current[Oe]=S.createRef()),C.jsx(Yr,{abaseRef:ue.current[Oe],...a,isDisabled:Se,className:Ke.clsx(Va.Option,Se&&Va.IsDiabled,we===j&&Va.IsSelected,"IsClickable",v&&Va.Underline,a==null?void 0:a.className),style:{minWidth:re,maxWidth:re,marginLeft:I,marginRight:F,"--color":we===j&&g||m,height:_,...a==null?void 0:a.style},onClick:Ae=>{!Se&&P(we),a&&a.onClick&&a.onClick(Ae)},children:C.jsx(u,{option:we})},Oe)}),C.jsx(zn,{w:I}),f&&C.jsxs(C.Fragment,{children:[C.jsx(Xu,{}),C.jsx("div",{className:Va.Addon,children:f})]})]})},r8=r=>{const{option:e}=r;if(typeof e=="string")return e;if(typeof e=="number")return e;if(typeof e=="object"){if(e===null)return"";const t=lr.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 xC(...r){const e=S.useRef(!1);S.useEffect(()=>{e.current||(e.current=!0,r.forEach(t=>t()))},[r])}const wC={String:(r,e,t,n)=>{const{value:o}=n;if(o===void 0)return!1;if(t==="")return lr.keys(e).some(p=>{const m=e[p],g=Er.getContent(m.asText,{defKey:p,def:m,item:r});if(g!==void 0)return g.toString().toLowerCase().includes(o.toLowerCase());const v=Er.getContent(m.content,{defKey:p,def:m,item:r});return["string","number"].includes(typeof v)&&v!==void 0&&v!==null?v.toString().toLowerCase().includes(o.toLowerCase()):!1});const i=lr.keys(e),a=t;if(!i.includes(a))return!1;const c=e[a],u=Er.getContent(c.asText,{defKey:a,def:c,item:r});if(u!==void 0)return u.toString().toLowerCase().includes(o.toLowerCase());const f=Er.getContent(c.content,{defKey:a,def:c,item:r});return["string","number"].includes(typeof f)&&f!==void 0&&f!==null?f.toString().toLowerCase().includes(o.toLowerCase()):!1},Select:(r,e,t,n)=>{const{value:o}=n;if(o==null)return!1;const i=lr.keys(e),a=t;if(!i.includes(a))return!1;const c=e[a],u=Er.getContent(c.asText,{defKey:a,def:c,item:r});if(u!==void 0)return o.toString().toLowerCase()===u.toString().toLowerCase();const f=Er.getContent(c.content,{defKey:a,def:c,item:r});return["string","number"].includes(typeof f)&&f!==void 0&&f!==null?o.toString().toLowerCase()===f.toString().toLowerCase():!1},Date:(r,e,t,n)=>{const{value:o}=n;if(o===void 0)return!1;const i=lr.keys(e),a=t;if(!i.includes(a))return!1;const c=e[a],u=Er.getContent(c.asText,{defKey:a,def:c,item:r});if(u!==void 0){const p=er.toDate(u.toString());return p&&er.eq(p,o)}const f=Er.getContent(c.content,{defKey:a,def:c,item:r});if(["string","number"].includes(typeof f)&&f!==void 0&&f!==null){const p=er.toDate(f.toString());return p&&er.eq(p,o)}return!1},DateRange:(r,e,t,n)=>{const{value:o}=n;if(o===void 0)return!1;const i=lr.keys(e),a=t;if(!i.includes(a))return!1;const c=e[a],u=Er.getContent(c.asText,{defKey:a,def:c,item:r});if(u!==void 0){const p=er.toDate(u.toString());return p&&er.be(o.sDate,p,o.eDate)}const f=Er.getContent(c.content,{defKey:a,def:c,item:r});if(["string","number"].includes(typeof f)&&f!==void 0&&f!==null){const p=er.toDate(f.toString());return p&&er.be(o.sDate,p,o.eDate)}return!1}},n8=(r,e,t)=>{let n=r;return lr.keys(t).forEach(i=>{const a=t[i];a.value===void 0||a.value===null||a.value===""||(n=n.filter(c=>{var u;return(u=a.predicate??wC[a.type])==null?void 0:u(c,e,i,a)}))}),n},o8=(r,e,t)=>{if(!t)return r;const n=t.defKey,o=e[n];if(n===void 0)return r;const i=t.sortF??((a,c)=>{const u=Er.getContent(o.content,{defKey:n,def:o,item:a}),f=Er.getContent(o.content,{defKey:n,def:o,item:c});return typeof u=="string"&&typeof f=="string"?u<f?-1:u>f?1:0:typeof u=="number"&&typeof f=="number"?u-f:typeof u=="string"&&typeof f=="number"?-1:typeof u=="number"&&typeof f=="string"||u===void 0&&f!==void 0?1:u!==void 0&&f===void 0?-1:0});return typeof i=="function"&&i.length>=3?r.slice().sort((a,c)=>i(a,c,t.isAsc)):r.slice().sort((a,c)=>{const u=i(a,c);return t.isAsc?u:-u})},i8=(r,e,t)=>r.slice((e-1)*t,e*t),CC=(r,e)=>{const t=Math.max(Math.ceil(r/e),1);return Array.from({length:t},(n,o)=>o+1)},s8=(r,e,t,n)=>{const o=CC(e,t),i=Math.floor((r-1)/n),a=i*n+1,c=(i+1)*n,u=o.slice(a-1,c);return{pages:o,rangedPages:u}},a8=(r,e,t)=>{const n=[],o=Object.keys(t),i=[];o.forEach(g=>{const v=t[g],w=Er.getContent(v.hContent,{defKey:g,def:v});if(w!==void 0){if(typeof w=="string"){i.push(w);return}else if(typeof w=="number"){i.push(w.toString());return}}const T=Er.getContent(v.name,{defKey:g,def:v});if(T!==void 0&&typeof T=="string"){i.push(T);return}i.push(g)});const a=i.map(g=>`"${g.replaceAll('"','""')}"`);n.push(a.join(",")),e.forEach(g=>{const v=[];o.forEach(T=>{const _=t[T],A=Er.getContent(_.content,{defKey:T,def:_,item:g});if(A!==void 0){if(typeof A=="string"){v.push(A);return}else if(typeof A=="number"){v.push(A.toString());return}}const R=g[T];typeof R=="string"?v.push(R):typeof R=="number"?v.push(R.toString()):v.push("")});const w=v.map(T=>`"${T.replaceAll('"','""')}"`);n.push(w.join(","))});const c=`${r}.csv`,u="\uFEFF"+n.join(`
166
166
  `),f=new Blob([u],{type:"text/csv;charset=UTF-8"}),p=URL.createObjectURL(f),m=document.createElement("a");m.href=p,m.download=c,m.click(),URL.revokeObjectURL(p)},l8=r=>{const e=lr.keys(r);if(e.length!==1)return;const t=e[0];if(t!=="")return;const n=r[t];if(n.type==="String")return n.value},c8=r=>{const e=Object.entries(r);let t={};return e.forEach(([n,o])=>{!o||o.value===void 0||o.value===null||o.value===""||(o.type==="DateRange"?(t[o.sFilterKey]=o.value.sDate,t[o.eFilterKey]=o.value.eDate):t[o.filterKey??n]=o.value)}),t},u8=r=>{const e=lr.keys(r).filter(o=>o!=="");if(e.length!==1)return;const t=e[0],n=r[t];return!n||n.value===void 0||n.value===null||n.value===""?{selectedKey:t,value:void 0}:{selectedKey:t,value:n.value}},Bl={applyFilteration:n8,applySortation:o8,applyPagination:i8,getPages:CC,getRangedPages:s8,downloadCsv:a8,getSingleFilterValue:l8,getMultiFilterValues:c8,getSelectFilterValue:u8},d8="_ATable_12zow_1",f8={ATable:d8};function SC(r,e,t,n){S.useEffect(()=>{if(r)return r.addEventListener(e,t,n),()=>{r.removeEventListener(e,t,n)}},[r,e,t,n])}const h8="_BodyHeader_ys4y0_1",p8="_TRow_ys4y0_7",g8="_OverflowSpace_ys4y0_11",m8="_BodyBody_ys4y0_16",v8="_IsSelected_ys4y0_35",y8="_IsSelectable_ys4y0_39",b8="_IsRowMarked_ys4y0_47",x8="_TH_ys4y0_52",w8="_TD_ys4y0_57",C8="_IsMarked_ys4y0_57",S8="_Resizer_ys4y0_76",_8="_IsMoving_ys4y0_88",A8="_IsResizable_ys4y0_91",E8="_ResizerCenter_ys4y0_94",T8="_ResizerOut_ys4y0_100",R8="_ResizerIn_ys4y0_104",k8="_IsClicked_ys4y0_139",I8="_NoItems_ys4y0_146",M8="_Content_ys4y0_152",On={BodyHeader:h8,TRow:p8,OverflowSpace:g8,BodyBody:m8,IsSelected:v8,IsSelectable:y8,IsRowMarked:b8,TH:x8,TD:w8,IsMarked:C8,Resizer:S8,IsMoving:_8,IsResizable:A8,ResizerCenter:E8,ResizerOut:T8,ResizerIn:R8,IsClicked:k8,NoItems:I8,Content:M8},Fc=25,hm=50,L8=r=>{const{defs:e,isEqual:t,rProps:n,useSelect:o,isTableDisabled:i,isSelectMulti:a,selectDisabled:c,appliedFilteration:u,useSortation:f,pagination:p,pagedItems:m,noMarking:g,noDefHeader:v,isLoading:w,showRows:T,RowRenderer:_=N8,isRowRendered:A,rowHeight:R,resources:O}=r,[I,F]=S.useMemo(()=>o??[],[o]),B=S.useCallback(Ce=>{i||!F||!I||c!=null&&c(Ce)||(a?I.some(Pe=>t(Pe,Ce))?F(I.filter(Pe=>!t(Pe,Ce))):F([...I,Ce]):F([Ce]))},[I,c,F,t,i,a]);S.useEffect(()=>{a||!I||!F||I.length>1&&F([I[I.length-1]])},[I,F,a]),S.useEffect(()=>{if(!I||!F)return;I.filter(Pe=>c==null?void 0:c(Pe)).length>0&&F(I.filter(Pe=>!(c!=null&&c(Pe))))},[I,F,c]);const[z,j]=f,V=S.useCallback((Ce,Pe)=>{j&&((z==null?void 0:z.defKey)===Ce?z.isAsc===!0?j({defKey:Ce,isAsc:!1,sortF:Pe}):z.isAsc===!1?j(void 0):j({defKey:Ce,isAsc:!0,sortF:Pe}):j({defKey:Ce,isAsc:!0,sortF:Pe}))},[z,j]),[ue,P]=S.useState({elem:null,row:null}),U=S.useRef(null),G=S.useRef(null),Q=S.useCallback(()=>P({elem:U.current,row:G.current}),[]);S.useEffect(()=>Q(),[m.length,Q]),SC(window,"resize",Q);const[re,ie]=S.useState(R);S.useEffect(()=>{const{row:Ce}=ue;Ce!=null&&ie(Ce.clientHeight)},[ue,re]);const se=S.useMemo(()=>{const{elem:Ce}=ue;return Ce?Math.floor(Ce.clientHeight/re):0},[ue,re]),ne=S.useMemo(()=>T||(m.length<=se?se:m.length),[se,T,m]),be=S.useMemo(()=>{if(T!==void 0)return T*re},[T,re]),te=S.useMemo(()=>be,[be]),de=S.useMemo(()=>{const{elem:Ce}=ue;return Ce?Ce.getBoundingClientRect().height/re<m.length:!1},[ue,re,m.length]),[ge,Ee]=S.useState(),Be=S.useMemo(()=>{const{elem:Ce}=ue;return!ge||!Ce?"100%":Ce.clientHeight+(A?0:50)},[ge,A,ue]),oe=S.useRef(null),[ve,we]=S.useState({}),Oe=S.useRef({x:0,y:0}),Se=S.useRef({}),Ae=S.useMemo(()=>lr.keys(ve),[ve]),Ie=S.useCallback((Ce,Pe)=>{const He=oe.current;if(!He)return;const Je=[];He.childNodes.forEach(dt=>{dt.classList.contains(On.TH)&&Je.push(dt)});const wt={};lr.keys(e).forEach((dt,mt)=>{const Fe=Je[mt];if(!Fe)return;const rt=Fe.getBoundingClientRect().width;wt[dt]=rt}),Se.current=wt,Ee(Pe),Oe.current={x:Ce.clientX,y:Ce.clientY};const Xe=dt=>{if(!oe.current)return;const Fe=dt.clientX-Oe.current.x,rt=O8(e,Pe,Se.current,Fe);we(rt)};document.addEventListener("mousemove",Xe);const Qe=()=>{Ee(void 0),document.removeEventListener("mousemove",Xe),document.removeEventListener("mouseup",Qe)};document.addEventListener("mouseup",Qe)},[e]),Ye=S.useCallback(()=>{Ee(void 0),we({})},[]),Ne=S.useMemo(()=>{if(Ae.length===0){const He={},Je=lr.keys(e);for(let wt=0;wt<Je.length;wt++){const Xe=Je[wt],Qe=e[Xe],dt=Er.getContent(Qe.colSpan,{defKey:Xe,def:Qe}),mt=Qe.width??80,Fe=Qe.minWidth??Fc,rt=Qe.maxWidth,At={width:mt,minWidth:Fe,maxWidth:rt,flexGrow:dt??1};if(He[Xe]=At,dt!==void 0){for(let Nt=1;Nt<Math.min(dt,Je.length-wt);Nt++){const kt=e[Je[wt+Nt]],Dt=kt.width??80,Jt=kt.minWidth??Fc,or=kt.maxWidth;At.width+=Dt,At.minWidth+=Jt,At.maxWidth!==void 0&&(or!==void 0?At.maxWidth+=or:At.maxWidth=void 0)}wt+=dt-1}}return He}const Ce={},Pe=lr.keys(e);for(let He=0;He<Pe.length;He++){let Je=Pe[He];const wt=e[Je];let Xe=ve[Je];const Qe=Er.getContent(wt.colSpan,{defKey:Je,def:wt}),dt=wt.minWidth??Fc,mt=wt.maxWidth,Fe={width:Xe,minWidth:dt,maxWidth:mt,flexGrow:Qe??1};if(Ce[Je]=Fe,Qe!==void 0){for(let rt=1;rt<Math.min(Qe,Pe.length-He);rt++){const At=e[Pe[He+rt]],Nt=ve[Pe[He+rt]],kt=At.minWidth??Fc,Dt=At.maxWidth;Fe.width+=Nt,Fe.minWidth+=kt,Fe.maxWidth!==void 0&&(Dt!==void 0?Fe.maxWidth+=Dt:Fe.maxWidth=void 0)}He+=Qe-1}}return Ce},[e,Ae,ve]),We=S.useRef(null),Ve=S.useMemo(()=>Bl.getSingleFilterValue(u),[u]);return S.useEffect(()=>{U.current&&U.current.scrollTo({top:0})},[p.page]),S.useEffect(()=>{A&&G.current&&G.current.scrollIntoView({behavior:"smooth",block:"center"})},[I,m,A]),C.jsxs(C.Fragment,{children:[C.jsx(Iv,{isLoading:w}),C.jsx("div",{ref:We,className:Ke.clsx(On.BodyHeader,ge!==void 0&&On.IsClicked),style:{display:v||A?"none":"flex"},children:C.jsx("div",{ref:oe,className:On.TRow,style:{minHeight:hm,maxHeight:hm},children:lr.map(e,([Ce],Pe)=>{const He=e[Ce],Je=Er.getContent(He.hContent,{defKey:Ce,def:He}),wt=He.name,Xe=Pe===lr.keys(e).length-1,Qe=He.width??80,dt=He.minWidth??Fc,mt=He.maxWidth,Fe={width:Qe,minWidth:dt,maxWidth:mt,justifyContent:Er.getContent(He.hAlign,{defKey:Ce,def:He})??"flex-start",...Er.getContent(He.hStyle,{defKey:Ce,def:He})};Ae.includes(Ce)&&(Fe.width=ve[Ce]);const rt=He.isSortable,At=(z==null?void 0:z.defKey)===Ce,Nt=z==null?void 0:z.isAsc;return C.jsxs(S.Fragment,{children:[C.jsxs("div",{className:Ke.clsx(On.TH,"Label1",rt?"IsClickable":"NoSelect"),style:Fe,onClick:()=>rt&&V(Ce,He.sortF),children:[C.jsx(tl,{children:Je??wt,className:On.Content}),rt&&C.jsx(en,{icon:At?Nt?"SortUp":"SortDown":"SortBoth",style:{width:16,height:16}})]}),!Xe&&C.jsxs("div",{className:Ke.sclsx(On,"Resizer","IsResizable","NoSelect",ge!==void 0&&"IsMoving"),onDoubleClick:Ye,onMouseDown:kt=>Ie(kt,Ce),children:[C.jsx("div",{className:On.ResizerOut}),C.jsx("div",{className:On.ResizerIn}),C.jsx("div",{className:On.ResizerCenter,style:{height:Be}}),C.jsx("div",{className:On.ResizerIn}),C.jsx("div",{className:On.ResizerOut})]}),Xe&&C.jsx(zn,{className:On.OverflowSpace,h:hm,style:{color:Fe.color,backgroundColor:Fe.backgroundColor,transition:Fe.transition},w:"var(--Scrollbar-width)"})]},Ce)})})}),C.jsxs("div",{ref:U,className:Ke.clsx(On.BodyBody,ge!==void 0&&On.IsClicked),style:{overflowY:de?"scroll":"hidden",minHeight:be,maxHeight:te},children:[m.map((Ce,Pe)=>{const He=Er.getContent(n,{item:Ce}),Je=F&&!i,wt=I==null?void 0:I.some(mt=>t(mt,Ce)),Xe=I&&(c==null?void 0:c(Ce)),Qe=typeof Xe=="string"?Xe:void 0,dt={...Ce};return A&&lr.keys(e).forEach(mt=>{const Fe=e[mt],rt=Er.getContent(Fe.content,{defKey:mt,def:Fe,item:Ce});let At=!1;if(Ve&&!g){const Nt=Er.getContent(Fe.asText,{defKey:mt,def:Fe,item:Ce});Nt!==void 0?At=Nt.toString().toLowerCase().includes(Ve.toLowerCase()):["string","number"].includes(typeof rt)&&rt!==void 0&&rt!==null&&(At=rt.toString().toLowerCase().includes(Ve.toLowerCase()))}dt[mt]=C.jsx("span",{className:Ke.clsx(At&&On.IsRowMarked),children:dt[mt]})}),C.jsx(Yr,{isDisabled:Xe,tooltip:Qe,...He,abaseRef:wt?G:void 0,className:Ke.clsx(He==null?void 0:He.className,Je&&On.IsSelectable,wt&&On.IsSelected),onClick:mt=>{var Fe;B(Ce),(Fe=He==null?void 0:He.onClick)==null||Fe.call(He,mt)},children:C.jsx(_,{defs:e,isBodyBodyOverflowed:de,item:Ce,markedItem:dt,noMarking:g,rowHeight:R,singleFilterValue:Ve,spanWidths:Ne})},Pe)}),C.jsx(D8,{isRowRendered:A,itemsLength:m.length,resources:O,rowHeight:re,showRows:ne})]})]})},D8=r=>{const{showRows:e,itemsLength:t,resources:n,isRowRendered:o,rowHeight:i}=r,a=S.useMemo(()=>t===0?e:e-t,[e,t]);return Array.from({length:a},(c,u)=>C.jsx("div",{className:Ke.clsx(On.TRow,"NoSelect"),style:{minHeight:i,maxHeight:i,...o&&{border:"none"}},children:t===0&&u===Math.floor(e/2)&&C.jsx(kn,{className:On.NoItems,children:n["No Items"]})},u))};function O8(r,e,t,n){const o={...t},i=lr.keys(r).findIndex(f=>f===e)+1,a=Object.entries(r);let c=i-1,u=i;if(n<0){for(;n<0&&!(c<0||u>=a.length);){const[f,p]=[a[c][0],a[c][1]],[m,g]=[a[u][0],a[u][1]],v=p.minWidth??Fc,w=g.maxWidth,T=o[f],_=o[m];let A=T-v;w!==void 0&&(A=Math.min(A,w-_));let R=-n;R=Math.min(R,A),T-R<=v&&c--,w!==void 0&&_+R>=w&&u++,o[f]=T-R,o[m]=_+R,n+=R}return o}else if(n>0){for(;n>0&&!(c<0||u>=a.length);){const[f,p]=[a[c][0],a[c][1]],[m,g]=[a[u][0],a[u][1]],v=g.minWidth??Fc,w=p.maxWidth,T=o[m],_=o[f];let A=T-v;w!==void 0&&(A=Math.min(A,w-_));let R=n;R=Math.min(R,A),T-R<=v&&u++,w!==void 0&&_+R>=w&&c--,o[m]=T-R,o[f]=_+R,n-=R}return o}return o}const N8=r=>{const{defs:e,item:t,noMarking:n,spanWidths:o,singleFilterValue:i,isBodyBodyOverflowed:a,rowHeight:c}=r;return C.jsx("div",{className:Ke.clsx(On.TRow),style:{minHeight:c,maxHeight:c},children:lr.map(e,([u],f)=>{const p=o[u];if(p===void 0)return null;const m=f===lr.keys(e).length-1,g=e[u],v=Er.getContent(g.content,{defKey:u,def:g,item:t}),w={width:p.width,minWidth:p.minWidth,maxWidth:p.maxWidth,flexGrow:p.flexGrow,justifyContent:Er.getContent(g.align,{defKey:u,def:g,item:t})??"flex-start",...Er.getContent(g.style,{defKey:u,def:g,item:t})};let T=!1;if(i&&!n){const _=Er.getContent(g.asText,{defKey:u,def:g,item:t});_!==void 0?T=_.toString().toLowerCase().includes(i.toLowerCase()):["string","number"].includes(typeof v)&&v!==void 0&&v!==null&&(T=v.toString().toLowerCase().includes(i.toLowerCase()))}return C.jsxs(S.Fragment,{children:[C.jsx("div",{className:Ke.clsx(On.TD,"Label1",T&&On.IsMarked),style:w,children:C.jsx(tl,{children:v,className:On.Content})}),!a&&m&&C.jsx(zn,{className:On.OverflowSpace,h:c,style:{color:w.color,backgroundColor:w.backgroundColor},w:"var(--Scrollbar-width)"})]},u)})})},P8="_ATableFooter_w090q_1",B8="_Button_w090q_10",F8="_IsSelected_w090q_26",j8="_IsDisabled_w090q_31",oa={ATableFooter:P8,Button:B8,IsSelected:F8,IsDisabled:j8},z8=r=>{const{pages:e,rangedPages:t,pageF:n,pagination:o}=r,i=S.useMemo(()=>e[e.length-1],[e]);return C.jsxs(kn,{className:oa.ATableFooter,children:[C.jsx(en,{className:Ke.clsx(oa.Button,o.page===1&&oa.IsDisabled),icon:"FirstPage",onClick:n.moveFirst}),C.jsx(en,{className:Ke.clsx(oa.Button,o.page===1&&oa.IsDisabled),icon:"NavigateBefore",onClick:n.movePrev}),t.map(a=>C.jsx("div",{className:Ke.clsx(oa.Button,"NoSelect",o.page===a&&oa.IsSelected),onClick:()=>n.move(a),children:a},a)),C.jsx(en,{className:Ke.clsx(oa.Button,o.page===i&&oa.IsDisabled),icon:"NavigateNext",onClick:n.moveNext}),C.jsx(en,{className:Ke.clsx(oa.Button,o.page===i&&oa.IsDisabled),icon:"LastPage",onClick:n.moveLast})]})},H8="_Filter_1b9j0_1",$8="_SelectFilter_1b9j0_11",q8="_MainFilter_1b9j0_15",U8="_IsOpen_1b9j0_26",W8="_SubFilters_1b9j0_30",V8="_Input_1b9j0_44",G8="_Main_1b9j0_15",Y8="_Sub_1b9j0_30",Z8="_Actions_1b9j0_62",K8="_Icon_1b9j0_67",X8="_LeftIcon_1b9j0_74",J8="_CircleAlertOutline_1b9j0_79",Q8="_Rotate_1b9j0_87",Or={Filter:H8,SelectFilter:$8,MainFilter:q8,IsOpen:U8,SubFilters:W8,Input:V8,Main:G8,Sub:Y8,Actions:Z8,Icon:K8,LeftIcon:X8,CircleAlertOutline:J8,Rotate:Q8},e9=r=>{const{defs:e,useFilteration:t,hasToggleFilteration:n,filterF:o,isRowRendered:i,isFilterSort:a,filterType:c,resources:u,placeholder:f}=r,[p,m]=S.useState([]),[g,v]=S.useMemo(()=>t,[t]),w=S.useMemo(()=>c==="Select",[c]),T=S.useMemo(()=>lr.keys(g).map(oe=>String(oe)),[g]),[_,A]=S.useState(w&&T.length>0?T[0]:null),R=S.useCallback((oe,ve,we)=>{if(!v)return;const Oe={...g};oe.value=ve,v(Oe),m(Se=>Se.map((Ae,Ie)=>Ie===(we?we+1:0)?"":Ae))},[g,v]),O=S.useMemo(()=>{let oe=[],ve=lr.keys(g);w&&_&&(ve=ve.filter(we=>we===_));for(const we of ve)oe.push({key:we,def:e[we],filter:g[we]});return oe},[g,e,w,_]),I=S.useMemo(()=>O.length>0?O[0]:null,[O]),F=S.useMemo(()=>p.length>0?p[0]:"",[p]),B=S.useMemo(()=>O.length>1?O.slice(1):[],[O]),z=S.useMemo(()=>p.length>1?p.slice(1):[],[p]),j=S.useMemo(()=>B.length>0,[B]),[V,ue]=S.useState(!1),[P,U]=S.useState(!1),G=S.useRef(null),Q=S.useCallback(()=>ue(!1),[]),re=S.useRef(null),ie=S.useCallback(()=>{U(!1),ue(!0),re.current&&(document.removeEventListener("mousedown",re.current),re.current=null)},[]),se=S.useCallback(()=>{const oe=ve=>{const we=document.getElementById("root"),Oe=ve.target,Se=G.current;!we||!Se||!Oe||!Se.contains(Oe)&&we.contains(Oe)&&ie()};return re.current=oe,oe},[ie]),ne=S.useCallback(()=>{ue(!0),U(!0),setTimeout(()=>{const oe=se();document.addEventListener("mousedown",oe)},0)},[se]),be=S.useMemo(()=>P?ie:ne,[P,ne,ie]),te=S.useCallback(()=>{const oe=O.map((ve,we)=>ve.filter.type==="String"&&ve.filter.validation?ve.filter.validation(ve.filter.value||""):ve.filter.type==="Date"&&ve.filter.validation||ve.filter.type==="DateRange"&&ve.filter.validation?ve.filter.validation(ve.filter.value):p[we]);return m(oe),oe.every(ve=>!ve)},[p,O]),de=S.useCallback(oe=>{oe.key==="Enter"?(te()&&o.apply(),oe.stopPropagation()):oe.key==="Escape"&&(U(!1),oe.currentTarget.focus(),oe.currentTarget.blur(),oe.stopPropagation())},[te,U,o]),ge=S.useMemo(()=>({open:ne,close:ie,toggle:be,validate:te}),[ne,ie,be,te]),Ee=S.useCallback(()=>{o.clear()},[o]),Be=S.useCallback(oe=>{if(!v||!oe)return;A(oe);const ve={...g};lr.keys(ve).forEach(we=>{if(we!==oe&&ve[we])switch(ve[we].type){case"String":ve[we].value="";break;case"Select":ve[we].value=null;break;case"Date":ve[we].value=void 0;break;case"DateRange":ve[we].value=void 0;break}}),m([]),v(ve),o.clear(),setTimeout(()=>{var Oe;const we=(Oe=G.current)==null?void 0:Oe.querySelector("input");we&&we.focus()},0)},[g,v,m,o]);return I?C.jsxs(C.Fragment,{children:[w&&C.jsx(zl,{isAutoWidth:!0,className:Ke.clsx(Or.SelectFilter),options:T,type:"Secondary",useSelect:[_,Be],OptionRenderer:({option:oe})=>{const ve=e[oe];let we;if(ve!=null&&ve.hContent){const Oe={defKey:oe,def:ve};we=typeof ve.hContent=="function"?ve.hContent(Oe):ve.hContent}else{const Oe=g[oe],Se=(ve==null?void 0:ve.name)||(Oe==null?void 0:Oe.placeholder)||String(oe);we=C.jsx("span",{children:Se})}return we}}),C.jsxs("div",{ref:G,className:Ke.clsx(Or.Filter),tabIndex:-1,style:{minWidth:i?a?180:void 0:180,maxWidth:i?a?300:void 0:300},onKeyDown:de,onClick:oe=>{oe.preventDefault(),oe.stopPropagation()},children:[C.jsx(t9,{errorMessage:F,filterF:o,filterSet:I,hasSelectFilterType:w,hasSubFilters:j,hasToggleFilteration:n,isOpen:P,placeholder:f,popupF:ge,resources:u,onChange:R}),!w&&C.jsx(r9,{errorMessages:z,filterF:o,isOpen:P,isTransitioning:V,placeholder:f,resources:u,subFilterSets:B,validate:te,onChange:R,onClearClick:Ee,onTransitionEnd:Q})]})]}):null},t9=r=>{var g,v,w,T;const{filterSet:e,hasToggleFilteration:t,hasSelectFilterType:n,onChange:o,filterF:i,hasSubFilters:a,popupF:c,isOpen:u,resources:f,errorMessage:p,placeholder:m}=r;if(e.filter.type==="String"){const _=[e.filter.value??"",I=>o(e.filter,I)],A=m??e.filter.placeholder??((g=e.def)==null?void 0:g.name),R=e.filter.icon,O=e.filter.iconTooltip??A;return C.jsxs("div",{className:Ke.clsx(Or.MainFilter,u&&Or.IsOpen),children:[C.jsx(Ya,{icon:R??"Type",isOpen:u,tooltip:O}),C.jsx(Gc,{autoFocus:e.filter.autoFocus,className:Ke.clsx(Or.Input,Or.Main),dataList:e.filter.dataList,LeftAddon:t&&C.jsx(dp,{isOpen:u,filterF:i,popupF:c,resources:f}),maxLength:e.filter.maxLength,placeholder:A??f["Search(Placeholder)"],type:p?"Error":"Primary",useValue:_,wrapProps:{style:{width:"100%",boxSizing:"border-box"}},RightAddon:C.jsx(fp,{errorMessage:p,filterF:i,hasSelectFilterType:n,hasSubFilters:a,isOpen:u,popupF:c,resources:f})})]})}else if(e.filter.type==="Select"){const _=[e.filter.value??null,I=>{o(e.filter,I),n&&setTimeout(()=>{c.validate()&&i.apply()},0)}],A=m??e.filter.placeholder??((v=e.def)==null?void 0:v.name),R=e.filter.icon,O=e.filter.iconTooltip??A;return C.jsxs("div",{className:Ke.clsx(Or.MainFilter,u&&Or.IsOpen),children:[C.jsx(Ya,{icon:R??"Menu",isOpen:u,tooltip:O}),C.jsx(zl,{className:Ke.clsx(Or.Input,Or.Main),OptionRenderer:e.filter.OptionRenderer,options:e.filter.options,placeholder:A,useSelect:_,SelectedRenderer:({OptionRenderer:I,selectedOption:F})=>F===null?A||e.filter.placeholder:C.jsxs(C.Fragment,{children:[t&&C.jsx(dp,{isOpen:u,filterF:i,popupF:c,resources:f}),C.jsx(I,{option:F}),C.jsx(fp,{filterF:i,hasSelectFilterType:n,hasSubFilters:a,hideSearchButton:!0,isOpen:u,popupF:c,resources:f})]})})]})}else if(e.filter.type==="Date"){const _=[e.filter.value,I=>o(e.filter,I)],A=m??e.filter.placeholder??((w=e.def)==null?void 0:w.name),R=e.filter.icon,O=e.filter.iconTooltip??A;return C.jsxs("div",{className:Ke.clsx(Or.MainFilter,u&&Or.IsOpen),children:[C.jsx(Ya,{icon:R??"CalendarDay",isOpen:u,tooltip:O}),C.jsx(Rv,{className:Ke.clsx(Or.DatePicker,Or.Input,Or.Main),maxDate:e.filter.maxDate,minDate:e.filter.minDate,placeholder:A,type:"Raw",useDate:_,LeftAddon:C.jsxs(C.Fragment,{children:[t&&C.jsx(dp,{isOpen:u,filterF:i,popupF:c,resources:f}),!t&&C.jsx(zn,{w:u?0:6}),C.jsx(Ya,{icon:R??"CalendarDay",isOpen:!u,tooltip:O}),C.jsx(zn,{w:u?8:0})]}),RightAddon:C.jsx(fp,{filterF:i,hasSelectFilterType:n,hasSubFilters:a,isOpen:u,popupF:c,resources:f})})]})}else if(e.filter.type==="DateRange"){const _=[e.filter.value,F=>o(e.filter,F)],{noDefaultChoices:A}=e.filter,R=m??e.filter.placeholder??((T=e.def)==null?void 0:T.name),O=e.filter.icon,I=e.filter.iconTooltip??R;return C.jsxs("div",{className:Ke.clsx(Or.MainFilter,u&&Or.IsOpen),children:[C.jsx(Ya,{icon:O??"CalendarDay",isOpen:u,tooltip:I}),C.jsx(Ev,{className:Ke.clsx(Or.DatePicker,Or.Input,Or.Main),maxDate:e.filter.maxDate,minDate:e.filter.minDate,noDefaultChoices:A,placeholder:R,type:"Raw",useDateRange:_,LeftAddon:C.jsxs(C.Fragment,{children:[t&&C.jsx(dp,{isOpen:u,filterF:i,popupF:c,resources:f}),!t&&C.jsx(zn,{w:u?0:6}),C.jsx(Ya,{icon:O??"CalendarDay",isOpen:!u,tooltip:I}),C.jsx(zn,{w:u?8:0})]}),RightAddon:C.jsx(fp,{filterF:i,hasSelectFilterType:n,hasSubFilters:a,isOpen:u,popupF:c,resources:f})})]})}return null},dp=r=>{const{filterF:e,popupF:t,resources:n,isOpen:o}=r;return C.jsx(ho,{className:Or.Icon,icon:"Convert",style:{width:o?0:24,marginLeft:o?0:8},tooltip:n["Toggle Filter"],type:"Raw",onMouseDown:i=>i.currentTarget.classList.remove(Or.Rotate),onClick:i=>{i.currentTarget.classList.add(Or.Rotate),e.toggle(),t.close(),i.stopPropagation()}})},fp=r=>{const{hasSubFilters:e,popupF:t,isOpen:n,resources:o,errorMessage:i,hideSearchButton:a,hasSelectFilterType:c,filterF:u}=r,f=S.useCallback(g=>{g.stopPropagation(),t.open()},[t]),p=S.useCallback(g=>{g.stopPropagation(),t.close()},[t]),m=S.useCallback(g=>{g.stopPropagation(),t.validate()&&u.apply()},[t,u]);return C.jsxs(S.Fragment,{children:[i&&C.jsx(ho,{className:Or.CircleAlertOutline,icon:"CircleAlertOutline",iconSize:"xs",tooltip:i,type:"Raw"}),e&&!c&&C.jsx(ho,{className:Or.Icon,icon:"ListAdd",type:"Raw",style:{opacity:+!n,visibility:+!n?"visible":"hidden",marginRight:-24,pointerEvents:n?"none":void 0},onClick:f}),e&&!c&&C.jsx(ho,{className:Or.Icon,icon:"ListRemove",type:"Raw",style:{opacity:+n,visibility:+n?"visible":"hidden",marginRight:n?-24:0,pointerEvents:n?void 0:"none"},onClick:p}),!a&&C.jsx(ho,{className:Or.Icon,icon:"Search",tooltip:o["Search(Button)"],type:"Raw",style:{opacity:+!n,visibility:+!n?"visible":"hidden",pointerEvents:n?"none":void 0,marginRight:4},onClick:m})]})},r9=r=>{const{subFilterSets:e,onChange:t,onClearClick:n,isOpen:o,isTransitioning:i,onTransitionEnd:a,resources:c,errorMessages:u,placeholder:f,filterF:p,validate:m}=r;return!o&&!i?null:C.jsxs("div",{className:Or.SubFilters,style:{opacity:+o,visibility:+o?"visible":"hidden"},onTransitionEnd:a,children:[e.map((g,v)=>{var w,T,_,A;if(g.filter.type==="String"){const R=[g.filter.value??"",z=>t(g.filter,z,v)],O=u[v],I=f??g.filter.placeholder??((w=g.def)==null?void 0:w.name),F=g.filter.icon,B=g.filter.iconTooltip??I;return C.jsxs(kn,{style:{marginBottom:6},children:[C.jsx(Ya,{icon:F??"Type",tooltip:B}),C.jsx(Gc,{autoFocus:g.filter.autoFocus,className:Ke.clsx(Or.Input,Or.Sub),dataList:g.filter.dataList,maxLength:g.filter.maxLength,placeholder:I??c["Search(Placeholder)"],type:O?"Error":"Secondary",useValue:R,wrapProps:{style:{width:"100%"}},RightAddon:O&&C.jsx(ho,{className:Or.CircleAlertOutline,icon:"CircleAlertOutline",iconSize:"xs",tooltip:O,type:"Raw"})}),C.jsx(zn,{h:8})]},v)}else if(g.filter.type==="Select"){const R=[g.filter.value??null,B=>t(g.filter,B)],O=f??g.filter.placeholder??((T=g.def)==null?void 0:T.name),I=g.filter.icon,F=g.filter.iconTooltip??O;return C.jsxs(kn,{style:{marginBottom:6},children:[C.jsx(Ya,{icon:I??"Menu",tooltip:F}),C.jsx(zl,{arrowProps:{style:{marginRight:4}},className:Ke.clsx(Or.Input,Or.Sub),OptionRenderer:g.filter.OptionRenderer,options:g.filter.options,placeholder:O,type:"Secondary",useSelect:R}),C.jsx(zn,{h:8})]},v)}else if(g.filter.type==="Date"){const R=[g.filter.value,B=>t(g.filter,B)],O=f??g.filter.placeholder??((_=g.def)==null?void 0:_.name),I=g.filter.icon,F=g.filter.iconTooltip??O;return C.jsxs(kn,{style:{marginBottom:6},children:[C.jsx(Ya,{icon:I??"CalendarDay",tooltip:F}),C.jsx(Rv,{className:Ke.clsx(Or.DatePicker,Or.Input,Or.Sub),LeftAddon:C.jsx(zn,{w:12}),maxDate:g.filter.maxDate,minDate:g.filter.minDate,placeholder:O,type:"Raw",useDate:R}),C.jsx(zn,{h:8})]},v)}else if(g.filter.type==="DateRange"){const R=[g.filter.value,z=>t(g.filter,z)],{noDefaultChoices:O}=g.filter,I=f??g.filter.placeholder??((A=g.def)==null?void 0:A.name),F=g.filter.icon,B=g.filter.iconTooltip??I;return C.jsxs(kn,{style:{marginBottom:6},children:[C.jsx(Ya,{icon:F??"CalendarDay",tooltip:B}),C.jsx(Ev,{className:Ke.clsx(Or.DatePicker,Or.Input,Or.Sub),LeftAddon:C.jsx(zn,{w:12}),maxDate:g.filter.maxDate,minDate:g.filter.minDate,noDefaultChoices:O,placeholder:I,type:"Raw",useDateRange:R})]},v)}else return null}),C.jsxs(kn,{className:Or.Actions,children:[C.jsx(Go,{type:"Secondary",onClick:n,children:c["Clear(Button)"]}),C.jsx(Go,{onClick:()=>{m()&&p.apply()},children:c["Search(Button)"]})]})]})},Ya=r=>{const{icon:e,tooltip:t,isOpen:n=!0}=r;return C.jsx(ho,{className:Or.LeftIcon,icon:e,tooltip:t,type:"Raw",style:{width:n?24:0,marginRight:n?4:0,opacity:+n}})},n9="_ATableHeader_1hzfz_1",o9="_LeftHeaderContent_1hzfz_11",i9="_RightHeaderContent_1hzfz_19",s9="_TopRightAddon_1hzfz_27",a9="_HItem_1hzfz_32",Pu={ATableHeader:n9,LeftHeaderContent:o9,RightHeaderContent:i9,TopRightAddon:s9,HItem:a9},l9=r=>{const{defs:e,title:t,totalCount:n,useCheck:o,useFilteration:i,hasToggleFilteration:a,filterF:c,noFilter:u,noCount:f,isFiltered:p,TopLeftAddon:m,TopRightAddon:g,useSortation:v,resources:w=wr.ATable,filterType:T,placeholder:_}=r,[A]=S.useMemo(()=>o||[],[o]),R=S.useMemo(()=>p?w["Searched n items"](n):w["Total n items"](n),[w,p,n]),[O]=i,[I,F]=v,[B,z]=S.useState(!1),j=S.useMemo(()=>{const se=lr.values(O).filter(te=>te.type==="DateRange"),ne=lr.keys(O).filter(te=>se.includes(O[te])),be=lr.keys(e).filter(te=>e[te].isSortable);return ne.length>0?(ne.length>1&&z(!0),be.map(de=>ne.includes(de)?[de+"_Asc",de+"_Desc"]:de).flat()):be},[e,O]),V=S.useMemo(()=>r.isRowRendered&&j.length>0,[j.length,r.isRowRendered]),ue=S.useCallback((se,ne)=>{F&&(I==null?void 0:I.defKey)===se&&(I.isAsc===!0?F({defKey:se,isAsc:!1,sortF:ne}):F({defKey:se,isAsc:!0,sortF:ne}))},[I,F]),P=S.useRef(),[U,G]=S.useState(),[Q,re]=S.useState(I?I.defKey:j[0]),ie=S.useMemo(()=>{if(!U)return{};const se=e[U];return{SortUp:{onClick:()=>{F==null||F({defKey:U,isAsc:!0,sortF:se.sortF}),re(U)},content:()=>w["Sort up"]},SortDown:{onClick:()=>{F==null||F({defKey:U,isAsc:!1,sortF:se.sortF}),re(U)},content:()=>w["Sort down"]}}},[F,U,e,w]);return C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:Ke.clsx(Pu.ATableHeader),children:[C.jsxs("div",{className:Ke.clsx(Pu.LeftHeaderContent,"NoSelect"),children:[C.jsxs(kn,{style:{marginBottom:V?8:0},children:[m&&C.jsx("div",{className:Ke.clsx(Pu.HItem),children:m}),t&&C.jsx("div",{className:Ke.clsx(Pu.HItem),style:{whiteSpace:"nowrap"},children:t}),!f&&C.jsxs("div",{className:Ke.clsx(Pu.HItem),style:{maxHeight:14,...V&&{minHeight:14,color:"var(--label-neutral)"}},children:[R,A&&A.length>0&&C.jsxs(C.Fragment,{children:[" / ",w["Checked n items"](A.length)]})]})]}),V&&C.jsx(bC,{options:j,optionWidth:"fit-content",tabProps:{style:{marginRight:8}},type:"Tertiary",useSelect:[Q,()=>{}],optionProps:{style:{cursor:"default"},onClick:se=>{var te;const ne=se.currentTarget.textContent;if(ne===w[ne])return;se.currentTarget.querySelector("svg")===null&&((te=P.current)==null||te.open(se.currentTarget))}},OptionRenderer:se=>{const ne=/_Asc|_Desc/.test(se.option),be=(I==null?void 0:I.defKey)===se.option,te=Q===se.option,de=I==null?void 0:I.isAsc,ge=()=>{if(ne){G(void 0),re(se.option);const[oe,ve]=se.option.split("_"),we=ve==="Asc";F==null||F({defKey:oe,isAsc:we,sortF:e[oe].sortF})}else te?ue(se.option,e[se.option].sortF):G(se.option)},Be=ne?(oe=>{const[ve,we]=oe.split("_");return(B?ve+" ":"")+w[we]})(se.option):w["Sort by x"](se.option);return C.jsxs(kn,{className:Ke.clsx(!(ne&&te)&&"IsClickable"),style:{height:"100%"},onClick:ge,children:[Be,te&&!ne&&C.jsx(en,{icon:be?de?"RowSortUp":"RowSortDown":"RowSortBoth",style:{marginRight:-5,marginLeft:4}})]},se.option)}})]}),C.jsx(Xu,{}),C.jsxs("div",{className:Ke.clsx(Pu.RightHeaderContent,"NoSelect"),children:[!u&&C.jsx(e9,{defs:e,filterF:c,filterType:T,hasToggleFilteration:a,isFilterSort:j.length>0,isRowRendered:r.isRowRendered,placeholder:_,resources:w,useFilteration:i}),g&&C.jsx(kn,{children:g,className:Ke.clsx(Pu.TopRightAddon)})]})]}),C.jsx(mC,{actionRef:P,defs:ie,position:bf.S,width:100,onClose:()=>G(void 0)})]})},c9=r=>{const{defs:e,pk:t,defaultDef:n,rProps:o,useSelect:i,isSelectMulti:a,selectDisabled:c,useCheck:u,checkDisabled:f,isLoading:p,isDisabled:m,title:g,entireItems:v,onStateChange:w,pagedItems:T,totalCount:_,useFilteration:A,useToggleFilteration:R,filterType:O="Default",placeholder:I,rowHeight:F=40,usePagination:B,useSortation:z,showRows:j,noHeader:V,noDefHeader:ue,noFooter:P,noFilter:U,noCount:G,noMarking:Q,noStateChangeOnMount:re,TopLeftAddon:ie,TopRightAddon:se,actionRef:ne,RowRenderer:be,resources:te}=r,de=S.useMemo(()=>({...wr.ATable,...te}),[te]),ge=S.useCallback((Me,tt)=>t!==void 0?Array.isArray(t)?t.every(Re=>Za.isEqual(Me[Re],tt[Re])):Za.isEqual(Me[t],tt[t]):Za.isEqual(Me,tt),[t]),Ee=S.useMemo(()=>({content:u9,...n}),[n]),Be=S.useMemo(()=>{const Me={};return lr.keys(e).forEach(tt=>{const Re=e[tt],it={...Ee,...Re};Me[tt]=it}),Me},[Ee,e]),[oe,ve]=vn(Za.cloneDeep(A),{"":{type:"String",placeholder:de["Search(Placeholder)"],value:""}}),[we,Oe]=vn(Za.cloneDeep(R),void 0),[Se,Ae]=S.useState(!1),[Ie,Ye]=S.useMemo(()=>Se&&we?[we,Oe]:[oe,ve],[oe,Se,ve,Oe,we]),[Ne,We]=S.useState(Ie),Ve=S.useMemo(()=>v?Bl.applyFilteration(v,Be,Ne):[],[v,Be,Ne]),Ce=S.useMemo(()=>{for(const Me in Ne){const tt=Ne[Me];if(tt.value!==void 0&&tt.value!==null&&tt.value!=="")return!0}return!1},[Ne]),[Pe,He]=vn(z,void 0),Je=S.useMemo(()=>Bl.applySortation(Ve,Be,Pe),[Ve,Be,Pe]),wt=S.useMemo(()=>{if(T!==void 0)return Bl.applySortation(T,Be,Pe)},[T,Be,Pe]),[Xe,Qe]=vn(B,{page:1,pageSize:50,pageRange:10}),dt=S.useMemo(()=>({pageSize:50,page:1,pageRange:10,...Xe}),[Xe]),{pagedItems:mt,totalCount:Fe,pagination:rt}=S.useMemo(()=>{const Me={...dt};if(wt!==void 0){let tt=_??wt.length;const Re=Bl.getPages(tt,Me.pageSize);return Me.page>Re.length?Me.page=Re.length:Me.page<1&&(Me.page=1),{pagedItems:wt,totalCount:tt,pagination:Me}}else if(v!==void 0){const tt=_??Je.length,Re=Bl.getPages(tt,Me.pageSize);return Me.page>Re.length?Me.page=Re.length:Me.page<1&&(Me.page=1),{pagedItems:Bl.applyPagination(Je,Me.page,Me.pageSize),totalCount:tt,pagination:Me}}else return{pagedItems:[],totalCount:_??0,pagination:dt}},[v,wt,_,dt,Je]),{pages:At,rangedPages:Nt}=S.useMemo(()=>Bl.getRangedPages(rt.page,Fe,rt.pageSize,rt.pageRange),[Fe,rt.pageSize,rt.page,rt.pageRange]),[kt,Dt]=S.useMemo(()=>u??[],[u]),Jt=S.useMemo(()=>mt.filter(Me=>kt==null?void 0:kt.some(tt=>ge(tt,Me))),[mt,kt,ge]),or=S.useMemo(()=>mt.filter(Me=>!(f!=null&&f(Me))),[mt,f]),ar=S.useMemo(()=>or.length>0&&or.every(Me=>Jt.some(tt=>ge(tt,Me))),[Jt,or,ge]),tr=S.useMemo(()=>ar?!1:or.some(Me=>Jt.some(tt=>ge(tt,Me))),[Jt,or,ar,ge]),dr=S.useCallback(()=>{!kt||!Dt||m||Dt(ar||tr?kt.filter(Me=>!or.some(tt=>ge(tt,Me))):[...kt,...or])},[kt,Dt,ar,tr,or,m,ge]),ke=S.useCallback(Me=>{!kt||!Dt||m||(kt.some(tt=>ge(tt,Me))?Dt(kt.filter(tt=>!ge(tt,Me))):Dt([...kt,Me]))},[kt,Dt,m,ge]);S.useEffect(()=>{if(!Dt||!kt||!f)return;kt.filter(tt=>f(tt)).length>0&&Dt(kt.filter(tt=>!f(tt)))},[f,kt,Dt]);const ae=S.useMemo(()=>({hContent:kt&&C.jsx(af,{isIndeterminate:tr,useCheck:[ar,dr]}),content:Me=>{const{item:tt}=Me,Re=f==null?void 0:f(tt),it=typeof Re=="string"?Re:void 0,ht=kt==null?void 0:kt.some(Bt=>ge(Bt,tt));return C.jsx(af,{isDisabled:Re,style:{zIndex:1},tooltip:it,useCheck:[ht,()=>ke(tt)],onClick:Bt=>Bt.stopPropagation()})},minWidth:32,maxWidth:32}),[kt,ar,tr,ge,dr,f,ke]),st=S.useMemo(()=>u?{checkDef:ae,...Be}:Be,[Be,ae,u]),[vt,Ht]=S.useState(!1),Pt=S.useMemo(()=>p??vt,[p,vt]),Et=S.useCallback(async Me=>{w&&(Ht(!0),await w(Me),Ht(!1)),Qe==null||Qe(Me.pagination),He==null||He(Me.sortation),We(Me.filteration)},[w,Qe,He]);S.useEffect(()=>{if(!ne)return;const Me=Re=>{const it={entireItems:v,filteration:Ie,pagination:rt,sortation:Pe},ht=Re?Re(it):it;Et(ht)},tt=Re=>{const it={...rt,page:1},ht=Re?Re(Ie):Ie;Et({entireItems:v,filteration:ht,pagination:it,sortation:Pe}),Ye==null||Ye(ht)};ne.current={fireOnStateChange:Me,applyFilteration:tt}},[ne,Et,v,Ye,Ie,rt,Pe]);const jt=S.useCallback(Me=>{Me.page===rt.page&&Me.pageSize===rt.pageSize||(Me.page<1?Me.page=1:Me.page>At[At.length-1]&&(Me.page=At[At.length-1]),Et({entireItems:v,filteration:Ne,pagination:Me,sortation:Pe}))},[rt,At,Et,v,Ne,Pe]),Ze=S.useCallback(Me=>{Ye&&Ye(Me)},[Ye]),ct=S.useCallback(Me=>{Et({entireItems:v,filteration:Ne,pagination:rt,sortation:Me})},[Et,v,Ne,rt]),ft=S.useCallback(Me=>{jt({...rt,page:Me})},[jt,rt]),Ct=S.useCallback(()=>{ft(rt.page-1)},[ft,rt.page]),Ot=S.useCallback(()=>{ft(rt.page+1)},[ft,rt.page]),at=S.useCallback(()=>{ft(1)},[ft]),St=S.useCallback(()=>{ft(At[At.length-1])},[ft,At]),Ft=S.useMemo(()=>({move:ft,movePrev:Ct,moveNext:Ot,moveFirst:at,moveLast:St}),[ft,Ct,Ot,at,St]),Qt=S.useCallback(()=>{const Me={...rt,page:1};Et({entireItems:v,filteration:Ie,pagination:Me,sortation:Pe})},[Ie,rt,Et,v,Pe]),$t=S.useCallback(()=>{Ae(!Se)},[Se]),vr=S.useCallback(()=>{Se&&we?Oe==null||Oe(k0(we)):Ye==null||Ye(k0(oe))},[Se,we,Oe,oe,Ye]),Br=S.useMemo(()=>({apply:Qt,toggle:$t,clear:vr}),[Qt,$t,vr]);xC(()=>{re||Et({entireItems:v,filteration:Ie,pagination:rt,sortation:Pe})});const pr=S.useMemo(()=>lr.map(Be,([tt])=>Be[tt].minWidth??Fc).reduce((tt,Re)=>tt+Re,0),[Be]),he=S.useMemo(()=>be!==void 0,[be]);return C.jsxs(Yr,{className:f8.ATable,isDisabled:m,style:{minWidth:pr},children:[!V&&C.jsx(l9,{defs:Be,filterF:Br,filterType:O,hasToggleFilteration:we!==void 0,isFiltered:Ce,isRowRendered:he,noCount:G,noFilter:U,placeholder:I,resources:de,title:g,TopLeftAddon:ie,TopRightAddon:se,totalCount:Fe,useCheck:u&&kt?[kt,Dt]:void 0,useFilteration:[Ie,Ze],useSortation:[Pe,ct]}),C.jsx(L8,{appliedFilteration:Ne,defs:st,isEqual:ge,isLoading:Pt,isRowRendered:he,isSelectMulti:a,isTableDisabled:m,noDefHeader:ue,noMarking:Q,pagedItems:mt,pagination:rt,resources:de,rowHeight:F,RowRenderer:be,rProps:o,selectDisabled:c,showRows:j,useSelect:i,useSortation:[Pe,ct]}),!P&&C.jsx(z8,{pageF:Ft,pages:At,pagination:rt,rangedPages:Nt})]})},u9=r=>{const{defKey:e,item:t}=r;if(lr.hasKey(t,e)){const n=t[e];return lr.isReactNode(n)?n:null}else return null};function k0(r){const e={...r};for(const t in e)e[t].value=void 0;return e}const d9="_AText_1asz6_1",f9={AText:d9},_C=r=>{const{text:e,styled:t,style:n}=r,o=S.useMemo(()=>{if(e)if(t)if(n){if(t===!0)return n==="bold"?C.jsx("b",{children:e}):C.jsx("span",{style:n,children:e});if(typeof t=="string"){const i=e.split(t);return n==="bold"?i.map((a,c)=>C.jsxs(S.Fragment,{children:[hp(a),c<i.length-1?C.jsx("b",{children:hp(t)}):""]},c)):i.map((a,c)=>C.jsxs(S.Fragment,{children:[hp(a),c<i.length-1&&C.jsx("span",{style:n,children:hp(t)})]},c))}}else return e;else return e;else return""},[e,n,t]);return C.jsx("div",{className:Ke.clsx("Body1Reading",f9.AText,"NoSelect"),children:o})};function hp(r){const e=r.split(`
167
167
  `);return e.map((t,n)=>C.jsxs(S.Fragment,{children:[t,n!==e.length-1&&C.jsx("br",{})]},n))}const h9="_Base_cpm4t_7",p9="_ATextArea_cpm4t_11",g9="_Primary_cpm4t_34",m9="_UnAvailable_cpm4t_39",v9="_Secondary_cpm4t_47",y9="_ReadOnly_cpm4t_59",pp={Base:h9,ATextArea:p9,Primary:g9,UnAvailable:m9,Secondary:v9,ReadOnly:y9,Error:"_Error_cpm4t_66"},b9=["Primary","Secondary","ReadOnly","Error"],x9=r=>{const{onEnterPress:e,errorMessage:t,type:n="Primary",textAreaRef:o,useValue:i,rows:a,isReadonly:c,placeholder:u,maxLength:f,tabIndex:p,autoFocus:m,textAreaProps:g,...v}=r,[{wrapId:w,wrapProps:T,labelProps:_,...A},R]=Ku(v),O=S.useMemo(()=>w9(t)?"Error":n,[t,n]),I=S.useMemo(()=>O==="ReadOnly"?!0:c,[O,c]),F=S.useMemo(()=>R.isDisabled||R.isLoading,[R.isDisabled,R.isLoading]),[B,z]=vn(i,""),j=S.useCallback(P=>{z&&z(P)},[z]),V=S.useCallback(P=>{var U;F||(j(P.target.value),(U=g==null?void 0:g.onChange)==null||U.call(g,P))},[F,j,g]),ue=S.useCallback(P=>{var U;if(!F){if((U=g==null?void 0:g.onKeyDown)==null||U.call(g,P),P.key==="Tab"){const G=P.currentTarget.selectionStart,Q=P.currentTarget.selectionEnd;P.currentTarget.value=P.currentTarget.value.substring(0,G)+" "+P.currentTarget.value.substring(Q),P.currentTarget.selectionStart=P.currentTarget.selectionEnd=G+1,P.preventDefault()}else P.key==="Enter"&&(e==null||e(P.currentTarget.value),P.stopPropagation());P.key!=="Escape"&&P.stopPropagation()}},[F,e,g]);return C.jsx(Vc,{wrapId:w,wrapProps:T,labelProps:_,...A,children:C.jsx(Yr,{...R,className:Ke.clsx(pp.Base,R.className),children:C.jsx("textarea",{...g,ref:o,autoFocus:m,className:Ke.clsx(pp.ATextArea,pp[O],F&&pp.UnAvailable,g==null?void 0:g.className),maxLength:f,placeholder:u,readOnly:I,rows:a,tabIndex:R.isDisabled||R.isLoading?-1:p,value:B,onChange:V,onKeyDown:ue})})})};function w9(r){return Array.isArray(r)?r.filter(Boolean).length>0:!!r}/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:AC,setPrototypeOf:I0,isFrozen:C9,getPrototypeOf:S9,getOwnPropertyDescriptor:_9}=Object;let{freeze:mi,seal:Os,create:EC}=Object,{apply:N1,construct:P1}=typeof Reflect<"u"&&Reflect;mi||(mi=function(e){return e});Os||(Os=function(e){return e});N1||(N1=function(e,t,n){return e.apply(t,n)});P1||(P1=function(e,t){return new e(...t)});const gp=vi(Array.prototype.forEach),A9=vi(Array.prototype.lastIndexOf),M0=vi(Array.prototype.pop),Kf=vi(Array.prototype.push),E9=vi(Array.prototype.splice),Hp=vi(String.prototype.toLowerCase),pm=vi(String.prototype.toString),L0=vi(String.prototype.match),Xf=vi(String.prototype.replace),T9=vi(String.prototype.indexOf),R9=vi(String.prototype.trim),aa=vi(Object.prototype.hasOwnProperty),pi=vi(RegExp.prototype.test),Jf=k9(TypeError);function vi(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return N1(r,e,n)}}function k9(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return P1(r,t)}}function Wr(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Hp;I0&&I0(r,null);let n=e.length;for(;n--;){let o=e[n];if(typeof o=="string"){const i=t(o);i!==o&&(C9(e)||(e[n]=i),o=i)}r[o]=!0}return r}function I9(r){for(let e=0;e<r.length;e++)aa(r,e)||(r[e]=null);return r}function Pl(r){const e=EC(null);for(const[t,n]of AC(r))aa(r,t)&&(Array.isArray(n)?e[t]=I9(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=Pl(n):e[t]=n);return e}function Qf(r,e){for(;r!==null;){const n=_9(r,e);if(n){if(n.get)return vi(n.get);if(typeof n.value=="function")return vi(n.value)}r=S9(r)}function t(){return null}return t}const D0=mi(["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","section","select","shadow","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"]),gm=mi(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),mm=mi(["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"]),M9=mi(["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"]),vm=mi(["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"]),L9=mi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),O0=mi(["#text"]),N0=mi(["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","face","for","headers","height","hidden","high","href","hreflang","id","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","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),ym=mi(["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","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"]),P0=mi(["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"]),mp=mi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),D9=Os(/\{\{[\w\W]*|[\w\W]*\}\}/gm),O9=Os(/<%[\w\W]*|[\w\W]*%>/gm),N9=Os(/\$\{[\w\W]*/gm),P9=Os(/^data-[\-\w.\u00B7-\uFFFF]+$/),B9=Os(/^aria-[\-\w]+$/),TC=Os(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),F9=Os(/^(?:\w+script|data):/i),j9=Os(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),RC=Os(/^html$/i),z9=Os(/^[a-z][.\w]*(-[.\w]+)+$/i);var B0=Object.freeze({__proto__:null,ARIA_ATTR:B9,ATTR_WHITESPACE:j9,CUSTOM_ELEMENT:z9,DATA_ATTR:P9,DOCTYPE_NAME:RC,ERB_EXPR:O9,IS_ALLOWED_URI:TC,IS_SCRIPT_OR_DATA:F9,MUSTACHE_EXPR:D9,TMPLIT_EXPR:N9});const eh={element:1,text:3,progressingInstruction:7,comment:8,document:9},H9=function(){return typeof window>"u"?null:window},$9=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},F0=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function kC(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:H9();const e=It=>kC(It);if(e.version="3.2.6",e.removed=[],!r||!r.document||r.document.nodeType!==eh.document||!r.Element)return e.isSupported=!1,e;let{document:t}=r;const n=t,o=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:c,Element:u,NodeFilter:f,NamedNodeMap:p=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:m,DOMParser:g,trustedTypes:v}=r,w=u.prototype,T=Qf(w,"cloneNode"),_=Qf(w,"remove"),A=Qf(w,"nextSibling"),R=Qf(w,"childNodes"),O=Qf(w,"parentNode");if(typeof a=="function"){const It=t.createElement("template");It.content&&It.content.ownerDocument&&(t=It.content.ownerDocument)}let I,F="";const{implementation:B,createNodeIterator:z,createDocumentFragment:j,getElementsByTagName:V}=t,{importNode:ue}=n;let P=F0();e.isSupported=typeof AC=="function"&&typeof O=="function"&&B&&B.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:U,ERB_EXPR:G,TMPLIT_EXPR:Q,DATA_ATTR:re,ARIA_ATTR:ie,IS_SCRIPT_OR_DATA:se,ATTR_WHITESPACE:ne,CUSTOM_ELEMENT:be}=B0;let{IS_ALLOWED_URI:te}=B0,de=null;const ge=Wr({},[...D0,...gm,...mm,...vm,...O0]);let Ee=null;const Be=Wr({},[...N0,...ym,...P0,...mp]);let oe=Object.seal(EC(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}})),ve=null,we=null,Oe=!0,Se=!0,Ae=!1,Ie=!0,Ye=!1,Ne=!0,We=!1,Ve=!1,Ce=!1,Pe=!1,He=!1,Je=!1,wt=!0,Xe=!1;const Qe="user-content-";let dt=!0,mt=!1,Fe={},rt=null;const At=Wr({},["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 Nt=null;const kt=Wr({},["audio","video","img","source","image","track"]);let Dt=null;const Jt=Wr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),or="http://www.w3.org/1998/Math/MathML",ar="http://www.w3.org/2000/svg",tr="http://www.w3.org/1999/xhtml";let dr=tr,ke=!1,ae=null;const st=Wr({},[or,ar,tr],pm);let vt=Wr({},["mi","mo","mn","ms","mtext"]),Ht=Wr({},["annotation-xml"]);const Pt=Wr({},["title","style","font","a","script"]);let Et=null;const jt=["application/xhtml+xml","text/html"],Ze="text/html";let ct=null,ft=null;const Ct=t.createElement("form"),Ot=function(pe){return pe instanceof RegExp||pe instanceof Function},at=function(){let pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ft&&ft===pe)){if((!pe||typeof pe!="object")&&(pe={}),pe=Pl(pe),Et=jt.indexOf(pe.PARSER_MEDIA_TYPE)===-1?Ze:pe.PARSER_MEDIA_TYPE,ct=Et==="application/xhtml+xml"?pm:Hp,de=aa(pe,"ALLOWED_TAGS")?Wr({},pe.ALLOWED_TAGS,ct):ge,Ee=aa(pe,"ALLOWED_ATTR")?Wr({},pe.ALLOWED_ATTR,ct):Be,ae=aa(pe,"ALLOWED_NAMESPACES")?Wr({},pe.ALLOWED_NAMESPACES,pm):st,Dt=aa(pe,"ADD_URI_SAFE_ATTR")?Wr(Pl(Jt),pe.ADD_URI_SAFE_ATTR,ct):Jt,Nt=aa(pe,"ADD_DATA_URI_TAGS")?Wr(Pl(kt),pe.ADD_DATA_URI_TAGS,ct):kt,rt=aa(pe,"FORBID_CONTENTS")?Wr({},pe.FORBID_CONTENTS,ct):At,ve=aa(pe,"FORBID_TAGS")?Wr({},pe.FORBID_TAGS,ct):Pl({}),we=aa(pe,"FORBID_ATTR")?Wr({},pe.FORBID_ATTR,ct):Pl({}),Fe=aa(pe,"USE_PROFILES")?pe.USE_PROFILES:!1,Oe=pe.ALLOW_ARIA_ATTR!==!1,Se=pe.ALLOW_DATA_ATTR!==!1,Ae=pe.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=pe.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ye=pe.SAFE_FOR_TEMPLATES||!1,Ne=pe.SAFE_FOR_XML!==!1,We=pe.WHOLE_DOCUMENT||!1,Pe=pe.RETURN_DOM||!1,He=pe.RETURN_DOM_FRAGMENT||!1,Je=pe.RETURN_TRUSTED_TYPE||!1,Ce=pe.FORCE_BODY||!1,wt=pe.SANITIZE_DOM!==!1,Xe=pe.SANITIZE_NAMED_PROPS||!1,dt=pe.KEEP_CONTENT!==!1,mt=pe.IN_PLACE||!1,te=pe.ALLOWED_URI_REGEXP||TC,dr=pe.NAMESPACE||tr,vt=pe.MATHML_TEXT_INTEGRATION_POINTS||vt,Ht=pe.HTML_INTEGRATION_POINTS||Ht,oe=pe.CUSTOM_ELEMENT_HANDLING||{},pe.CUSTOM_ELEMENT_HANDLING&&Ot(pe.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(oe.tagNameCheck=pe.CUSTOM_ELEMENT_HANDLING.tagNameCheck),pe.CUSTOM_ELEMENT_HANDLING&&Ot(pe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(oe.attributeNameCheck=pe.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),pe.CUSTOM_ELEMENT_HANDLING&&typeof pe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(oe.allowCustomizedBuiltInElements=pe.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ye&&(Se=!1),He&&(Pe=!0),Fe&&(de=Wr({},O0),Ee=[],Fe.html===!0&&(Wr(de,D0),Wr(Ee,N0)),Fe.svg===!0&&(Wr(de,gm),Wr(Ee,ym),Wr(Ee,mp)),Fe.svgFilters===!0&&(Wr(de,mm),Wr(Ee,ym),Wr(Ee,mp)),Fe.mathMl===!0&&(Wr(de,vm),Wr(Ee,P0),Wr(Ee,mp))),pe.ADD_TAGS&&(de===ge&&(de=Pl(de)),Wr(de,pe.ADD_TAGS,ct)),pe.ADD_ATTR&&(Ee===Be&&(Ee=Pl(Ee)),Wr(Ee,pe.ADD_ATTR,ct)),pe.ADD_URI_SAFE_ATTR&&Wr(Dt,pe.ADD_URI_SAFE_ATTR,ct),pe.FORBID_CONTENTS&&(rt===At&&(rt=Pl(rt)),Wr(rt,pe.FORBID_CONTENTS,ct)),dt&&(de["#text"]=!0),We&&Wr(de,["html","head","body"]),de.table&&(Wr(de,["tbody"]),delete ve.tbody),pe.TRUSTED_TYPES_POLICY){if(typeof pe.TRUSTED_TYPES_POLICY.createHTML!="function")throw Jf('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof pe.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Jf('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');I=pe.TRUSTED_TYPES_POLICY,F=I.createHTML("")}else I===void 0&&(I=$9(v,o)),I!==null&&typeof F=="string"&&(F=I.createHTML(""));mi&&mi(pe),ft=pe}},St=Wr({},[...gm,...mm,...M9]),Ft=Wr({},[...vm,...L9]),Qt=function(pe){let lt=O(pe);(!lt||!lt.tagName)&&(lt={namespaceURI:dr,tagName:"template"});const bt=Hp(pe.tagName),fr=Hp(lt.tagName);return ae[pe.namespaceURI]?pe.namespaceURI===ar?lt.namespaceURI===tr?bt==="svg":lt.namespaceURI===or?bt==="svg"&&(fr==="annotation-xml"||vt[fr]):!!St[bt]:pe.namespaceURI===or?lt.namespaceURI===tr?bt==="math":lt.namespaceURI===ar?bt==="math"&&Ht[fr]:!!Ft[bt]:pe.namespaceURI===tr?lt.namespaceURI===ar&&!Ht[fr]||lt.namespaceURI===or&&!vt[fr]?!1:!Ft[bt]&&(Pt[bt]||!St[bt]):!!(Et==="application/xhtml+xml"&&ae[pe.namespaceURI]):!1},$t=function(pe){Kf(e.removed,{element:pe});try{O(pe).removeChild(pe)}catch{_(pe)}},vr=function(pe,lt){try{Kf(e.removed,{attribute:lt.getAttributeNode(pe),from:lt})}catch{Kf(e.removed,{attribute:null,from:lt})}if(lt.removeAttribute(pe),pe==="is")if(Pe||He)try{$t(lt)}catch{}else try{lt.setAttribute(pe,"")}catch{}},Br=function(pe){let lt=null,bt=null;if(Ce)pe="<remove></remove>"+pe;else{const cr=L0(pe,/^[\r\n\t ]+/);bt=cr&&cr[0]}Et==="application/xhtml+xml"&&dr===tr&&(pe='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+pe+"</body></html>");const fr=I?I.createHTML(pe):pe;if(dr===tr)try{lt=new g().parseFromString(fr,Et)}catch{}if(!lt||!lt.documentElement){lt=B.createDocument(dr,"template",null);try{lt.documentElement.innerHTML=ke?F:fr}catch{}}const Fr=lt.body||lt.documentElement;return pe&&bt&&Fr.insertBefore(t.createTextNode(bt),Fr.childNodes[0]||null),dr===tr?V.call(lt,We?"html":"body")[0]:We?lt.documentElement:Fr},pr=function(pe){return z.call(pe.ownerDocument||pe,pe,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT|f.SHOW_PROCESSING_INSTRUCTION|f.SHOW_CDATA_SECTION,null)},he=function(pe){return pe instanceof m&&(typeof pe.nodeName!="string"||typeof pe.textContent!="string"||typeof pe.removeChild!="function"||!(pe.attributes instanceof p)||typeof pe.removeAttribute!="function"||typeof pe.setAttribute!="function"||typeof pe.namespaceURI!="string"||typeof pe.insertBefore!="function"||typeof pe.hasChildNodes!="function")},Me=function(pe){return typeof c=="function"&&pe instanceof c};function tt(It,pe,lt){gp(It,bt=>{bt.call(e,pe,lt,ft)})}const Re=function(pe){let lt=null;if(tt(P.beforeSanitizeElements,pe,null),he(pe))return $t(pe),!0;const bt=ct(pe.nodeName);if(tt(P.uponSanitizeElement,pe,{tagName:bt,allowedTags:de}),Ne&&pe.hasChildNodes()&&!Me(pe.firstElementChild)&&pi(/<[/\w!]/g,pe.innerHTML)&&pi(/<[/\w!]/g,pe.textContent)||pe.nodeType===eh.progressingInstruction||Ne&&pe.nodeType===eh.comment&&pi(/<[/\w]/g,pe.data))return $t(pe),!0;if(!de[bt]||ve[bt]){if(!ve[bt]&&ht(bt)&&(oe.tagNameCheck instanceof RegExp&&pi(oe.tagNameCheck,bt)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(bt)))return!1;if(dt&&!rt[bt]){const fr=O(pe)||pe.parentNode,Fr=R(pe)||pe.childNodes;if(Fr&&fr){const cr=Fr.length;for(let xr=cr-1;xr>=0;--xr){const tn=T(Fr[xr],!0);tn.__removalCount=(pe.__removalCount||0)+1,fr.insertBefore(tn,A(pe))}}}return $t(pe),!0}return pe instanceof u&&!Qt(pe)||(bt==="noscript"||bt==="noembed"||bt==="noframes")&&pi(/<\/no(script|embed|frames)/i,pe.innerHTML)?($t(pe),!0):(Ye&&pe.nodeType===eh.text&&(lt=pe.textContent,gp([U,G,Q],fr=>{lt=Xf(lt,fr," ")}),pe.textContent!==lt&&(Kf(e.removed,{element:pe.cloneNode()}),pe.textContent=lt)),tt(P.afterSanitizeElements,pe,null),!1)},it=function(pe,lt,bt){if(wt&&(lt==="id"||lt==="name")&&(bt in t||bt in Ct))return!1;if(!(Se&&!we[lt]&&pi(re,lt))){if(!(Oe&&pi(ie,lt))){if(!Ee[lt]||we[lt]){if(!(ht(pe)&&(oe.tagNameCheck instanceof RegExp&&pi(oe.tagNameCheck,pe)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(pe))&&(oe.attributeNameCheck instanceof RegExp&&pi(oe.attributeNameCheck,lt)||oe.attributeNameCheck instanceof Function&&oe.attributeNameCheck(lt))||lt==="is"&&oe.allowCustomizedBuiltInElements&&(oe.tagNameCheck instanceof RegExp&&pi(oe.tagNameCheck,bt)||oe.tagNameCheck instanceof Function&&oe.tagNameCheck(bt))))return!1}else if(!Dt[lt]){if(!pi(te,Xf(bt,ne,""))){if(!((lt==="src"||lt==="xlink:href"||lt==="href")&&pe!=="script"&&T9(bt,"data:")===0&&Nt[pe])){if(!(Ae&&!pi(se,Xf(bt,ne,"")))){if(bt)return!1}}}}}}return!0},ht=function(pe){return pe!=="annotation-xml"&&L0(pe,be)},Bt=function(pe){tt(P.beforeSanitizeAttributes,pe,null);const{attributes:lt}=pe;if(!lt||he(pe))return;const bt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee,forceKeepAttr:void 0};let fr=lt.length;for(;fr--;){const Fr=lt[fr],{name:cr,namespaceURI:xr,value:tn}=Fr,sn=ct(cr),Pn=tn;let Hr=cr==="value"?Pn:R9(Pn);if(bt.attrName=sn,bt.attrValue=Hr,bt.keepAttr=!0,bt.forceKeepAttr=void 0,tt(P.uponSanitizeAttribute,pe,bt),Hr=bt.attrValue,Xe&&(sn==="id"||sn==="name")&&(vr(cr,pe),Hr=Qe+Hr),Ne&&pi(/((--!?|])>)|<\/(style|title)/i,Hr)){vr(cr,pe);continue}if(bt.forceKeepAttr)continue;if(!bt.keepAttr){vr(cr,pe);continue}if(!Ie&&pi(/\/>/i,Hr)){vr(cr,pe);continue}Ye&&gp([U,G,Q],In=>{Hr=Xf(Hr,In," ")});const rn=ct(pe.nodeName);if(!it(rn,sn,Hr)){vr(cr,pe);continue}if(I&&typeof v=="object"&&typeof v.getAttributeType=="function"&&!xr)switch(v.getAttributeType(rn,sn)){case"TrustedHTML":{Hr=I.createHTML(Hr);break}case"TrustedScriptURL":{Hr=I.createScriptURL(Hr);break}}if(Hr!==Pn)try{xr?pe.setAttributeNS(xr,cr,Hr):pe.setAttribute(cr,Hr),he(pe)?$t(pe):M0(e.removed)}catch{vr(cr,pe)}}tt(P.afterSanitizeAttributes,pe,null)},Gt=function It(pe){let lt=null;const bt=pr(pe);for(tt(P.beforeSanitizeShadowDOM,pe,null);lt=bt.nextNode();)tt(P.uponSanitizeShadowNode,lt,null),Re(lt),Bt(lt),lt.content instanceof i&&It(lt.content);tt(P.afterSanitizeShadowDOM,pe,null)};return e.sanitize=function(It){let pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lt=null,bt=null,fr=null,Fr=null;if(ke=!It,ke&&(It="<!-->"),typeof It!="string"&&!Me(It))if(typeof It.toString=="function"){if(It=It.toString(),typeof It!="string")throw Jf("dirty is not a string, aborting")}else throw Jf("toString is not a function");if(!e.isSupported)return It;if(Ve||at(pe),e.removed=[],typeof It=="string"&&(mt=!1),mt){if(It.nodeName){const tn=ct(It.nodeName);if(!de[tn]||ve[tn])throw Jf("root node is forbidden and cannot be sanitized in-place")}}else if(It instanceof c)lt=Br("<!---->"),bt=lt.ownerDocument.importNode(It,!0),bt.nodeType===eh.element&&bt.nodeName==="BODY"||bt.nodeName==="HTML"?lt=bt:lt.appendChild(bt);else{if(!Pe&&!Ye&&!We&&It.indexOf("<")===-1)return I&&Je?I.createHTML(It):It;if(lt=Br(It),!lt)return Pe?null:Je?F:""}lt&&Ce&&$t(lt.firstChild);const cr=pr(mt?It:lt);for(;fr=cr.nextNode();)Re(fr),Bt(fr),fr.content instanceof i&&Gt(fr.content);if(mt)return It;if(Pe){if(He)for(Fr=j.call(lt.ownerDocument);lt.firstChild;)Fr.appendChild(lt.firstChild);else Fr=lt;return(Ee.shadowroot||Ee.shadowrootmode)&&(Fr=ue.call(n,Fr,!0)),Fr}let xr=We?lt.outerHTML:lt.innerHTML;return We&&de["!doctype"]&&lt.ownerDocument&&lt.ownerDocument.doctype&&lt.ownerDocument.doctype.name&&pi(RC,lt.ownerDocument.doctype.name)&&(xr="<!DOCTYPE "+lt.ownerDocument.doctype.name+`>
168
168
  `+xr),Ye&&gp([U,G,Q],tn=>{xr=Xf(xr,tn," ")}),I&&Je?I.createHTML(xr):xr},e.setConfig=function(){let It=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};at(It),Ve=!0},e.clearConfig=function(){ft=null,Ve=!1},e.isValidAttribute=function(It,pe,lt){ft||at({});const bt=ct(It),fr=ct(pe);return it(bt,fr,lt)},e.addHook=function(It,pe){typeof pe=="function"&&Kf(P[It],pe)},e.removeHook=function(It,pe){if(pe!==void 0){const lt=A9(P[It],pe);return lt===-1?void 0:E9(P[It],lt,1)[0]}return M0(P[It])},e.removeHooks=function(It){P[It]=[]},e.removeAllHooks=function(){P=F0()},e}var q9=kC(),vp={exports:{}},bm,j0;function U9(){if(j0)return bm;j0=1;var r=-1,e=1,t=0;function n(P,U,G,Q,re){if(P===U)return P?[[t,P]]:[];if(G!=null){var ie=V(P,U,G);if(ie)return ie}var se=c(P,U),ne=P.substring(0,se);P=P.substring(se),U=U.substring(se),se=f(P,U);var be=P.substring(P.length-se);P=P.substring(0,P.length-se),U=U.substring(0,U.length-se);var te=o(P,U);return ne&&te.unshift([t,ne]),be&&te.push([t,be]),R(te,re),Q&&m(te),te}function o(P,U){var G;if(!P)return[[e,U]];if(!U)return[[r,P]];var Q=P.length>U.length?P:U,re=P.length>U.length?U:P,ie=Q.indexOf(re);if(ie!==-1)return G=[[e,Q.substring(0,ie)],[t,re],[e,Q.substring(ie+re.length)]],P.length>U.length&&(G[0][0]=G[2][0]=r),G;if(re.length===1)return[[r,P],[e,U]];var se=p(P,U);if(se){var ne=se[0],be=se[1],te=se[2],de=se[3],ge=se[4],Ee=n(ne,te),Be=n(be,de);return Ee.concat([[t,ge]],Be)}return i(P,U)}function i(P,U){for(var G=P.length,Q=U.length,re=Math.ceil((G+Q)/2),ie=re,se=2*re,ne=new Array(se),be=new Array(se),te=0;te<se;te++)ne[te]=-1,be[te]=-1;ne[ie+1]=0,be[ie+1]=0;for(var de=G-Q,ge=de%2!==0,Ee=0,Be=0,oe=0,ve=0,we=0;we<re;we++){for(var Oe=-we+Ee;Oe<=we-Be;Oe+=2){var Se=ie+Oe,Ae;Oe===-we||Oe!==we&&ne[Se-1]<ne[Se+1]?Ae=ne[Se+1]:Ae=ne[Se-1]+1;for(var Ie=Ae-Oe;Ae<G&&Ie<Q&&P.charAt(Ae)===U.charAt(Ie);)Ae++,Ie++;if(ne[Se]=Ae,Ae>G)Be+=2;else if(Ie>Q)Ee+=2;else if(ge){var Ye=ie+de-Oe;if(Ye>=0&&Ye<se&&be[Ye]!==-1){var Ne=G-be[Ye];if(Ae>=Ne)return a(P,U,Ae,Ie)}}}for(var We=-we+oe;We<=we-ve;We+=2){var Ye=ie+We,Ne;We===-we||We!==we&&be[Ye-1]<be[Ye+1]?Ne=be[Ye+1]:Ne=be[Ye-1]+1;for(var Ve=Ne-We;Ne<G&&Ve<Q&&P.charAt(G-Ne-1)===U.charAt(Q-Ve-1);)Ne++,Ve++;if(be[Ye]=Ne,Ne>G)ve+=2;else if(Ve>Q)oe+=2;else if(!ge){var Se=ie+de-We;if(Se>=0&&Se<se&&ne[Se]!==-1){var Ae=ne[Se],Ie=ie+Ae-Se;if(Ne=G-Ne,Ae>=Ne)return a(P,U,Ae,Ie)}}}}return[[r,P],[e,U]]}function a(P,U,G,Q){var re=P.substring(0,G),ie=U.substring(0,Q),se=P.substring(G),ne=U.substring(Q),be=n(re,ie),te=n(se,ne);return be.concat(te)}function c(P,U){if(!P||!U||P.charAt(0)!==U.charAt(0))return 0;for(var G=0,Q=Math.min(P.length,U.length),re=Q,ie=0;G<re;)P.substring(ie,re)==U.substring(ie,re)?(G=re,ie=G):Q=re,re=Math.floor((Q-G)/2+G);return O(P.charCodeAt(re-1))&&re--,re}function u(P,U){var G=P.length,Q=U.length;if(G==0||Q==0)return 0;G>Q?P=P.substring(G-Q):G<Q&&(U=U.substring(0,G));var re=Math.min(G,Q);if(P==U)return re;for(var ie=0,se=1;;){var ne=P.substring(re-se),be=U.indexOf(ne);if(be==-1)return ie;se+=be,(be==0||P.substring(re-se)==U.substring(0,se))&&(ie=se,se++)}}function f(P,U){if(!P||!U||P.slice(-1)!==U.slice(-1))return 0;for(var G=0,Q=Math.min(P.length,U.length),re=Q,ie=0;G<re;)P.substring(P.length-re,P.length-ie)==U.substring(U.length-re,U.length-ie)?(G=re,ie=G):Q=re,re=Math.floor((Q-G)/2+G);return I(P.charCodeAt(P.length-re))&&re--,re}function p(P,U){var G=P.length>U.length?P:U,Q=P.length>U.length?U:P;if(G.length<4||Q.length*2<G.length)return null;function re(Be,oe,ve){for(var we=Be.substring(ve,ve+Math.floor(Be.length/4)),Oe=-1,Se="",Ae,Ie,Ye,Ne;(Oe=oe.indexOf(we,Oe+1))!==-1;){var We=c(Be.substring(ve),oe.substring(Oe)),Ve=f(Be.substring(0,ve),oe.substring(0,Oe));Se.length<Ve+We&&(Se=oe.substring(Oe-Ve,Oe)+oe.substring(Oe,Oe+We),Ae=Be.substring(0,ve-Ve),Ie=Be.substring(ve+We),Ye=oe.substring(0,Oe-Ve),Ne=oe.substring(Oe+We))}return Se.length*2>=Be.length?[Ae,Ie,Ye,Ne,Se]:null}var ie=re(G,Q,Math.ceil(G.length/4)),se=re(G,Q,Math.ceil(G.length/2)),ne;if(!ie&&!se)return null;se?ie?ne=ie[4].length>se[4].length?ie:se:ne=se:ne=ie;var be,te,de,ge;P.length>U.length?(be=ne[0],te=ne[1],de=ne[2],ge=ne[3]):(de=ne[0],ge=ne[1],be=ne[2],te=ne[3]);var Ee=ne[4];return[be,te,de,ge,Ee]}function m(P){for(var U=!1,G=[],Q=0,re=null,ie=0,se=0,ne=0,be=0,te=0;ie<P.length;)P[ie][0]==t?(G[Q++]=ie,se=be,ne=te,be=0,te=0,re=P[ie][1]):(P[ie][0]==e?be+=P[ie][1].length:te+=P[ie][1].length,re&&re.length<=Math.max(se,ne)&&re.length<=Math.max(be,te)&&(P.splice(G[Q-1],0,[r,re]),P[G[Q-1]+1][0]=e,Q--,Q--,ie=Q>0?G[Q-1]:-1,se=0,ne=0,be=0,te=0,re=null,U=!0)),ie++;for(U&&R(P),A(P),ie=1;ie<P.length;){if(P[ie-1][0]==r&&P[ie][0]==e){var de=P[ie-1][1],ge=P[ie][1],Ee=u(de,ge),Be=u(ge,de);Ee>=Be?(Ee>=de.length/2||Ee>=ge.length/2)&&(P.splice(ie,0,[t,ge.substring(0,Ee)]),P[ie-1][1]=de.substring(0,de.length-Ee),P[ie+1][1]=ge.substring(Ee),ie++):(Be>=de.length/2||Be>=ge.length/2)&&(P.splice(ie,0,[t,de.substring(0,Be)]),P[ie-1][0]=e,P[ie-1][1]=ge.substring(0,ge.length-Be),P[ie+1][0]=r,P[ie+1][1]=de.substring(Be),ie++),ie++}ie++}}var g=/[^a-zA-Z0-9]/,v=/\s/,w=/[\r\n]/,T=/\n\r?\n$/,_=/^\r?\n\r?\n/;function A(P){function U(Be,oe){if(!Be||!oe)return 6;var ve=Be.charAt(Be.length-1),we=oe.charAt(0),Oe=ve.match(g),Se=we.match(g),Ae=Oe&&ve.match(v),Ie=Se&&we.match(v),Ye=Ae&&ve.match(w),Ne=Ie&&we.match(w),We=Ye&&Be.match(T),Ve=Ne&&oe.match(_);return We||Ve?5:Ye||Ne?4:Oe&&!Ae&&Ie?3:Ae||Ie?2:Oe||Se?1:0}for(var G=1;G<P.length-1;){if(P[G-1][0]==t&&P[G+1][0]==t){var Q=P[G-1][1],re=P[G][1],ie=P[G+1][1],se=f(Q,re);if(se){var ne=re.substring(re.length-se);Q=Q.substring(0,Q.length-se),re=ne+re.substring(0,re.length-se),ie=ne+ie}for(var be=Q,te=re,de=ie,ge=U(Q,re)+U(re,ie);re.charAt(0)===ie.charAt(0);){Q+=re.charAt(0),re=re.substring(1)+ie.charAt(0),ie=ie.substring(1);var Ee=U(Q,re)+U(re,ie);Ee>=ge&&(ge=Ee,be=Q,te=re,de=ie)}P[G-1][1]!=be&&(be?P[G-1][1]=be:(P.splice(G-1,1),G--),P[G][1]=te,de?P[G+1][1]=de:(P.splice(G+1,1),G--))}G++}}function R(P,U){P.push([t,""]);for(var G=0,Q=0,re=0,ie="",se="",ne;G<P.length;){if(G<P.length-1&&!P[G][1]){P.splice(G,1);continue}switch(P[G][0]){case e:re++,se+=P[G][1],G++;break;case r:Q++,ie+=P[G][1],G++;break;case t:var be=G-re-Q-1;if(U){if(be>=0&&B(P[be][1])){var te=P[be][1].slice(-1);if(P[be][1]=P[be][1].slice(0,-1),ie=te+ie,se=te+se,!P[be][1]){P.splice(be,1),G--;var de=be-1;P[de]&&P[de][0]===e&&(re++,se=P[de][1]+se,de--),P[de]&&P[de][0]===r&&(Q++,ie=P[de][1]+ie,de--),be=de}}if(F(P[G][1])){var te=P[G][1].charAt(0);P[G][1]=P[G][1].slice(1),ie+=te,se+=te}}if(G<P.length-1&&!P[G][1]){P.splice(G,1);break}if(ie.length>0||se.length>0){ie.length>0&&se.length>0&&(ne=c(se,ie),ne!==0&&(be>=0?P[be][1]+=se.substring(0,ne):(P.splice(0,0,[t,se.substring(0,ne)]),G++),se=se.substring(ne),ie=ie.substring(ne)),ne=f(se,ie),ne!==0&&(P[G][1]=se.substring(se.length-ne)+P[G][1],se=se.substring(0,se.length-ne),ie=ie.substring(0,ie.length-ne)));var ge=re+Q;ie.length===0&&se.length===0?(P.splice(G-ge,ge),G=G-ge):ie.length===0?(P.splice(G-ge,ge,[e,se]),G=G-ge+1):se.length===0?(P.splice(G-ge,ge,[r,ie]),G=G-ge+1):(P.splice(G-ge,ge,[r,ie],[e,se]),G=G-ge+2)}G!==0&&P[G-1][0]===t?(P[G-1][1]+=P[G][1],P.splice(G,1)):G++,re=0,Q=0,ie="",se="";break}}P[P.length-1][1]===""&&P.pop();var Ee=!1;for(G=1;G<P.length-1;)P[G-1][0]===t&&P[G+1][0]===t&&(P[G][1].substring(P[G][1].length-P[G-1][1].length)===P[G-1][1]?(P[G][1]=P[G-1][1]+P[G][1].substring(0,P[G][1].length-P[G-1][1].length),P[G+1][1]=P[G-1][1]+P[G+1][1],P.splice(G-1,1),Ee=!0):P[G][1].substring(0,P[G+1][1].length)==P[G+1][1]&&(P[G-1][1]+=P[G+1][1],P[G][1]=P[G][1].substring(P[G+1][1].length)+P[G+1][1],P.splice(G+1,1),Ee=!0)),G++;Ee&&R(P,U)}function O(P){return P>=55296&&P<=56319}function I(P){return P>=56320&&P<=57343}function F(P){return I(P.charCodeAt(0))}function B(P){return O(P.charCodeAt(P.length-1))}function z(P){for(var U=[],G=0;G<P.length;G++)P[G][1].length>0&&U.push(P[G]);return U}function j(P,U,G,Q){return B(P)||F(Q)?null:z([[t,P],[r,U],[e,G],[t,Q]])}function V(P,U,G){var Q=typeof G=="number"?{index:G,length:0}:G.oldRange,re=typeof G=="number"?null:G.newRange,ie=P.length,se=U.length;if(Q.length===0&&(re===null||re.length===0)){var ne=Q.index,be=P.slice(0,ne),te=P.slice(ne),de=re?re.index:null;e:{var ge=ne+se-ie;if(de!==null&&de!==ge||ge<0||ge>se)break e;var Ee=U.slice(0,ge),Be=U.slice(ge);if(Be!==te)break e;var oe=Math.min(ne,ge),ve=be.slice(0,oe),we=Ee.slice(0,oe);if(ve!==we)break e;var Oe=be.slice(oe),Se=Ee.slice(oe);return j(ve,Oe,Se,te)}e:{if(de!==null&&de!==ne)break e;var Ae=ne,Ee=U.slice(0,Ae),Be=U.slice(Ae);if(Ee!==be)break e;var Ie=Math.min(ie-Ae,se-Ae),Ye=te.slice(te.length-Ie),Ne=Be.slice(Be.length-Ie);if(Ye!==Ne)break e;var Oe=te.slice(0,te.length-Ie),Se=Be.slice(0,Be.length-Ie);return j(be,Oe,Se,Ye)}}if(Q.length>0&&re&&re.length===0)e:{var ve=P.slice(0,Q.index),Ye=P.slice(Q.index+Q.length),oe=ve.length,Ie=Ye.length;if(se<oe+Ie)break e;var we=U.slice(0,oe),Ne=U.slice(se-Ie);if(ve!==we||Ye!==Ne)break e;var Oe=P.slice(oe,ie-Ie),Se=U.slice(oe,se-Ie);return j(ve,Oe,Se,Ye)}return null}function ue(P,U,G,Q){return n(P,U,G,Q,!0)}return ue.INSERT=e,ue.DELETE=r,ue.EQUAL=t,bm=ue,bm}var dh={exports:{}};dh.exports;var z0;function IC(){return z0||(z0=1,function(r,e){var t=200,n="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object Array]",c="[object Boolean]",u="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",v="[object Number]",w="[object Object]",T="[object Promise]",_="[object RegExp]",A="[object Set]",R="[object String]",O="[object Symbol]",I="[object WeakMap]",F="[object ArrayBuffer]",B="[object DataView]",z="[object Float32Array]",j="[object Float64Array]",V="[object Int8Array]",ue="[object Int16Array]",P="[object Int32Array]",U="[object Uint8Array]",G="[object Uint8ClampedArray]",Q="[object Uint16Array]",re="[object Uint32Array]",ie=/[\\^$.*+?()[\]{}|]/g,se=/\w*$/,ne=/^\[object .+?Constructor\]$/,be=/^(?:0|[1-9]\d*)$/,te={};te[i]=te[a]=te[F]=te[B]=te[c]=te[u]=te[z]=te[j]=te[V]=te[ue]=te[P]=te[g]=te[v]=te[w]=te[_]=te[A]=te[R]=te[O]=te[U]=te[G]=te[Q]=te[re]=!0,te[f]=te[p]=te[I]=!1;var de=typeof Di=="object"&&Di&&Di.Object===Object&&Di,ge=typeof self=="object"&&self&&self.Object===Object&&self,Ee=de||ge||Function("return this")(),Be=e&&!e.nodeType&&e,oe=Be&&!0&&r&&!r.nodeType&&r,ve=oe&&oe.exports===Be;function we(D,J){return D.set(J[0],J[1]),D}function Oe(D,J){return D.add(J),D}function Se(D,J){for(var xe=-1,ot=D?D.length:0;++xe<ot&&J(D[xe],xe,D)!==!1;);return D}function Ae(D,J){for(var xe=-1,ot=J.length,ir=D.length;++xe<ot;)D[ir+xe]=J[xe];return D}function Ie(D,J,xe,ot){for(var ir=-1,Kt=D?D.length:0;++ir<Kt;)xe=J(xe,D[ir],ir,D);return xe}function Ye(D,J){for(var xe=-1,ot=Array(D);++xe<D;)ot[xe]=J(xe);return ot}function Ne(D,J){return D==null?void 0:D[J]}function We(D){var J=!1;if(D!=null&&typeof D.toString!="function")try{J=!!(D+"")}catch{}return J}function Ve(D){var J=-1,xe=Array(D.size);return D.forEach(function(ot,ir){xe[++J]=[ir,ot]}),xe}function Ce(D,J){return function(xe){return D(J(xe))}}function Pe(D){var J=-1,xe=Array(D.size);return D.forEach(function(ot){xe[++J]=ot}),xe}var He=Array.prototype,Je=Function.prototype,wt=Object.prototype,Xe=Ee["__core-js_shared__"],Qe=function(){var D=/[^.]+$/.exec(Xe&&Xe.keys&&Xe.keys.IE_PROTO||"");return D?"Symbol(src)_1."+D:""}(),dt=Je.toString,mt=wt.hasOwnProperty,Fe=wt.toString,rt=RegExp("^"+dt.call(mt).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),At=ve?Ee.Buffer:void 0,Nt=Ee.Symbol,kt=Ee.Uint8Array,Dt=Ce(Object.getPrototypeOf,Object),Jt=Object.create,or=wt.propertyIsEnumerable,ar=He.splice,tr=Object.getOwnPropertySymbols,dr=At?At.isBuffer:void 0,ke=Ce(Object.keys,Object),ae=qt(Ee,"DataView"),st=qt(Ee,"Map"),vt=qt(Ee,"Promise"),Ht=qt(Ee,"Set"),Pt=qt(Ee,"WeakMap"),Et=qt(Object,"create"),jt=dn(ae),Ze=dn(st),ct=dn(vt),ft=dn(Ht),Ct=dn(Pt),Ot=Nt?Nt.prototype:void 0,at=Ot?Ot.valueOf:void 0;function St(D){var J=-1,xe=D?D.length:0;for(this.clear();++J<xe;){var ot=D[J];this.set(ot[0],ot[1])}}function Ft(){this.__data__=Et?Et(null):{}}function Qt(D){return this.has(D)&&delete this.__data__[D]}function $t(D){var J=this.__data__;if(Et){var xe=J[D];return xe===n?void 0:xe}return mt.call(J,D)?J[D]:void 0}function vr(D){var J=this.__data__;return Et?J[D]!==void 0:mt.call(J,D)}function Br(D,J){var xe=this.__data__;return xe[D]=Et&&J===void 0?n:J,this}St.prototype.clear=Ft,St.prototype.delete=Qt,St.prototype.get=$t,St.prototype.has=vr,St.prototype.set=Br;function pr(D){var J=-1,xe=D?D.length:0;for(this.clear();++J<xe;){var ot=D[J];this.set(ot[0],ot[1])}}function he(){this.__data__=[]}function Me(D){var J=this.__data__,xe=Hr(J,D);if(xe<0)return!1;var ot=J.length-1;return xe==ot?J.pop():ar.call(J,xe,1),!0}function tt(D){var J=this.__data__,xe=Hr(J,D);return xe<0?void 0:J[xe][1]}function Re(D){return Hr(this.__data__,D)>-1}function it(D,J){var xe=this.__data__,ot=Hr(xe,D);return ot<0?xe.push([D,J]):xe[ot][1]=J,this}pr.prototype.clear=he,pr.prototype.delete=Me,pr.prototype.get=tt,pr.prototype.has=Re,pr.prototype.set=it;function ht(D){var J=-1,xe=D?D.length:0;for(this.clear();++J<xe;){var ot=D[J];this.set(ot[0],ot[1])}}function Bt(){this.__data__={hash:new St,map:new(st||pr),string:new St}}function Gt(D){return Rt(this,D).delete(D)}function It(D){return Rt(this,D).get(D)}function pe(D){return Rt(this,D).has(D)}function lt(D,J){return Rt(this,D).set(D,J),this}ht.prototype.clear=Bt,ht.prototype.delete=Gt,ht.prototype.get=It,ht.prototype.has=pe,ht.prototype.set=lt;function bt(D){this.__data__=new pr(D)}function fr(){this.__data__=new pr}function Fr(D){return this.__data__.delete(D)}function cr(D){return this.__data__.get(D)}function xr(D){return this.__data__.has(D)}function tn(D,J){var xe=this.__data__;if(xe instanceof pr){var ot=xe.__data__;if(!st||ot.length<t-1)return ot.push([D,J]),this;xe=this.__data__=new ht(ot)}return xe.set(D,J),this}bt.prototype.clear=fr,bt.prototype.delete=Fr,bt.prototype.get=cr,bt.prototype.has=xr,bt.prototype.set=tn;function sn(D,J){var xe=Pi(D)||so(D)?Ye(D.length,String):[],ot=xe.length,ir=!!ot;for(var Kt in D)mt.call(D,Kt)&&!(ir&&(Kt=="length"||Ln(Kt,ot)))&&xe.push(Kt);return xe}function Pn(D,J,xe){var ot=D[J];(!(mt.call(D,J)&&Xn(ot,xe))||xe===void 0&&!(J in D))&&(D[J]=xe)}function Hr(D,J){for(var xe=D.length;xe--;)if(Xn(D[xe][0],J))return xe;return-1}function rn(D,J){return D&&Ue(J,zr(J),D)}function In(D,J,xe,ot,ir,Kt,_r){var Ir;if(ot&&(Ir=Kt?ot(D,ir,Kt,_r):ot(D)),Ir!==void 0)return Ir;if(!lo(D))return D;var Cr=Pi(D);if(Cr){if(Ir=kr(D),!J)return le(D,Ir)}else{var Lr=Vt(D),fn=Lr==p||Lr==m;if($n(D))return Fn(D,J);if(Lr==w||Lr==i||fn&&!Kt){if(We(D))return Kt?D:{};if(Ir=an(fn?{}:D),!J)return ze(D,rn(Ir,D))}else{if(!te[Lr])return Kt?D:{};Ir=Mn(D,Lr,In,J)}}_r||(_r=new bt);var qn=_r.get(D);if(qn)return qn;if(_r.set(D,Ir),!Cr)var nn=xe?nt(D):zr(D);return Se(nn||D,function(Vr,hn){nn&&(hn=Vr,Vr=D[hn]),Pn(Ir,hn,In(Vr,J,xe,ot,hn,D,_r))}),Ir}function Bn(D){return lo(D)?Jt(D):{}}function _o(D,J,xe){var ot=J(D);return Pi(D)?ot:Ae(ot,xe(D))}function Do(D){return Fe.call(D)}function Oo(D){if(!lo(D)||Kn(D))return!1;var J=Bi(D)||We(D)?rt:ne;return J.test(dn(D))}function Hn(D){if(!No(D))return ke(D);var J=[];for(var xe in Object(D))mt.call(D,xe)&&xe!="constructor"&&J.push(xe);return J}function Fn(D,J){if(J)return D.slice();var xe=new D.constructor(D.length);return D.copy(xe),xe}function Cn(D){var J=new D.constructor(D.byteLength);return new kt(J).set(new kt(D)),J}function io(D,J){var xe=J?Cn(D.buffer):D.buffer;return new D.constructor(xe,D.byteOffset,D.byteLength)}function yn(D,J,xe){var ot=J?xe(Ve(D),!0):Ve(D);return Ie(ot,we,new D.constructor)}function En(D){var J=new D.constructor(D.source,se.exec(D));return J.lastIndex=D.lastIndex,J}function k(D,J,xe){var ot=J?xe(Pe(D),!0):Pe(D);return Ie(ot,Oe,new D.constructor)}function $(D){return at?Object(at.call(D)):{}}function X(D,J){var xe=J?Cn(D.buffer):D.buffer;return new D.constructor(xe,D.byteOffset,D.length)}function le(D,J){var xe=-1,ot=D.length;for(J||(J=Array(ot));++xe<ot;)J[xe]=D[xe];return J}function Ue(D,J,xe,ot){xe||(xe={});for(var ir=-1,Kt=J.length;++ir<Kt;){var _r=J[ir],Ir=void 0;Pn(xe,_r,Ir===void 0?D[_r]:Ir)}return xe}function ze(D,J){return Ue(D,Yt(D),J)}function nt(D){return _o(D,zr,Yt)}function Rt(D,J){var xe=D.__data__;return po(J)?xe[typeof J=="string"?"string":"hash"]:xe.map}function qt(D,J){var xe=Ne(D,J);return Oo(xe)?xe:void 0}var Yt=tr?Ce(tr,Object):Mr,Vt=Do;(ae&&Vt(new ae(new ArrayBuffer(1)))!=B||st&&Vt(new st)!=g||vt&&Vt(vt.resolve())!=T||Ht&&Vt(new Ht)!=A||Pt&&Vt(new Pt)!=I)&&(Vt=function(D){var J=Fe.call(D),xe=J==w?D.constructor:void 0,ot=xe?dn(xe):void 0;if(ot)switch(ot){case jt:return B;case Ze:return g;case ct:return T;case ft:return A;case Ct:return I}return J});function kr(D){var J=D.length,xe=D.constructor(J);return J&&typeof D[0]=="string"&&mt.call(D,"index")&&(xe.index=D.index,xe.input=D.input),xe}function an(D){return typeof D.constructor=="function"&&!No(D)?Bn(Dt(D)):{}}function Mn(D,J,xe,ot){var ir=D.constructor;switch(J){case F:return Cn(D);case c:case u:return new ir(+D);case B:return io(D,ot);case z:case j:case V:case ue:case P:case U:case G:case Q:case re:return X(D,ot);case g:return yn(D,ot,xe);case v:case R:return new ir(D);case _:return En(D);case A:return k(D,ot,xe);case O:return $(D)}}function Ln(D,J){return J=J??o,!!J&&(typeof D=="number"||be.test(D))&&D>-1&&D%1==0&&D<J}function po(D){var J=typeof D;return J=="string"||J=="number"||J=="symbol"||J=="boolean"?D!=="__proto__":D===null}function Kn(D){return!!Qe&&Qe in D}function No(D){var J=D&&D.constructor,xe=typeof J=="function"&&J.prototype||wt;return D===xe}function dn(D){if(D!=null){try{return dt.call(D)}catch{}try{return D+""}catch{}}return""}function Ao(D){return In(D,!0,!0)}function Xn(D,J){return D===J||D!==D&&J!==J}function so(D){return bi(D)&&mt.call(D,"callee")&&(!or.call(D,"callee")||Fe.call(D)==i)}var Pi=Array.isArray;function yi(D){return D!=null&&ao(D.length)&&!Bi(D)}function bi(D){return ri(D)&&yi(D)}var $n=dr||jr;function Bi(D){var J=lo(D)?Fe.call(D):"";return J==p||J==m}function ao(D){return typeof D=="number"&&D>-1&&D%1==0&&D<=o}function lo(D){var J=typeof D;return!!D&&(J=="object"||J=="function")}function ri(D){return!!D&&typeof D=="object"}function zr(D){return yi(D)?sn(D):Hn(D)}function Mr(){return[]}function jr(){return!1}r.exports=Ao}(dh,dh.exports)),dh.exports}var fh={exports:{}};fh.exports;var H0;function MC(){return H0||(H0=1,function(r,e){var t=200,n="__lodash_hash_undefined__",o=1,i=2,a=9007199254740991,c="[object Arguments]",u="[object Array]",f="[object AsyncFunction]",p="[object Boolean]",m="[object Date]",g="[object Error]",v="[object Function]",w="[object GeneratorFunction]",T="[object Map]",_="[object Number]",A="[object Null]",R="[object Object]",O="[object Promise]",I="[object Proxy]",F="[object RegExp]",B="[object Set]",z="[object String]",j="[object Symbol]",V="[object Undefined]",ue="[object WeakMap]",P="[object ArrayBuffer]",U="[object DataView]",G="[object Float32Array]",Q="[object Float64Array]",re="[object Int8Array]",ie="[object Int16Array]",se="[object Int32Array]",ne="[object Uint8Array]",be="[object Uint8ClampedArray]",te="[object Uint16Array]",de="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,Ee=/^\[object .+?Constructor\]$/,Be=/^(?:0|[1-9]\d*)$/,oe={};oe[G]=oe[Q]=oe[re]=oe[ie]=oe[se]=oe[ne]=oe[be]=oe[te]=oe[de]=!0,oe[c]=oe[u]=oe[P]=oe[p]=oe[U]=oe[m]=oe[g]=oe[v]=oe[T]=oe[_]=oe[R]=oe[F]=oe[B]=oe[z]=oe[ue]=!1;var ve=typeof Di=="object"&&Di&&Di.Object===Object&&Di,we=typeof self=="object"&&self&&self.Object===Object&&self,Oe=ve||we||Function("return this")(),Se=e&&!e.nodeType&&e,Ae=Se&&!0&&r&&!r.nodeType&&r,Ie=Ae&&Ae.exports===Se,Ye=Ie&&ve.process,Ne=function(){try{return Ye&&Ye.binding&&Ye.binding("util")}catch{}}(),We=Ne&&Ne.isTypedArray;function Ve(D,J){for(var xe=-1,ot=D==null?0:D.length,ir=0,Kt=[];++xe<ot;){var _r=D[xe];J(_r,xe,D)&&(Kt[ir++]=_r)}return Kt}function Ce(D,J){for(var xe=-1,ot=J.length,ir=D.length;++xe<ot;)D[ir+xe]=J[xe];return D}function Pe(D,J){for(var xe=-1,ot=D==null?0:D.length;++xe<ot;)if(J(D[xe],xe,D))return!0;return!1}function He(D,J){for(var xe=-1,ot=Array(D);++xe<D;)ot[xe]=J(xe);return ot}function Je(D){return function(J){return D(J)}}function wt(D,J){return D.has(J)}function Xe(D,J){return D==null?void 0:D[J]}function Qe(D){var J=-1,xe=Array(D.size);return D.forEach(function(ot,ir){xe[++J]=[ir,ot]}),xe}function dt(D,J){return function(xe){return D(J(xe))}}function mt(D){var J=-1,xe=Array(D.size);return D.forEach(function(ot){xe[++J]=ot}),xe}var Fe=Array.prototype,rt=Function.prototype,At=Object.prototype,Nt=Oe["__core-js_shared__"],kt=rt.toString,Dt=At.hasOwnProperty,Jt=function(){var D=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return D?"Symbol(src)_1."+D:""}(),or=At.toString,ar=RegExp("^"+kt.call(Dt).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tr=Ie?Oe.Buffer:void 0,dr=Oe.Symbol,ke=Oe.Uint8Array,ae=At.propertyIsEnumerable,st=Fe.splice,vt=dr?dr.toStringTag:void 0,Ht=Object.getOwnPropertySymbols,Pt=tr?tr.isBuffer:void 0,Et=dt(Object.keys,Object),jt=Yt(Oe,"DataView"),Ze=Yt(Oe,"Map"),ct=Yt(Oe,"Promise"),ft=Yt(Oe,"Set"),Ct=Yt(Oe,"WeakMap"),Ot=Yt(Object,"create"),at=dn(jt),St=dn(Ze),Ft=dn(ct),Qt=dn(ft),$t=dn(Ct),vr=dr?dr.prototype:void 0,Br=vr?vr.valueOf:void 0;function pr(D){var J=-1,xe=D==null?0:D.length;for(this.clear();++J<xe;){var ot=D[J];this.set(ot[0],ot[1])}}function he(){this.__data__=Ot?Ot(null):{},this.size=0}function Me(D){var J=this.has(D)&&delete this.__data__[D];return this.size-=J?1:0,J}function tt(D){var J=this.__data__;if(Ot){var xe=J[D];return xe===n?void 0:xe}return Dt.call(J,D)?J[D]:void 0}function Re(D){var J=this.__data__;return Ot?J[D]!==void 0:Dt.call(J,D)}function it(D,J){var xe=this.__data__;return this.size+=this.has(D)?0:1,xe[D]=Ot&&J===void 0?n:J,this}pr.prototype.clear=he,pr.prototype.delete=Me,pr.prototype.get=tt,pr.prototype.has=Re,pr.prototype.set=it;function ht(D){var J=-1,xe=D==null?0:D.length;for(this.clear();++J<xe;){var ot=D[J];this.set(ot[0],ot[1])}}function Bt(){this.__data__=[],this.size=0}function Gt(D){var J=this.__data__,xe=Fn(J,D);if(xe<0)return!1;var ot=J.length-1;return xe==ot?J.pop():st.call(J,xe,1),--this.size,!0}function It(D){var J=this.__data__,xe=Fn(J,D);return xe<0?void 0:J[xe][1]}function pe(D){return Fn(this.__data__,D)>-1}function lt(D,J){var xe=this.__data__,ot=Fn(xe,D);return ot<0?(++this.size,xe.push([D,J])):xe[ot][1]=J,this}ht.prototype.clear=Bt,ht.prototype.delete=Gt,ht.prototype.get=It,ht.prototype.has=pe,ht.prototype.set=lt;function bt(D){var J=-1,xe=D==null?0:D.length;for(this.clear();++J<xe;){var ot=D[J];this.set(ot[0],ot[1])}}function fr(){this.size=0,this.__data__={hash:new pr,map:new(Ze||ht),string:new pr}}function Fr(D){var J=qt(this,D).delete(D);return this.size-=J?1:0,J}function cr(D){return qt(this,D).get(D)}function xr(D){return qt(this,D).has(D)}function tn(D,J){var xe=qt(this,D),ot=xe.size;return xe.set(D,J),this.size+=xe.size==ot?0:1,this}bt.prototype.clear=fr,bt.prototype.delete=Fr,bt.prototype.get=cr,bt.prototype.has=xr,bt.prototype.set=tn;function sn(D){var J=-1,xe=D==null?0:D.length;for(this.__data__=new bt;++J<xe;)this.add(D[J])}function Pn(D){return this.__data__.set(D,n),this}function Hr(D){return this.__data__.has(D)}sn.prototype.add=sn.prototype.push=Pn,sn.prototype.has=Hr;function rn(D){var J=this.__data__=new ht(D);this.size=J.size}function In(){this.__data__=new ht,this.size=0}function Bn(D){var J=this.__data__,xe=J.delete(D);return this.size=J.size,xe}function _o(D){return this.__data__.get(D)}function Do(D){return this.__data__.has(D)}function Oo(D,J){var xe=this.__data__;if(xe instanceof ht){var ot=xe.__data__;if(!Ze||ot.length<t-1)return ot.push([D,J]),this.size=++xe.size,this;xe=this.__data__=new bt(ot)}return xe.set(D,J),this.size=xe.size,this}rn.prototype.clear=In,rn.prototype.delete=Bn,rn.prototype.get=_o,rn.prototype.has=Do,rn.prototype.set=Oo;function Hn(D,J){var xe=so(D),ot=!xe&&Xn(D),ir=!xe&&!ot&&yi(D),Kt=!xe&&!ot&&!ir&&ri(D),_r=xe||ot||ir||Kt,Ir=_r?He(D.length,String):[],Cr=Ir.length;for(var Lr in D)Dt.call(D,Lr)&&!(_r&&(Lr=="length"||ir&&(Lr=="offset"||Lr=="parent")||Kt&&(Lr=="buffer"||Lr=="byteLength"||Lr=="byteOffset")||Mn(Lr,Cr)))&&Ir.push(Lr);return Ir}function Fn(D,J){for(var xe=D.length;xe--;)if(Ao(D[xe][0],J))return xe;return-1}function Cn(D,J,xe){var ot=J(D);return so(D)?ot:Ce(ot,xe(D))}function io(D){return D==null?D===void 0?V:A:vt&&vt in Object(D)?Vt(D):No(D)}function yn(D){return lo(D)&&io(D)==c}function En(D,J,xe,ot,ir){return D===J?!0:D==null||J==null||!lo(D)&&!lo(J)?D!==D&&J!==J:k(D,J,xe,ot,En,ir)}function k(D,J,xe,ot,ir,Kt){var _r=so(D),Ir=so(J),Cr=_r?u:an(D),Lr=Ir?u:an(J);Cr=Cr==c?R:Cr,Lr=Lr==c?R:Lr;var fn=Cr==R,qn=Lr==R,nn=Cr==Lr;if(nn&&yi(D)){if(!yi(J))return!1;_r=!0,fn=!1}if(nn&&!fn)return Kt||(Kt=new rn),_r||ri(D)?Ue(D,J,xe,ot,ir,Kt):ze(D,J,Cr,xe,ot,ir,Kt);if(!(xe&o)){var Vr=fn&&Dt.call(D,"__wrapped__"),hn=qn&&Dt.call(J,"__wrapped__");if(Vr||hn){var go=Vr?D.value():D,Eo=hn?J.value():J;return Kt||(Kt=new rn),ir(go,Eo,xe,ot,Kt)}}return nn?(Kt||(Kt=new rn),nt(D,J,xe,ot,ir,Kt)):!1}function $(D){if(!ao(D)||po(D))return!1;var J=$n(D)?ar:Ee;return J.test(dn(D))}function X(D){return lo(D)&&Bi(D.length)&&!!oe[io(D)]}function le(D){if(!Kn(D))return Et(D);var J=[];for(var xe in Object(D))Dt.call(D,xe)&&xe!="constructor"&&J.push(xe);return J}function Ue(D,J,xe,ot,ir,Kt){var _r=xe&o,Ir=D.length,Cr=J.length;if(Ir!=Cr&&!(_r&&Cr>Ir))return!1;var Lr=Kt.get(D);if(Lr&&Kt.get(J))return Lr==J;var fn=-1,qn=!0,nn=xe&i?new sn:void 0;for(Kt.set(D,J),Kt.set(J,D);++fn<Ir;){var Vr=D[fn],hn=J[fn];if(ot)var go=_r?ot(hn,Vr,fn,J,D,Kt):ot(Vr,hn,fn,D,J,Kt);if(go!==void 0){if(go)continue;qn=!1;break}if(nn){if(!Pe(J,function(Eo,Jn){if(!wt(nn,Jn)&&(Vr===Eo||ir(Vr,Eo,xe,ot,Kt)))return nn.push(Jn)})){qn=!1;break}}else if(!(Vr===hn||ir(Vr,hn,xe,ot,Kt))){qn=!1;break}}return Kt.delete(D),Kt.delete(J),qn}function ze(D,J,xe,ot,ir,Kt,_r){switch(xe){case U:if(D.byteLength!=J.byteLength||D.byteOffset!=J.byteOffset)return!1;D=D.buffer,J=J.buffer;case P:return!(D.byteLength!=J.byteLength||!Kt(new ke(D),new ke(J)));case p:case m:case _:return Ao(+D,+J);case g:return D.name==J.name&&D.message==J.message;case F:case z:return D==J+"";case T:var Ir=Qe;case B:var Cr=ot&o;if(Ir||(Ir=mt),D.size!=J.size&&!Cr)return!1;var Lr=_r.get(D);if(Lr)return Lr==J;ot|=i,_r.set(D,J);var fn=Ue(Ir(D),Ir(J),ot,ir,Kt,_r);return _r.delete(D),fn;case j:if(Br)return Br.call(D)==Br.call(J)}return!1}function nt(D,J,xe,ot,ir,Kt){var _r=xe&o,Ir=Rt(D),Cr=Ir.length,Lr=Rt(J),fn=Lr.length;if(Cr!=fn&&!_r)return!1;for(var qn=Cr;qn--;){var nn=Ir[qn];if(!(_r?nn in J:Dt.call(J,nn)))return!1}var Vr=Kt.get(D);if(Vr&&Kt.get(J))return Vr==J;var hn=!0;Kt.set(D,J),Kt.set(J,D);for(var go=_r;++qn<Cr;){nn=Ir[qn];var Eo=D[nn],Jn=J[nn];if(ot)var Fi=_r?ot(Jn,Eo,nn,J,D,Kt):ot(Eo,Jn,nn,D,J,Kt);if(!(Fi===void 0?Eo===Jn||ir(Eo,Jn,xe,ot,Kt):Fi)){hn=!1;break}go||(go=nn=="constructor")}if(hn&&!go){var ni=D.constructor,bn=J.constructor;ni!=bn&&"constructor"in D&&"constructor"in J&&!(typeof ni=="function"&&ni instanceof ni&&typeof bn=="function"&&bn instanceof bn)&&(hn=!1)}return Kt.delete(D),Kt.delete(J),hn}function Rt(D){return Cn(D,zr,kr)}function qt(D,J){var xe=D.__data__;return Ln(J)?xe[typeof J=="string"?"string":"hash"]:xe.map}function Yt(D,J){var xe=Xe(D,J);return $(xe)?xe:void 0}function Vt(D){var J=Dt.call(D,vt),xe=D[vt];try{D[vt]=void 0;var ot=!0}catch{}var ir=or.call(D);return ot&&(J?D[vt]=xe:delete D[vt]),ir}var kr=Ht?function(D){return D==null?[]:(D=Object(D),Ve(Ht(D),function(J){return ae.call(D,J)}))}:Mr,an=io;(jt&&an(new jt(new ArrayBuffer(1)))!=U||Ze&&an(new Ze)!=T||ct&&an(ct.resolve())!=O||ft&&an(new ft)!=B||Ct&&an(new Ct)!=ue)&&(an=function(D){var J=io(D),xe=J==R?D.constructor:void 0,ot=xe?dn(xe):"";if(ot)switch(ot){case at:return U;case St:return T;case Ft:return O;case Qt:return B;case $t:return ue}return J});function Mn(D,J){return J=J??a,!!J&&(typeof D=="number"||Be.test(D))&&D>-1&&D%1==0&&D<J}function Ln(D){var J=typeof D;return J=="string"||J=="number"||J=="symbol"||J=="boolean"?D!=="__proto__":D===null}function po(D){return!!Jt&&Jt in D}function Kn(D){var J=D&&D.constructor,xe=typeof J=="function"&&J.prototype||At;return D===xe}function No(D){return or.call(D)}function dn(D){if(D!=null){try{return kt.call(D)}catch{}try{return D+""}catch{}}return""}function Ao(D,J){return D===J||D!==D&&J!==J}var Xn=yn(function(){return arguments}())?yn:function(D){return lo(D)&&Dt.call(D,"callee")&&!ae.call(D,"callee")},so=Array.isArray;function Pi(D){return D!=null&&Bi(D.length)&&!$n(D)}var yi=Pt||jr;function bi(D,J){return En(D,J)}function $n(D){if(!ao(D))return!1;var J=io(D);return J==v||J==w||J==f||J==I}function Bi(D){return typeof D=="number"&&D>-1&&D%1==0&&D<=a}function ao(D){var J=typeof D;return D!=null&&(J=="object"||J=="function")}function lo(D){return D!=null&&typeof D=="object"}var ri=We?Je(We):X;function zr(D){return Pi(D)?Hn(D):le(D)}function Mr(){return[]}function jr(){return!1}r.exports=bi}(fh,fh.exports)),fh.exports}var yp={},$0;function W9(){if($0)return yp;$0=1,Object.defineProperty(yp,"__esModule",{value:!0});const r=IC(),e=MC();var t;return function(n){function o(u={},f={},p=!1){typeof u!="object"&&(u={}),typeof f!="object"&&(f={});let m=r(f);p||(m=Object.keys(m).reduce((g,v)=>(m[v]!=null&&(g[v]=m[v]),g),{}));for(const g in u)u[g]!==void 0&&f[g]===void 0&&(m[g]=u[g]);return Object.keys(m).length>0?m:void 0}n.compose=o;function i(u={},f={}){typeof u!="object"&&(u={}),typeof f!="object"&&(f={});const p=Object.keys(u).concat(Object.keys(f)).reduce((m,g)=>(e(u[g],f[g])||(m[g]=f[g]===void 0?null:f[g]),m),{});return Object.keys(p).length>0?p:void 0}n.diff=i;function a(u={},f={}){u=u||{};const p=Object.keys(f).reduce((m,g)=>(f[g]!==u[g]&&u[g]!==void 0&&(m[g]=f[g]),m),{});return Object.keys(u).reduce((m,g)=>(u[g]!==f[g]&&f[g]===void 0&&(m[g]=null),m),p)}n.invert=a;function c(u,f,p=!1){if(typeof u!="object")return f;if(typeof f!="object")return;if(!p)return f;const m=Object.keys(f).reduce((g,v)=>(u[v]===void 0&&(g[v]=f[v]),g),{});return Object.keys(m).length>0?m:void 0}n.transform=c}(t||(t={})),yp.default=t,yp}var bp={},q0;function LC(){if(q0)return bp;q0=1,Object.defineProperty(bp,"__esModule",{value:!0});var r;return function(e){function t(n){return typeof n.delete=="number"?n.delete:typeof n.retain=="number"?n.retain:typeof n.retain=="object"&&n.retain!==null?1:typeof n.insert=="string"?n.insert.length:1}e.length=t}(r||(r={})),bp.default=r,bp}var xp={},U0;function V9(){if(U0)return xp;U0=1,Object.defineProperty(xp,"__esModule",{value:!0});const r=LC();class e{constructor(n){this.ops=n,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(n){n||(n=1/0);const o=this.ops[this.index];if(o){const i=this.offset,a=r.default.length(o);if(n>=a-i?(n=a-i,this.index+=1,this.offset=0):this.offset+=n,typeof o.delete=="number")return{delete:n};{const c={};return o.attributes&&(c.attributes=o.attributes),typeof o.retain=="number"?c.retain=n:typeof o.retain=="object"&&o.retain!==null?c.retain=o.retain:typeof o.insert=="string"?c.insert=o.insert.substr(i,n):c.insert=o.insert,c}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?r.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const n=this.ops[this.index];return n?typeof n.delete=="number"?"delete":typeof n.retain=="number"||typeof n.retain=="object"&&n.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const n=this.offset,o=this.index,i=this.next(),a=this.ops.slice(this.index);return this.offset=n,this.index=o,[i].concat(a)}}else return[]}}return xp.default=e,xp}var W0;function G9(){return W0||(W0=1,function(r,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=U9(),n=IC(),o=MC(),i=W9();e.AttributeMap=i.default;const a=LC();e.Op=a.default;const c=V9();e.OpIterator=c.default;const u="\0",f=(m,g)=>{if(typeof m!="object"||m===null)throw new Error(`cannot retain a ${typeof m}`);if(typeof g!="object"||g===null)throw new Error(`cannot retain a ${typeof g}`);const v=Object.keys(m)[0];if(!v||v!==Object.keys(g)[0])throw new Error(`embed types not matched: ${v} != ${Object.keys(g)[0]}`);return[v,m[v],g[v]]};class p{constructor(g){Array.isArray(g)?this.ops=g:g!=null&&Array.isArray(g.ops)?this.ops=g.ops:this.ops=[]}static registerEmbed(g,v){this.handlers[g]=v}static unregisterEmbed(g){delete this.handlers[g]}static getHandler(g){const v=this.handlers[g];if(!v)throw new Error(`no handlers for embed type "${g}"`);return v}insert(g,v){const w={};return typeof g=="string"&&g.length===0?this:(w.insert=g,v!=null&&typeof v=="object"&&Object.keys(v).length>0&&(w.attributes=v),this.push(w))}delete(g){return g<=0?this:this.push({delete:g})}retain(g,v){if(typeof g=="number"&&g<=0)return this;const w={retain:g};return v!=null&&typeof v=="object"&&Object.keys(v).length>0&&(w.attributes=v),this.push(w)}push(g){let v=this.ops.length,w=this.ops[v-1];if(g=n(g),typeof w=="object"){if(typeof g.delete=="number"&&typeof w.delete=="number")return this.ops[v-1]={delete:w.delete+g.delete},this;if(typeof w.delete=="number"&&g.insert!=null&&(v-=1,w=this.ops[v-1],typeof w!="object"))return this.ops.unshift(g),this;if(o(g.attributes,w.attributes)){if(typeof g.insert=="string"&&typeof w.insert=="string")return this.ops[v-1]={insert:w.insert+g.insert},typeof g.attributes=="object"&&(this.ops[v-1].attributes=g.attributes),this;if(typeof g.retain=="number"&&typeof w.retain=="number")return this.ops[v-1]={retain:w.retain+g.retain},typeof g.attributes=="object"&&(this.ops[v-1].attributes=g.attributes),this}}return v===this.ops.length?this.ops.push(g):this.ops.splice(v,0,g),this}chop(){const g=this.ops[this.ops.length-1];return g&&typeof g.retain=="number"&&!g.attributes&&this.ops.pop(),this}filter(g){return this.ops.filter(g)}forEach(g){this.ops.forEach(g)}map(g){return this.ops.map(g)}partition(g){const v=[],w=[];return this.forEach(T=>{(g(T)?v:w).push(T)}),[v,w]}reduce(g,v){return this.ops.reduce(g,v)}changeLength(){return this.reduce((g,v)=>v.insert?g+a.default.length(v):v.delete?g-v.delete:g,0)}length(){return this.reduce((g,v)=>g+a.default.length(v),0)}slice(g=0,v=1/0){const w=[],T=new c.default(this.ops);let _=0;for(;_<v&&T.hasNext();){let A;_<g?A=T.next(g-_):(A=T.next(v-_),w.push(A)),_+=a.default.length(A)}return new p(w)}compose(g){const v=new c.default(this.ops),w=new c.default(g.ops),T=[],_=w.peek();if(_!=null&&typeof _.retain=="number"&&_.attributes==null){let R=_.retain;for(;v.peekType()==="insert"&&v.peekLength()<=R;)R-=v.peekLength(),T.push(v.next());_.retain-R>0&&w.next(_.retain-R)}const A=new p(T);for(;v.hasNext()||w.hasNext();)if(w.peekType()==="insert")A.push(w.next());else if(v.peekType()==="delete")A.push(v.next());else{const R=Math.min(v.peekLength(),w.peekLength()),O=v.next(R),I=w.next(R);if(I.retain){const F={};if(typeof O.retain=="number")F.retain=typeof I.retain=="number"?R:I.retain;else if(typeof I.retain=="number")O.retain==null?F.insert=O.insert:F.retain=O.retain;else{const z=O.retain==null?"insert":"retain",[j,V,ue]=f(O[z],I.retain),P=p.getHandler(j);F[z]={[j]:P.compose(V,ue,z==="retain")}}const B=i.default.compose(O.attributes,I.attributes,typeof O.retain=="number");if(B&&(F.attributes=B),A.push(F),!w.hasNext()&&o(A.ops[A.ops.length-1],F)){const z=new p(v.rest());return A.concat(z).chop()}}else typeof I.delete=="number"&&(typeof O.retain=="number"||typeof O.retain=="object"&&O.retain!==null)&&A.push(I)}return A.chop()}concat(g){const v=new p(this.ops.slice());return g.ops.length>0&&(v.push(g.ops[0]),v.ops=v.ops.concat(g.ops.slice(1))),v}diff(g,v){if(this.ops===g.ops)return new p;const w=[this,g].map(O=>O.map(I=>{if(I.insert!=null)return typeof I.insert=="string"?I.insert:u;const F=O===g?"on":"with";throw new Error("diff() called "+F+" non-document")}).join("")),T=new p,_=t(w[0],w[1],v,!0),A=new c.default(this.ops),R=new c.default(g.ops);return _.forEach(O=>{let I=O[1].length;for(;I>0;){let F=0;switch(O[0]){case t.INSERT:F=Math.min(R.peekLength(),I),T.push(R.next(F));break;case t.DELETE:F=Math.min(I,A.peekLength()),A.next(F),T.delete(F);break;case t.EQUAL:F=Math.min(A.peekLength(),R.peekLength(),I);const B=A.next(F),z=R.next(F);o(B.insert,z.insert)?T.retain(F,i.default.diff(B.attributes,z.attributes)):T.push(z).delete(F);break}I-=F}}),T.chop()}eachLine(g,v=`
package/dist/index.es.js CHANGED
@@ -19855,9 +19855,8 @@ const EI = {
19855
19855
  (W) => {
19856
19856
  if (_)
19857
19857
  if (g && W.startsWith("*")) _("*");
19858
- else if (W === "") _("");
19859
- else if (W === "-")
19860
- _("-");
19858
+ else if (W === "") _(a !== void 0 ? `${a}` : "");
19859
+ else if (W === "-") _("-");
19861
19860
  else {
19862
19861
  W = W.replace(/[^0-9-]/g, "");
19863
19862
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ados-rcm",
3
- "version": "1.1.616",
3
+ "version": "1.1.617",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",