GV(e,n,t),getStopIndexForStartIndex:(e,t,n,a)=>{const{height:l,total:o,layout:s,width:i}=e,u=Vi(s)?i:l,c=Us(e,t,a),d=n+u;let f=c.offset+c.size,p=t;for(;p {s(),ei(this)},{checked:t!==!1});return}else s()}const o=this.parent;!o||o.level===0||!a&&!this.store.checkStrictly&&ei(o)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const a=this.store.props;let l="children";return a&&(l=a.children||"children"),Ot(n[l])&&(n[l]=null),t&&!n[l]&&(n[l]=[]),n[l]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(o=>o.data),a={},l=[];t.forEach((o,s)=>{const i=o[_2];i&&n.some(u=>(u==null?void 0:u.$treeNodeId)===i)?a[i]={index:s,data:o}:l.push({index:s,data:o})}),this.store.lazy||n.forEach(o=>{a[o==null?void 0:o.$treeNodeId]||this.removeChildByData(o)}),l.forEach(({index:o,data:s})=>{this.insertChild({data:s},o)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const a=o=>{this.childNodes=[],this.doCreateChildren(o,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,o)},l=()=>{this.loading=!1};this.store.load(this,a,l)}else t&&t.call(this)}eachNode(t){const n=[this];for(;n.length;){const a=n.shift();n.unshift(...a.childNodes),t(a)}}reInitChecked(){this.store.checkStrictly||ei(this)}},nU=class{constructor(e){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const t in e)Bt(e,t)&&(this[t]=e[t]);this.nodesMap={}}initialize(){if(this.root=new vv({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,t=>{this.root.doCreateChildren(t),this._initDefaultCheckedNodes()},mt)}else this._initDefaultCheckedNodes()}filter(e){const t=this.filterNodeMethod,n=this.lazy,a=async function(l){const o=l.root?l.root.childNodes:l.childNodes;for(const[s,i]of o.entries())i.visible=!!(t!=null&&t.call(i,e,i.data,i)),s%80===0&&s>0&&await _e(),await a(i);if(!l.visible&&o.length){let s=!0;s=!o.some(i=>i.visible),l.root?l.root.visible=s===!1:l.visible=s===!1}e&&l.visible&&!l.isLeaf&&(!n||l.loaded)&&l.expand()};a(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof vv)return e;const t=ut(e)?vm(this.key,e):e;return this.nodesMap[t]||null}insertBefore(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertBefore({data:e},n)}insertAfter(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertAfter({data:e},n)}remove(e){const t=this.getNode(e);t&&t.parent&&(t===this.currentNode&&(this.currentNode=null),t.parent.removeChild(t))}append(e,t){const n=Oa(t)?this.root:this.getNode(t);n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],t=this.nodesMap;e.forEach(n=>{const a=t[n];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){const t=this.defaultCheckedKeys||[];!vn(e.key)&&t.includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const t=this.key;if(!(!e||!e.data))if(!t)this.nodesMap[e.id]=e;else{const n=e.key;vn(n)||(this.nodesMap[n]=e)}}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(t=>{this.deregisterNode(t)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,t=!1){const n=[],a=function(l){(l.root?l.root.childNodes:l.childNodes).forEach(o=>{(o.checked||t&&o.indeterminate)&&(!e||e&&o.isLeaf)&&n.push(o.data),a(o)})};return a(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(t=>(t||{})[this.key])}getHalfCheckedNodes(){const e=[],t=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(a=>{a.indeterminate&&e.push(a.data),t(a)})};return t(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],t=this.nodesMap;for(const n in t)Bt(t,n)&&e.push(t[n]);return e}updateChildren(e,t){const n=this.nodesMap[e];if(!n)return;const a=n.childNodes;for(let l=a.length-1;l>=0;l--){const o=a[l];this.remove(o.data)}for(let l=0,o=t.length;lF&&(ve=ue+be.right-F)):(be.top
{n.canFocus=t,pv(n.childNodes,t)})};let tU=0;var vv=class mc{constructor(t){this.isLeafByUser=void 0,this.isLeaf=void 0,this.isEffectivelyChecked=!1,this.id=tU++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in t)Bt(t,n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var o;const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const n=t.props;if(n&&typeof n.isLeaf<"u"){const s=zu(this,"isLeaf");qt(s)&&(this.isLeafByUser=s)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Se(this.data)||o0(this,this.data),!this.data)return;const a=t.defaultExpandedKeys,l=t.key;l&&!vn(this.key)&&a&&a.includes(this.key)&&this.expand(null,t.autoExpandParent),l&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode&&(t.currentNode.isCurrent=!1),t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((o=this.parent)==null?void 0:o.expanded)===!0)&&(this.canFocus=!0)}setData(t){Se(t)||o0(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&Se(this.data)?n=this.data:n=zu(this,"children")||[];for(let a=0,l=n.length;a导出口径与说明▾
i&&(e.scrollTop=o-e.clientHeight)}function nR(e,t,n,a,l){const o=Date.now();let s;const i=()=>{const u=Date.now()-o,c=eR(u>a?a:u,t,n,a);tu(e)?e.scrollTo(window.pageXOffset,c):e.scrollTop=c,u{s&&al(s)}}const Qg=(e,t)=>tu(t)?e.ownerDocument.documentElement:t,eb=e=>tu(e)?window.scrollY:e.scrollTop,Ad=(e,t={})=>{Zt(e)||rn("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||me("popup"),a=S(()=>n.bm("parent","hidden"));let l=0,o=!1,s="0",i=!1;const u=()=>{i||(i=!0,setTimeout(()=>{typeof document>"u"||o&&document&&(document.body.style.width=s,aa(document.body,a.value))},200))};ce(e,c=>{if(!c){u();return}i=!1,o=!Fa(document.body,a.value),o&&(s=document.body.style.width,Va(document.body,a.value)),l=aS(n.namespace.value);const d=document.documentElement.clientHeight