ados-rcm 1.1.362 → 1.1.363

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
@@ -346,7 +346,7 @@ Error generating stack: `+d.message+`
346
346
  `,"user"),t.index+=2):(this.quill.insertText(t.index,`
347
347
  `,"user"),t.index+=1)}}findTableParent(e){let t=e;for(;t;){if(t.domNode&&t.domNode.tagName==="TABLE")return t;t=t.parent}return null}hidePicker(){this.removeTooltip(),this.picker&&(this.picker.remove(),this.picker=null),this.tableButton&&this.tableButton.classList.remove("ql-expanded")}}var Iu={},Wb;function IP(){if(Wb)return Iu;Wb=1;var r=Fs;if(process.env.NODE_ENV==="production")Iu.createRoot=r.createRoot,Iu.hydrateRoot=r.hydrateRoot;else{var e=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Iu.createRoot=function(t,n){e.usingClientEntryPoint=!0;try{return r.createRoot(t,n)}finally{e.usingClientEntryPoint=!1}},Iu.hydrateRoot=function(t,n,i){e.usingClientEntryPoint=!0;try{return r.hydrateRoot(t,n,i)}finally{e.usingClientEntryPoint=!1}}}return Iu}var LP=IP();const Vb=il(LP);class MP{constructor(e,t){it(this,"DEFAULTS",{maxRowCount:-1});it(this,"quill");it(this,"options");it(this,"position",null);it(this,"table");it(this,"selectedCell",null);it(this,"menuRoot",null);it(this,"helperTextElement",null);it(this,"scrollTimeout",null);it(this,"SCROLL_DEBOUNCE_TIME",80);it(this,"lastSelectedCellRef",null);it(this,"boundDocClickHandler",this.hideMenu.bind(this));it(this,"boundEditorChangeHandler",this.editorChangeHandler.bind(this));it(this,"boundContextMenuHandler",this.contextMenuHandler.bind(this));it(this,"boundCopyHandler",this.copyHandler.bind(this));it(this,"boundScrollHandler",this.handleScroll.bind(this));it(this,"boundPasteHandler",this.pasteHandler.bind(this));it(this,"menuItems",[]);it(this,"positionCache",new Map);it(this,"POSITION_CACHE_LIFETIME",1e3);it(this,"reactRoot",null);if(this.quill=e,this.options={...this.DEFAULTS,...t},this.table=e.getModule("table"),!this.table){console.error('"table" module not found');return}this.initializeMenuItems(),this.overrideTableMethods(),this.initializeHelperText(),this.attachEventListeners()}initializeMenuItems(){this.menuItems=[{handler:()=>{(!(this.options.maxRowCount!==void 0&&this.options.maxRowCount>0)||this.getColCount()<(this.options.maxRowCount||0))&&this.table.insertColumnRight()},icon:Os.renderToString(v.jsx(Br,{icon:"AddColRight"})),title:hn.AEditor["Insert Column Right"]},{handler:()=>{(!(this.options.maxRowCount!==void 0&&this.options.maxRowCount>0)||this.getColCount()<(this.options.maxRowCount||0))&&this.table.insertColumnLeft()},icon:Os.renderToString(v.jsx(Br,{icon:"AddColLeft"})),title:hn.AEditor["Insert Column Left"]},{handler:()=>{this.table.insertRowAbove()},icon:Os.renderToString(v.jsx(Br,{icon:"AddRowAbove"})),title:hn.AEditor["Insert Row Top"]},{handler:()=>{this.table.insertRowBelow()},icon:Os.renderToString(v.jsx(Br,{icon:"AddRowBelow"})),title:hn.AEditor["Insert Row Bottom"]},{handler:()=>{this.table.deleteColumn()},icon:Os.renderToString(v.jsx(Br,{icon:"RemoveCol"})),title:hn.AEditor["Delete Column"]},{handler:()=>{this.table.deleteRow()},icon:Os.renderToString(v.jsx(Br,{icon:"RemoveRow"})),title:hn.AEditor["Delete Row"]},{handler:()=>{this.table.deleteTable()},icon:Os.renderToString(v.jsx(Br,{icon:"Trash"})),title:hn.AEditor["Delete Table"]}]}overrideTableMethods(){const e=this.table.insertTable;this.table.insertTable=(...n)=>{const i=e.apply(this.table,n),l=this.quill.getSelection();return l&&(this.quill.focus(),setTimeout(()=>this.detectButton(l),0)),i};const t=this.table.deleteTable;this.table.deleteTable=(...n)=>{const i=t.apply(this.table,n);return this.cleanupTableUI(),i}}initializeHelperText(){this.helperTextElement=document.createElement("div"),this.helperTextElement.className=Wn["ql-tableui-helper"];const e=document.createElement("span");e.className=He.clsx("Caption1",Wn["ql-tableui-helper__text"],"NoSelect"),e.textContent=hn.AEditor["Right click to open properties"];const t=document.createElement("span");t.className=Wn["ql-tableui-helper__icon"],t.innerHTML=Os.renderToString(v.jsx(Br,{icon:"MoreHorizontal",size:"xs"})),t.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation(),this.menuRoot?this.hideMenu():this.showMenu()}),this.helperTextElement.appendChild(e),this.helperTextElement.appendChild(t),this.helperTextElement.style.display="none",this.quill.container.appendChild(this.helperTextElement)}attachEventListeners(){this.quill.on("editor-change",this.boundEditorChangeHandler),this.quill.root.addEventListener("contextmenu",this.boundContextMenuHandler),this.quill.root.addEventListener("copy",this.boundCopyHandler),this.quill.root.addEventListener("paste",this.boundPasteHandler),window.addEventListener("scroll",this.boundScrollHandler,!0)}removeEventListeners(){this.quill.off("editor-change",this.boundEditorChangeHandler),this.quill.root.removeEventListener("contextmenu",this.boundContextMenuHandler),this.quill.root.removeEventListener("copy",this.boundCopyHandler),this.quill.root.removeEventListener("paste",this.boundPasteHandler),document.removeEventListener("click",this.boundDocClickHandler),window.removeEventListener("scroll",this.boundScrollHandler,!0)}editorChangeHandler(e,t,n,i){e==="selection-change"&&this.detectButton(t)}contextMenuHandler(e){return this.isTable()?(e.preventDefault(),this.showMenu(),!1):!0}copyHandler(e){if(!this.selectedCell||!e.clipboardData)return;e.preventDefault();const t=this.selectedCell.textContent||"";e.clipboardData.setData("text/plain",t)}isTable(e){return e=e||this.quill.getSelection(),e?!!(this.quill.getFormat(e.index).table&&!e.length):!1}getColCount(e){if(e=e||this.quill.getSelection(),!e)return 0;const[t]=this.table.getTable(e);return t?t.rows().reduce((n,i)=>Math.max(i.children.length,n),0):0}showMenu(){if(this.menuRoot){this.hideMenu();return}if(!this.selectedCell)return;this.menuRoot||(this.menuRoot=document.createElement("div"),document.body.appendChild(this.menuRoot));const e=this.getBoundingRectWithCache(this.selectedCell),t=window.innerWidth,n=window.innerHeight,i=I.memo(({item:u,index:h})=>v.jsxs("div",{className:Wn["ql-tableui-options__item"],onClick:this.createItemClickHandler(u),children:[v.jsx("span",{className:Wn["ql-tableui-options__item-icon"],dangerouslySetInnerHTML:{__html:u.icon}}),v.jsx("span",{className:Wn["ql-tableui-options__item-text"],children:u.title})]},h)),l=()=>v.jsx("div",{className:Wn["ql-tableui-options"],style:{position:"fixed",visibility:"hidden",zIndex:1e4},children:this.menuItems.map((u,h)=>v.jsx(i,{item:u,index:h},h))});try{Vb.createRoot?(this.reactRoot=Vb.createRoot(this.menuRoot),this.reactRoot.render(v.jsx(l,{}))):Fs.render(v.jsx(l,{}),this.menuRoot)}catch{Fs.render(v.jsx(l,{}),this.menuRoot)}document.addEventListener("click",this.boundDocClickHandler),requestAnimationFrame(()=>{if(!this.menuRoot)return;const u=this.menuRoot.firstElementChild;if(u){const h=u.getBoundingClientRect();let g=e.bottom+window.scrollY,m=e.left+window.scrollX;m+h.width>t&&(m=e.right-h.width+window.scrollX),g+h.height>n+window.scrollY&&(g=e.top-h.height+window.scrollY),u.style.top=`${g}px`,u.style.left=`${m}px`,u.style.visibility="visible"}})}hideMenu(){this.menuRoot&&(document.removeEventListener("click",this.boundDocClickHandler),this.reactRoot?(this.reactRoot.unmount(),this.reactRoot=null):Fs.unmountComponentAtNode(this.menuRoot),this.menuRoot.remove(),this.menuRoot=null)}detectButton(e){if(e)if(this.isTable(e)){const[t,n]=this.quill.getLine(e.index);if(!t||!t.domNode)return;const i=t.domNode,l=`${i.tagName}-${i.offsetLeft}-${i.offsetTop}`;this.selectedCell===i||this.lastSelectedCellRef===l||(this.clearAllTableCellOutlines(),i.style.outline="2px solid var(--acent-brand)",i.style.outlineOffset="-1px",this.selectedCell=i,this.lastSelectedCellRef=l),this.showHelperText();const h=this.quill.container.getBoundingClientRect(),g=i.getBoundingClientRect(),m={bottom:g.bottom-h.top,height:g.height,left:g.left-h.left,right:g.right-h.left,top:g.top-h.top,width:g.width,x:g.x,y:g.y,toJSON:()=>JSON.stringify(m)};this.position&&(this.position.top!==m.top||this.position.left!==m.left)&&this.hideMenu(),this.position=m}else this.cleanupTableUI()}clearAllTableCellOutlines(){this.selectedCell&&(this.selectedCell.style.removeProperty("outline"),this.selectedCell.style.removeProperty("outline-offset"),this.selectedCell=null),this.quill.root.querySelectorAll("td, th").forEach(t=>{t instanceof HTMLElement&&(t.style.removeProperty("outline"),t.style.removeProperty("outline-offset"))}),this.lastSelectedCellRef=null}showHelperText(){if(!this.selectedCell||!this.helperTextElement)return;const e=this.quill.getSelection();if(!e)return;const[t]=this.table.getTable(e);if(!t||!t.domNode)return;const i=t.domNode.getBoundingClientRect(),l=this.quill.container.getBoundingClientRect();if(!(i.bottom<l.top+5||i.top>l.bottom-5)){let h=i.top-l.top-20;i.top<l.top&&(h=5),this.helperTextElement.style.display="block",this.helperTextElement.style.left=`${i.left-l.left}px`,this.helperTextElement.style.top=`${h}px`}else this.helperTextElement.style.display="none"}removeHelperText(){this.helperTextElement&&(this.helperTextElement.style.display="none")}handleScroll(){this.removeHelperText(),this.hideMenu(),this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(()=>{const e=this.quill.getSelection();e&&this.isTable(e)&&this.detectButton(e),this.scrollTimeout=null},this.SCROLL_DEBOUNCE_TIME)}destroy(){this.removeEventListeners(),this.cleanupTableUI(),this.helperTextElement&&this.helperTextElement.remove(),this.scrollTimeout&&(clearTimeout(this.scrollTimeout),this.scrollTimeout=null),this.positionCache.clear(),this.reactRoot=null,this.selectedCell=null,this.helperTextElement=null,this.position=null,this.options=this.DEFAULTS,this.menuRoot=null,this.table=null}createItemClickHandler(e){return t=>{t.preventDefault(),t.stopPropagation(),this.quill.focus(),e.handler(),this.hideMenu(),this.detectButton(this.quill.getSelection())}}getBoundingRectWithCache(e){const t=Date.now(),n=this.positionCache.get(e);if(n&&t-n.timestamp<this.POSITION_CACHE_LIFETIME)return n.rect;const i=e.getBoundingClientRect();return this.positionCache.set(e,{rect:i,timestamp:t}),i}pasteHandler(){this.clearAllTableCellOutlines(),setTimeout(()=>{const e=this.quill.getSelection();e&&this.detectButton(e)},0)}cleanupTableUI(){this.removeHelperText(),this.clearAllTableCellOutlines(),this.hideMenu(),this.lastSelectedCellRef=null}}const lS=[1,2,3,!1,4],cS=$e.import("ui/icons");cS.table=Os.renderToString(v.jsx(Br,{icon:"Table",strokeWidth:2.5}));cS.divider=Os.renderToString(v.jsx(Br,{icon:"Minus",strokeWidth:2.5}));const DP=$e.import("blots/block/embed");class rm extends DP{static create(e){const t=super.create(e);return t.style.border="var(--AEditor_Addon_Primary_border)",t.style.borderBottom="none",t.style.transition="border var(--Transition)",t}}it(rm,"blotName","divider"),it(rm,"tagName","hr");$e.register({"modules/imageCompress":ZD,"modules/resize":JD,"modules/tablePicker":RP,"modules/tableUI":MP,"formats/header":FP(lS),"formats/divider":rm},!0);const OP=["bold","italic","underline","strike","blockquote","table","size","header","color","indent","list","align","image","link","video","divider"],PP=[[{header:lS}],["bold","italic","underline","strike","blockquote","divider","table",{color:[]}],[{list:"ordered"},{list:"bullet"},{indent:"-1"},{indent:"+1"},{align:[]}],["link","image","video"],["clean"]],NP=r=>{const{onEnterPress:e,errorMessage:t,type:n="Primary",editorRef:i,useValue:l,useError:u,placeholder:h,tabIndex:g,autoFocus:m,editorProps:M,wrapProps:T,helperText:C,label:_,labelProps:S,wrapType:D,style:A,minHeight:b,maxHeight:k,contentHeight:O,contentMaxHeight:q=1e3,toolbarSize:H="Med",readOnly:G,...Y}=r,ue=I.useMemo(()=>n==="ReadOnly"||G,[n,G]),te=I.useMemo(()=>O?20:0,[O]),[fe,N]=I.useState(H==="Med"?40:50),re=I.useMemo(()=>ue?0:fe,[ue,fe]),[K,ie]=I.useMemo(()=>[20,6],[]),ne=I.useMemo(()=>u?K+ie:0,[u,K,ie]),[ce,me]=I.useState(O),[ae,be]=I.useState(!1),[ge,xe]=I.useState(!1),Le=I.useRef(null),je=I.useRef(0),We=I.useRef(0),we=I.useMemo(()=>_?23:0,[_]),rt=I.useCallback(Ve=>{if(!ae||!O)return;const ht=Ve.clientY-We.current,yt=b?b-re-ne:O,De=Math.max(yt,0),ut=k?k-re-ne:q,At=Math.min(ut,Math.max(De,je.current+ht));me(At)},[O,ae,q,b,k,re,ne]),gt=I.useCallback(()=>{be(!1),xe(!1),window.removeEventListener("mousemove",rt),window.removeEventListener("mouseup",gt)},[rt]),Xe=I.useCallback(Ve=>{if(!ce)return;if(Ve.detail===2){me(O);return}be(!0),xe(!0),je.current=ce,We.current=Ve.clientY;const ht=De=>{if(!O)return;const ut=De.clientY-We.current,At=b?b-re-ne:O,er=Math.max(At,0),vr=k?k-re-ne:q,pr=Math.min(vr,Math.max(er,je.current+ut));me(pr)},yt=()=>{be(!1),xe(!1),window.removeEventListener("mousemove",ht),window.removeEventListener("mouseup",yt)};window.addEventListener("mousemove",ht),window.addEventListener("mouseup",yt)},[O,ce,q,b,k,re,ne]),Ye=I.useMemo(()=>{if(O){if(ce)switch(n){case"ReadOnly":return ce;case"Raw":return ce+ne;default:return ce+re+ne}}else return},[O,ce,n,re,ne]),Pe=I.useMemo(()=>{if(!(!k||k<=re+ne))switch(n){case"ReadOnly":return k;case"Raw":return k-ne;default:return k-re-ne}},[n,re,ne,k]),ke=I.useMemo(()=>{if(b&&O){const Ve=Math.min(b-re-ne,O);return ue?Ve:Ve+re+ne}else return b||(O?void 0:`calc(100% - ${we}px)`)},[O,b,re,ne,ue,we]),Te=I.useMemo(()=>jP(t)?"Error":n,[t,n]),[Fe,Ee]=pn(l,""),[Qe,lt]=pn(u,!1),[Ct,wt]=I.useState(()=>{if(!Fe)return new Ut;try{const Ve=document.createElement("div");return Ve.innerHTML=Fe,new $e(Ve,{readOnly:!0}).getContents()}catch(Ve){return console.warn("Error parsing HTML content:",Ve),new Ut}}),vt=I.useMemo(()=>Math.floor(5e4*.68234)*3,[]),kt=I.useCallback(Ve=>Ve.ops?Ve.ops.reduce((ht,yt)=>{if(typeof yt.insert=="string"){const De=yt.insert.replace(/\n/g,"");return ht+De.split("").reduce((ut,At)=>ut+(At.charCodeAt(0)<=127?1:3),0)}return typeof yt.insert=="object"&&yt.insert.image?ht+yt.insert.image.length:ht},0):0,[]),Tt=I.useMemo(()=>({clipboard:{matchVisual:!1},imageCompress:{quality:.5},...!ue&&{resize:{locale:{altTip:hn.AEditor["Image size adjust"],center:hn.AEditor.Center,floatLeft:hn.AEditor.floatLeft,floatRight:hn.AEditor.floatRight,inputTip:hn.AEditor["Input on mouse down"],restore:hn.AEditor.Restore}},table:!0,tablePicker:!0,tableUI:!0,toolbar:{container:PP,handlers:{divider:function(){const Ve=this.quill,ht=Ve.getSelection(!0),yt=Ve.getModule("table"),De=yt&&(()=>{try{return!!yt.getTable(ht)[0]}catch{return!1}})();De||Ve.insertText(ht.index,`
348
348
  `,$e.sources.USER);const ut=De?0:1;Ve.insertEmbed(ht.index+ut,"divider",!0,$e.sources.USER),Ve.setSelection(ht.index+ut+1,0,$e.sources.SILENT)}}}}}),[ue]),ct=I.useCallback((Ve,ht,yt,De)=>{var vr;if(!Ee||yt!=="user")return;const ut=De.getContents(),At=De.getHTML(),er=((vr=ut.ops)==null?void 0:vr.length)===1&&ut.ops[0].insert===`
349
- `;if(lt){const pr=kt(ut);lt(pr>vt)}Ee(er?"":At),wt(ut)},[kt,vt,lt,Ee]),st=I.useMemo(()=>H==="Med"?8:12.5,[H]),St=I.useCallback(Ve=>{if(!Ve)return;const ht=Ve.getEditor();if(!ht)return;const yt=[],De={input:X=>{const Me=X.target;Me.value=Me.value.replace(/[^0-9]/g,"");const Ke=parseInt(Me.value);Ke>100&&(Me.value="100"),Ke<1&&(Me.value="1")},keyDown:X=>{if(X.key!=="Delete"&&X.key!=="Backspace")return;const Me=document.querySelector("#image-resizer");if(!Me)return;const Ke=Me.getBoundingClientRect(),Pt=document.querySelectorAll(".ql-editor img"),mt=Array.from(Pt).find(_t=>{const zt=_t.getBoundingClientRect();return Math.abs(zt.left-Ke.left)<5&&Math.abs(zt.top-Ke.top)<5});if(mt){Me.style.display="none";const _t=$e.find(mt),zt=ht.getIndex(_t);_t.remove(),ht.setSelection(zt,0,$e.sources.USER)}},formatExpand:X=>{const Me=ht.getFormat();X.forEach(Ke=>{if(Me[Ke]){const Pt=Me[Ke],mt=`.ql-${Ke}`,_t=document.querySelector(`${mt} .ql-picker-label`),zt=document.querySelectorAll(`${mt} .ql-picker-item`),Nt=Array.from(zt).find(or=>or.getAttribute("data-value")===Pt);Nt&&(Nt.classList.add("ql-selected"),_t==null||_t.classList.add("ql-active"))}})},resizeToolbar:X=>{requestAnimationFrame(()=>{for(const Me of X)N(Me.contentRect.height+st*2)})}},ut=ht.root,At=document.querySelector(".ql-snow.ql-toolbar"),er=document.querySelector("#image-resizer .input-wrapper input"),vr=new ResizeObserver(De.resizeToolbar),pr=["header","color"],pe=[];return ut==null||ut.addEventListener("keydown",De.keyDown),er==null||er.addEventListener("input",De.input),vr.observe(At),pr.forEach(X=>{const Me=document.querySelector(`.ql-${X} .ql-picker-label`);Me&&(Me.addEventListener("click",()=>De.formatExpand(pr)),pe.push(Me))}),yt.push(()=>{ut==null||ut.removeEventListener("keydown",De.keyDown),er==null||er.removeEventListener("input",De.input),vr.disconnect(),pe.forEach(X=>X.removeEventListener("click",()=>De.formatExpand(pr)))}),()=>yt.forEach(X=>X())},[st]),Re=I.useCallback(Ve=>{i&&(typeof i=="function"?i(Ve):i.current=Ve),Ve&&St(Ve)},[i,St]),dt=I.useMemo(()=>k?k+we:b?"fit-content":`calc(100% - ${we}px)`,[k,b,we]);return v.jsx(Uc,{helperText:C,label:_,wrapType:D,labelProps:{...S,style:{minHeight:20}},errorMessage:t,wrapProps:{...T,style:{...T==null?void 0:T.style,height:dt}},children:v.jsxs(Ur,{...Y,className:He.clsx(Y.className,Wn.AEditorContainer),style:{...A,height:Ye,minHeight:ke},children:[v.jsx(bh,{...M,ref:Re,className:He.clsx(M==null?void 0:M.className,Wn.AEditor,Wn[Te]),formats:OP,modules:Tt,placeholder:h,readOnly:ue,theme:"snow",value:Ct,style:{maxHeight:Pe?Pe+re:void 0,"--icon-size":`${H==="Med"?18:24}px`,"--toolbar-padding":`${st}px`,"--content-height":ce?`${ce}px`:"100%","--max-height":Pe?`${Pe}px`:void 0,"--default-text":`'${hn.AEditor.Default}'`,"--arrow-background":`url("data:image/svg+xml,${encodeURIComponent(Os.renderToString(v.jsx(Br,{icon:"EditorArrow"})))}`},onChange:ct}),O&&v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:Le,className:Wn.Resizer,style:{height:te,bottom:u&&!ue?ne-1:-1,cursor:"ns-resize"},onMouseDown:Xe}),ge&&v.jsx("div",{className:He.clsx(Wn.Indicator,"NoSelect","Caption"),style:{bottom:u&&!ue?ne:0},children:`${Math.round(ce)}px`})]}),u&&!ue&&v.jsx("div",{className:He.clsx(Wn.LimitContainer,"NoSelect"),style:{marginTop:ie,minHeight:K},children:v.jsxs(Xl,{className:Wn.Limit,children:["(",v.jsx("span",{className:Qe?Wn.Error:void 0,children:nm(kt(Ct))})," / ",nm(vt),")"]})})]})})};function jP(r){return Array.isArray(r)?r.filter(Boolean).length>0:!!r}function FP(r){const e=$e.import("formats/header");return e.whitelist=r,e}const nm=r=>{if(!r)return"0 bytes";const e=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB","RB","QB"];let t=0;for(;r>=1024&&t<e.length-1;)r/=1024,t++;return`${t===0?Math.floor(r):r.toFixed(1)} ${e[t]}`};function eh(r,e){Array.isArray(r)||(r=[r]);for(const t of r){if(e(t))return t;if(!t.children||t.children.length<1)continue;const n=eh(t.children,e);if(n)return n}}function sd(r,e){Array.isArray(r)||(r=[r]);for(const t of r)e(t),!(!t.children||t.children.length<1)&&sd(t.children,e)}function uS(r,e){Array.isArray(r)||(r=[r]);const t=[];return sd(r,(n,i)=>t.push(e(n,i))),t}function fS(r,e){Array.isArray(r)||(r=[r]);for(const t of r){if(!e(t))return!1;if(!(!t.children||t.children.length<1)&&!fS(t.children,e))return!1}return!0}function BP(r,e){Array.isArray(r)||(r=[r]);const t=[];return sd(r,(n,i)=>{e(n,i)&&t.push(n)}),t}function HP(r){Array.isArray(r)||(r=[r]);let e=0;return sd(r,()=>e++),e}function qP(r,e,t,n){if(n(e,t))return null;Array.isArray(r)||(r=[r]);const i=eh(r,u=>{var h;return(h=u.children)==null?void 0:h.some(g=>n(g,e))}),l=eh(r,u=>{var h;return(h=u.children)==null?void 0:h.some(g=>n(g,t))});if(i===void 0&&l===void 0){const u=r.findIndex(g=>n(g,e)),h=r.findIndex(g=>n(g,t));return r.splice(u,1),r.splice(h,0,e),[...r]}else if(i!==void 0&&l!==void 0&&n(i,l)&&i.children){const u=i.children.findIndex(g=>n(g,e)),h=i.children.findIndex(g=>n(g,t));return u===void 0||h===void 0?null:(i.children.splice(u,1),i.children.splice(h,0,e),i.children=[...i.children],[...r])}return null}function zP(r,e,t){const n=[],i=[...e];for(;i.length>0;){const l=i.shift();if(l&&!n.find(u=>t(u,l))&&(n.push(l),!(!l.children||l.children.length<1)))for(const u of l.children)i.push(u)}return n}function $P(r,e,t){Array.isArray(r)||(r=[r]);const n=uS(r,u=>u),i=[],l=[...e];for(;l.length>0;){const u=l.shift();if(!u||i.find(g=>t(g,u)))continue;i.push(u);const h=n.find(g=>{var m;return(m=g.children)==null?void 0:m.some(M=>t(M,u))});h&&l.push(h)}return i}const Qa={find:eh,forEach:sd,map:uS,every:fS,filter:BP,length:HP,replace:qP,descendants:zP,ancestors:$P},UP="_AWrap_f5le3_1",WP="_AContainer_f5le3_10",VP="_ATree_f5le3_18",GP="_ATreeBody_f5le3_30",ZP="_CoverBorder_f5le3_36",YP="_InsertBorder_f5le3_45",KP="_ATreeHeader_f5le3_76",XP="_ATreeBodyHeader_f5le3_82",JP="_ATreeBodyHeaderResources_f5le3_92",QP="_ATreeItem_f5le3_98",eN="_IsSelectUsed_f5le3_114",tN="_IsSelected_f5le3_117",rN="_IsSearchSelected_f5le3_122",nN="_IsHovered_f5le3_133",iN="_CheckBox_f5le3_137",oN="_Indents_f5le3_149",sN="_ExpandIcon_f5le3_156",aN="_Content_f5le3_168",lN="_RightSticky_f5le3_177",cN="_SearchInputWrap_f5le3_188",uN="_SearchInput_f5le3_188",fN="_RightAddon_f5le3_200",dN="_RightAddonIcon_f5le3_211",hN="_Loader_f5le3_218",fn={AWrap:UP,AContainer:WP,ATree:VP,ATreeBody:GP,CoverBorder:ZP,InsertBorder:YP,ATreeHeader:KP,ATreeBodyHeader:XP,ATreeBodyHeaderResources:JP,ATreeItem:QP,IsSelectUsed:eN,IsSelected:tN,IsSearchSelected:rN,IsHovered:nN,CheckBox:iN,Indents:oN,ExpandIcon:sN,Content:aN,RightSticky:lN,SearchInputWrap:cN,SearchInput:uN,RightAddon:fN,RightAddonIcon:dN,Loader:hN},pN=r=>{const{isEqual:e,item:t,selectDisabled:n,selectUnused:i,isParentDisabled:l,indents:u,extIndents:h,useExpand:g,useSelect:m,useSearch:M,onDragStart:T,onDragOver:C,onDragEnd:_,showCheckbox:S,icons:D,iconWidth:A,isSelectMulti:b,isDraggable:k,isParentCheckHovered:O,hoverdItem:q,onMouseOver:H,onMouseLeave:G,ContentRenderer:Y,TreeItemRenderer:ue,RightStickyAddon:te,resources:fe,containerRef:N,TreeItemStyle:re,TreeItemClassName:K,searchItemStyle:ie,searchItemClassName:ne,height:ce}=r,{children:me}=I.useMemo(()=>t,[t]),[ae,be]=I.useMemo(()=>g,[g]),[ge,xe]=I.useMemo(()=>m,[m]),[Le,je]=I.useMemo(()=>M,[M]),We=I.useMemo(()=>i?i(t):!1,[i,t]),we=I.useMemo(()=>!n||l?l:n(t),[n,l,t]),rt=I.useMemo(()=>ae.some(De=>e(De,t)),[ae,e,t]),gt=I.useMemo(()=>!me||me.length<1?"noChild":rt?"expanded":"collapsed",[me,rt]),Xe=I.useMemo(()=>{const De=D[gt];return am.includes(De)?v.jsx(Br,{style:{width:A,height:A},icon:De}):De},[D,A,gt]),Ye=I.useCallback(De=>{!be||gt==="noChild"||(be(rt?ae.filter(ut=>!e(ut,t)):[...ae,t]),De.stopPropagation())},[be,ae,rt,t,e,gt]),Pe=I.useMemo(()=>ge.some(De=>e(De,t)),[ge,e,t]),ke=I.useCallback(()=>{!xe||we||(xe(b?Pe?ge.filter(De=>!e(De,t)):[...ge,t]:[t]),Le&&je&&Le.items.some(De=>e(De,t))&&je({...Le,item:t}))},[b,we,Pe,Le,je,xe,e,ge,t]),Te=I.useMemo(()=>Le==null?void 0:Le.items.some(De=>e(De,t)),[Le,e,t]),Fe=I.useMemo(()=>Te&&(Le==null?void 0:Le.item)&&e(Le.item,t),[Te,Le,e,t]),Ee=I.useRef(null);I.useEffect(()=>{setTimeout(()=>{if(Fe&&Ee.current&&N.current){const{top:De,bottom:ut}=Ee.current.getBoundingClientRect(),{top:At,bottom:er}=N.current.getBoundingClientRect();(De<At||ut>er)&&Ee.current.scrollIntoView({behavior:"smooth",block:"center"})}},10)},[N,Fe]);const[Qe,lt]=I.useState(!1),Ct=I.useCallback(()=>!we&&lt(!0),[we]),wt=I.useCallback(()=>!we&&lt(!1),[we]),vt=I.useMemo(()=>Qa.map(t,De=>De).filter(De=>!(n!=null&&n(De))&&!(i!=null&&i(De))),[n,i,t]),kt=I.useMemo(()=>!S||!b?!1:Pe&&vt.some(De=>ge.some(ut=>e(De,ut)))&&vt.some(De=>!ge.some(ut=>e(De,ut))),[S,b,Pe,vt,e,ge]),Tt=I.useMemo(()=>S?b?vt.every(De=>ge.some(ut=>e(De,ut))):ge.some(De=>e(De,t)):!1,[S,b,vt,t,e,ge]),ct=I.useCallback(()=>{if(!(!xe||we))if(b)if(Pe){const De=ge.filter(ut=>!(i!=null&&i(ut))&&!(n!=null&&n(ut))&&vt.some(At=>e(At,ut)));De.length>0&&xe(ge.filter(ut=>!De.some(At=>e(ut,At))))}else{const De=vt.filter(ut=>!(i!=null&&i(ut))&&!(n!=null&&n(ut))&&!ge.some(At=>e(At,ut)));De.length>0&&xe([...ge,...De])}else xe([t])},[we,n,i,b,xe,e,Pe,ge,vt,t]),st=I.useCallback(De=>{we||ct(),De.stopPropagation()},[we,ct]),St=I.useMemo(()=>{if(!S||!b||we)return"";if(Pe){const ut=ge.filter(At=>!(i!=null&&i(At))&&!(n!=null&&n(At))&&vt.some(er=>e(er,At)));if(ut.length>0)return fe["deselect n"](ut.length)}const De=vt.filter(ut=>!(i!=null&&i(ut))&&!(n!=null&&n(ut))&&!ge.some(At=>e(At,ut)));return fe["select n"](De.length)},[n,i,fe,we,S,b,Pe,vt,e,ge]),Re=I.useMemo(()=>kr.getContent(te,r),[te,r]),dt=I.useMemo(()=>kr.getContent(re,r),[r,re]),Ve=I.useMemo(()=>kr.getContent(K,r),[r,K]),ht=I.useMemo(()=>kr.getContent(ne,r),[r,ne]),yt=I.useMemo(()=>kr.getContent(ie,r),[r,ie]);return v.jsxs(I.Fragment,{children:[v.jsxs(Ur,{className:He.clsx(fn.ATreeItem,Pe&&fn.IsSelected,!we&&(Qe||O)&&fn.IsHovered,Te&&fn.IsSearched,Fe&&(ht||fn.IsSearchSelected),!We&&fn.IsSelectUsed,"NoSelect",Ve),style:{...dt,...Fe&&yt,"--ATreeItem_height":`${ce}px`},draggable:k,onDragStart:()=>T==null?void 0:T(t),onDragEnter:De=>C==null?void 0:C(De,t),onDragEnd:De=>_==null?void 0:_(De,t),onClick:ke,abaseRef:Ee,isDisabled:we,onMouseOver:De=>H==null?void 0:H(De,t),onMouseLeave:De=>G==null?void 0:G(De,t),children:[S&&v.jsx(Uu,{style:{visibility:we||We?"hidden":"visible",zIndex:we||We?0:2},className:fn.CheckBox,useCheck:[+Tt,ct],onClick:st,isIndeterminate:kt,onMouseOver:Ct,onMouseOut:wt,tooltip:St,isDisabled:we}),v.jsx("div",{className:fn.Indents,style:{paddingLeft:S?0:r.icons.noChild?12:0},children:u.map((De,ut)=>{const At=ut===u.length-1;return v.jsx(I2,{value:De,map:{Collapsed:h?h({iconWidth:A}).collapsed:v.jsx(mN,{iconWidth:A}),Expanded:h?h({iconWidth:A,isLast:At}).expanded:v.jsx(gN,{iconWidth:A,isLast:At}),IsLast:h?h({iconWidth:A}).isLast:v.jsx(vN,{iconWidth:A})}},ut)})}),Xe&&v.jsx("div",{className:fn.ExpandIcon,style:{width:A,minWidth:A,maxWidth:A},onClick:Ye,children:Xe}),v.jsx("div",{className:He.clsx(fn.Content,"NoSelect"),children:v.jsx(Y,{isEqual:e,item:t,indents:u,extIndents:h,useExpand:g,useSelect:m,useSearch:M,onDragStart:T,onDragOver:C,onDragEnd:_,showCheckbox:S,icons:D,iconWidth:A,isSelectMulti:b,isDraggable:k,isParentCheckHovered:b&&(Qe||O),hoverdItem:q,onMouseOver:H,onMouseLeave:G,ContentRenderer:Y,TreeItemRenderer:ue,RightStickyAddon:te,resources:fe,containerRef:N,TreeItemStyle:re,TreeItemClassName:K,searchItemClassName:ht,searchItemStyle:ie,height:ce})}),Re&&v.jsx("div",{className:fn.RightSticky,children:Re})]}),rt&&(me==null?void 0:me.map((De,ut)=>v.jsx(ue,{isEqual:e,item:De,selectDisabled:n,selectUnused:i,indents:[...u.map(At=>At==="IsLast"?"Collapsed":At),ut===me.length-1?"IsLast":"Expanded"],extIndents:h,ContentRenderer:Y,useExpand:g,useSelect:m,useSearch:M,onDragStart:T,onDragOver:C,onDragEnd:_,showCheckbox:S,icons:D,iconWidth:A,isSelectMulti:b,isDraggable:k,isParentCheckHovered:b&&(Qe||O),hoverdItem:q,onMouseOver:H,onMouseLeave:G,TreeItemRenderer:ue,RightStickyAddon:te,resources:fe,containerRef:N,TreeItemStyle:re,TreeItemClassName:K,searchItemClassName:ht,searchItemStyle:ie,height:ce},ut)))]})},gN=({iconWidth:r,isLast:e})=>v.jsx("div",{style:{width:r/8*3,height:"100%",borderLeft:"var(--ATree_Indent_border)",marginLeft:r/2,marginRight:r/8,boxSizing:"border-box",transition:"border-color var(--Transition)"},children:e&&v.jsx("div",{style:{borderBottom:"var(--ATree_Indent_border)",height:"50%",transition:"border-color var(--Transition)"}})}),mN=({iconWidth:r})=>v.jsx("div",{style:{width:r,height:"100%",borderLeft:"none",marginLeft:0,transition:"border-color var(--Transition)"}}),vN=({iconWidth:r})=>v.jsx("div",{style:{width:r/8*3,height:"50%",borderLeft:"var(--ATree_Indent_border)",borderBottom:"var(--ATree_Indent_border)",marginLeft:r/2,marginRight:r/8,boxSizing:"border-box",transition:"border-color var(--Transition)"}}),yN=r=>{const{isEqual:e,searchResult:t,initSearch:n,searchUp:i,searchDown:l,searchEnter:u,isDisabled:h,isLoading:g,resources:m,maxLength:M,autoFocus:T}=r,C=I.useCallback(D=>{D.key==="Enter"?u():D.key==="ArrowDown"?l():D.key==="ArrowUp"&&i(),D.preventDefault(),D.stopPropagation()},[l,u,i]),_=I.useCallback(D=>{n(D)},[n]),S=I.useMemo(()=>h||g?-1:void 0,[h,g]);return v.jsx(Jl,{className:fn.SearchInput,wrapProps:{className:fn.SearchInputWrap},isDisabled:h,tabIndex:S,useValue:[(t==null?void 0:t.keyword)??"",_],onKeyDown:C,placeholder:m["Search(Placeholder)"],RightAddon:v.jsx(bN,{isEqual:e,searchResult:t,searchUp:i,searchDown:l,searchEnter:u,resources:m}),maxLength:M,autoFocus:T})},bN=r=>{const{isEqual:e,searchResult:t,searchUp:n,searchDown:i,searchEnter:l,resources:u}=r,h=I.useMemo(()=>!t||t.items.length<1?0:t.items.findIndex(S=>t.item&&e(S,t.item))+1,[t,e]),g=I.useMemo(()=>!t||t.items.length<1?0:t.items.length,[t]),m=I.useMemo(()=>h<2,[h]),M=I.useMemo(()=>h>=g,[h,g]),T=I.useCallback(S=>{S.stopPropagation(),!m&&n()},[n,m]),C=I.useCallback(S=>{S.stopPropagation(),!M&&i()},[i,M]),_=I.useCallback(S=>{S.stopPropagation(),l()},[l]);return v.jsx("div",{className:He.clsx(fn.RightAddon,"NoSelect"),children:t?v.jsxs(v.Fragment,{children:[h,"/",g,v.jsx(Ur,{onClick:T,isDisabled:m,children:v.jsx(Br,{className:fn.RightAddonIcon,icon:"ArrowUp",mask:""})}),v.jsx(Ur,{onClick:C,isDisabled:M,children:v.jsx(Br,{className:fn.RightAddonIcon,icon:"ArrowDown"})})]}):v.jsx(vo,{type:"Raw",className:fn.RightAddonIcon,style:{marginRight:4},icon:"Search",onClick:_,tooltip:u["Search(Button)"]})})},_N=r=>{var Wr;const{pk:e,selectDisabled:t,selectUnused:n,useItems:i,useExpand:l,useSelect:u,useSearch:h,showCheckbox:g,iconWidth:m=24,icons:M={noChild:"Folder",collapsed:"FolderCopy",expanded:"FolderOpen"},indents:T,isSelectMulti:C=!1,noSearch:_=!1,isDraggable:S,noSyncSearchSelect:D=!1,actionRef:A,placeholder:b,searchPredicate:k=SN,isDisabled:O,isLoading:q,ContentRenderer:H=xN,TreeItemRenderer:G=pN,RightStickyAddon:Y,TopRightAddon:ue,TreeTopAddon:te,resources:fe,maxLength:N,autoFocus:re,TreeItemStyle:K,TreeItemClassName:ie,OverflowPadding:ne,insertBorder:ce,width:me,searchItemClassName:ae,searchItemStyle:be,height:ge=40,...xe}=r,Le=I.useMemo(()=>({...hn.ATree,...fe}),[fe]),je=I.useCallback((ot,Lt)=>e!==void 0?Array.isArray(e)?e.every(xt=>el.isEqual(ot[xt],Lt[xt])):el.isEqual(ot[e],Lt[e]):el.isEqual(ot,Lt),[e]),We=I.useRef(null),[we,rt]=pn(i,[]),gt=I.useMemo(()=>Qa.map(we,ot=>ot),[we]),[Xe,Ye]=pn(l,[]),[Pe,ke]=pn(u,[]),[Te,Fe]=pn(h,void 0),Ee=I.useCallback(ot=>{if(O||!Ye||Xe.some(Je=>je(Je,ot)))return;const Lt=[];let xt=ot;for(;xt;){const Je=xt;Xe.find(jt=>je(jt,Je))||Lt.push(Je),xt=gt.find(jt=>{var ee;return(ee=jt.children)==null?void 0:ee.some(qe=>je(qe,Je))})}Ye([...Xe,...Lt])},[Xe,O,je,Ye,gt]),Qe=I.useCallback(()=>{!Ye||O||Ye([...gt])},[gt,O,Ye]),lt=I.useCallback(()=>{!Ye||O||Ye([])},[Ye,O]),Ct=I.useCallback(ot=>{!ke||O||n!=null&&n(ot)||(ke([ot]),Ee(ot))},[ke,O,n,Ee]),wt=I.useCallback(ot=>{if(!Fe||O)return;if(!ot||_){Fe(void 0),D||ke==null||ke([]);return}const Lt=Qa.filter(we,Je=>k(ot,Je));let xt;if(Lt.find(Je=>(Te==null?void 0:Te.item)&&je(Je,Te.item))?xt=Te==null?void 0:Te.item:Lt.length>0&&(xt=Lt[0]),Fe({keyword:ot,items:Lt,item:xt}),xt&&Ee(xt),ke&&!D)if(C)ke(Lt);else{const Je=Lt.find(jt=>xt&&je(jt,xt));ke(Je?[Je]:[])}},[we,O,je,k,Fe,ke,Ee,D,_,C,Te]),vt=I.useRef(!1);I.useEffect(()=>{vt.current=!0},[we]),I.useEffect(()=>{Te&&vt.current&&(wt(Te.keyword),vt.current=!1)},[wt,Te]);const kt=I.useCallback(()=>{if(!Te||!Fe||O)return;let ot=Te.items.findIndex(Lt=>Te.item&&je(Lt,Te.item))-1;ot<0||(Fe({...Te,item:Te.items[ot]}),Ee(Te.items[ot]),D||Ct(Te.items[ot]))},[Te,Ee,Fe,O,Ct,je,D]),Tt=I.useCallback(()=>{if(!Te||!Fe||O)return;let ot=Te.items.findIndex(Lt=>Te.item&&je(Lt,Te.item))+1;ot>=Te.items.length||(Fe({...Te,item:Te.items[ot]}),Ee(Te.items[ot]),D||Ct(Te.items[ot]))},[Te,Ee,O,Fe,Ct,je,D]),ct=I.useCallback(()=>{if(!Te||!Fe||O)return;let ot=Te.items.findIndex(xt=>Te.item&&je(xt,Te.item));if(!D||n!=null&&n(Te.items[ot])){Tt();return}if(Pe.some(xt=>Te.item&&je(xt,Te.item))){let xt=ot+1;const Je=Te.items[xt];if(xt>=Te.items.length)return;Fe({...Te,item:Je}),Ct(Je)}else Ct(Te.items[ot])},[Te,Fe,O,Pe,D,Tt,je,Ct,n]),[st,St]=I.useState(!1),Re=I.useCallback(()=>St(!0),[]),dt=I.useCallback(()=>St(!1),[]),Ve=I.useMemo(()=>n?Qa.map(we,ot=>ot).filter(ot=>!n(ot)):t?Qa.map(we,ot=>ot).filter(ot=>!t(ot)):Qa.map(we,ot=>ot),[n,t,we]),ht=I.useMemo(()=>!g||!C?!1:Pe.length>0&&Ve.length>Pe.length,[g,C,Pe,Ve]),yt=I.useMemo(()=>!g||!C?!1:Pe.length>0&&Ve.length===Pe.length,[g,C,Pe,Ve]),De=I.useCallback(()=>{if(!ke||!C||O)return;const ot=Pe.filter(Lt=>!(n!=null&&n(Lt))&&!(t!=null&&t(Lt))&&Ve.some(xt=>je(xt,Lt)));if(ot.length>0)ke(Pe.filter(Lt=>!ot.some(xt=>je(Lt,xt))));else{const Lt=Ve.filter(xt=>!(n!=null&&n(xt))&&!(t!=null&&t(xt))&&!Pe.some(Je=>je(Je,xt)));Lt.length>0&&ke([...Pe,...Lt])}},[C,O,n,t,ke,Pe,Ve,je]),ut=I.useMemo(()=>{if(!g||!C||O)return"";const ot=Pe.filter(Lt=>!(n!=null&&n(Lt))&&!(t!=null&&t(Lt))&&Ve.some(xt=>je(xt,Lt)));if(ot.length>0)return Le["deselect n"](ot.length);{const Lt=Ve.filter(xt=>!(n!=null&&n(xt))&&!(t!=null&&t(xt))&&!Pe.some(Je=>je(Je,xt)));return Le["select n"](Lt.length)}},[n,t,O,Le,g,C,Ve,Pe,je]),[At,er]=I.useState(null),[vr,pr]=I.useState(null),pe=I.useCallback(ot=>{!S||O||er(ot)},[O,S]),X=I.useCallback((ot,Lt)=>{if(!S||O||!At||(ot.preventDefault(),ot.stopPropagation(),pr(Lt),!rt))return;const xt=Qa.replace(we,At,Lt,je);xt&&rt(xt)},[S,we,At,O,rt,je]),Me=I.useCallback(()=>{if(!S||O||!At||!vr||!rt||je(At,vr))return;const ot=Qa.replace(we,At,vr,je);ot&&(rt(ot),er(null))},[S,rt,we,At,vr,je,O]);I.useEffect(()=>{var ot;g||(ot=We.current)==null||ot.scrollTo(0,0)},[g,We]),I.useEffect(()=>{!C&&Pe.length>1&&(ke==null||ke([Pe[Pe.length-1]]))},[C,ke,Pe]),I.useEffect(()=>{A&&(A.current={expandAll:Qe,collapseAll:lt})},[A,Qe,lt]),I.useEffect(()=>{if(!t||!ke)return;const ot=Pe.filter(Lt=>!t(Lt));Pe.length!==ot.length&&ke(ot)},[t,Pe,ke]),I.useEffect(()=>{if(!n||!ke)return;const ot=Pe.filter(Lt=>!n(Lt));Pe.length!==ot.length&&ke(ot)},[n,Pe,ke]),I.useEffect(()=>{Fe&&Fe(void 0)},[Fe]);const[Ke,Pt]=I.useState(!1);I.useEffect(()=>{Pt(ot=>!ot)},[we]);const[mt,_t]=I.useState(null),zt=I.useCallback((ot,Lt)=>{O||(ot.stopPropagation(),ot.preventDefault(),_t(Lt))},[O]),Nt=I.useCallback((ot,Lt)=>{mt===null||O||je(Lt,mt)&&(ot.stopPropagation(),ot.preventDefault(),_t(null))},[mt,O,je]),or=I.useRef(null),[fr,Rr]=I.useState(!1),[cr,xr]=I.useState((Wr=or.current)==null?void 0:Wr.scrollHeight);return I.useEffect(()=>{if(Xe.length<0)return;const ot=We.current,Lt=or.current,xt=ot.clientHeight<Lt.clientHeight;xr(xt?Lt.scrollHeight:ot.clientHeight),Rr(xt)},[Xe]),v.jsxs(Ur,{...xe,isDisabled:O,className:He.clsx(xe.className,fn.AWrap),children:[(!_||ue)&&v.jsxs(si,{className:fn.ATreeHeader,children:[!_&&v.jsx(yN,{isEqual:je,searchResult:Te,initSearch:wt,searchUp:kt,searchDown:Tt,searchEnter:ct,isLoading:q,isDisabled:O,resources:Le,maxLength:N,autoFocus:re}),!_&&ue&&v.jsx(mn,{w:8}),ue]}),(!_||ue||g&&C||S)&&v.jsx(hm,{isLoading:q&&we.length!==0}),(g&&C||S)&&v.jsxs("div",{className:He.clsx(fn.ATreeBodyHeader,"NoSelect"),children:[g&&v.jsx(Uu,{className:fn.CheckBox,useCheck:[+yt,()=>De()],isIndeterminate:ht,onMouseOver:Re,onMouseOut:dt,isDisabled:O,tooltip:ut}),Le.Items,v.jsx(Yc,{}),v.jsxs("div",{className:He.clsx(fn.ATreeBodyHeaderResources,"NoSelect"),style:{marginRight:fr?8:0},children:[v.jsx("span",{children:g&&Le["*Click row for single select"]}),v.jsx("span",{children:S&&Le["*Change order to row drag"]})]})]}),v.jsx("div",{ref:We,className:He.clsx(xe.className,fn.AContainer),children:v.jsxs("div",{className:fn.ATree,style:{minWidth:me||"fit-content",marginRight:ne&&fr?8:0},children:[v.jsxs("div",{ref:or,className:fn.ATreeBody,children:[we.length===0?q?v.jsx(CN,{text:Le["Loading Contents..."]}):b:te,we.map((ot,Lt)=>v.jsx(G,{isEqual:je,indents:[],extIndents:T,item:ot,selectDisabled:t,selectUnused:n,isParentDisabled:O,useExpand:[Xe,Ye],useSelect:[Pe,ke],useSearch:[Te,Fe],onDragStart:pe,onDragOver:X,onDragEnd:Me,showCheckbox:g,icons:M,iconWidth:m,isSelectMulti:C,isDraggable:S,isParentCheckHovered:C&&st,ContentRenderer:H,TreeItemRenderer:G,RightStickyAddon:Y,resources:Le,containerRef:We,TreeItemStyle:K,TreeItemClassName:ie,hoverdItem:mt,onMouseOver:zt,onMouseLeave:Nt,searchItemClassName:ae,searchItemStyle:be,height:ge},`${Lt}${Ke}`))]}),ce&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:fn.CoverBorder}),v.jsx("div",{className:fn.InsertBorder,style:{"--InsertBorder_height":`${ge}px`,height:fr?cr:"100%"}})]})]})})]})},xN=r=>{const{item:e}=r,t={};return Kt.keys(e).forEach(n=>{n!=="children"&&(t[n]=e[n])}),JSON.stringify(t)};function SN(r,e){return Kt.some(e,(t,n)=>{var i;return(i=Kt.stringify(n))==null?void 0:i.toLowerCase().includes(r.toLowerCase())})}const CN=r=>{const{text:e}=r;return v.jsxs(si,{className:He.clsx(fn.Loader,"NoSelect"),children:[v.jsx(Br,{icon:"Spinner",style:{height:40},height:40,width:40}),v.jsx(z2,{text:e})]})};var $g,Gb;function Qu(){return Gb||(Gb=1,$g=TypeError),$g}const wN={},AN=Object.freeze(Object.defineProperty({__proto__:null,default:wN},Symbol.toStringTag,{value:"Module"})),TN=t4(AN);var Ug,Zb;function _h(){if(Zb)return Ug;Zb=1;var r=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=r&&e&&typeof e.get=="function"?e.get:null,n=r&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,l=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=i&&l&&typeof l.get=="function"?l.get:null,h=i&&Set.prototype.forEach,g=typeof WeakMap=="function"&&WeakMap.prototype,m=g?WeakMap.prototype.has:null,M=typeof WeakSet=="function"&&WeakSet.prototype,T=M?WeakSet.prototype.has:null,C=typeof WeakRef=="function"&&WeakRef.prototype,_=C?WeakRef.prototype.deref:null,S=Boolean.prototype.valueOf,D=Object.prototype.toString,A=Function.prototype.toString,b=String.prototype.match,k=String.prototype.slice,O=String.prototype.replace,q=String.prototype.toUpperCase,H=String.prototype.toLowerCase,G=RegExp.prototype.test,Y=Array.prototype.concat,ue=Array.prototype.join,te=Array.prototype.slice,fe=Math.floor,N=typeof BigInt=="function"?BigInt.prototype.valueOf:null,re=Object.getOwnPropertySymbols,K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ie=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ne=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ie||!0)?Symbol.toStringTag:null,ce=Object.prototype.propertyIsEnumerable,me=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(pe){return pe.__proto__}:null);function ae(pe,X){if(pe===1/0||pe===-1/0||pe!==pe||pe&&pe>-1e3&&pe<1e3||G.call(/e/,X))return X;var Me=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof pe=="number"){var Ke=pe<0?-fe(-pe):fe(pe);if(Ke!==pe){var Pt=String(Ke),mt=k.call(X,Pt.length+1);return O.call(Pt,Me,"$&_")+"."+O.call(O.call(mt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return O.call(X,Me,"$&_")}var be=TN,ge=be.custom,xe=Ee(ge)?ge:null,Le={__proto__:null,double:'"',single:"'"},je={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ug=function pe(X,Me,Ke,Pt){var mt=Me||{};if(Ct(mt,"quoteStyle")&&!Ct(Le,mt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ct(mt,"maxStringLength")&&(typeof mt.maxStringLength=="number"?mt.maxStringLength<0&&mt.maxStringLength!==1/0:mt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var _t=Ct(mt,"customInspect")?mt.customInspect:!0;if(typeof _t!="boolean"&&_t!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ct(mt,"indent")&&mt.indent!==null&&mt.indent!==" "&&!(parseInt(mt.indent,10)===mt.indent&&mt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ct(mt,"numericSeparator")&&typeof mt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var zt=mt.numericSeparator;if(typeof X>"u")return"undefined";if(X===null)return"null";if(typeof X=="boolean")return X?"true":"false";if(typeof X=="string")return Ve(X,mt);if(typeof X=="number"){if(X===0)return 1/0/X>0?"0":"-0";var Nt=String(X);return zt?ae(X,Nt):Nt}if(typeof X=="bigint"){var or=String(X)+"n";return zt?ae(X,or):or}var fr=typeof mt.depth>"u"?5:mt.depth;if(typeof Ke>"u"&&(Ke=0),Ke>=fr&&fr>0&&typeof X=="object")return gt(X)?"[Array]":"[Object]";var Rr=er(mt,Ke);if(typeof Pt>"u")Pt=[];else if(kt(Pt,X)>=0)return"[Circular]";function cr(sr,ur,zr){if(ur&&(Pt=te.call(Pt),Pt.push(ur)),zr){var gr={depth:mt.depth};return Ct(mt,"quoteStyle")&&(gr.quoteStyle=mt.quoteStyle),pe(sr,gr,Ke+1,Pt)}return pe(sr,mt,Ke+1,Pt)}if(typeof X=="function"&&!Ye(X)){var xr=vt(X),Wr=pr(X,cr);return"[Function"+(xr?": "+xr:" (anonymous)")+"]"+(Wr.length>0?" { "+ue.call(Wr,", ")+" }":"")}if(Ee(X)){var ot=ie?O.call(String(X),/^(Symbol\(.*\))_[^)]*$/,"$1"):K.call(X);return typeof X=="object"&&!ie?yt(ot):ot}if(dt(X)){for(var Lt="<"+H.call(String(X.nodeName)),xt=X.attributes||[],Je=0;Je<xt.length;Je++)Lt+=" "+xt[Je].name+"="+We(we(xt[Je].value),"double",mt);return Lt+=">",X.childNodes&&X.childNodes.length&&(Lt+="..."),Lt+="</"+H.call(String(X.nodeName))+">",Lt}if(gt(X)){if(X.length===0)return"[]";var jt=pr(X,cr);return Rr&&!At(jt)?"["+vr(jt,Rr)+"]":"[ "+ue.call(jt,", ")+" ]"}if(Pe(X)){var ee=pr(X,cr);return!("cause"in Error.prototype)&&"cause"in X&&!ce.call(X,"cause")?"{ ["+String(X)+"] "+ue.call(Y.call("[cause]: "+cr(X.cause),ee),", ")+" }":ee.length===0?"["+String(X)+"]":"{ ["+String(X)+"] "+ue.call(ee,", ")+" }"}if(typeof X=="object"&&_t){if(xe&&typeof X[xe]=="function"&&be)return be(X,{depth:fr-Ke});if(_t!=="symbol"&&typeof X.inspect=="function")return X.inspect()}if(Tt(X)){var qe=[];return n&&n.call(X,function(sr,ur){qe.push(cr(ur,X,!0)+" => "+cr(sr,X))}),ut("Map",t.call(X),qe,Rr)}if(St(X)){var pt=[];return h&&h.call(X,function(sr){pt.push(cr(sr,X))}),ut("Set",u.call(X),pt,Rr)}if(ct(X))return De("WeakMap");if(Re(X))return De("WeakSet");if(st(X))return De("WeakRef");if(Te(X))return yt(cr(Number(X)));if(Qe(X))return yt(cr(N.call(X)));if(Fe(X))return yt(S.call(X));if(ke(X))return yt(cr(String(X)));if(typeof window<"u"&&X===window)return"{ [object Window] }";if(typeof globalThis<"u"&&X===globalThis||typeof yi<"u"&&X===yi)return"{ [object globalThis] }";if(!Xe(X)&&!Ye(X)){var Dt=pr(X,cr),Qt=me?me(X)===Object.prototype:X instanceof Object||X.constructor===Object,Zt=X instanceof Object?"":"null prototype",Mt=!Qt&&ne&&Object(X)===X&&ne in X?k.call(wt(X),8,-1):Zt?"Object":"",Yt=Qt||typeof X.constructor!="function"?"":X.constructor.name?X.constructor.name+" ":"",Mr=Yt+(Mt||Zt?"["+ue.call(Y.call([],Mt||[],Zt||[]),": ")+"] ":"");return Dt.length===0?Mr+"{}":Rr?Mr+"{"+vr(Dt,Rr)+"}":Mr+"{ "+ue.call(Dt,", ")+" }"}return String(X)};function We(pe,X,Me){var Ke=Me.quoteStyle||X,Pt=Le[Ke];return Pt+pe+Pt}function we(pe){return O.call(String(pe),/"/g,"&quot;")}function rt(pe){return!ne||!(typeof pe=="object"&&(ne in pe||typeof pe[ne]<"u"))}function gt(pe){return wt(pe)==="[object Array]"&&rt(pe)}function Xe(pe){return wt(pe)==="[object Date]"&&rt(pe)}function Ye(pe){return wt(pe)==="[object RegExp]"&&rt(pe)}function Pe(pe){return wt(pe)==="[object Error]"&&rt(pe)}function ke(pe){return wt(pe)==="[object String]"&&rt(pe)}function Te(pe){return wt(pe)==="[object Number]"&&rt(pe)}function Fe(pe){return wt(pe)==="[object Boolean]"&&rt(pe)}function Ee(pe){if(ie)return pe&&typeof pe=="object"&&pe instanceof Symbol;if(typeof pe=="symbol")return!0;if(!pe||typeof pe!="object"||!K)return!1;try{return K.call(pe),!0}catch{}return!1}function Qe(pe){if(!pe||typeof pe!="object"||!N)return!1;try{return N.call(pe),!0}catch{}return!1}var lt=Object.prototype.hasOwnProperty||function(pe){return pe in this};function Ct(pe,X){return lt.call(pe,X)}function wt(pe){return D.call(pe)}function vt(pe){if(pe.name)return pe.name;var X=b.call(A.call(pe),/^function\s*([\w$]+)/);return X?X[1]:null}function kt(pe,X){if(pe.indexOf)return pe.indexOf(X);for(var Me=0,Ke=pe.length;Me<Ke;Me++)if(pe[Me]===X)return Me;return-1}function Tt(pe){if(!t||!pe||typeof pe!="object")return!1;try{t.call(pe);try{u.call(pe)}catch{return!0}return pe instanceof Map}catch{}return!1}function ct(pe){if(!m||!pe||typeof pe!="object")return!1;try{m.call(pe,m);try{T.call(pe,T)}catch{return!0}return pe instanceof WeakMap}catch{}return!1}function st(pe){if(!_||!pe||typeof pe!="object")return!1;try{return _.call(pe),!0}catch{}return!1}function St(pe){if(!u||!pe||typeof pe!="object")return!1;try{u.call(pe);try{t.call(pe)}catch{return!0}return pe instanceof Set}catch{}return!1}function Re(pe){if(!T||!pe||typeof pe!="object")return!1;try{T.call(pe,T);try{m.call(pe,m)}catch{return!0}return pe instanceof WeakSet}catch{}return!1}function dt(pe){return!pe||typeof pe!="object"?!1:typeof HTMLElement<"u"&&pe instanceof HTMLElement?!0:typeof pe.nodeName=="string"&&typeof pe.getAttribute=="function"}function Ve(pe,X){if(pe.length>X.maxStringLength){var Me=pe.length-X.maxStringLength,Ke="... "+Me+" more character"+(Me>1?"s":"");return Ve(k.call(pe,0,X.maxStringLength),X)+Ke}var Pt=je[X.quoteStyle||"single"];Pt.lastIndex=0;var mt=O.call(O.call(pe,Pt,"\\$1"),/[\x00-\x1f]/g,ht);return We(mt,"single",X)}function ht(pe){var X=pe.charCodeAt(0),Me={8:"b",9:"t",10:"n",12:"f",13:"r"}[X];return Me?"\\"+Me:"\\x"+(X<16?"0":"")+q.call(X.toString(16))}function yt(pe){return"Object("+pe+")"}function De(pe){return pe+" { ? }"}function ut(pe,X,Me,Ke){var Pt=Ke?vr(Me,Ke):ue.call(Me,", ");return pe+" ("+X+") {"+Pt+"}"}function At(pe){for(var X=0;X<pe.length;X++)if(kt(pe[X],`
349
+ `;if(lt){const pr=kt(ut);lt(pr>vt)}Ee(er?"":At),wt(ut)},[kt,vt,lt,Ee]),st=I.useMemo(()=>H==="Med"?8:12.5,[H]),St=I.useCallback(Ve=>{if(!Ve)return;const ht=Ve.getEditor();if(!ht)return;const yt=[],De={input:X=>{const Me=X.target;Me.value=Me.value.replace(/[^0-9]/g,"");const Ke=parseInt(Me.value);Ke>100&&(Me.value="100"),Ke<1&&(Me.value="1")},keyDown:X=>{if(X.key!=="Delete"&&X.key!=="Backspace")return;const Me=document.querySelector("#image-resizer");if(!Me)return;const Ke=Me.getBoundingClientRect(),Pt=document.querySelectorAll(".ql-editor img"),mt=Array.from(Pt).find(_t=>{const zt=_t.getBoundingClientRect();return Math.abs(zt.left-Ke.left)<5&&Math.abs(zt.top-Ke.top)<5});if(mt){Me.style.display="none";const _t=$e.find(mt),zt=ht.getIndex(_t);_t.remove(),ht.setSelection(zt,0,$e.sources.USER)}},formatExpand:X=>{const Me=ht.getFormat();X.forEach(Ke=>{if(Me[Ke]){const Pt=Me[Ke],mt=`.ql-${Ke}`,_t=document.querySelector(`${mt} .ql-picker-label`),zt=document.querySelectorAll(`${mt} .ql-picker-item`),Nt=Array.from(zt).find(or=>or.getAttribute("data-value")===Pt);Nt&&(Nt.classList.add("ql-selected"),_t==null||_t.classList.add("ql-active"))}})},resizeToolbar:X=>{requestAnimationFrame(()=>{for(const Me of X)N(Me.contentRect.height+st*2)})}},ut=ht.root,At=document.querySelector(".ql-snow.ql-toolbar"),er=document.querySelector("#image-resizer .input-wrapper input"),vr=new ResizeObserver(De.resizeToolbar),pr=["header","color"],pe=[];return ut==null||ut.addEventListener("keydown",De.keyDown),er==null||er.addEventListener("input",De.input),vr.observe(At),pr.forEach(X=>{const Me=document.querySelector(`.ql-${X} .ql-picker-label`);Me&&(Me.addEventListener("click",()=>De.formatExpand(pr)),pe.push(Me))}),yt.push(()=>{ut==null||ut.removeEventListener("keydown",De.keyDown),er==null||er.removeEventListener("input",De.input),vr.disconnect(),pe.forEach(X=>X.removeEventListener("click",()=>De.formatExpand(pr)))}),()=>yt.forEach(X=>X())},[st]),Re=I.useCallback(Ve=>{i&&(typeof i=="function"?i(Ve):i.current=Ve),Ve&&St(Ve)},[i,St]),dt=I.useMemo(()=>O||b?"fit-content":k?k+we:`calc(100% - ${we}px)`,[O,k,b,we]);return v.jsx(Uc,{helperText:C,label:_,wrapType:D,labelProps:{...S,style:{minHeight:20}},errorMessage:t,wrapProps:{...T,style:{...T==null?void 0:T.style,height:dt}},children:v.jsxs(Ur,{...Y,className:He.clsx(Y.className,Wn.AEditorContainer),style:{...A,height:Ye,minHeight:ke},children:[v.jsx(bh,{...M,ref:Re,className:He.clsx(M==null?void 0:M.className,Wn.AEditor,Wn[Te]),formats:OP,modules:Tt,placeholder:h,readOnly:ue,theme:"snow",value:Ct,style:{maxHeight:Pe?Pe+re:void 0,"--icon-size":`${H==="Med"?18:24}px`,"--toolbar-padding":`${st}px`,"--content-height":ce?`${ce}px`:"100%","--max-height":Pe?`${Pe}px`:void 0,"--default-text":`'${hn.AEditor.Default}'`,"--arrow-background":`url("data:image/svg+xml,${encodeURIComponent(Os.renderToString(v.jsx(Br,{icon:"EditorArrow"})))}`},onChange:ct}),O&&v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:Le,className:Wn.Resizer,style:{height:te,bottom:u&&!ue?ne-1:-1,cursor:"ns-resize"},onMouseDown:Xe}),ge&&v.jsx("div",{className:He.clsx(Wn.Indicator,"NoSelect","Caption"),style:{bottom:u&&!ue?ne:0},children:`${Math.round(ce)}px`})]}),u&&!ue&&v.jsx("div",{className:He.clsx(Wn.LimitContainer,"NoSelect"),style:{marginTop:ie,minHeight:K},children:v.jsxs(Xl,{className:Wn.Limit,children:["(",v.jsx("span",{className:Qe?Wn.Error:void 0,children:nm(kt(Ct))})," / ",nm(vt),")"]})})]})})};function jP(r){return Array.isArray(r)?r.filter(Boolean).length>0:!!r}function FP(r){const e=$e.import("formats/header");return e.whitelist=r,e}const nm=r=>{if(!r)return"0 bytes";const e=["bytes","KB","MB","GB","TB","PB","EB","ZB","YB","RB","QB"];let t=0;for(;r>=1024&&t<e.length-1;)r/=1024,t++;return`${t===0?Math.floor(r):r.toFixed(1)} ${e[t]}`};function eh(r,e){Array.isArray(r)||(r=[r]);for(const t of r){if(e(t))return t;if(!t.children||t.children.length<1)continue;const n=eh(t.children,e);if(n)return n}}function sd(r,e){Array.isArray(r)||(r=[r]);for(const t of r)e(t),!(!t.children||t.children.length<1)&&sd(t.children,e)}function uS(r,e){Array.isArray(r)||(r=[r]);const t=[];return sd(r,(n,i)=>t.push(e(n,i))),t}function fS(r,e){Array.isArray(r)||(r=[r]);for(const t of r){if(!e(t))return!1;if(!(!t.children||t.children.length<1)&&!fS(t.children,e))return!1}return!0}function BP(r,e){Array.isArray(r)||(r=[r]);const t=[];return sd(r,(n,i)=>{e(n,i)&&t.push(n)}),t}function HP(r){Array.isArray(r)||(r=[r]);let e=0;return sd(r,()=>e++),e}function qP(r,e,t,n){if(n(e,t))return null;Array.isArray(r)||(r=[r]);const i=eh(r,u=>{var h;return(h=u.children)==null?void 0:h.some(g=>n(g,e))}),l=eh(r,u=>{var h;return(h=u.children)==null?void 0:h.some(g=>n(g,t))});if(i===void 0&&l===void 0){const u=r.findIndex(g=>n(g,e)),h=r.findIndex(g=>n(g,t));return r.splice(u,1),r.splice(h,0,e),[...r]}else if(i!==void 0&&l!==void 0&&n(i,l)&&i.children){const u=i.children.findIndex(g=>n(g,e)),h=i.children.findIndex(g=>n(g,t));return u===void 0||h===void 0?null:(i.children.splice(u,1),i.children.splice(h,0,e),i.children=[...i.children],[...r])}return null}function zP(r,e,t){const n=[],i=[...e];for(;i.length>0;){const l=i.shift();if(l&&!n.find(u=>t(u,l))&&(n.push(l),!(!l.children||l.children.length<1)))for(const u of l.children)i.push(u)}return n}function $P(r,e,t){Array.isArray(r)||(r=[r]);const n=uS(r,u=>u),i=[],l=[...e];for(;l.length>0;){const u=l.shift();if(!u||i.find(g=>t(g,u)))continue;i.push(u);const h=n.find(g=>{var m;return(m=g.children)==null?void 0:m.some(M=>t(M,u))});h&&l.push(h)}return i}const Qa={find:eh,forEach:sd,map:uS,every:fS,filter:BP,length:HP,replace:qP,descendants:zP,ancestors:$P},UP="_AWrap_f5le3_1",WP="_AContainer_f5le3_10",VP="_ATree_f5le3_18",GP="_ATreeBody_f5le3_30",ZP="_CoverBorder_f5le3_36",YP="_InsertBorder_f5le3_45",KP="_ATreeHeader_f5le3_76",XP="_ATreeBodyHeader_f5le3_82",JP="_ATreeBodyHeaderResources_f5le3_92",QP="_ATreeItem_f5le3_98",eN="_IsSelectUsed_f5le3_114",tN="_IsSelected_f5le3_117",rN="_IsSearchSelected_f5le3_122",nN="_IsHovered_f5le3_133",iN="_CheckBox_f5le3_137",oN="_Indents_f5le3_149",sN="_ExpandIcon_f5le3_156",aN="_Content_f5le3_168",lN="_RightSticky_f5le3_177",cN="_SearchInputWrap_f5le3_188",uN="_SearchInput_f5le3_188",fN="_RightAddon_f5le3_200",dN="_RightAddonIcon_f5le3_211",hN="_Loader_f5le3_218",fn={AWrap:UP,AContainer:WP,ATree:VP,ATreeBody:GP,CoverBorder:ZP,InsertBorder:YP,ATreeHeader:KP,ATreeBodyHeader:XP,ATreeBodyHeaderResources:JP,ATreeItem:QP,IsSelectUsed:eN,IsSelected:tN,IsSearchSelected:rN,IsHovered:nN,CheckBox:iN,Indents:oN,ExpandIcon:sN,Content:aN,RightSticky:lN,SearchInputWrap:cN,SearchInput:uN,RightAddon:fN,RightAddonIcon:dN,Loader:hN},pN=r=>{const{isEqual:e,item:t,selectDisabled:n,selectUnused:i,isParentDisabled:l,indents:u,extIndents:h,useExpand:g,useSelect:m,useSearch:M,onDragStart:T,onDragOver:C,onDragEnd:_,showCheckbox:S,icons:D,iconWidth:A,isSelectMulti:b,isDraggable:k,isParentCheckHovered:O,hoverdItem:q,onMouseOver:H,onMouseLeave:G,ContentRenderer:Y,TreeItemRenderer:ue,RightStickyAddon:te,resources:fe,containerRef:N,TreeItemStyle:re,TreeItemClassName:K,searchItemStyle:ie,searchItemClassName:ne,height:ce}=r,{children:me}=I.useMemo(()=>t,[t]),[ae,be]=I.useMemo(()=>g,[g]),[ge,xe]=I.useMemo(()=>m,[m]),[Le,je]=I.useMemo(()=>M,[M]),We=I.useMemo(()=>i?i(t):!1,[i,t]),we=I.useMemo(()=>!n||l?l:n(t),[n,l,t]),rt=I.useMemo(()=>ae.some(De=>e(De,t)),[ae,e,t]),gt=I.useMemo(()=>!me||me.length<1?"noChild":rt?"expanded":"collapsed",[me,rt]),Xe=I.useMemo(()=>{const De=D[gt];return am.includes(De)?v.jsx(Br,{style:{width:A,height:A},icon:De}):De},[D,A,gt]),Ye=I.useCallback(De=>{!be||gt==="noChild"||(be(rt?ae.filter(ut=>!e(ut,t)):[...ae,t]),De.stopPropagation())},[be,ae,rt,t,e,gt]),Pe=I.useMemo(()=>ge.some(De=>e(De,t)),[ge,e,t]),ke=I.useCallback(()=>{!xe||we||(xe(b?Pe?ge.filter(De=>!e(De,t)):[...ge,t]:[t]),Le&&je&&Le.items.some(De=>e(De,t))&&je({...Le,item:t}))},[b,we,Pe,Le,je,xe,e,ge,t]),Te=I.useMemo(()=>Le==null?void 0:Le.items.some(De=>e(De,t)),[Le,e,t]),Fe=I.useMemo(()=>Te&&(Le==null?void 0:Le.item)&&e(Le.item,t),[Te,Le,e,t]),Ee=I.useRef(null);I.useEffect(()=>{setTimeout(()=>{if(Fe&&Ee.current&&N.current){const{top:De,bottom:ut}=Ee.current.getBoundingClientRect(),{top:At,bottom:er}=N.current.getBoundingClientRect();(De<At||ut>er)&&Ee.current.scrollIntoView({behavior:"smooth",block:"center"})}},10)},[N,Fe]);const[Qe,lt]=I.useState(!1),Ct=I.useCallback(()=>!we&&lt(!0),[we]),wt=I.useCallback(()=>!we&&lt(!1),[we]),vt=I.useMemo(()=>Qa.map(t,De=>De).filter(De=>!(n!=null&&n(De))&&!(i!=null&&i(De))),[n,i,t]),kt=I.useMemo(()=>!S||!b?!1:Pe&&vt.some(De=>ge.some(ut=>e(De,ut)))&&vt.some(De=>!ge.some(ut=>e(De,ut))),[S,b,Pe,vt,e,ge]),Tt=I.useMemo(()=>S?b?vt.every(De=>ge.some(ut=>e(De,ut))):ge.some(De=>e(De,t)):!1,[S,b,vt,t,e,ge]),ct=I.useCallback(()=>{if(!(!xe||we))if(b)if(Pe){const De=ge.filter(ut=>!(i!=null&&i(ut))&&!(n!=null&&n(ut))&&vt.some(At=>e(At,ut)));De.length>0&&xe(ge.filter(ut=>!De.some(At=>e(ut,At))))}else{const De=vt.filter(ut=>!(i!=null&&i(ut))&&!(n!=null&&n(ut))&&!ge.some(At=>e(At,ut)));De.length>0&&xe([...ge,...De])}else xe([t])},[we,n,i,b,xe,e,Pe,ge,vt,t]),st=I.useCallback(De=>{we||ct(),De.stopPropagation()},[we,ct]),St=I.useMemo(()=>{if(!S||!b||we)return"";if(Pe){const ut=ge.filter(At=>!(i!=null&&i(At))&&!(n!=null&&n(At))&&vt.some(er=>e(er,At)));if(ut.length>0)return fe["deselect n"](ut.length)}const De=vt.filter(ut=>!(i!=null&&i(ut))&&!(n!=null&&n(ut))&&!ge.some(At=>e(At,ut)));return fe["select n"](De.length)},[n,i,fe,we,S,b,Pe,vt,e,ge]),Re=I.useMemo(()=>kr.getContent(te,r),[te,r]),dt=I.useMemo(()=>kr.getContent(re,r),[r,re]),Ve=I.useMemo(()=>kr.getContent(K,r),[r,K]),ht=I.useMemo(()=>kr.getContent(ne,r),[r,ne]),yt=I.useMemo(()=>kr.getContent(ie,r),[r,ie]);return v.jsxs(I.Fragment,{children:[v.jsxs(Ur,{className:He.clsx(fn.ATreeItem,Pe&&fn.IsSelected,!we&&(Qe||O)&&fn.IsHovered,Te&&fn.IsSearched,Fe&&(ht||fn.IsSearchSelected),!We&&fn.IsSelectUsed,"NoSelect",Ve),style:{...dt,...Fe&&yt,"--ATreeItem_height":`${ce}px`},draggable:k,onDragStart:()=>T==null?void 0:T(t),onDragEnter:De=>C==null?void 0:C(De,t),onDragEnd:De=>_==null?void 0:_(De,t),onClick:ke,abaseRef:Ee,isDisabled:we,onMouseOver:De=>H==null?void 0:H(De,t),onMouseLeave:De=>G==null?void 0:G(De,t),children:[S&&v.jsx(Uu,{style:{visibility:we||We?"hidden":"visible",zIndex:we||We?0:2},className:fn.CheckBox,useCheck:[+Tt,ct],onClick:st,isIndeterminate:kt,onMouseOver:Ct,onMouseOut:wt,tooltip:St,isDisabled:we}),v.jsx("div",{className:fn.Indents,style:{paddingLeft:S?0:r.icons.noChild?12:0},children:u.map((De,ut)=>{const At=ut===u.length-1;return v.jsx(I2,{value:De,map:{Collapsed:h?h({iconWidth:A}).collapsed:v.jsx(mN,{iconWidth:A}),Expanded:h?h({iconWidth:A,isLast:At}).expanded:v.jsx(gN,{iconWidth:A,isLast:At}),IsLast:h?h({iconWidth:A}).isLast:v.jsx(vN,{iconWidth:A})}},ut)})}),Xe&&v.jsx("div",{className:fn.ExpandIcon,style:{width:A,minWidth:A,maxWidth:A},onClick:Ye,children:Xe}),v.jsx("div",{className:He.clsx(fn.Content,"NoSelect"),children:v.jsx(Y,{isEqual:e,item:t,indents:u,extIndents:h,useExpand:g,useSelect:m,useSearch:M,onDragStart:T,onDragOver:C,onDragEnd:_,showCheckbox:S,icons:D,iconWidth:A,isSelectMulti:b,isDraggable:k,isParentCheckHovered:b&&(Qe||O),hoverdItem:q,onMouseOver:H,onMouseLeave:G,ContentRenderer:Y,TreeItemRenderer:ue,RightStickyAddon:te,resources:fe,containerRef:N,TreeItemStyle:re,TreeItemClassName:K,searchItemClassName:ht,searchItemStyle:ie,height:ce})}),Re&&v.jsx("div",{className:fn.RightSticky,children:Re})]}),rt&&(me==null?void 0:me.map((De,ut)=>v.jsx(ue,{isEqual:e,item:De,selectDisabled:n,selectUnused:i,indents:[...u.map(At=>At==="IsLast"?"Collapsed":At),ut===me.length-1?"IsLast":"Expanded"],extIndents:h,ContentRenderer:Y,useExpand:g,useSelect:m,useSearch:M,onDragStart:T,onDragOver:C,onDragEnd:_,showCheckbox:S,icons:D,iconWidth:A,isSelectMulti:b,isDraggable:k,isParentCheckHovered:b&&(Qe||O),hoverdItem:q,onMouseOver:H,onMouseLeave:G,TreeItemRenderer:ue,RightStickyAddon:te,resources:fe,containerRef:N,TreeItemStyle:re,TreeItemClassName:K,searchItemClassName:ht,searchItemStyle:ie,height:ce},ut)))]})},gN=({iconWidth:r,isLast:e})=>v.jsx("div",{style:{width:r/8*3,height:"100%",borderLeft:"var(--ATree_Indent_border)",marginLeft:r/2,marginRight:r/8,boxSizing:"border-box",transition:"border-color var(--Transition)"},children:e&&v.jsx("div",{style:{borderBottom:"var(--ATree_Indent_border)",height:"50%",transition:"border-color var(--Transition)"}})}),mN=({iconWidth:r})=>v.jsx("div",{style:{width:r,height:"100%",borderLeft:"none",marginLeft:0,transition:"border-color var(--Transition)"}}),vN=({iconWidth:r})=>v.jsx("div",{style:{width:r/8*3,height:"50%",borderLeft:"var(--ATree_Indent_border)",borderBottom:"var(--ATree_Indent_border)",marginLeft:r/2,marginRight:r/8,boxSizing:"border-box",transition:"border-color var(--Transition)"}}),yN=r=>{const{isEqual:e,searchResult:t,initSearch:n,searchUp:i,searchDown:l,searchEnter:u,isDisabled:h,isLoading:g,resources:m,maxLength:M,autoFocus:T}=r,C=I.useCallback(D=>{D.key==="Enter"?u():D.key==="ArrowDown"?l():D.key==="ArrowUp"&&i(),D.preventDefault(),D.stopPropagation()},[l,u,i]),_=I.useCallback(D=>{n(D)},[n]),S=I.useMemo(()=>h||g?-1:void 0,[h,g]);return v.jsx(Jl,{className:fn.SearchInput,wrapProps:{className:fn.SearchInputWrap},isDisabled:h,tabIndex:S,useValue:[(t==null?void 0:t.keyword)??"",_],onKeyDown:C,placeholder:m["Search(Placeholder)"],RightAddon:v.jsx(bN,{isEqual:e,searchResult:t,searchUp:i,searchDown:l,searchEnter:u,resources:m}),maxLength:M,autoFocus:T})},bN=r=>{const{isEqual:e,searchResult:t,searchUp:n,searchDown:i,searchEnter:l,resources:u}=r,h=I.useMemo(()=>!t||t.items.length<1?0:t.items.findIndex(S=>t.item&&e(S,t.item))+1,[t,e]),g=I.useMemo(()=>!t||t.items.length<1?0:t.items.length,[t]),m=I.useMemo(()=>h<2,[h]),M=I.useMemo(()=>h>=g,[h,g]),T=I.useCallback(S=>{S.stopPropagation(),!m&&n()},[n,m]),C=I.useCallback(S=>{S.stopPropagation(),!M&&i()},[i,M]),_=I.useCallback(S=>{S.stopPropagation(),l()},[l]);return v.jsx("div",{className:He.clsx(fn.RightAddon,"NoSelect"),children:t?v.jsxs(v.Fragment,{children:[h,"/",g,v.jsx(Ur,{onClick:T,isDisabled:m,children:v.jsx(Br,{className:fn.RightAddonIcon,icon:"ArrowUp",mask:""})}),v.jsx(Ur,{onClick:C,isDisabled:M,children:v.jsx(Br,{className:fn.RightAddonIcon,icon:"ArrowDown"})})]}):v.jsx(vo,{type:"Raw",className:fn.RightAddonIcon,style:{marginRight:4},icon:"Search",onClick:_,tooltip:u["Search(Button)"]})})},_N=r=>{var Wr;const{pk:e,selectDisabled:t,selectUnused:n,useItems:i,useExpand:l,useSelect:u,useSearch:h,showCheckbox:g,iconWidth:m=24,icons:M={noChild:"Folder",collapsed:"FolderCopy",expanded:"FolderOpen"},indents:T,isSelectMulti:C=!1,noSearch:_=!1,isDraggable:S,noSyncSearchSelect:D=!1,actionRef:A,placeholder:b,searchPredicate:k=SN,isDisabled:O,isLoading:q,ContentRenderer:H=xN,TreeItemRenderer:G=pN,RightStickyAddon:Y,TopRightAddon:ue,TreeTopAddon:te,resources:fe,maxLength:N,autoFocus:re,TreeItemStyle:K,TreeItemClassName:ie,OverflowPadding:ne,insertBorder:ce,width:me,searchItemClassName:ae,searchItemStyle:be,height:ge=40,...xe}=r,Le=I.useMemo(()=>({...hn.ATree,...fe}),[fe]),je=I.useCallback((ot,Lt)=>e!==void 0?Array.isArray(e)?e.every(xt=>el.isEqual(ot[xt],Lt[xt])):el.isEqual(ot[e],Lt[e]):el.isEqual(ot,Lt),[e]),We=I.useRef(null),[we,rt]=pn(i,[]),gt=I.useMemo(()=>Qa.map(we,ot=>ot),[we]),[Xe,Ye]=pn(l,[]),[Pe,ke]=pn(u,[]),[Te,Fe]=pn(h,void 0),Ee=I.useCallback(ot=>{if(O||!Ye||Xe.some(Je=>je(Je,ot)))return;const Lt=[];let xt=ot;for(;xt;){const Je=xt;Xe.find(jt=>je(jt,Je))||Lt.push(Je),xt=gt.find(jt=>{var ee;return(ee=jt.children)==null?void 0:ee.some(qe=>je(qe,Je))})}Ye([...Xe,...Lt])},[Xe,O,je,Ye,gt]),Qe=I.useCallback(()=>{!Ye||O||Ye([...gt])},[gt,O,Ye]),lt=I.useCallback(()=>{!Ye||O||Ye([])},[Ye,O]),Ct=I.useCallback(ot=>{!ke||O||n!=null&&n(ot)||(ke([ot]),Ee(ot))},[ke,O,n,Ee]),wt=I.useCallback(ot=>{if(!Fe||O)return;if(!ot||_){Fe(void 0),D||ke==null||ke([]);return}const Lt=Qa.filter(we,Je=>k(ot,Je));let xt;if(Lt.find(Je=>(Te==null?void 0:Te.item)&&je(Je,Te.item))?xt=Te==null?void 0:Te.item:Lt.length>0&&(xt=Lt[0]),Fe({keyword:ot,items:Lt,item:xt}),xt&&Ee(xt),ke&&!D)if(C)ke(Lt);else{const Je=Lt.find(jt=>xt&&je(jt,xt));ke(Je?[Je]:[])}},[we,O,je,k,Fe,ke,Ee,D,_,C,Te]),vt=I.useRef(!1);I.useEffect(()=>{vt.current=!0},[we]),I.useEffect(()=>{Te&&vt.current&&(wt(Te.keyword),vt.current=!1)},[wt,Te]);const kt=I.useCallback(()=>{if(!Te||!Fe||O)return;let ot=Te.items.findIndex(Lt=>Te.item&&je(Lt,Te.item))-1;ot<0||(Fe({...Te,item:Te.items[ot]}),Ee(Te.items[ot]),D||Ct(Te.items[ot]))},[Te,Ee,Fe,O,Ct,je,D]),Tt=I.useCallback(()=>{if(!Te||!Fe||O)return;let ot=Te.items.findIndex(Lt=>Te.item&&je(Lt,Te.item))+1;ot>=Te.items.length||(Fe({...Te,item:Te.items[ot]}),Ee(Te.items[ot]),D||Ct(Te.items[ot]))},[Te,Ee,O,Fe,Ct,je,D]),ct=I.useCallback(()=>{if(!Te||!Fe||O)return;let ot=Te.items.findIndex(xt=>Te.item&&je(xt,Te.item));if(!D||n!=null&&n(Te.items[ot])){Tt();return}if(Pe.some(xt=>Te.item&&je(xt,Te.item))){let xt=ot+1;const Je=Te.items[xt];if(xt>=Te.items.length)return;Fe({...Te,item:Je}),Ct(Je)}else Ct(Te.items[ot])},[Te,Fe,O,Pe,D,Tt,je,Ct,n]),[st,St]=I.useState(!1),Re=I.useCallback(()=>St(!0),[]),dt=I.useCallback(()=>St(!1),[]),Ve=I.useMemo(()=>n?Qa.map(we,ot=>ot).filter(ot=>!n(ot)):t?Qa.map(we,ot=>ot).filter(ot=>!t(ot)):Qa.map(we,ot=>ot),[n,t,we]),ht=I.useMemo(()=>!g||!C?!1:Pe.length>0&&Ve.length>Pe.length,[g,C,Pe,Ve]),yt=I.useMemo(()=>!g||!C?!1:Pe.length>0&&Ve.length===Pe.length,[g,C,Pe,Ve]),De=I.useCallback(()=>{if(!ke||!C||O)return;const ot=Pe.filter(Lt=>!(n!=null&&n(Lt))&&!(t!=null&&t(Lt))&&Ve.some(xt=>je(xt,Lt)));if(ot.length>0)ke(Pe.filter(Lt=>!ot.some(xt=>je(Lt,xt))));else{const Lt=Ve.filter(xt=>!(n!=null&&n(xt))&&!(t!=null&&t(xt))&&!Pe.some(Je=>je(Je,xt)));Lt.length>0&&ke([...Pe,...Lt])}},[C,O,n,t,ke,Pe,Ve,je]),ut=I.useMemo(()=>{if(!g||!C||O)return"";const ot=Pe.filter(Lt=>!(n!=null&&n(Lt))&&!(t!=null&&t(Lt))&&Ve.some(xt=>je(xt,Lt)));if(ot.length>0)return Le["deselect n"](ot.length);{const Lt=Ve.filter(xt=>!(n!=null&&n(xt))&&!(t!=null&&t(xt))&&!Pe.some(Je=>je(Je,xt)));return Le["select n"](Lt.length)}},[n,t,O,Le,g,C,Ve,Pe,je]),[At,er]=I.useState(null),[vr,pr]=I.useState(null),pe=I.useCallback(ot=>{!S||O||er(ot)},[O,S]),X=I.useCallback((ot,Lt)=>{if(!S||O||!At||(ot.preventDefault(),ot.stopPropagation(),pr(Lt),!rt))return;const xt=Qa.replace(we,At,Lt,je);xt&&rt(xt)},[S,we,At,O,rt,je]),Me=I.useCallback(()=>{if(!S||O||!At||!vr||!rt||je(At,vr))return;const ot=Qa.replace(we,At,vr,je);ot&&(rt(ot),er(null))},[S,rt,we,At,vr,je,O]);I.useEffect(()=>{var ot;g||(ot=We.current)==null||ot.scrollTo(0,0)},[g,We]),I.useEffect(()=>{!C&&Pe.length>1&&(ke==null||ke([Pe[Pe.length-1]]))},[C,ke,Pe]),I.useEffect(()=>{A&&(A.current={expandAll:Qe,collapseAll:lt})},[A,Qe,lt]),I.useEffect(()=>{if(!t||!ke)return;const ot=Pe.filter(Lt=>!t(Lt));Pe.length!==ot.length&&ke(ot)},[t,Pe,ke]),I.useEffect(()=>{if(!n||!ke)return;const ot=Pe.filter(Lt=>!n(Lt));Pe.length!==ot.length&&ke(ot)},[n,Pe,ke]),I.useEffect(()=>{Fe&&Fe(void 0)},[Fe]);const[Ke,Pt]=I.useState(!1);I.useEffect(()=>{Pt(ot=>!ot)},[we]);const[mt,_t]=I.useState(null),zt=I.useCallback((ot,Lt)=>{O||(ot.stopPropagation(),ot.preventDefault(),_t(Lt))},[O]),Nt=I.useCallback((ot,Lt)=>{mt===null||O||je(Lt,mt)&&(ot.stopPropagation(),ot.preventDefault(),_t(null))},[mt,O,je]),or=I.useRef(null),[fr,Rr]=I.useState(!1),[cr,xr]=I.useState((Wr=or.current)==null?void 0:Wr.scrollHeight);return I.useEffect(()=>{if(Xe.length<0)return;const ot=We.current,Lt=or.current,xt=ot.clientHeight<Lt.clientHeight;xr(xt?Lt.scrollHeight:ot.clientHeight),Rr(xt)},[Xe]),v.jsxs(Ur,{...xe,isDisabled:O,className:He.clsx(xe.className,fn.AWrap),children:[(!_||ue)&&v.jsxs(si,{className:fn.ATreeHeader,children:[!_&&v.jsx(yN,{isEqual:je,searchResult:Te,initSearch:wt,searchUp:kt,searchDown:Tt,searchEnter:ct,isLoading:q,isDisabled:O,resources:Le,maxLength:N,autoFocus:re}),!_&&ue&&v.jsx(mn,{w:8}),ue]}),(!_||ue||g&&C||S)&&v.jsx(hm,{isLoading:q&&we.length!==0}),(g&&C||S)&&v.jsxs("div",{className:He.clsx(fn.ATreeBodyHeader,"NoSelect"),children:[g&&v.jsx(Uu,{className:fn.CheckBox,useCheck:[+yt,()=>De()],isIndeterminate:ht,onMouseOver:Re,onMouseOut:dt,isDisabled:O,tooltip:ut}),Le.Items,v.jsx(Yc,{}),v.jsxs("div",{className:He.clsx(fn.ATreeBodyHeaderResources,"NoSelect"),style:{marginRight:fr?8:0},children:[v.jsx("span",{children:g&&Le["*Click row for single select"]}),v.jsx("span",{children:S&&Le["*Change order to row drag"]})]})]}),v.jsx("div",{ref:We,className:He.clsx(xe.className,fn.AContainer),children:v.jsxs("div",{className:fn.ATree,style:{minWidth:me||"fit-content",marginRight:ne&&fr?8:0},children:[v.jsxs("div",{ref:or,className:fn.ATreeBody,children:[we.length===0?q?v.jsx(CN,{text:Le["Loading Contents..."]}):b:te,we.map((ot,Lt)=>v.jsx(G,{isEqual:je,indents:[],extIndents:T,item:ot,selectDisabled:t,selectUnused:n,isParentDisabled:O,useExpand:[Xe,Ye],useSelect:[Pe,ke],useSearch:[Te,Fe],onDragStart:pe,onDragOver:X,onDragEnd:Me,showCheckbox:g,icons:M,iconWidth:m,isSelectMulti:C,isDraggable:S,isParentCheckHovered:C&&st,ContentRenderer:H,TreeItemRenderer:G,RightStickyAddon:Y,resources:Le,containerRef:We,TreeItemStyle:K,TreeItemClassName:ie,hoverdItem:mt,onMouseOver:zt,onMouseLeave:Nt,searchItemClassName:ae,searchItemStyle:be,height:ge},`${Lt}${Ke}`))]}),ce&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:fn.CoverBorder}),v.jsx("div",{className:fn.InsertBorder,style:{"--InsertBorder_height":`${ge}px`,height:fr?cr:"100%"}})]})]})})]})},xN=r=>{const{item:e}=r,t={};return Kt.keys(e).forEach(n=>{n!=="children"&&(t[n]=e[n])}),JSON.stringify(t)};function SN(r,e){return Kt.some(e,(t,n)=>{var i;return(i=Kt.stringify(n))==null?void 0:i.toLowerCase().includes(r.toLowerCase())})}const CN=r=>{const{text:e}=r;return v.jsxs(si,{className:He.clsx(fn.Loader,"NoSelect"),children:[v.jsx(Br,{icon:"Spinner",style:{height:40},height:40,width:40}),v.jsx(z2,{text:e})]})};var $g,Gb;function Qu(){return Gb||(Gb=1,$g=TypeError),$g}const wN={},AN=Object.freeze(Object.defineProperty({__proto__:null,default:wN},Symbol.toStringTag,{value:"Module"})),TN=t4(AN);var Ug,Zb;function _h(){if(Zb)return Ug;Zb=1;var r=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=r&&e&&typeof e.get=="function"?e.get:null,n=r&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,l=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=i&&l&&typeof l.get=="function"?l.get:null,h=i&&Set.prototype.forEach,g=typeof WeakMap=="function"&&WeakMap.prototype,m=g?WeakMap.prototype.has:null,M=typeof WeakSet=="function"&&WeakSet.prototype,T=M?WeakSet.prototype.has:null,C=typeof WeakRef=="function"&&WeakRef.prototype,_=C?WeakRef.prototype.deref:null,S=Boolean.prototype.valueOf,D=Object.prototype.toString,A=Function.prototype.toString,b=String.prototype.match,k=String.prototype.slice,O=String.prototype.replace,q=String.prototype.toUpperCase,H=String.prototype.toLowerCase,G=RegExp.prototype.test,Y=Array.prototype.concat,ue=Array.prototype.join,te=Array.prototype.slice,fe=Math.floor,N=typeof BigInt=="function"?BigInt.prototype.valueOf:null,re=Object.getOwnPropertySymbols,K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ie=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ne=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ie||!0)?Symbol.toStringTag:null,ce=Object.prototype.propertyIsEnumerable,me=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(pe){return pe.__proto__}:null);function ae(pe,X){if(pe===1/0||pe===-1/0||pe!==pe||pe&&pe>-1e3&&pe<1e3||G.call(/e/,X))return X;var Me=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof pe=="number"){var Ke=pe<0?-fe(-pe):fe(pe);if(Ke!==pe){var Pt=String(Ke),mt=k.call(X,Pt.length+1);return O.call(Pt,Me,"$&_")+"."+O.call(O.call(mt,/([0-9]{3})/g,"$&_"),/_$/,"")}}return O.call(X,Me,"$&_")}var be=TN,ge=be.custom,xe=Ee(ge)?ge:null,Le={__proto__:null,double:'"',single:"'"},je={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Ug=function pe(X,Me,Ke,Pt){var mt=Me||{};if(Ct(mt,"quoteStyle")&&!Ct(Le,mt.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ct(mt,"maxStringLength")&&(typeof mt.maxStringLength=="number"?mt.maxStringLength<0&&mt.maxStringLength!==1/0:mt.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var _t=Ct(mt,"customInspect")?mt.customInspect:!0;if(typeof _t!="boolean"&&_t!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ct(mt,"indent")&&mt.indent!==null&&mt.indent!==" "&&!(parseInt(mt.indent,10)===mt.indent&&mt.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ct(mt,"numericSeparator")&&typeof mt.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var zt=mt.numericSeparator;if(typeof X>"u")return"undefined";if(X===null)return"null";if(typeof X=="boolean")return X?"true":"false";if(typeof X=="string")return Ve(X,mt);if(typeof X=="number"){if(X===0)return 1/0/X>0?"0":"-0";var Nt=String(X);return zt?ae(X,Nt):Nt}if(typeof X=="bigint"){var or=String(X)+"n";return zt?ae(X,or):or}var fr=typeof mt.depth>"u"?5:mt.depth;if(typeof Ke>"u"&&(Ke=0),Ke>=fr&&fr>0&&typeof X=="object")return gt(X)?"[Array]":"[Object]";var Rr=er(mt,Ke);if(typeof Pt>"u")Pt=[];else if(kt(Pt,X)>=0)return"[Circular]";function cr(sr,ur,zr){if(ur&&(Pt=te.call(Pt),Pt.push(ur)),zr){var gr={depth:mt.depth};return Ct(mt,"quoteStyle")&&(gr.quoteStyle=mt.quoteStyle),pe(sr,gr,Ke+1,Pt)}return pe(sr,mt,Ke+1,Pt)}if(typeof X=="function"&&!Ye(X)){var xr=vt(X),Wr=pr(X,cr);return"[Function"+(xr?": "+xr:" (anonymous)")+"]"+(Wr.length>0?" { "+ue.call(Wr,", ")+" }":"")}if(Ee(X)){var ot=ie?O.call(String(X),/^(Symbol\(.*\))_[^)]*$/,"$1"):K.call(X);return typeof X=="object"&&!ie?yt(ot):ot}if(dt(X)){for(var Lt="<"+H.call(String(X.nodeName)),xt=X.attributes||[],Je=0;Je<xt.length;Je++)Lt+=" "+xt[Je].name+"="+We(we(xt[Je].value),"double",mt);return Lt+=">",X.childNodes&&X.childNodes.length&&(Lt+="..."),Lt+="</"+H.call(String(X.nodeName))+">",Lt}if(gt(X)){if(X.length===0)return"[]";var jt=pr(X,cr);return Rr&&!At(jt)?"["+vr(jt,Rr)+"]":"[ "+ue.call(jt,", ")+" ]"}if(Pe(X)){var ee=pr(X,cr);return!("cause"in Error.prototype)&&"cause"in X&&!ce.call(X,"cause")?"{ ["+String(X)+"] "+ue.call(Y.call("[cause]: "+cr(X.cause),ee),", ")+" }":ee.length===0?"["+String(X)+"]":"{ ["+String(X)+"] "+ue.call(ee,", ")+" }"}if(typeof X=="object"&&_t){if(xe&&typeof X[xe]=="function"&&be)return be(X,{depth:fr-Ke});if(_t!=="symbol"&&typeof X.inspect=="function")return X.inspect()}if(Tt(X)){var qe=[];return n&&n.call(X,function(sr,ur){qe.push(cr(ur,X,!0)+" => "+cr(sr,X))}),ut("Map",t.call(X),qe,Rr)}if(St(X)){var pt=[];return h&&h.call(X,function(sr){pt.push(cr(sr,X))}),ut("Set",u.call(X),pt,Rr)}if(ct(X))return De("WeakMap");if(Re(X))return De("WeakSet");if(st(X))return De("WeakRef");if(Te(X))return yt(cr(Number(X)));if(Qe(X))return yt(cr(N.call(X)));if(Fe(X))return yt(S.call(X));if(ke(X))return yt(cr(String(X)));if(typeof window<"u"&&X===window)return"{ [object Window] }";if(typeof globalThis<"u"&&X===globalThis||typeof yi<"u"&&X===yi)return"{ [object globalThis] }";if(!Xe(X)&&!Ye(X)){var Dt=pr(X,cr),Qt=me?me(X)===Object.prototype:X instanceof Object||X.constructor===Object,Zt=X instanceof Object?"":"null prototype",Mt=!Qt&&ne&&Object(X)===X&&ne in X?k.call(wt(X),8,-1):Zt?"Object":"",Yt=Qt||typeof X.constructor!="function"?"":X.constructor.name?X.constructor.name+" ":"",Mr=Yt+(Mt||Zt?"["+ue.call(Y.call([],Mt||[],Zt||[]),": ")+"] ":"");return Dt.length===0?Mr+"{}":Rr?Mr+"{"+vr(Dt,Rr)+"}":Mr+"{ "+ue.call(Dt,", ")+" }"}return String(X)};function We(pe,X,Me){var Ke=Me.quoteStyle||X,Pt=Le[Ke];return Pt+pe+Pt}function we(pe){return O.call(String(pe),/"/g,"&quot;")}function rt(pe){return!ne||!(typeof pe=="object"&&(ne in pe||typeof pe[ne]<"u"))}function gt(pe){return wt(pe)==="[object Array]"&&rt(pe)}function Xe(pe){return wt(pe)==="[object Date]"&&rt(pe)}function Ye(pe){return wt(pe)==="[object RegExp]"&&rt(pe)}function Pe(pe){return wt(pe)==="[object Error]"&&rt(pe)}function ke(pe){return wt(pe)==="[object String]"&&rt(pe)}function Te(pe){return wt(pe)==="[object Number]"&&rt(pe)}function Fe(pe){return wt(pe)==="[object Boolean]"&&rt(pe)}function Ee(pe){if(ie)return pe&&typeof pe=="object"&&pe instanceof Symbol;if(typeof pe=="symbol")return!0;if(!pe||typeof pe!="object"||!K)return!1;try{return K.call(pe),!0}catch{}return!1}function Qe(pe){if(!pe||typeof pe!="object"||!N)return!1;try{return N.call(pe),!0}catch{}return!1}var lt=Object.prototype.hasOwnProperty||function(pe){return pe in this};function Ct(pe,X){return lt.call(pe,X)}function wt(pe){return D.call(pe)}function vt(pe){if(pe.name)return pe.name;var X=b.call(A.call(pe),/^function\s*([\w$]+)/);return X?X[1]:null}function kt(pe,X){if(pe.indexOf)return pe.indexOf(X);for(var Me=0,Ke=pe.length;Me<Ke;Me++)if(pe[Me]===X)return Me;return-1}function Tt(pe){if(!t||!pe||typeof pe!="object")return!1;try{t.call(pe);try{u.call(pe)}catch{return!0}return pe instanceof Map}catch{}return!1}function ct(pe){if(!m||!pe||typeof pe!="object")return!1;try{m.call(pe,m);try{T.call(pe,T)}catch{return!0}return pe instanceof WeakMap}catch{}return!1}function st(pe){if(!_||!pe||typeof pe!="object")return!1;try{return _.call(pe),!0}catch{}return!1}function St(pe){if(!u||!pe||typeof pe!="object")return!1;try{u.call(pe);try{t.call(pe)}catch{return!0}return pe instanceof Set}catch{}return!1}function Re(pe){if(!T||!pe||typeof pe!="object")return!1;try{T.call(pe,T);try{m.call(pe,m)}catch{return!0}return pe instanceof WeakSet}catch{}return!1}function dt(pe){return!pe||typeof pe!="object"?!1:typeof HTMLElement<"u"&&pe instanceof HTMLElement?!0:typeof pe.nodeName=="string"&&typeof pe.getAttribute=="function"}function Ve(pe,X){if(pe.length>X.maxStringLength){var Me=pe.length-X.maxStringLength,Ke="... "+Me+" more character"+(Me>1?"s":"");return Ve(k.call(pe,0,X.maxStringLength),X)+Ke}var Pt=je[X.quoteStyle||"single"];Pt.lastIndex=0;var mt=O.call(O.call(pe,Pt,"\\$1"),/[\x00-\x1f]/g,ht);return We(mt,"single",X)}function ht(pe){var X=pe.charCodeAt(0),Me={8:"b",9:"t",10:"n",12:"f",13:"r"}[X];return Me?"\\"+Me:"\\x"+(X<16?"0":"")+q.call(X.toString(16))}function yt(pe){return"Object("+pe+")"}function De(pe){return pe+" { ? }"}function ut(pe,X,Me,Ke){var Pt=Ke?vr(Me,Ke):ue.call(Me,", ");return pe+" ("+X+") {"+Pt+"}"}function At(pe){for(var X=0;X<pe.length;X++)if(kt(pe[X],`
350
350
  `)>=0)return!1;return!0}function er(pe,X){var Me;if(pe.indent===" ")Me=" ";else if(typeof pe.indent=="number"&&pe.indent>0)Me=ue.call(Array(pe.indent+1)," ");else return null;return{base:Me,prev:ue.call(Array(X+1),Me)}}function vr(pe,X){if(pe.length===0)return"";var Me=`
351
351
  `+X.prev+X.base;return Me+ue.call(pe,","+Me)+`
352
352
  `+X.prev}function pr(pe,X){var Me=gt(pe),Ke=[];if(Me){Ke.length=pe.length;for(var Pt=0;Pt<pe.length;Pt++)Ke[Pt]=Ct(pe,Pt)?X(pe[Pt],pe):""}var mt=typeof re=="function"?re(pe):[],_t;if(ie){_t={};for(var zt=0;zt<mt.length;zt++)_t["$"+mt[zt]]=mt[zt]}for(var Nt in pe)Ct(pe,Nt)&&(Me&&String(Number(Nt))===Nt&&Nt<pe.length||ie&&_t["$"+Nt]instanceof Symbol||(G.call(/[^\w$]/,Nt)?Ke.push(X(Nt,pe)+": "+X(pe[Nt],pe)):Ke.push(Nt+": "+X(pe[Nt],pe))));if(typeof re=="function")for(var or=0;or<mt.length;or++)ce.call(pe,mt[or])&&Ke.push("["+X(mt[or])+"]: "+X(pe[mt[or]],pe));return Ke}return Ug}var Wg,Yb;function EN(){if(Yb)return Wg;Yb=1;var r=_h(),e=Qu(),t=function(h,g,m){for(var M=h,T;(T=M.next)!=null;M=T)if(T.key===g)return M.next=T.next,m||(T.next=h.next,h.next=T),T},n=function(h,g){if(h){var m=t(h,g);return m&&m.value}},i=function(h,g,m){var M=t(h,g);M?M.value=m:h.next={key:g,next:h.next,value:m}},l=function(h,g){return h?!!t(h,g):!1},u=function(h,g){if(h)return t(h,g,!0)};return Wg=function(){var g,m={assert:function(M){if(!m.has(M))throw new e("Side channel does not contain "+r(M))},delete:function(M){var T=g&&g.next,C=u(g,M);return C&&T&&T===C&&(g=void 0),!!C},get:function(M){return n(g,M)},has:function(M){return l(g,M)},set:function(M,T){g||(g={next:void 0}),i(g,M,T)}};return m},Wg}var Vg,Kb;function dS(){return Kb||(Kb=1,Vg=Object),Vg}var Gg,Xb;function kN(){return Xb||(Xb=1,Gg=Error),Gg}var Zg,Jb;function RN(){return Jb||(Jb=1,Zg=EvalError),Zg}var Yg,Qb;function IN(){return Qb||(Qb=1,Yg=RangeError),Yg}var Kg,e_;function LN(){return e_||(e_=1,Kg=ReferenceError),Kg}var Xg,t_;function MN(){return t_||(t_=1,Xg=SyntaxError),Xg}var Jg,r_;function DN(){return r_||(r_=1,Jg=URIError),Jg}var Qg,n_;function ON(){return n_||(n_=1,Qg=Math.abs),Qg}var e1,i_;function PN(){return i_||(i_=1,e1=Math.floor),e1}var t1,o_;function NN(){return o_||(o_=1,t1=Math.max),t1}var r1,s_;function jN(){return s_||(s_=1,r1=Math.min),r1}var n1,a_;function FN(){return a_||(a_=1,n1=Math.pow),n1}var i1,l_;function BN(){return l_||(l_=1,i1=Math.round),i1}var o1,c_;function HN(){return c_||(c_=1,o1=Number.isNaN||function(e){return e!==e}),o1}var s1,u_;function qN(){if(u_)return s1;u_=1;var r=HN();return s1=function(t){return r(t)||t===0?t:t<0?-1:1},s1}var a1,f_;function zN(){return f_||(f_=1,a1=Object.getOwnPropertyDescriptor),a1}var l1,d_;function hS(){if(d_)return l1;d_=1;var r=zN();if(r)try{r([],"length")}catch{r=null}return l1=r,l1}var c1,h_;function $N(){if(h_)return c1;h_=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return c1=r,c1}var u1,p_;function UN(){return p_||(p_=1,u1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var l in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var h=Object.getOwnPropertyDescriptor(e,t);if(h.value!==i||h.enumerable!==!0)return!1}return!0}),u1}var f1,g_;function WN(){if(g_)return f1;g_=1;var r=typeof Symbol<"u"&&Symbol,e=UN();return f1=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},f1}var d1,m_;function pS(){return m_||(m_=1,d1=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),d1}var h1,v_;function gS(){if(v_)return h1;v_=1;var r=dS();return h1=r.getPrototypeOf||null,h1}var p1,y_;function VN(){if(y_)return p1;y_=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(g,m){for(var M=[],T=0;T<g.length;T+=1)M[T]=g[T];for(var C=0;C<m.length;C+=1)M[C+g.length]=m[C];return M},l=function(g,m){for(var M=[],T=m,C=0;T<g.length;T+=1,C+=1)M[C]=g[T];return M},u=function(h,g){for(var m="",M=0;M<h.length;M+=1)m+=h[M],M+1<h.length&&(m+=g);return m};return p1=function(g){var m=this;if(typeof m!="function"||e.apply(m)!==n)throw new TypeError(r+m);for(var M=l(arguments,1),T,C=function(){if(this instanceof T){var b=m.apply(this,i(M,arguments));return Object(b)===b?b:this}return m.apply(g,i(M,arguments))},_=t(0,m.length-M.length),S=[],D=0;D<_;D++)S[D]="$"+D;if(T=Function("binder","return function ("+u(S,",")+"){ return binder.apply(this,arguments); }")(C),m.prototype){var A=function(){};A.prototype=m.prototype,T.prototype=new A,A.prototype=null}return T},p1}var g1,b_;function xh(){if(b_)return g1;b_=1;var r=VN();return g1=Function.prototype.bind||r,g1}var m1,__;function Bm(){return __||(__=1,m1=Function.prototype.call),m1}var v1,x_;function mS(){return x_||(x_=1,v1=Function.prototype.apply),v1}var y1,S_;function GN(){return S_||(S_=1,y1=typeof Reflect<"u"&&Reflect&&Reflect.apply),y1}var b1,C_;function ZN(){if(C_)return b1;C_=1;var r=xh(),e=mS(),t=Bm(),n=GN();return b1=n||r.call(t,e),b1}var _1,w_;function vS(){if(w_)return _1;w_=1;var r=xh(),e=Qu(),t=Bm(),n=ZN();return _1=function(l){if(l.length<1||typeof l[0]!="function")throw new e("a function is required");return n(r,t,l)},_1}var x1,A_;function YN(){if(A_)return x1;A_=1;var r=vS(),e=hS(),t;try{t=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var n=!!t&&e&&e(Object.prototype,"__proto__"),i=Object,l=i.getPrototypeOf;return x1=n&&typeof n.get=="function"?r([n.get]):typeof l=="function"?function(h){return l(h==null?h:i(h))}:!1,x1}var S1,T_;function KN(){if(T_)return S1;T_=1;var r=pS(),e=gS(),t=YN();return S1=r?function(i){return r(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:t?function(i){return t(i)}:null,S1}var C1,E_;function XN(){if(E_)return C1;E_=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=xh();return C1=t.call(r,e),C1}var w1,k_;function Hm(){if(k_)return w1;k_=1;var r,e=dS(),t=kN(),n=RN(),i=IN(),l=LN(),u=MN(),h=Qu(),g=DN(),m=ON(),M=PN(),T=NN(),C=jN(),_=FN(),S=BN(),D=qN(),A=Function,b=function(Ye){try{return A('"use strict"; return ('+Ye+").constructor;")()}catch{}},k=hS(),O=$N(),q=function(){throw new h},H=k?function(){try{return arguments.callee,q}catch{try{return k(arguments,"callee").get}catch{return q}}}():q,G=WN()(),Y=KN(),ue=gS(),te=pS(),fe=mS(),N=Bm(),re={},K=typeof Uint8Array>"u"||!Y?r:Y(Uint8Array),ie={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":G&&Y?Y([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":re,"%AsyncGenerator%":re,"%AsyncGeneratorFunction%":re,"%AsyncIteratorPrototype%":re,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":A,"%GeneratorFunction%":re,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":G&&Y?Y(Y([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!G||!Y?r:Y(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":k,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":i,"%ReferenceError%":l,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!G||!Y?r:Y(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":G&&Y?Y(""[Symbol.iterator]()):r,"%Symbol%":G?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":H,"%TypedArray%":K,"%TypeError%":h,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":g,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":N,"%Function.prototype.apply%":fe,"%Object.defineProperty%":O,"%Object.getPrototypeOf%":ue,"%Math.abs%":m,"%Math.floor%":M,"%Math.max%":T,"%Math.min%":C,"%Math.pow%":_,"%Math.round%":S,"%Math.sign%":D,"%Reflect.getPrototypeOf%":te};if(Y)try{null.error}catch(Ye){var ne=Y(Y(Ye));ie["%Error.prototype%"]=ne}var ce=function Ye(Pe){var ke;if(Pe==="%AsyncFunction%")ke=b("async function () {}");else if(Pe==="%GeneratorFunction%")ke=b("function* () {}");else if(Pe==="%AsyncGeneratorFunction%")ke=b("async function* () {}");else if(Pe==="%AsyncGenerator%"){var Te=Ye("%AsyncGeneratorFunction%");Te&&(ke=Te.prototype)}else if(Pe==="%AsyncIteratorPrototype%"){var Fe=Ye("%AsyncGenerator%");Fe&&Y&&(ke=Y(Fe.prototype))}return ie[Pe]=ke,ke},me={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ae=xh(),be=XN(),ge=ae.call(N,Array.prototype.concat),xe=ae.call(fe,Array.prototype.splice),Le=ae.call(N,String.prototype.replace),je=ae.call(N,String.prototype.slice),We=ae.call(N,RegExp.prototype.exec),we=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,rt=/\\(\\)?/g,gt=function(Pe){var ke=je(Pe,0,1),Te=je(Pe,-1);if(ke==="%"&&Te!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(Te==="%"&&ke!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var Fe=[];return Le(Pe,we,function(Ee,Qe,lt,Ct){Fe[Fe.length]=lt?Le(Ct,rt,"$1"):Qe||Ee}),Fe},Xe=function(Pe,ke){var Te=Pe,Fe;if(be(me,Te)&&(Fe=me[Te],Te="%"+Fe[0]+"%"),be(ie,Te)){var Ee=ie[Te];if(Ee===re&&(Ee=ce(Te)),typeof Ee>"u"&&!ke)throw new h("intrinsic "+Pe+" exists, but is not available. Please file an issue!");return{alias:Fe,name:Te,value:Ee}}throw new u("intrinsic "+Pe+" does not exist!")};return w1=function(Pe,ke){if(typeof Pe!="string"||Pe.length===0)throw new h("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ke!="boolean")throw new h('"allowMissing" argument must be a boolean');if(We(/^%?[^%]*%?$/,Pe)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Te=gt(Pe),Fe=Te.length>0?Te[0]:"",Ee=Xe("%"+Fe+"%",ke),Qe=Ee.name,lt=Ee.value,Ct=!1,wt=Ee.alias;wt&&(Fe=wt[0],xe(Te,ge([0,1],wt)));for(var vt=1,kt=!0;vt<Te.length;vt+=1){var Tt=Te[vt],ct=je(Tt,0,1),st=je(Tt,-1);if((ct==='"'||ct==="'"||ct==="`"||st==='"'||st==="'"||st==="`")&&ct!==st)throw new u("property names with quotes must have matching quotes");if((Tt==="constructor"||!kt)&&(Ct=!0),Fe+="."+Tt,Qe="%"+Fe+"%",be(ie,Qe))lt=ie[Qe];else if(lt!=null){if(!(Tt in lt)){if(!ke)throw new h("base intrinsic for "+Pe+" exists, but the property is not available.");return}if(k&&vt+1>=Te.length){var St=k(lt,Tt);kt=!!St,kt&&"get"in St&&!("originalValue"in St.get)?lt=St.get:lt=lt[Tt]}else kt=be(lt,Tt),lt=lt[Tt];kt&&!Ct&&(ie[Qe]=lt)}}return lt},w1}var A1,R_;function yS(){if(R_)return A1;R_=1;var r=Hm(),e=vS(),t=e([r("%String.prototype.indexOf%")]);return A1=function(i,l){var u=r(i,!!l);return typeof u=="function"&&t(i,".prototype.")>-1?e([u]):u},A1}var T1,I_;function bS(){if(I_)return T1;I_=1;var r=Hm(),e=yS(),t=_h(),n=Qu(),i=r("%Map%",!0),l=e("Map.prototype.get",!0),u=e("Map.prototype.set",!0),h=e("Map.prototype.has",!0),g=e("Map.prototype.delete",!0),m=e("Map.prototype.size",!0);return T1=!!i&&function(){var T,C={assert:function(_){if(!C.has(_))throw new n("Side channel does not contain "+t(_))},delete:function(_){if(T){var S=g(T,_);return m(T)===0&&(T=void 0),S}return!1},get:function(_){if(T)return l(T,_)},has:function(_){return T?h(T,_):!1},set:function(_,S){T||(T=new i),u(T,_,S)}};return C},T1}var E1,L_;function JN(){if(L_)return E1;L_=1;var r=Hm(),e=yS(),t=_h(),n=bS(),i=Qu(),l=r("%WeakMap%",!0),u=e("WeakMap.prototype.get",!0),h=e("WeakMap.prototype.set",!0),g=e("WeakMap.prototype.has",!0),m=e("WeakMap.prototype.delete",!0);return E1=l?function(){var T,C,_={assert:function(S){if(!_.has(S))throw new i("Side channel does not contain "+t(S))},delete:function(S){if(l&&S&&(typeof S=="object"||typeof S=="function")){if(T)return m(T,S)}else if(n&&C)return C.delete(S);return!1},get:function(S){return l&&S&&(typeof S=="object"||typeof S=="function")&&T?u(T,S):C&&C.get(S)},has:function(S){return l&&S&&(typeof S=="object"||typeof S=="function")&&T?g(T,S):!!C&&C.has(S)},set:function(S,D){l&&S&&(typeof S=="object"||typeof S=="function")?(T||(T=new l),h(T,S,D)):n&&(C||(C=n()),C.set(S,D))}};return _}:n,E1}var k1,M_;function QN(){if(M_)return k1;M_=1;var r=Qu(),e=_h(),t=EN(),n=bS(),i=JN(),l=i||n||t;return k1=function(){var h,g={assert:function(m){if(!g.has(m))throw new r("Side channel does not contain "+e(m))},delete:function(m){return!!h&&h.delete(m)},get:function(m){return h&&h.get(m)},has:function(m){return!!h&&h.has(m)},set:function(m,M){h||(h=l()),h.set(m,M)}};return g},k1}var R1,D_;function qm(){if(D_)return R1;D_=1;var r=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return R1={default:t.RFC3986,formatters:{RFC1738:function(n){return r.call(n,e,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},R1}var I1,O_;function _S(){if(O_)return I1;O_=1;var r=qm(),e=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var A=[],b=0;b<256;++b)A.push("%"+((b<16?"0":"")+b.toString(16)).toUpperCase());return A}(),i=function(b){for(;b.length>1;){var k=b.pop(),O=k.obj[k.prop];if(t(O)){for(var q=[],H=0;H<O.length;++H)typeof O[H]<"u"&&q.push(O[H]);k.obj[k.prop]=q}}},l=function(b,k){for(var O=k&&k.plainObjects?{__proto__:null}:{},q=0;q<b.length;++q)typeof b[q]<"u"&&(O[q]=b[q]);return O},u=function A(b,k,O){if(!k)return b;if(typeof k!="object"&&typeof k!="function"){if(t(b))b.push(k);else if(b&&typeof b=="object")(O&&(O.plainObjects||O.allowPrototypes)||!e.call(Object.prototype,k))&&(b[k]=!0);else return[b,k];return b}if(!b||typeof b!="object")return[b].concat(k);var q=b;return t(b)&&!t(k)&&(q=l(b,O)),t(b)&&t(k)?(k.forEach(function(H,G){if(e.call(b,G)){var Y=b[G];Y&&typeof Y=="object"&&H&&typeof H=="object"?b[G]=A(Y,H,O):b.push(H)}else b[G]=H}),b):Object.keys(k).reduce(function(H,G){var Y=k[G];return e.call(H,G)?H[G]=A(H[G],Y,O):H[G]=Y,H},q)},h=function(b,k){return Object.keys(k).reduce(function(O,q){return O[q]=k[q],O},b)},g=function(A,b,k){var O=A.replace(/\+/g," ");if(k==="iso-8859-1")return O.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(O)}catch{return O}},m=1024,M=function(b,k,O,q,H){if(b.length===0)return b;var G=b;if(typeof b=="symbol"?G=Symbol.prototype.toString.call(b):typeof b!="string"&&(G=String(b)),O==="iso-8859-1")return escape(G).replace(/%u[0-9a-f]{4}/gi,function(K){return"%26%23"+parseInt(K.slice(2),16)+"%3B"});for(var Y="",ue=0;ue<G.length;ue+=m){for(var te=G.length>=m?G.slice(ue,ue+m):G,fe=[],N=0;N<te.length;++N){var re=te.charCodeAt(N);if(re===45||re===46||re===95||re===126||re>=48&&re<=57||re>=65&&re<=90||re>=97&&re<=122||H===r.RFC1738&&(re===40||re===41)){fe[fe.length]=te.charAt(N);continue}if(re<128){fe[fe.length]=n[re];continue}if(re<2048){fe[fe.length]=n[192|re>>6]+n[128|re&63];continue}if(re<55296||re>=57344){fe[fe.length]=n[224|re>>12]+n[128|re>>6&63]+n[128|re&63];continue}N+=1,re=65536+((re&1023)<<10|te.charCodeAt(N)&1023),fe[fe.length]=n[240|re>>18]+n[128|re>>12&63]+n[128|re>>6&63]+n[128|re&63]}Y+=fe.join("")}return Y},T=function(b){for(var k=[{obj:{o:b},prop:"o"}],O=[],q=0;q<k.length;++q)for(var H=k[q],G=H.obj[H.prop],Y=Object.keys(G),ue=0;ue<Y.length;++ue){var te=Y[ue],fe=G[te];typeof fe=="object"&&fe!==null&&O.indexOf(fe)===-1&&(k.push({obj:G,prop:te}),O.push(fe))}return i(k),b},C=function(b){return Object.prototype.toString.call(b)==="[object RegExp]"},_=function(b){return!b||typeof b!="object"?!1:!!(b.constructor&&b.constructor.isBuffer&&b.constructor.isBuffer(b))},S=function(b,k){return[].concat(b,k)},D=function(b,k){if(t(b)){for(var O=[],q=0;q<b.length;q+=1)O.push(k(b[q]));return O}return k(b)};return I1={arrayToObject:l,assign:h,combine:S,compact:T,decode:g,encode:M,isBuffer:_,isRegExp:C,maybeMap:D,merge:u},I1}var L1,P_;function ej(){if(P_)return L1;P_=1;var r=QN(),e=_S(),t=qm(),n=Object.prototype.hasOwnProperty,i={brackets:function(A){return A+"[]"},comma:"comma",indices:function(A,b){return A+"["+b+"]"},repeat:function(A){return A}},l=Array.isArray,u=Array.prototype.push,h=function(D,A){u.apply(D,l(A)?A:[A])},g=Date.prototype.toISOString,m=t.default,M={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:m,formatter:t.formatters[m],indices:!1,serializeDate:function(A){return g.call(A)},skipNulls:!1,strictNullHandling:!1},T=function(A){return typeof A=="string"||typeof A=="number"||typeof A=="boolean"||typeof A=="symbol"||typeof A=="bigint"},C={},_=function D(A,b,k,O,q,H,G,Y,ue,te,fe,N,re,K,ie,ne,ce,me){for(var ae=A,be=me,ge=0,xe=!1;(be=be.get(C))!==void 0&&!xe;){var Le=be.get(A);if(ge+=1,typeof Le<"u"){if(Le===ge)throw new RangeError("Cyclic object value");xe=!0}typeof be.get(C)>"u"&&(ge=0)}if(typeof te=="function"?ae=te(b,ae):ae instanceof Date?ae=re(ae):k==="comma"&&l(ae)&&(ae=e.maybeMap(ae,function(Qe){return Qe instanceof Date?re(Qe):Qe})),ae===null){if(H)return ue&&!ne?ue(b,M.encoder,ce,"key",K):b;ae=""}if(T(ae)||e.isBuffer(ae)){if(ue){var je=ne?b:ue(b,M.encoder,ce,"key",K);return[ie(je)+"="+ie(ue(ae,M.encoder,ce,"value",K))]}return[ie(b)+"="+ie(String(ae))]}var We=[];if(typeof ae>"u")return We;var we;if(k==="comma"&&l(ae))ne&&ue&&(ae=e.maybeMap(ae,ue)),we=[{value:ae.length>0?ae.join(",")||null:void 0}];else if(l(te))we=te;else{var rt=Object.keys(ae);we=fe?rt.sort(fe):rt}var gt=Y?String(b).replace(/\./g,"%2E"):String(b),Xe=O&&l(ae)&&ae.length===1?gt+"[]":gt;if(q&&l(ae)&&ae.length===0)return Xe+"[]";for(var Ye=0;Ye<we.length;++Ye){var Pe=we[Ye],ke=typeof Pe=="object"&&Pe&&typeof Pe.value<"u"?Pe.value:ae[Pe];if(!(G&&ke===null)){var Te=N&&Y?String(Pe).replace(/\./g,"%2E"):String(Pe),Fe=l(ae)?typeof k=="function"?k(Xe,Te):Xe:Xe+(N?"."+Te:"["+Te+"]");me.set(A,ge);var Ee=r();Ee.set(C,me),h(We,D(ke,Fe,k,O,q,H,G,Y,k==="comma"&&ne&&l(ae)?null:ue,te,fe,N,re,K,ie,ne,ce,Ee))}}return We},S=function(A){if(!A)return M;if(typeof A.allowEmptyArrays<"u"&&typeof A.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof A.encodeDotInKeys<"u"&&typeof A.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(A.encoder!==null&&typeof A.encoder<"u"&&typeof A.encoder!="function")throw new TypeError("Encoder has to be a function.");var b=A.charset||M.charset;if(typeof A.charset<"u"&&A.charset!=="utf-8"&&A.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var k=t.default;if(typeof A.format<"u"){if(!n.call(t.formatters,A.format))throw new TypeError("Unknown format option provided.");k=A.format}var O=t.formatters[k],q=M.filter;(typeof A.filter=="function"||l(A.filter))&&(q=A.filter);var H;if(A.arrayFormat in i?H=A.arrayFormat:"indices"in A?H=A.indices?"indices":"repeat":H=M.arrayFormat,"commaRoundTrip"in A&&typeof A.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var G=typeof A.allowDots>"u"?A.encodeDotInKeys===!0?!0:M.allowDots:!!A.allowDots;return{addQueryPrefix:typeof A.addQueryPrefix=="boolean"?A.addQueryPrefix:M.addQueryPrefix,allowDots:G,allowEmptyArrays:typeof A.allowEmptyArrays=="boolean"?!!A.allowEmptyArrays:M.allowEmptyArrays,arrayFormat:H,charset:b,charsetSentinel:typeof A.charsetSentinel=="boolean"?A.charsetSentinel:M.charsetSentinel,commaRoundTrip:!!A.commaRoundTrip,delimiter:typeof A.delimiter>"u"?M.delimiter:A.delimiter,encode:typeof A.encode=="boolean"?A.encode:M.encode,encodeDotInKeys:typeof A.encodeDotInKeys=="boolean"?A.encodeDotInKeys:M.encodeDotInKeys,encoder:typeof A.encoder=="function"?A.encoder:M.encoder,encodeValuesOnly:typeof A.encodeValuesOnly=="boolean"?A.encodeValuesOnly:M.encodeValuesOnly,filter:q,format:k,formatter:O,serializeDate:typeof A.serializeDate=="function"?A.serializeDate:M.serializeDate,skipNulls:typeof A.skipNulls=="boolean"?A.skipNulls:M.skipNulls,sort:typeof A.sort=="function"?A.sort:null,strictNullHandling:typeof A.strictNullHandling=="boolean"?A.strictNullHandling:M.strictNullHandling}};return L1=function(D,A){var b=D,k=S(A),O,q;typeof k.filter=="function"?(q=k.filter,b=q("",b)):l(k.filter)&&(q=k.filter,O=q);var H=[];if(typeof b!="object"||b===null)return"";var G=i[k.arrayFormat],Y=G==="comma"&&k.commaRoundTrip;O||(O=Object.keys(b)),k.sort&&O.sort(k.sort);for(var ue=r(),te=0;te<O.length;++te){var fe=O[te],N=b[fe];k.skipNulls&&N===null||h(H,_(N,fe,G,Y,k.allowEmptyArrays,k.strictNullHandling,k.skipNulls,k.encodeDotInKeys,k.encode?k.encoder:null,k.filter,k.sort,k.allowDots,k.serializeDate,k.format,k.formatter,k.encodeValuesOnly,k.charset,ue))}var re=H.join(k.delimiter),K=k.addQueryPrefix===!0?"?":"";return k.charsetSentinel&&(k.charset==="iso-8859-1"?K+="utf8=%26%2310003%3B&":K+="utf8=%E2%9C%93&"),re.length>0?K+re:""},L1}var M1,N_;function tj(){if(N_)return M1;N_=1;var r=_S(),e=Object.prototype.hasOwnProperty,t=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},i=function(C){return C.replace(/&#(\d+);/g,function(_,S){return String.fromCharCode(parseInt(S,10))})},l=function(C,_,S){if(C&&typeof C=="string"&&_.comma&&C.indexOf(",")>-1)return C.split(",");if(_.throwOnLimitExceeded&&S>=_.arrayLimit)throw new RangeError("Array limit exceeded. Only "+_.arrayLimit+" element"+(_.arrayLimit===1?"":"s")+" allowed in an array.");return C},u="utf8=%26%2310003%3B",h="utf8=%E2%9C%93",g=function(_,S){var D={__proto__:null},A=S.ignoreQueryPrefix?_.replace(/^\?/,""):_;A=A.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var b=S.parameterLimit===1/0?void 0:S.parameterLimit,k=A.split(S.delimiter,S.throwOnLimitExceeded?b+1:b);if(S.throwOnLimitExceeded&&k.length>b)throw new RangeError("Parameter limit exceeded. Only "+b+" parameter"+(b===1?"":"s")+" allowed.");var O=-1,q,H=S.charset;if(S.charsetSentinel)for(q=0;q<k.length;++q)k[q].indexOf("utf8=")===0&&(k[q]===h?H="utf-8":k[q]===u&&(H="iso-8859-1"),O=q,q=k.length);for(q=0;q<k.length;++q)if(q!==O){var G=k[q],Y=G.indexOf("]="),ue=Y===-1?G.indexOf("="):Y+1,te,fe;ue===-1?(te=S.decoder(G,n.decoder,H,"key"),fe=S.strictNullHandling?null:""):(te=S.decoder(G.slice(0,ue),n.decoder,H,"key"),fe=r.maybeMap(l(G.slice(ue+1),S,t(D[te])?D[te].length:0),function(re){return S.decoder(re,n.decoder,H,"value")})),fe&&S.interpretNumericEntities&&H==="iso-8859-1"&&(fe=i(String(fe))),G.indexOf("[]=")>-1&&(fe=t(fe)?[fe]:fe);var N=e.call(D,te);N&&S.duplicates==="combine"?D[te]=r.combine(D[te],fe):(!N||S.duplicates==="last")&&(D[te]=fe)}return D},m=function(C,_,S,D){var A=0;if(C.length>0&&C[C.length-1]==="[]"){var b=C.slice(0,-1).join("");A=Array.isArray(_)&&_[b]?_[b].length:0}for(var k=D?_:l(_,S,A),O=C.length-1;O>=0;--O){var q,H=C[O];if(H==="[]"&&S.parseArrays)q=S.allowEmptyArrays&&(k===""||S.strictNullHandling&&k===null)?[]:r.combine([],k);else{q=S.plainObjects?{__proto__:null}:{};var G=H.charAt(0)==="["&&H.charAt(H.length-1)==="]"?H.slice(1,-1):H,Y=S.decodeDotInKeys?G.replace(/%2E/g,"."):G,ue=parseInt(Y,10);!S.parseArrays&&Y===""?q={0:k}:!isNaN(ue)&&H!==Y&&String(ue)===Y&&ue>=0&&S.parseArrays&&ue<=S.arrayLimit?(q=[],q[ue]=k):Y!=="__proto__"&&(q[Y]=k)}k=q}return k},M=function(_,S,D,A){if(_){var b=D.allowDots?_.replace(/\.([^.[]+)/g,"[$1]"):_,k=/(\[[^[\]]*])/,O=/(\[[^[\]]*])/g,q=D.depth>0&&k.exec(b),H=q?b.slice(0,q.index):b,G=[];if(H){if(!D.plainObjects&&e.call(Object.prototype,H)&&!D.allowPrototypes)return;G.push(H)}for(var Y=0;D.depth>0&&(q=O.exec(b))!==null&&Y<D.depth;){if(Y+=1,!D.plainObjects&&e.call(Object.prototype,q[1].slice(1,-1))&&!D.allowPrototypes)return;G.push(q[1])}if(q){if(D.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+D.depth+" and strictDepth is true");G.push("["+b.slice(q.index)+"]")}return m(G,S,D,A)}},T=function(_){if(!_)return n;if(typeof _.allowEmptyArrays<"u"&&typeof _.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof _.decodeDotInKeys<"u"&&typeof _.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(_.decoder!==null&&typeof _.decoder<"u"&&typeof _.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof _.charset<"u"&&_.charset!=="utf-8"&&_.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof _.throwOnLimitExceeded<"u"&&typeof _.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var S=typeof _.charset>"u"?n.charset:_.charset,D=typeof _.duplicates>"u"?n.duplicates:_.duplicates;if(D!=="combine"&&D!=="first"&&D!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var A=typeof _.allowDots>"u"?_.decodeDotInKeys===!0?!0:n.allowDots:!!_.allowDots;return{allowDots:A,allowEmptyArrays:typeof _.allowEmptyArrays=="boolean"?!!_.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof _.allowPrototypes=="boolean"?_.allowPrototypes:n.allowPrototypes,allowSparse:typeof _.allowSparse=="boolean"?_.allowSparse:n.allowSparse,arrayLimit:typeof _.arrayLimit=="number"?_.arrayLimit:n.arrayLimit,charset:S,charsetSentinel:typeof _.charsetSentinel=="boolean"?_.charsetSentinel:n.charsetSentinel,comma:typeof _.comma=="boolean"?_.comma:n.comma,decodeDotInKeys:typeof _.decodeDotInKeys=="boolean"?_.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof _.decoder=="function"?_.decoder:n.decoder,delimiter:typeof _.delimiter=="string"||r.isRegExp(_.delimiter)?_.delimiter:n.delimiter,depth:typeof _.depth=="number"||_.depth===!1?+_.depth:n.depth,duplicates:D,ignoreQueryPrefix:_.ignoreQueryPrefix===!0,interpretNumericEntities:typeof _.interpretNumericEntities=="boolean"?_.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof _.parameterLimit=="number"?_.parameterLimit:n.parameterLimit,parseArrays:_.parseArrays!==!1,plainObjects:typeof _.plainObjects=="boolean"?_.plainObjects:n.plainObjects,strictDepth:typeof _.strictDepth=="boolean"?!!_.strictDepth:n.strictDepth,strictNullHandling:typeof _.strictNullHandling=="boolean"?_.strictNullHandling:n.strictNullHandling,throwOnLimitExceeded:typeof _.throwOnLimitExceeded=="boolean"?_.throwOnLimitExceeded:!1}};return M1=function(C,_){var S=T(_);if(C===""||C===null||typeof C>"u")return S.plainObjects?{__proto__:null}:{};for(var D=typeof C=="string"?g(C,S):C,A=S.plainObjects?{__proto__:null}:{},b=Object.keys(D),k=0;k<b.length;++k){var O=b[k],q=M(O,D[O],S,typeof C=="string");A=r.merge(A,q,S)}return S.allowSparse===!0?A:r.compact(A)},M1}var D1,j_;function rj(){if(j_)return D1;j_=1;var r=ej(),e=tj(),t=qm();return D1={formats:t,parse:e,stringify:r},D1}var nj=rj();const ij=il(nj),im={StoredContexts:{},defaultHandler:()=>{}},xS={Init:()=>{},Create:r=>{const e=r.method+r.url;return im.StoredContexts[e]=r,oj(r)},FetchBaseUrl:()=>window.location.href,useDefaultHandler:r=>{im.defaultHandler=r}};function oj(r){const e=`[${r.method}] ${r.url}`;return{Call:async n=>{let{url:i,method:l,stream:u,paramType:h}=r;const{po:g,onStream:m,onStreamEnd:M,noDefaultHandle:T=[]}=n??{};(h==="query"||l==="GET")&&g!==void 0&&(i+="?"+ij.stringify(g,{arrayFormat:"comma"}));const C={method:l,headers:{Accept:"application/json;charset=UTF-8","X-Requested-With":"XMLHttpRequest","Cache-Control":"no-cache",Pragma:"no-cache",crossDomain:"true"}};if(h==="form"){const D=new FormData;if(g!==void 0)for(const A in g){const b=g[A];D.append(A,b)}C.body=D}else(h==="body"||h===void 0&&r.method!=="GET")&&(C.body=JSON.stringify(g),C.headers["Content-Type"]="application/json;charset=UTF-8");let _={errorCode:0,message:""};const S=Date.now();i=xS.FetchBaseUrl()+i;try{let D=await fetch(i,C);if(D.ok===!1)return _.errorCode=D.status,_.message=D.statusText,_;{const A=new TextDecoder("utf-8");if(u){if(D.body){let b=D.body.getReader(),k="";for(;;){const O=await b.read();if(O.done)break;const q=A.decode(O.value).trim();k+=q;let H=null;try{const G=q.split("\0");let Y=G[G.length-1];for(let ue=G.length-2;ue>=0;ue--)if(G[ue].trim().length!==0){Y=G[ue];break}H=await JSON.parse(Y)}catch{try{const Y=k.split("\0");let ue=Y[Y.length-1];for(let te=Y.length-2;te>=0;te--)if(Y[te].trim().length!==0){ue=Y[te];break}H=await JSON.parse(ue)}catch{}}if(H!=null&&(Object.keys(H).includes("err_code")?_.errorCode=H.err_code:(_.errorCode=0,_.data=H,k="",O.done?M==null||M(_.data):m==null||m(_.data))),O.done)break}}}else if(D.body){const k=await D.body.getReader().read(),O=A.decode(k.value);if(O==="null")return _;{let q=await JSON.parse(O.replaceAll("\0",""));Object.keys(q).includes("err_code")?(_.errorCode=q.err_code,_.message=q.err_msg):_.data=q}}}}catch(D){console.warn(D),_.errorCode=-1,_.message=D.message}return console.debug(`${e} ${Date.now()-S}ms`),T!==!0&&await im.defaultHandler(_,T),_}}}async function sj(r){const e=new Promise((t,n)=>{const i=new FileReader;i.onloadend=()=>{i.result?typeof i.result=="string"?t(i.result):n(new Error("Failed to convert file to Base64: Invalid result type.")):n(new Error("Failed to convert file to Base64: Empty result."))},i.onerror=n,i.readAsDataURL(r)});try{return await e}catch{return}}function aj(r,e){var h,g;const t=r.split(","),n=(g=(h=t[0])==null?void 0:h.match(/:(.*?);/))==null?void 0:g[1],i=atob(t[1]);let l=i.length;const u=new Uint8Array(l);for(;l--;)u[l]=i.charCodeAt(l);return new File([u],e,{type:n})}const lj={toBase64:sj,toFile:aj};exports.ABase=Ur;exports.ABaseStyleKeys=r2;exports.AButton=Bi;exports.AButtonStyleKeys=i2;exports.AButtonTypes=r5;exports.ACheckBox=Uu;exports.ACheckBoxStyleKeys=l2;exports.AChip=L2;exports.AChipKeys=E2;exports.AChips=vT;exports.AClock=IT;exports.AColFrame=R2;exports.ADatePicker=dm;exports.ADatePickerStyleKeys=y2;exports.ADatePickerTypes=n6;exports.ADateRangePicker=um;exports.ADateRangePickerStyleKeys=b2;exports.ADialog=d6;exports.ADialogStyleKeys=c2;exports.ADialogTypes=f6;exports.ADivideFrame=oT;exports.AEditor=NP;exports.AEditorStyleKeys=a2;exports.AFileBox=C6;exports.AFileBoxStyleKeys=g2;exports.AFloatMenu=O2;exports.AFloatMenuKeys=C2;exports.AFrameStyleKeys=S2;exports.AGrow=Yc;exports.AIcon=Br;exports.AIconButton=vo;exports.AIconButtonStyleKeys=_2;exports.AIconButtonTypes=n5;exports.AIconHOC=F4;exports.AIcons=am;exports.AInput=Jl;exports.AInputStyleKeys=o2;exports.AInputTypes=$T;exports.AListView=P6;exports.AListViewStyleKeys=m2;exports.ALoadingBorder=hm;exports.ALoadingBorderKeys=w2;exports.AMultiSelect=ck;exports.AMultiSelectStyleKeys=f2;exports.ANumInput=I6;exports.AOverflowFrame=Xl;exports.ARadioSelect=Z6;exports.ARadioSelectKeys=T2;exports.ARowFrame=si;exports.ASelect=Wc;exports.ASelectStyleKeys=u2;exports.ASelectTypes=iE;exports.ASpace=mn;exports.AStepper=wk;exports.AStepperStyleKeys=v2;exports.ASwitch=Y_;exports.ASwitchFrame=I2;exports.ASwitchStyleKeys=h2;exports.ATab=j2;exports.ATabStyleKeys=p2;exports.ATabTypes=Nk;exports.ATable=$8;exports.ATableStyleKeys=x2;exports.AText=z2;exports.ATextArea=eR;exports.ATextAreaStyleKeys=s2;exports.ATextAreaTypes=Q8;exports.AThemeButton=q5;exports.AThemes=Df;exports.ATooltip=Z_;exports.ATooltipStyleKeys=n2;exports.ATree=_N;exports.ATreeStyleKeys=d2;exports.AWrap=Uc;exports.AWrapKeys=A2;exports.AWrapTypes=x5;exports.ApiContext=xS;exports.BodyStyleKeys=t2;exports.CreateADC=y6;exports.DefaultOptionRenderer=N2;exports.EDir12=Ku;exports.EDir4=vi;exports.FileSizeTrans=nm;exports.Icons=th;exports.IsCursorPointer=z_;exports.IsFixedShape=q_;exports.IsInteractive=$_;exports.NoSelect=H_;exports.Resources=hn;exports.SetResources=g5;exports.alphanumericRegex=bT;exports.bound=Mf;exports.cbF=kr;exports.changeSemanticMode=cm;exports.componentStyleKeys=D5;exports.createEvent=$c;exports.dateF=$t;exports.defaultPredicate=B2;exports.dlgF=b6;exports.emailIdRegex=xT;exports.emailRegex=_T;exports.fileF=lj;exports.getMonthsOptions=Wf;exports.getYearsOptions=fm;exports.hangulRegex=CT;exports.hexRegex=ST;exports.noHanguljamoRegex=AT;exports.noSpaceRegex=wT;exports.numF=P2;exports.objF=Kt;exports.paletteKeys=K_;exports.paletteModes=rh;exports.passwordRegex=ET;exports.refinedDesignTokens=bi;exports.sF=He;exports.semanticKeys=Q_;exports.semanticModes=$u;exports.setDir12Style=lm;exports.setDir12StyleElem=V_;exports.specialCharRegex=TT;exports.strF=D2;exports.tableF=Ja;exports.treeF=Qa;exports.useADialogCore=m6;exports.useADialogCores=g6;exports.useEvent=q2;exports.useInit=F2;exports.useValues=pn;exports.uuidRegex=kT;
package/dist/index.es.js CHANGED
@@ -30819,7 +30819,7 @@ const nM = [
30819
30819
  i && (typeof i == "function" ? i(Ge) : i.current = Ge), Ge && wt(Ge);
30820
30820
  },
30821
30821
  [i, wt]
30822
- ), ht = me(() => R ? R + Ae : b ? "fit-content" : `calc(100% - ${Ae}px)`, [R, b, Ae]);
30822
+ ), ht = me(() => O || b ? "fit-content" : R ? R + Ae : `calc(100% - ${Ae}px)`, [O, R, b, Ae]);
30823
30823
  return /* @__PURE__ */ v.jsx(
30824
30824
  Vu,
30825
30825
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ados-rcm",
3
- "version": "1.1.362",
3
+ "version": "1.1.363",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",