nv-basic-bw 1.0.1 → 1.0.2
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/nv-basci-bw.js +27 -5
- package/attr.js +72 -0
- package/ele-getter.js +54 -0
- package/index.js +13 -0
- package/package.json +5 -2
- package/ui.js +42 -0
- package/wait.js +27 -0
package/DIST/nv-basci-bw.js
CHANGED
|
@@ -1,7 +1,29 @@
|
|
|
1
|
-
var nvbasicbw=(()=>{var N=(l,t)=>()=>(t||l((t={exports:{}}).exports,t),t.exports);var $=N((D,k)=>{var h=l=>l.constructor.name==="AsyncFunction",S=l=>{let t=0;for(;l&&l.parentNode;)l=l.parentNode,t++;return t},v=(l,t)=>{if(t>0){let r=1;for(;;){let e=l.parentNode;if(r===t)return e;l=e,++r}}else return l},A=l=>{for(;l.parentNode;)l=l.parentNode;return l},b=l=>{let t=0;for(;l.lastChild;)l=l.lastChild,++t;return[l,t]},w=l=>{let t=0;for(;;){let r=l.firstChild;if(r)++t,l=r;else return[l,t]}},y=(l,t)=>{if(l.nextSibling)return[l.nextSibling,t];let r=l.parentNode,e=t;for(;r;){if(e-=1,r.nextSibling)return[r.nextSibling,e];r=r.parentNode}return[null,-1]},u=async(l,t=(r,e)=>{})=>{let[r,e]=b(l),s=l,n=h(t),i=0;for(;;){let o=!1;if(n?o=await t(s,i):o=t(s,i),o||s===r)return;{let f=s.firstChild;if(f)++i,s=f;else{let c=y(s,i);if(s=c[0],s)i=c[1];else break}}}},x=(l,t)=>{if(l.prevSibling)return[l.prevSibling,t];let r=l.parentNode,e=t;for(;r;){if(e-=1,r.prevSibling)return[r.prevSibling,e];r=r.parentNode}return[null,-1]},q=async(l,t=(r,e)=>{})=>{let[r,e]=w(l),s=l,n=h(t),i=0;for(;;){let o=!1;if(n?o=await t(s,i):o=t(s,i),o||s===r)return;{let f=s.firstChild;if(f)++i,s=f;else{let c=x(s,i);if(s=c[0],s)i=c[1];else break}}}},B=async(l,t=(r,e)=>{})=>{let[r,e]=w(l),s=h(t);for(;;){let n=!1;if(s?n=await t(r,e):n=t(r,e),n||r===l)return;{let i=r.nextSibling;if(i){let o=w(i);e+=o[1],r=o[0]}else{let o=r.parentNode;if(o)--e,r=o;else break}}}},P=async(l,t=(r,e)=>{})=>{let[r,e]=b(l),s=h(t);for(;;){let n=!1;if(s?n=await t(r,e):n=t(r,e),n||r===l)return;{let i=r.prevSibling;if(i){let o=b(i);e+=o[1],r=o[0]}else{let o=r.parentNode;if(o)--e,r=o;else break}}}},a=async(l,t=(e,s)=>{},r=(e,s)=>{})=>{let e=l,s="open",n={open:[r,h(r)],clos:[t,h(t)]},i=0;for(;;){let o=!1,[f,c]=n[s];if(s==="open"){if(c?o=await f(e,i):o=f(e,i),o)return;{let _=e.firstChild;_?(e=_,++i):s="clos"}}else{let _,d,p,g=e.nextSibling;if(g?(p="open",_=g,d=i):(p="clos",_=e.parentNode,d=i-1),c?o=await f(e,i):o=f(e,i),o)return;if(e!==l)s=p,e=_,i=d;else break}}},R=async(l,t=(e,s)=>{},r=(e,s)=>{})=>{let e=l,s="open",n={open:[r,h(r)],clos:[t,h(t)]},i=0;for(;;){let o=!1,[f,c]=n[s];if(s==="open"){if(c?o=await f(e,i):o=f(e,i),o)return;{let _=e.lastChild;_?(e=_,++i):s="clos"}}else{let _,d,p,g=e.prevSibling;if(g?(p="open",_=g,d=i):(p="clos",_=e.parentNode,d=i-1),c?o=await f(e,i):o=f(e,i),o)return;if(e!==l)s=p,e=_,i=d;else break}}},J=async(l,t)=>{if(typeof t=="string"){let r=[];return await u(l,async(e,s)=>{(e.tagName?e.tagName.toLowerCase()===t.toLowerCase():!1)&&r.push(e)}),r}else{let r=[];return h(t)?await u(l,async(e,s)=>{await t(e,s)&&r.push(e)}):await u(l,async(e,s)=>{t(e,s)&&r.push(e)}),r}},L=async()=>{let l=document.querySelectorAll("script"),t=[];for(let s of l)if(s.src)t.push(fetch(s.src).then(n=>n.ok?n.text():"").catch(()=>""));else{let n=s.textContent;n.trim()&&t.push(Promise.resolve(n))}return`<script>
|
|
2
|
-
${(await Promise.all(t)).filter(s=>s).join(`
|
|
1
|
+
var nvbasicbw=(()=>{var xl=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var w=o((Ho,Vs)=>{var Tl=Symbol("empty"),Ye=Symbol("unknown"),Ys=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Fs=/^[\-\+]?[0-9]+$/,Ms=/^\+?[0-9]+$/,Sl=/^[\-\+]?0[bB][0-1]+$/,El=/^[\-\+]?0[oO][0-7]+$/,Gs=/^[\-\+]?0[xX][0-9a-fA-F]+$/,Cl=e=>Fs.test(e)||Gs.test(e),Rs={"0b":2,"0o":8,"0x":16,2:"0b",8:"0o",16:"0x"},ql=/^[\-\+]?[0-9]+n$/,Al=/^[\-\+]?0[bB][0-1]+n$/,Il=/^[\-\+]?0[oO][0-7]+n$/,Dl=/^[\-\+]?0[xX][0-9a-fA-F]+n$/,Hs=e=>ql.test(e)||Al.test(e)||Il.test(e)||Dl.test(e),ue={Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11,6:"Integer",7:"Float",8:"BigInt",9:"PosInfinity",10:"NegInfinity",11:"NaN"},Xs=(e,t=!1)=>{let r={value:void 0,type:void 0};return e==="+Infinity"||e==="Infinity"?(r.value=1/0,r.type=ue.PosInfinity):e==="-Infinity"?(r.value=-1/0,r.type=ue.NegInfinity):(e==="NaN"||e==="+NaN"||e==="-NaN")&&(r.value=NaN,r.type=ue.NaN),t?r:r.value},Nl=e=>{let t,r,n;e[0]==="+"||e[0]==="-"?(t=e[0],r=Rs[e.slice(1,3).join("").toLowerCase()],n=e.slice(3).join("").toLowerCase()):(t="+",r=Rs[e.slice(0,2).join("").toLowerCase()],n=e.slice(2).join("").toLowerCase());let i=parseInt(n,r);return t==="+"?+i:-i},Ws=e=>{let t=Array.from(e);if(Fs.test(e))return parseInt(e);if(Sl.test(e)||El.test(e)||Gs.test(e))return Nl(t)},Pl=e=>{let t=e.be.sign+e.be.bd+e.be.dot+e.be.ad,r=e.ae.sign+e.ae.bd+e.ae.dot+e.ae.ad,n;if(!(t==="+"||t==="-"||r==="+"||r==="-")){if(r!=="")if(e.ae.dot==="."){let i=parseFloat(t),l=parseFloat(r);n=i*10**l}else n=parseFloat(t+"e"+r);else n=parseFloat(t);return n}},Ll=(e,t)=>e.length===0||t==="."||t==="-."||t==="+."||t==="+"||t==="-",Ol=()=>({be:{sign:"",bd:"",dot:"",ad:""},ae:{sign:"",bd:"",dot:"",ad:""},state:"init"}),js=(e,t,r,n)=>((e[r]==="-"||e[r]==="+")&&(t[n].sign=e[r],r=r+1),[e,r]),Rl=(e,t,r,n)=>{if(t.state=n+"bd",e[r]===".")t[n].bd="0",t[n].dot=".",t.state=n+"ad";else if(Ms.test(e[r]))t[n].bd=e[r];else return[!0,r];return[!1,r+1]},Bs=(e,t,r,n)=>{let i;for(i=r;i<e.length;i++)if(e[i]==="."){if(t[n].dot===".")return[!0,i];t[n].dot=".",t.state=n+"ad"}else{if(e[i]==="e"||e[i]==="E")return n==="ae"?[!0,i]:(t.state="aebd",[!1,i+1]);if(Ms.test(e[i]))t.state===n+"bd"?t[n].bd=t[n].bd+e[i]:t[n].ad=t[n].ad+e[i];else return[!0,i]}return[!1,i+1]},zs=e=>{let t=Ol(),r=Array.from(e);if(Ll(r,e))return;let n=0,i=!1;if([r,n]=js(r,t,n,"be"),[i,n]=Rl(r,t,n,"be"),!i&&([i,n]=Bs(r,t,n,"be"),!i&&([r,n]=js(r,t,n,"ae"),[i,n]=Bs(r,t,n,"ae"),!i)))return Pl(t)},Js=(e,t=!1)=>{let r={value:void 0,type:void 0};if(Hs(e))r.value=BigInt(e.substr(0,e.length-1)),r.type=ue.BigInt;else{let n=Ws(e);n!==void 0?(r.value=n,r.type=ue.Integer):(n=zs(e),n!==void 0?(r.value=n,r.type=ue.Float):(n=Xs(e,t=!0),n.value!==void 0&&(r=n)))}return t?r:r.value},jl=(e,t=!0)=>{if(typeof e=="string")return e;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="number")return e.toString();if(typeof e=="bigint")return e.toString()+"n";if(typeof e=="symbol")return e.description;if(Ys()&&e[Symbol.for("nodejs.util.inspect.custom")])return e[Symbol.for("nodejs.util.inspect.custom")]();{let r=function(n){if(typeof n.toString=="function")return n.toString()};try{return t?s=JSON.stringify(e):s=JSON.stringify(e,null,4),typeof s=="string"?s:r(e)}catch{return r(e)}}},Be={UndefinedLiteral:0,NullLiteral:1,FalseLiteral:3,TrueLiteral:4,StringLiteral:12},Bl={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1};function Us(e,t={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1}){let r=JSON.parse(JSON.stringify(Bl));Object.assign(r,t);let{only_value:n,with_value:i,with_type:l,unknown_as_string:_}=r,c={value:Ye,type:Ye};if(e==="undefined")c.value=void 0,c.type=Be.UndefinedLiteral;else if(e==="null")c.value=null,c.type=Be.NullLiteral;else if(e==="false")c.value=!1,c.type=Be.FalseLiteral;else if(e==="true")c.value=!0,c.type=Be.TrueLiteral;else{let u=Js(e,!0);u.type===void 0?_?(c.value=e,c.type=Be.StringLiteral):(c.value=e,c.type=Ye):(c.value=u.value,c.type=u.type)}return n?c.value:(l||delete c.type,i||delete c.value,c)}Us.unknown=Ye;var Yl={UndefinedLiteral:0,NullLiteral:1,BooleanLiteral:{_self:2,FalseLiteral:3,TrueLiteral:4},NumericLiteral:{_self:5,Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11},StringLiteral:12,ArrayExpression:{_self:13,element:14},ObjectExpression:{_self:15,property:16},_Ref:17,CommentLine:{_self:18,tt:19,k:20,bv:21,av:22},CommentBlock:{_self:23,tt:24,k:25,bv:26,av:27}};Vs.exports={TYPE_DICT:Yl,isNode:Ys,empty:Tl,unknown:Ye,is_bigint_str:Hs,is_jsint_str:Cl,NUM_TYPE_DICT:ue,parse_abnormal_num:Xs,parse_int:Ws,parse_float:zs,parse_num:Js,parse0:Us,to_str:jl}});var er=o((Xo,Zs)=>{var Fe={backSpace:8,tab:9,lineFeed:10,lineTab:11,formFeed:12,carriageReturn:13,shiftOut:14,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,nonBreakingSpace:160,oghamSpaceMark:5760,enQuad:8192,emQuad:8193,enSpace:8194,emSpace:8195,threePerEmSpace:8196,fourPerEmSpace:8197,sixPerEmSpace:8198,figureSpace:8199,punctuationSpace:8200,thinSpace:8201,hairSpace:8202,lineSeparator:8232,paragraphSeparator:8233,narrowNoBreakSpace:8239,mediumMathematicalSpace:8287,ideographicSpace:12288,zeroWidthNoBreakSpace:65279};function Fl(e){let t=Object.entries(e),r=new Map;return t.forEach(n=>r.set(n[1],n[0])),r}var St=Fl(Fe);function Ml(e){let t=Object.entries(e);return t=t.map(r=>[r[0],String.fromCharCode(r[1])]),Object.fromEntries(t)}var Gl=Ml(Fe),Qs=e=>55296<=e&&e<=56319,Hl=e=>56320<=e&&e<=57343,Xl=(e,t)=>(e-55296)*1024+(t-56320)+65536,Ks=e=>e<=65535,Wl=e=>!Ks(e),zl=e=>{if(e<=65535)return[e,null];{e=e-65536;let t=[null,null];return t[0]=(e>>10)+55296,t[1]=e%1024+56320,t}},Jl=(e,t)=>Qs(e)?t+2:t+1;Zs.exports={CODE_DICT:Fe,CH_DICT:Gl,CODE_NAME_MP:St,cd2ch:e=>String.fromCharCode(e),ch2cd:e=>e.codePointAt(0),cd2n:e=>St.get(e),n2cd:e=>String.fromCharCode(Fe[e]),n2ch:e=>Fe[e],ch2n:e=>St.get(e.codePointAt(0)),is_high_code:Qs,is_low_code:Hl,get_code_point_from_high_low:Xl,get_high_low_from_code_point:zl,is_length1_code_point:Ks,is_length2_code_point:Wl,_next_code_index:Jl}});var ke=o((Wo,x)=>{var{CODE_DICT:h,CH_DICT:g}=er(),tr=/\r\n?|[\n\u2028\u2029]/;x.exports.line_break_regexp=tr;x.exports.line_break_regexp_g=new RegExp(tr.source,"g");function sr(e){switch(e){case h.lineFeed:case h.carriageReturn:case h.lineSeparator:case h.paragraphSeparator:return!0;default:return!1}}function rr(e){switch(e){case g.lineFeed:case g.carriageReturn:case g.lineSeparator:case g.paragraphSeparator:return!0;default:return!1}}var Et=[h.lineFeed,h.carriageReturn,h.lineSeparator,h.paragraphSeparator],nr=Et.map(e=>String.fromCharCode(e));x.exports.NL_CODE_ARR=Et;x.exports.NL_CH_ARR=nr;x.exports.is_nl_code=sr;x.exports.is_nl=rr;x.exports.skip_white_space_regexp=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function ir(e){switch(e){case 9:case 11:case 12:case h.space:case h.nonBreakingSpace:case h.oghamSpaceMark:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}x.exports.is_non_nl_ws_code=ir;function lr(e){switch(e){case g.tab:case g.lineTab:case g.formFeed:case g.space:case g.nonBreakingSpace:case g.oghamSpaceMark:case g.enQuad:case g.emQuad:case g.enSpace:case g.emSpace:case g.threePerEmSpace:case g.fourPerEmSpace:case g.sixPerEmSpace:case g.figureSpace:case g.punctuationSpace:case g.thinSpace:case g.hairSpace:case g.narrowNoBreakSpace:case g.mediumMathematicalSpace:case g.ideographicSpace:case g.zeroWidthNoBreakSpace:return!0;default:return!1}}x.exports.is_non_nl_ws=lr;var Ct=[h.tab,h.lineTab,h.formFeed,h.space,h.nonBreakingSpace,h.oghamSpaceMark,h.enQuad,h.emQuad,h.enSpace,h.emSpace,h.threePerEmSpace,h.fourPerEmSpace,h.sixPerEmSpace,h.figureSpace,h.punctuationSpace,h.thinSpace,h.hairSpace,h.narrowNoBreakSpace,h.mediumMathematicalSpace,h.ideographicSpace,h.zeroWidthNoBreakSpace];x.exports.NON_NL_WS_CODE_ARR=Ct;var _r=Ct.map(e=>String.fromCharCode(e));x.exports.NON_NL_WS_CH_ARR=_r;function Ul(e){return ir(e)||sr(e)}function ve(e){return lr(e)||rr(e)}x.exports.is_ws_code=Ul;x.exports.is_ws=ve;x.exports.WS_CHCODE_ARR=Et.concat(Ct);x.exports.WS_CH_ARR=nr.concat(_r);var K={init:0,executing:1,succ:2,eof:3};x.exports.STATE_DICT=K;function Vl(e,t=new Set){let r={g:e,rslt:"",state:K.init},n=r.g.next().value;if(n===void 0)return r.state=K.eof,r;for(;n!==void 0&&(ve(n)||t.has(n));)n=r.g.next().value;for(;n!==void 0&&!ve(n)&&!t.has(n);)r.rslt=r.rslt+n,n=r.g.next().value;return n===void 0?r.state=K.eof:(ve(n)||t.has(n))&&(r.state=K.succ),r}function Ql(e,t=0,r=new Set){let n={arr:e,pos:t,rslt:"",state:K.init};for(let l=n.pos;l<e.length;l++){let _=e[l];if(ve(_)||r.has(_))n.pos=n.pos+1;else break}let i=n.pos;for(let l=n.pos;l<e.length;l++){let _=e[l];if(!ve(_)&&!r.has(_))n.pos=n.pos+1;else break}return n.pos===e.length?n.state=K.eof:n.state=K.succ,n.rslt=e.slice(i,n.pos).join(""),n}x.exports.from_generator=Vl;x.exports.from_charr=Ql});var Z=o((zo,hr)=>{var{WS_CH_ARR:cr,NON_NL_WS_CH_ARR:Kl,NL_CH_ARR:Zl}=ke();function e_(e){return Array.from(e).length}var t_="\u200C",ur="\u200D",s_=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null;function qt(e,t,...r){let n=function(){return t(this,...r)};s_()?e.prototype[Symbol.for("nodejs.util.inspect.custom")]=n:e.prototype.repr=n}var j={tmpl_quote:new Error("tmpl_quote: ` cant be deleted"),reserved:new Error(" [/,*,#,&,`,\\,] and whitespaces are reserved"),inuse:new Error("in using"),char:new Error("must be a char"),pair:new Error("left block must be different with right"),cant_be_empty:new Error("can NOT be empty")},st=Symbol("get_pair_lmp"),r_=Symbol("add_pair_reserved"),Me=class{#t;#e=new Map;#s=new Map;constructor(t){this.#t=t}get[st](){return this.#e}get size(){return this.#e.size}[r_](t,r){if(t===r)throw j.pair;this.#e.set(t,r),this.#s.set(r,t)}add(t,r){if(this.#t.validate(t),this.#t.validate(r),t===r)throw j.pair;this.#e.set(t,r),this.#s.set(r,t)}ldelete(t){if(this.size<2)throw j.cant_be_empty;{let r=this.#e.get(t);this.#e.delete(t),this.#s.delete(r)}}rdelete(t){if(this.size<2)throw j.cant_be_empty;{let r=this.#s.get(t);this.#s.delete(t),this.#e.delete(r)}}lhas(t){return this.#e.has(t)}rhas(t){return this.#s.has(t)}has(t){return this.lhas(t)||this.rhas(t)}getl(t){return this.#s.get(t)}getr(t){return this.#e.get(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function n_(e){return new Map(e[st])}qt(Me,n_);var ar=Symbol("get_single_set"),or=Symbol("add_single_reserved"),we=class{#t;#e=new Set;constructor(t){this.#t=t}get[ar](){return this.#e}[or](t){this.#e.add(t)}add(t){this.#t.validate(t),this.#e.add(t)}delete(t){if(this.size<2)throw j.cant_be_empty;if(t==="`")throw j.tmpl_quote;this.#e.delete(t)}has(t){return this.#e.has(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function i_(e){return new Set(e[ar])}qt(we,i_);var rt=class{#t;#e;#s;#r;#n;#i=!1;constructor(){this.#t=new Me(this),this.#t.add("[","]"),this.#t.add("(",")"),this.#t.add("<",">"),this.#t.add("\uFF08","\uFF09"),this.#t.add("\u2018","\u2019"),this.#e=new Me(this),this.#e.add("{","}"),this.#e.add("\u3010","\u3011"),this.#e.add("\u300A","\u300B"),this.#e.add("\u201C","\u201D"),this.#s=new we(this),this.#s.add('"'),this.#s.add("'"),this.#s.add("\xB7"),this.#s[or]("`"),this.#r=new we(this),this.#r.add(","),this.#r.add("\uFF0C"),this.#r.add(";"),this.#r.add("\uFF1B"),this.#r.add("\u3002"),this.#r.add("\u3001"),this.#n=new we(this),this.#n.add(":"),this.#n.add("\uFF1A"),this.#n.add("="),this.#i=!0}get reserved(){return["/","*","#","&","`","\\"].concat(cr)}get inuse(){let t=new Set;if(this.#i){for(let r of this.#s)t.add(r);for(let r of this.#r)t.add(r);for(let r of this.#n)t.add(r);for(let r of this.#t[st])t.add(r);for(let r of this.#e[st])t.add(r)}return t}validate(t){if(typeof t!="string"||e_(t)!==1)throw j.char;if(this.reserved.includes(t))throw j.reserved;if(Array.from(this.inuse).flat().includes(t))throw j.inuse;return t}get esc(){return"\\"}get slash(){return"/"}get line_comment(){return"//"}get asterisk(){return"*"}get blk_comments(){return["/*","*/"]}get hash(){return"#"}get ref(){return"&"}get tmpl_quote(){return"`"}get nl(){return Zl}get non_nl_ws(){return Kl}get ws(){return cr}get array_blks(){return this.#t}get fst_ary_blks(){return Array.from(this.#t)[0]}get obj_blks(){return this.#e}get fst_obj_blks(){return Array.from(this.#e)[0]}get quotes(){return this.#s}get fst_quote(){return Array.from(this.#s)[0]}get commas(){return this.#r}get fst_comma(){return Array.from(this.#r)[0]}get colons(){return this.#n}get fst_colon(){return Array.from(this.#n)[0]}},nt=class{constructor(t){this.reserved=t.reserved}get[Symbol.toStringTag](){return"reserved"}};Object.defineProperty(nt,"name",{value:ur});var it=class{constructor(t){this.esc=t.esc,this.hash=t.hash,this.ref=t.ref,this.tmpl_quote=t.tmpl_quote,this.slash=t.slash,this.asterisk=t.asterisk,this.line_comment=t.line_comment,this.blk_comments=t.blk_comments,this.nl=t.nl,this.non_nl_ws=t.non_nl_ws}get[Symbol.toStringTag](){return"fixed"}};Object.defineProperty(it,"name",{value:ur});var lt=class{constructor(t){this.obj_blks=t.obj_blks,this.array_blks=t.array_blks,this.quotes=t.quotes,this.commas=t.commas,this.colons=t.colons}get[Symbol.toStringTag](){return"configurable-if-not-reserved"}};Object.defineProperty(lt,"name",{value:t_});function l_(e){return[new it(e),new lt(e),new nt(e)]}qt(rt,l_);var fr=new rt;fr.ERROR_DICT=j;hr.exports=fr});var mr=o((Jo,D)=>{var dr=xl("fs");function*pr(e){for(let t of e)yield t;e=null}function __(e,t){let r=e.codePointAt(t);if(r!==void 0)return r<65536?t=t+1:t=t+2,t}function*c_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield r,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}function*u_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield t,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}async function a_(e){let t=[];for await(let r of e)t.push(r);return t}async function*o_(e){for(let t of e)yield t;e=null}async function*f_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield r,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}async function*h_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield t,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}function*d_(e,t="utf8"){let r=dr.readFileSync(e,{encoding:t});yield*pr(r)}async function*gr(e,t="utf8",r=4096){let n=dr.createReadStream(e,{encoding:t,highWaterMark:r});for await(let i of n)yield i,i=null;await n.close(),await n.destroy(),n=null}async function*p_(e,t="utf8"){yield*gr(e,t,1)}D.exports.sync_gen_from_file=d_;D.exports.async_gen_from_file=p_;D.exports.async_gen_chunk_from_file=gr;D.exports.async_iter_to_array=a_;D.exports.sync_gen_from_str=pr;D.exports.async_gen_from_str=o_;D.exports.get_next_pos=__;D.exports.sync_gen_pos_from_str=u_;D.exports.sync_gen_code_point_from_str=c_;D.exports.async_gen_pos_from_str=h_;D.exports.async_gen_code_point_from_str=f_});var A=o((Uo,$r)=>{var br={bk:{_self:0,eof:{_self:1,lc:2,blkc:3,hash:{_self:4,naked:5,quote:6},ref:{_self:7,naked:8,quote:9}}},k:{_self:10,eof:{_self:11,lc:12,blkc:13,hash:{_self:14,naked:15,quote:16},ref:{_self:17,naked:18,quote:19}}},ak:{_self:20,eof:{_self:21,lc:22,blkc:23,hash:{_self:24,naked:25,quote:26},ref:{_self:27,naked:28,quote:29}}},bv:{_self:30,eof:{_self:31,lc:32,blkc:33,hash:{_self:34,naked:35,quote:36},ref:{_self:37,naked:38,quote:39}}},v:{_self:40,eof:{_self:41,lc:42,blkc:43,hash:{_self:44,naked:45,quote:46},ref:{_self:47,naked:48,quote:49}}},av:{_self:50,eof:{_self:51,lc:52,blkc:53,hash:{_self:54,naked:55,quote:56},ref:{_self:57,naked:58,quote:59}}}};function q(e){return e instanceof Object?e._self:e}function g_(e){return e+1}function m_(e){return e+2}function b_(e){return e+3}function y_(e){return e+6}function $_(e){return e+5}function v_(e){return e+9}function k_(e){return e+8}function yr(e){return e%10!==0}var w_={backslash:0,lcmt:1,blkcmt:2,quote:3,naked:4},x_={handling:0,handled:1};function T_(e,t,r){let n=br;return e.$has_yield_sign()||yr(r)||t===q(n.av)&&r===q(n.bv)||t===q(n.av)&&r===q(n.bk)||t===q(n.av)&&r===q(n.k)||t===q(n.av)&&r===q(n.v)||t===q(n.av)&&r===q(n.ak)||t===q(n.v)&&r===q(n.bv)||t===q(n.v)&&r===q(n.bk)}$r.exports={STATE_DICT:br,gtv:q,get_main_eofv_with_code:g_,get_lcmt_eofv_with_code:m_,get_blkcmt_eofv_with_code:b_,get_hash_quote_eofv_with_code:y_,get_hash_naked_eofv_with_code:$_,get_ref_quote_eofv_with_code:v_,get_ref_naked_eofv_with_code:k_,LEFTED_TYPE:w_,AVND_CACHE_STATE_DICT:x_,is_eofv:yr,is_should_yield:T_}});var Rt=o((Vo,Ir)=>{var{is_nl:wr}=ke(),xr=(e,t,r=" ",n=!1)=>{let i=e.length;return i<=t?r.repeat(t-i)+e:n?e.substr(i-t):e},_t=(e,t,r,n="0",i=!1)=>{let l=e.toString(t);return xr(l,r,n,i)},S_=/^[0-7]$/,E_=/^[0-9a-fA-F]$/,ae=e=>S_.test(e),W=e=>E_.test(e),ct={b:"\b",f:"\f",n:`
|
|
2
|
+
`,r:"\r",t:" ",v:"\v"},Tr={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\\":"\\\\"};function C_(e){return Tr[e]}function Sr(e){return ct[e]}function q_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\x"+_t(t,16,2)}function A_(e){e=Array.from(e);let t=e[0],r=e[1];if(W(t)&&W(r)){let n=parseInt("0x"+t+r);return String.fromCharCode(n)}}function I_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\u"+_t(t,16,4)}function D_(e){e=Array.from(e);let t=e[0],r=e[1],n=e[2],i=e[3];if(W(t)&&W(r)&&W(n)&&W(i)){let l=parseInt("0x"+t+r+n+i);return String.fromCharCode(l)}}function N_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\"+_t(t,8,3)}function P_(e){let t="";e=Array.from(e);let r=e[0];if(ae(r)){t=t+r;let n=e[1];if(ae(n)){t=t+n;let l=e[2];ae(l)&&(t=t+l)}let i=parseInt(t,8);return String.fromCharCode(i)}}var d={init:0,executing:1,succ:2,eof:3,backslash:4,x:5,u:6,o:7};function*L_(e){let t=Array.from(e);for(let r of t)yield r}function*vr(e,t){yield*t,yield*e}function Er(e,t,r,n,i=!1){if(typeof t=="string"){let _=t;t=c=>c===_}if(typeof(r==="string")&&r.length>0){let _=L_(r);e=vr(e,_)}else e=vr(e,r);let l={state:d.init,end:t,esc:n,g:e,curr:"",ch:e.next().value,offset:0};return l.ch!==void 0&&(l.offset=l.offset+1),i&&(l.rslt=""),l}function At(e){return e.ch===void 0||e.end(e.ch)&&e.state!==d.backslash||e.state===d.x||e.state===d.u||e.state===d.o}function It(e,t=!1){return e.ch===e.esc?(e.state=d.backslash,e.curr=""):(e.state=d.executing,t&&(e.rslt=e.rslt+e.ch),e.curr=e.ch),e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function kr(e,t,r,n,i,l,_){return _===!0?n===Cr?(e.state=d.x,e.ch="\\x"+t.join(""),e):n===qr?(e.state=d.u,e.ch="\\u"+t.join(""),e):(n===Ar&&(e.state=d.o,e.ch="\\"+t.join("")),e):i?(e.curr=t.join(""),l&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=r,e):(e.curr=n(t),l&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=r,e)}function O_(e,t,r,n,i){return e.curr=n(t),i&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function ut(e,t,r,n,i=!0,l=!1,_=void 0,c=!1){let u;if(_!==void 0?u=_:(u=e.g.next().value,u!==void 0&&(e.offset=e.offset+1)),u===void 0)return e;let a=0,f=[],v;if(l?v=!0:v=r(u),v)a=a+1,f.push(u);else return e.state=d.executing,e.ch=u,e;for(;a<t;){if(u=e.g.next().value,u===void 0)return kr(e,f,u,n,i,c,tail=!0);if(e.offset=e.offset+1,v=r(u),v)a=a+1,f.push(u);else return kr(e,f,u,n,i,c,tail=!1)}return O_(e,f,u,n,c)}function Cr(e){let t=parseInt("0x"+e[0]+e[1]);return String.fromCharCode(t)}function qr(e){let t=parseInt("0x"+e[0]+e[1]+e[2]+e[3]);return String.fromCharCode(t)}function Ar(e){let t=parseInt(e.join(""),8);return String.fromCharCode(t)}function Dt(e,t=!1){return e.curr=Sr(e.ch),t&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Nt(e,t=!1){return ut(e,2,W,Cr,!0,!1,void 0,t)}function Pt(e,t=!1){return ut(e,4,W,qr,!0,!1,void 0,t)}function Lt(e,t=!1){return ut(e,3,ae,Ar,!1,!0,e.ch,t)}function Ot(e,t=!1){return e.curr=e.ch,t&&(e.rslt=e.rslt+e.ch),e.state=d.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function R_(e,t=i=>i==='"',r="",n="\\"){let i=Er(e,t,r,n,!0);for(i.state=d.executing;!At(i);)i.state===d.executing?It(i,!0):i.state===d.backslash&&(wr(i.ch)?(i.ch=i.g.next().value,i.ch!==void 0&&(i.offset=i.offset+1),i.state=d.executing):i.ch in ct?Dt(i,!0):i.ch==="x"?Nt(i,!0):i.ch==="u"?Pt(i,!0):ae(i.ch)?Lt(i,!0):Ot(i,!0));return typeof i.ch=="string"&&i.end(i.ch)?(i.state=d.succ,i.ch=""):i.state===d.backslash?i.ch=i.esc:i.ch===void 0&&(i.state=d.eof,i.ch=""),i}function*j_(e){let t=e;for(t.state=d.executing;!At(t);)t.state===d.executing?(It(t,!1),t.curr!==""&&(yield t.curr)):t.state===d.backslash&&(wr(t.ch)?(t.state=d.executing,t.ch=t.g.next().value,t.ch!==void 0&&(t.offset=t.offset+1)):t.ch in ct?(Dt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="x"?(Nt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="u"?(Pt(t,!1),t.curr!==""&&(yield t.curr)):ae(t.ch)?(Lt(t,!1),t.curr!==""&&(yield t.curr)):(Ot(t,!1),t.curr!==""&&(yield t.curr)));return typeof t.ch=="string"&&t.end(t.ch)?(t.state=d.succ,t.ch=""):t.state===d.backslash?(t.ch=t.esc,yield t.curr):t.ch===void 0&&(t.state=d.eof,t.ch=""),t}Ir.exports={CHAR_UNESC_DICT:ct,CHAR_ESC_DICT:Tr,escc:C_,unescc:Sr,escx:q_,unescx:A_,escu:I_,unescu:D_,esco:N_,unesco:P_,STATE_DICT:d,from_generator:R_,init:Er,handle_executing:It,is_terminated:At,handle_escc:Dt,esc_handle_engine:ut,handle_escx:Nt,handle_escu:Pt,handle_esco:Lt,handle_esc_other:Ot,gen:j_,prepend:xr,prepend_num:_t,is_odigit_ch:ae,is_hdigit_ch:W}});var Yr=o((Qo,Br)=>{var{is_nl:B_}=ke(),xe=Rt(),Dr={line_comment:0,blk_comment:1},ee={init:0,executing:1,succ:2,eof:3,asterisk:4};function Nr(e){return{state:ee.init,g:e,rslt:"",ch:"",offset:0}}function Pr(e,t){return e.state=ee.eof,e.rslt=e.rslt+t.rslt,e.ch="",e}function Lr(e,t){return e.state=ee.succ,e.rslt=e.rslt+t.rslt,e.ch="",e}function Or(e,t){return e.state=ee.executing,e.rslt=e.rslt+t.rslt,e.ch=t.ch,e}function Rr(e,t=""){let r=Nr(e);r.state=ee.executing;let n=xe.from_generator(r.g,B_,t);return r.offset=n.offset+r.offset,r.g=n.g,n.state===xe.STATE_DICT.eof?Pr(r,n):n.state===xe.STATE_DICT.succ?Lr(r,n):Or(r,n)}function jr(e,t=""){let r=Nr(e);r.state=ee.executing;let n;for(;;){if(n=xe.from_generator(r.g,"*",t),r.offset=r.offset+n.offset,r.g=n.g,n.state===xe.STATE_DICT.eof)return Pr(r,n);if(n.state===xe.STATE_DICT.succ){let i=r.g.next().value;if(i!==void 0&&(r.offset=r.offset+1),i==="/")return Lr(r,n);if(i!==void 0)r.rslt=r.rslt+n.rslt+"*",t=i,r.offset=r.offset-1;else return r.rslt=r.rslt+n.rslt,r.ch="*",r.state=ee.asterisk,r}else return Or(r,n)}return r}function Y_(e,t,r=""){return t===Dr.line_comment?Rr(e,r):jr(e,r)}Br.exports={TYPE_DICT:Dr,STATE_DICT:ee,lc_from_generator:Rr,blk_from_generator:jr,from_generator:Y_}});var jt=o((Ko,Fr)=>{function F_(e){if(globalThis.document===void 0){let i=globalThis.require("fs").readFileSync(e).toString();return JSON.parse(i)}else return}function M_(e,t){if(globalThis.document===void 0){let n=globalThis.require("fs"),i=JSON.stringify(t);n.writeFileSync(e,i)}else return}function G_(e){return parseInt(e).toString()===e}Fr.exports={rjson:F_,wjson:M_,is_int_str:G_}});var Bt=o((Zo,Mr)=>{var H_=()=>Math.random()*9007199254740992;function X_(e,t){return Array.from({length:t-e}).map((r,n)=>n+e)}function W_(e,t){return t.filter((r,n)=>e.includes(n))}function z_(e){return Object.entries(e).length===0}function J_(e){return Object.entries(e).map(n=>n[1])}function U_(e){return Object.entries(e).map(n=>n[0])}function V_(e){return Object.entries(e).length}function Q_(e,t){for(let r in e)t(r,e[r]);return e}function K_(e,t){for(let r in e)e[r]=t(r,e[r]);return e}function Z_(e,t){for(let r in t)e[r]=t[r];return e}function ec(e,t){for(let r in t)!(r in e)&&(e[r]=t[r]);return e}function tc(e,t,r){return r=r.filter(n=>n[e]!==t),r}function sc(e,t,r){return r.findIndex(i=>i[e]===t)}function rc(e){return JSON.parse(JSON.stringify(e))}function nc(e,t){for(let r=0;r<e.length;r++){lyr=e[r];for(let n=0;n<lyr.length;n++)e[r][n]=t(e[r][n],r,n)}return e}function ic(e){let t=e[0]!=="_",r=e[0]!=="$";return t&&r}Mr.exports={gen_guid:H_,range:X_,seqs_slct:W_,dict_length:V_,is_empty_dict:z_,dict_values:J_,dict_keys:U_,dict_map:K_,dict_foreach:Q_,dict_plus:Z_,dict_update:ec,dtb_kv_rm:tc,dtb_kv_get_seq:sc,dcp:rc,mat_map:nc,is_cu_property:ic}});var Kt=o((ef,pn)=>{var $=Bt();function Mt(e){if($.is_empty_dict(e))return 0;{let t=$.dict_keys(e);return Math.max(...t)+1}}function Ge(e){return e!=null}function Hr(e,t){return e._id=e._id+t,e._tree=e._tree+t,Ge(e._fstch)&&(e._fstch=e._fstch+t),Ge(e._lsib)&&(e._lsib=e._lsib+t),Ge(e._rsib)&&(e._rsib=e._rsib+t),Ge(e._parent)&&(e._parent=e._parent+t),e}function oe(e,t){let r=Mt(e);for(let n in t){let i=Hr(t[n],r);t[i._id]=i,delete t[n]}return t}function lc(e=0){let t=e;return{_id:t,_fstch:null,_lsib:null,_rsib:null,_parent:null,_tree:t}}function _c(e,t=0){return{_id:Mt(e)+t,_fstch:null,_lsib:void 0,_rsib:void 0,_parent:void 0,_tree:void 0}}function Xr(e){return e._tree!==void 0}function te(e){let t=e._tree!==void 0,r=e._tree===e._id;return t&&r}function Gt(e){return e._lsib===null}function Ht(e){return e._rsib===null}function B(e){return e._fstch===null}function Wr(e,t){if(te(e))return!0;{let n=k(e,t);return F(n,t).length===1}}function ze(e){return te(e)||!Xr(e)}function at(e,t,r){if(!ze(t))return console.log("only root or uninited could be prepend"),e;let n=B(e);if(t._tree=e._tree,t._lsib=null,n)t._rsib=null,t._parent=e._id;else{let i=r[e._fstch];i._lsib=void 0,t._rsib=i._id,t._parent=void 0}return e._fstch=t._id,r[t._id]=t,e}function Xt(e,t,r){if(!ze(t))return console.log("only root or uninited could be append"),e;let n=B(e);if(t._tree=e._tree,t._rsib=null,n)e._fstch=t._id,t._lsib=null;else{let i=he(e,r);i._parent=void 0,i._rsib=t._id,t._lsib=void 0}return t._parent=e._id,r[t._id]=t,e}function Wt(e,t,r){if(!ze(t))return console.log("only root or uninited could be add"),e;if(te(e))return console.log("cant addrsib to root"),e;let n=Ht(e);return t._tree=e._tree,n?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t._id,t._lsib=void 0,r[t._id]=t,e}function zr(e,t,r){if(!ze(t))return console.log("only root or uninited could be add"),e;if(te(e))return console.log("cant addlsib to root"),e;let n=Gt(e);if(t._tree=e._tree,n){let i=k(e,r);e._lsib=void 0,t._lsib=null,i._fstch=t._id}else{let i=Y(e,r);i._rsib=t._id,t._lsib=void 0}return t._rsib=e._id,t._parent=void 0,r[t._id]=t,e}function Jr(e,t,r,n){let i=F(t,n),l=i.length;if(l===0)return at(t,r,n);if(e<=l&&e>=0){if(e===0)return at(t,r,n);if(e===l)return Xt(t,r,n);{let c=i[e-1];return Wt(c,r,n)}}else return console.log("not in range!!"),t}function Te(e,t){for(let r in t)t[r]._tree=e._tree}function cc(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=at(e,i,t),Te(e,r),$.dict_plus(t,r),e}function uc(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=Xt(e,i,t),Te(e,r),$.dict_plus(t,r),e}function ac(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=Wt(e,i,t),Te(e,r),$.dict_plus(t,r),e}function oc(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=zr(e,i,t),Te(e,r),$.dict_plus(t,r),e}function fc(e,t,r,n){n=oe(r,n);let i=$.dict_keys(n)[0],l=re(n[i],n);return t=Jr(e,t,l,r),Te(t,n),$.dict_plus(r,n),t}function He(e,t){let r=M(e,t),n=r[0]._id;return r.forEach(i=>{i._tree=n}),r}function Xe(e,t){let r={};return e.map(n=>{let i=n._id;r[i]=n,delete t[i]}),r}function Ur(e){return e._fstch=null,e}function We(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function Se(e,t){if(te(e))return[e,t];if(Wr(e,t)){let n=t[e._parent];Ur(n);let i=He(e,t),l=Xe(i,t);return We(e),[e,l]}else if(Gt(e)){let n=O(e,t);n._lsib=null;let i=k(e,t);i._fstch=e._rsib;let l=He(e,t),_=Xe(l,t);return We(e),[e,_]}else if(Ht(e)){let n=Y(e,t);n._rsib=e._rsib,n._parent=e._parent;let i=He(e,t),l=Xe(i,t);return We(e),[e,l]}else{let n=Y(e,t);n._rsib=e._rsib;let i=He(e,t),l=Xe(i,t);return We(e),[e,l]}}function hc(e,t){let r=fe(e,t);return r===null?[e,t]:Se(r,t)}function dc(e,t){let r=he(e,t);return r===null?[e,t]:Se(r,t)}function pc(e,t,r){let n=Vr(e,t,r);return n===null?[t,r]:Se(n,r)}function gc(e,t,...r){let n=Qr(e,t,...whiches);for(let i=0;i<n.length;i++)Se(n[i],t);return[e,t]}function mc(e,t){let r=F(e,t);for(let n=0;n<r.length;n++)Se(r[n],t);return t}function fe(e,t){return e._fstch===null?null:t[e._fstch]}function F(e,t){let r=[],n=fe(e,t);for(;n!==null;)r.push(n),n=O(n,t);return r}function he(e,t){let r=F(e,t);return r.length===0?null:r[r.length-1]}function Vr(e,t,r){let n=F(t,r);return n.length===0||e>n.length-1||e<0?null:n[e]}function Qr(e,t,...r){let n=F(e,t),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let _=r[l];_>n.length-1||_<0||i.push(n[_])}return i}function Kr(e,t,r=!1){let n=e,i=O(e,t);for(;i!==null;)n=i,i=O(i,t);return r||n._id!==e._id?n:null}function bc(e,t){let r=se(e,t,!0),n=$.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l<n&&i.push(r[l]);return i}function yc(e,t){let r=se(e,t,!0),n=$.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l>n&&i.push(r[l]);return i}function se(e,t,r=!1){let n=k(e,t),i;return n!==null?i=F(n,t):i=[e],r||(i=$.dtb_kv_rm("_id",e._id,i)),i}function $c(e,t,r=!1){let n=se(e,t,!0);return r?n[0]:n[0]._id===e._id?null:n[0]}function vc(e,t,r){let n=se(t,r,!0),i=n.length;return e<=i-1&&e>=0?n[e]:null}function kc(e,t,...r){let n=se(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let _=r[l];_>n.length-1||_<0||i.push(n[_])}return i}function wc(e,t){let r=se(e,t,!0);return $.dtb_kv_get_seq("_id",e._id,r)}function Y(e,t){let r=se(e,t,!0),n=$.dtb_kv_get_seq("_id",e._id,r);return n===0?null:r[n-1]}function O(e,t){return e._rsib===null?null:t[e._rsib]}function E(e,t){return ot(e,t,!0).length-1}function Zr(e,t){let r=E(e,t),i=M(e,t).map(_=>E(_,t));return Math.max(...i)-r+1}function xc(e,t){return B(e)?null:E(e,t)+1}function Tc(e,t){if(B(e))return null;{let n=E(e,t),l=M(e,t).map(c=>E(c,t));return Math.max(...l)}}function Sc(e,t,r){let n=E(t,r);return Zr(t,r)<=e?null:n+e}function en(e,t){let r=re(e,t),n=M(r,t),i=E(e,t);return n.filter(_=>E(_,t)===i)}function Yt(e,t){let r=en(e,t);return $.dtb_kv_get_seq("_id",e._id,r)}function Ec(e,t){return M(e,t).length}function re(e,t){let r=e,n=k(e,t);for(;n!==null;)r=n,n=k(n,t);return r}function k(e,t){let r;if(te(e))r=null;else{let n=Kr(e,t,!0);r=t[n._parent]}return r}function ot(e,t,r=!1){let n=[],i=k(e,t);for(;i!==null;)n.push(i),i=k(i,t);return r&&n.unshift(e),n}function Cc(e,t,r){let n=ot(t,r,!0),i=n.length;return e<i&&e>=0?n[e]:null}function qc(e,t,...r){let n=ot(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let _=r[l];_>n.length-1||_<0||i.push(n[_])}return i}function tn(e,t){let r=k(e,t);for(;r!==null;){let n=O(r,t);if(n!==null)return n;r=k(r,t)}return null}function sn(e,t){let r=fe(e,t);if(r!==null)return r;{let n=O(e,t);return n!==null?n:tn(e,t)}}function rn(e,t){let r=e,n=he(e,t);for(;n!==null;)r=n,n=he(n,t);return r}function Ac(e,t){if(te(e))return null;if(B(e)){let n=Y(e,t);return n!==null?n:k(e,t)}else{let n=Y(e,t);return n!==null?B(n)?n:rn(n,t):k(e,t)}}function M(e,t){let r=E(e,t),n=[];for(;e!==null&&(n.push(e),e=sn(e,t),!(e!==null&&E(e,t)<=r)););return n}function zt(e,t){let r=e,n=fe(e,t);for(;n!==null;)r=n,n=fe(n,t);return r}function nn(e,t){let r=O(e,t);return r===null?k(e,t):zt(r,t)}function ln(e,t){let r=k(e,t);for(;r!==null;){let n=Y(r,t);if(n!==null)return n;r=k(r,t)}return null}function Ic(e,t){if(B(e)){let n=Y(e,t);return n===null?ln(e,t):n}else return he(e,t)}function _n(e,t){let r=[],n=zt(e,t);for(;n!==null&&(r.push(n),n._id!==e._id);)n=nn(n,t);return r}function Ft(e){$.dict_foreach(e,(t,r)=>{e[t]._$visited=!1})}function cn(e,t){let r=e._$visited;if(B(e))if(r){let i=O(e,t);return i===null?k(e,t):i}else return e._$visited=!0,e;else if(r){let i=O(e,t);return i===null?k(e,t):i}else return e._$visited=!0,fe(e,t)}function Dc(e,t,r){if(B(t)){if(e)return t;{let i=Y(t,r);return i===null?k(t,r):i}}else{if(e)return he(t,r);{let i=Y(t,r);return i===null?k(t,r):i}}}function un(e,t){return t._$visited&&e===t._id}function an(e,t,r=!1,n=!0){let i=[];Ft(t);let l=e._id;for(;!un(l,e);)r?i.push($.dcp(e)):i.push(e),e=cn(e,t);return r?i.push($.dcp(e)):i.push(e),n&&Ft(t),i}function Nc(e,t){let r={};r._depth=E(e,t),r._breadth=Yt(e,t);let n=k(e,t);return r._pbreadth=n===null?null:Yt(n,t),r._id=e._id,r}function Gr(e){let t={};return t.ele={},t.nd=e,t.ele._id=e._id,t.ele._children=[],t}function Jt(e,t){let r=[],n=e[0],i=[Gr(n)];for(i[0].ele._pbreadth=null;i.length>0;){let l=[];for(let c=0;c<i.length;c++){i[c].ele._breadth=c,i[c].ele._depth=r.length;let u=F(i[c].nd,t);u=u.map(a=>Gr(a)),u.forEach((a,f)=>{a.ele._pbreadth=i[c].ele._breadth,i[c].ele._children.push([r.length+1,l.length+f])}),l=l.concat(u)}let _=i.map(c=>c.ele);r.push(_),i=l}return r}function on(e,t){return _n(e[0],t)}function fn(e,t,r=!1,n=!0){return an(e[0],t,r,n)}function Pc(e,t){let r=Ut(e,t);return Jt(r,t)}function Ut(e,t){let r=e[e.length-1];return M(r,t)}function Lc(e,t,r=!1,n=!0){let i=Ut(e,t);return fn(i,t,r,n)}function Oc(e,t){let r=Vt(e,t);return Jt(r,t)}function Vt(e,t){let r=e[0];return M(r,t)}function Rc(e,t){let r=Vt(e,t);return on(r,t)}function Qt(e,t,r=!1){let n=M(e,t);return r||n.splice(0,1),n}function jc(e,t){return F(e,t)}function Bc(e,t){let r=Qt(e,t,!1),n=sdfs.map(l=>E(l,t)),i=Math.max(...n);return r=r.filter(l=>E(l,t)===i),r}function hn(e,t,r){let n=E(t,r),i=Qt(t,r,!1),l=sdfs.map(_=>E(_,r));return i=i.filter(_=>E(_,r)===n+e),i}function Yc(e,t,...r){let n=r.map(i=>hn(i,e,t));return n=Array.prototype.concat(...n),n}function dn(e){let t=$.dict_keys(e)[0],r=e[t];return re(r,e)}function Fc(e){let t=dn(e);return M(t,e)}pn.exports={calc_next_id:Mt,update_nodes_ids:oe,creat_root:lc,creat_nd:_c,is_inited:Xr,is_root:te,is_fstch:Gt,is_lstch:Ht,is_leaf:B,is_lonely:Wr,is_id:Ge,is_connectable:ze,prepend_child:at,append_child:Xt,insert_child:Jr,add_rsib:Wt,add_lsib:zr,get_fstch:fe,get_rsib:O,get_children:F,get_lstch:he,get_which_child:Vr,get_some_children:Qr,get_fstsib:$c,get_lstsib:Kr,get_preceding_sibs:bc,get_following_sibs:yc,get_sibs:se,get_which_sib:vc,get_some_sibs:kc,get_sibseq:wc,get_lsib:Y,get_rsib:O,get_lyr:en,get_breadth:Yt,get_count:Ec,get_depth:E,get_height:Zr,get_fst_lyr_des_depth:xc,get_lst_lyr_des_depth:Tc,get_which_lyr_des_depth:Sc,get_root:re,get_parent:k,get_ances:ot,get_which_ance:Cc,get_some_ances:qc,get_rsib_of_fst_ance_having_rsib:tn,get_sdfs_next:sn,get_drmost_des:rn,get_sdfs_prev:Ac,get_sdfs:M,get_lsib_of_fst_ance_having_lsib:ln,get_dlmost_des:zt,get_edfs_next:nn,get_edfs_prev:Ic,get_edfs:_n,clear_$visited:Ft,get_sedfs_next:cn,is_sedfs_traverse_finished:un,get_sedfs_prev:Dc,get_sedfs:an,get_deses:Qt,get_fst_lyr_deses:jc,get_lst_lyr_deses:Bc,get_which_lyr_deses:hn,get_some_lyrs_deses:Yc,nd2ele:Nc,sdfs2mat:Jt,sdfs2edfs:on,sdfs2sedfs:fn,edfs2mat:Pc,edfs2sdfs:Ut,edfs2sedfs:Lc,sedfs2mat:Oc,sedfs2sdfs:Vt,sedfs2edfs:Rc,update_disconnected_nodes:He,update_orig_nodes:Xe,leafize:Ur,rootize:We,disconnect:Se,rm_fstch:hc,rm_lstch:dc,rm_which:pc,rm_some:gc,rm_all:mc,update_treeid:Te,update_one_nodeid:Hr,update_nodes_ids:oe,prepend_child_tree:cc,append_child_tree:uc,add_rsib_tree:ac,add_lsib_tree:oc,insert_child_tree:fc,get_root_via_tree:dn,tree2sdfs:Fc}});var $n=o((tf,yn)=>{function gn(e="E"){class t extends Event{#t;constructor(n,i){super(n),this.#t=i}get data(){return this.#t}set data(n){this.#t=n}}return t}var mn=gn();function bn(e="ET"){class t extends EventTarget{#t=new Map;addEventListener(n,i){super.addEventListener(n,i),this.#t.set(n,i)}ls(){return this.#t}removeEventListener(n){super.removeEventListener(n),this.#t.delete(n)}dispatch(n,i){let l=new mn(n,i);return this.dispatchEvent(l),l}}return t}var Mc=bn();yn.exports={creat_event_cls:gn,E:mn,creat_event_target_cls:bn,ET:Mc}});var Qn=o((sf,Vn)=>{var Pn=jt(),Ue=Bt(),de=Kt(),{ET:vn}=$n(),Gc=["_fstch","_lsib","_rsib","_parent","_tree"];function Ln(e){return e._tree!==void 0}function Zt(e){return e._tree===e}function Hc(e){return e._lsib===null}function Xc(e){return e._rsib===null}function Wc(e){return e._fstch===null}function zc(e){return e.$sibs(!0).length===1}function bt(e){return Zt(e)||!Ln(e)}function kn(e){let t=e._fstch,r=t;for(;t!==null;)r=t,t=t._rsib;return r}function wn(e,t){let r=0,n=t._fstch;for(;;){if(r===e)return n;if(n===null)return n;n=n._rsib,r=r+1}}function xn(e,...t){let r=[],n=0,i=e._fstch;for(;;){if(t.includes(n))r.push(i);else if(i===null)return r;i=i._rsib,n=n+1}}function es(e){let t=[],r=0,n=e._fstch;for(;;){if(n===null)return t;t.push(n),n=n._rsib,r=r+1}}function Jc(e){let t=0,r=e._fstch;for(;;){if(r===null)return t;r=r._rsib,t=t+1}}function On(e,t=!1){let r=e._rsib,n=e;for(;r!==null;)n=r,r=r._rsib;return t||n!==e?n:null}function yt(e,t=!1){let r=ts(e);if(r===null)return t?e:null;{let n=r._fstch;return t||n!==e?n:null}}function Uc(e){let t=yt(e,!1);if(t===null)return null;{let r=t;for(;;){if(r._rsib===e)return r;r=r._rsib}}}function ns(e){let t=[],n=yt(e,!0);for(;n!==null;){if(n===e)return t;t.push(n),n=n._rsib}}function Rn(e){let t=[],r=e._rsib;for(;r!==null;)t.push(r),r=r._rsib;return t}function jn(e,t=!1){let r=ns(e),n=Rn(e),i=[e],l;return t?l=r.concat(i,n):l=r.concat(n),l}function Vc(e,t){let r=yt(t,!0),n=0;for(;;){if(r===null)return null;if(n==e)return r;r=r._rsib,n=n+1}}function Qc(e,...t){return jn(e,!0).filter((i,l)=>t.includes(l))}function Tn(e){return ns(e).length}function Kc(e,t=!1){return e.$sibs(t).length}function ts(e){return On(e,!0)._parent}function Zc(e){let t=e,r=e;for(;t!==null;)r=t,t=t.$parent();return r}function eu(e,t){let r=0,n=t;for(;n!==null;){if(r===e)return n;n=n.$parent(),r=r+1}return null}function gt(e,t=!1){let r=[],n=e;for(t&&r.push(n),n=n.$parent();n!==null;)r.push(n),n=n.$parent();return r}function tu(e,...t){return gt(e,!0).filter((i,l)=>t.includes(l))}function su(e,t=!1){return gt(e,t).length}function ru(e){let t=e.$parent();return t===null?null:t.$lsib()}function nu(e){let t=e.$parent();return t===null?null:t.$rsib()}function iu(e){let t=e.$luncle();return e.$is_fstch()?t===null?null:t.$lstch():null}function lu(e){let t=e.$runcle();return e.$is_lstch()?t===null?null:t.$fstch():null}function _u(e){let r=e.$root().$sdfs(),n=e.$depth();return r.filter(l=>l.$depth()===n)}function cu(e){let t=e.$parent();return t===null?null:t.$breadth()}function uu(e){return e.$lyr().indexOf(e)}function au(e){let t=e.$sdfs();return t=t.filter(r=>r.$is_leaf()),t.length}function ou(e){let r=e.$root().$edfs(),n;if(e.$is_leaf())n=r.indexOf(e);else{let i=e.$dlmost_des();n=r.indexOf(i)}return r=r.slice(0,n+1),offset=r.filter(i=>i.$is_leaf()).length-1,offset}function Sn(e,t=!1){let r=Yn(e),n=ge(e),i=n.indexOf(r);return t?n.slice(0,i+1):n.slice(1,i+1)}function fu(e){let t=e.$deses(!1),r=t.map(i=>i.$depth()),n=Math.max(...r);return t=t.filter(i=>i.$depth()===n),t}function hu(e,t){let r=t.$depth(),n=t.$deses(!1),i=n.map(l=>l.$depth());return n=n.filter(l=>l.$depth()===r+e),n}function du(e,...t){let r=e.$depth(),n=t.map(_=>_+r),i=e.$deses(!1),l=i.map(_=>_.$depth());return i=i.filter(_=>n.includes(_.$depth())),i}function ss(e,t){if(!bt(t))return console.log("only root or uninited could be prepend"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._lsib=null,r)t._rsib=null,t._parent=e;else{let n=e._fstch;n._lsib=void 0,t._rsib=n,t._parent=void 0}return e._fstch=t,t}function rs(e,t){if(!bt(t))return console.log("only root or uninited could be append"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._rsib=null,r)e._fstch=t,t._lsib=null;else{let n=e.$lstch();n._parent=void 0,n._rsib=t,t._lsib=void 0}return t._parent=e,t}function Bn(e,t){if(!bt(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addrsib to root"),e;let r=e.$is_lstch();return t._tree=e._tree,r?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t,t._lsib=void 0,t}function pu(e,t){if(!bt(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addlsib to root"),e;let r=e.$is_fstch();if(t._tree=e._tree,r){let n=e.$parent();e._lsib=void 0,t._lsib=null,n._fstch=t}else{let n=e.$lsib();n._rsib=t,t._lsib=void 0}return t._rsib=e,t._parent=void 0,t}function En(e,t,r){let n=es(t),i=n.length;if(i===0)r=ss(t,r);else if(!(e<=i&&e>=0))console.log("not in range!!");else if(e===0)r=ss(t,r);else if(e===i)r=rs(t,r);else{let _=n[e-1];r=Bn(_,r)}return r}function gu(e){let t=e.$parent();for(;t!==null;){let r=t.$rsib();if(r!==null)return r;t=t.$parent()}return null}function mu(e){let t=e.$fstch();if(t!==null)return t;{let r=e.$rsib();return r!==null?r:e.$rsib_of_fst_ance_having_rsib()}}function Yn(e){let t=e,r=e.$lstch();for(;r!==null;)t=r,r=r.$lstch();return t}function bu(e){if(e.$is_root())return null;if(e.$is_leaf()){let r=e.$lsib();return r!==null?r:e.$parent()}else{let r=e.$lsib();return r!==null?r.$is_leaf()?r:r.$drmost_des():e.$parent()}}function ge(e){let t=e.$depth();if(e===null)return[];{let r=[e];for(e=e.$sdfs_next();e!==null&&e.$depth()>t;)r.push(e),e=e.$sdfs_next();return r}}function yu(e){let t=e,r=e.$fstch();for(;r!==null;)t=r,r=r.$fstch();return t}function $u(e){let t=e.$rsib();return t===null?e.$parent():t.$dlmost_des()}function vu(e){let t=e.$parent();for(;t!==null;){let r=t.$lsib();if(r!==null)return r;t=t.$parent()}return null}function ku(e){if(e.$is_leaf()){let r=e.$lsib();return r===null?e.$lsib_of_fst_ance_having_lsib():r}else return e.$lstch()}function wu(e){let t=[],r=e.$dlmost_des();for(;r!==null&&(t.push(r),r!==e);)r=r.$edfs_next();return t}function Fn(e){let t=e.$visited;if(e.$is_leaf())if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e;else if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e.$fstch()}function xu(e,t){if(t.$is_leaf()){if(e)return t;{let n=t.$lsib();return n===null?t.$parent():n}}else{if(e)return t.$lstch();{let n=t.$lsib();return n===null?t.$parent():n}}}function Tu(e){e.$sdfs().forEach(r=>{delete r.$visited})}function Su(e,t){return t.$visited&&e===t}function Cn(e){Tu(e);let t=[],r=new Set,n=e;for(;!Su(n,e);)r.has(e)?e.$close_at=t.length:(e.$open_at=t.length,r.add(e)),t.push(e),e=Fn(e);return n.$close_at=t.length,t.push(n),t.forEach(i=>{delete i.$visited}),t}function Eu(e){return e._fstch=null,e}function ft(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function ht(e){let t=e.$sdfs();return t.forEach(r=>{r._tree=t[0]}),t}function pe(e){if(e.$is_root())return e;if(e.$is_lonely()){let r=e.$parent();Eu(r);let n=ht(e);return ft(e),e}else if(e.$is_fstch()){let r=e.$rsib();r._lsib=null;let n=e.$parent();n._fstch=e._rsib;let i=ht(e);return ft(e),e}else if(e.$is_lstch()){let r=e.$lsib();r._rsib=e._rsib,r._parent=e._parent;let n=ht(e);return ft(e),e}else{let r=e.$lsib();r._rsib=e._rsib;let n=ht(e);return ft(e),e}}function qn(e){let t={};return t._nd=e,t._children=[],t}function An(e){let t=[],r=e[0],n=[qn(r)];for(n[0]._pbreadth=null;n.length>0;){let i=[];for(let _=0;_<n.length;_++){n[_]._breadth=_,n[_]._depth=t.length;let c=n[_]._nd.$children();c=c.map(u=>qn(u)),c.forEach((u,a)=>{u._pbreadth=n[_]._breadth,n[_]._children.push([t.length+1,i.length+a])}),i=i.concat(c)}let l=n;t.push(l),n=i}return t}function In(e,t="_children"){let r=e._nd,n={};n[t]=[],n.$guid=r.$guid;for(let i in r)Ue.is_cu_property(i)&&(n[i]=r[i]);return n}function Cu(e,t="_children"){let r=e[0][0],n=In(r,t),i=[{d:n,ele:r}];for(;i.length>0;){let l=[];for(let _=0;_<i.length;_++){let c=i[_],u=c.d,a=c.ele,v=c.ele._children.map(T=>e[T[0]][T[1]]);for(let T=0;T<v.length;T++){let Q=v[T],Os=In(Q,t);u[t].push(Os);let wl={d:Os,ele:Q};l.push(wl)}}i=l}return n}function Dn(e,t="_children"){let r=new z;e.$guid!==void 0&&(r.$guid=e.$guid);for(let n in e)Ue.is_cu_property(n)&&t!==n&&(r[n]=e[n]);return r}function qu(e,t="_children"){let r=Dn(e,t),n=[{d:e,nd:r}];for(;n.length>0;){let i=[];for(let l=0;l<n.length;l++){let _=n[l].d,c=n[l].nd,u=_[t]===void 0?[]:_[t];for(let a=0;a<u.length;a++){let f=u[a],v=Dn(f,t);c.$append_child(v);let T={d:f,nd:v};i.push(T)}}n=i}return r}function Au(e){let t=["_fstch","_lsib","_rsib","_parent","_tree","$guid","_guid","_id","$open_at","$close_at"];e._fstch=void 0,e._lsib=void 0,e._rsib=void 0,e._parent=void 0,e._tree=void 0,e.$guid=void 0,e._guid=void 0,e._id=void 0,e.$open_at=void 0,e.$close_at=void 0;for(let r of t)Object.defineProperty(e,r,{enumerable:!1})}function Iu(e,t,r){let n=e.$depth();return" ".repeat(n)+"["+r.indexOf(e)+"] : "+e.$guid}function Du(e,t){let r=e.$depth(),n=" ".repeat(r),i="";return t===e.$open_at&&(i=n+"<"+e._id+" : "+e.$guid+">"),t===e.$close_at&&(i=n+"</"+e._id+" : "+e.$guid+">"),i}var Nu=["$fstch","$rsib","$parent"];function Pu(e){if(e.$fstch()!==null)return["$fstch"];if(e.$rsib()!==null)return["$rsib"];{let n=[],i=e.$parent();for(;i!==null;)if(n.push("$parent"),i.$rsib()!==null){n.push("$rsib");break}else i=i.$parent();return n}}function Lu(e){return e.$sdfs().map(n=>n.$sdfs_next_action_for_srch())}var Mn={$fstch:"$append_child",$rsib:"$add_rsib",$parent:"$parent"};function Ou(e,t){for(let r=0;r<t.length;r++){let n=Mn[t[r]];e=e[n]()}return e}function Ru(e){let t=new z,r=t;for(let n=0;n<e.length;n++){let i=e[n];r=Ou(r,i)}return t}function ju(e,t,r){if(r&&(t=t.$clone()),!e.$is_root())if(e.$is_lonely()){let n=e.$parent();e.$disconn(),n.$append_child(t)}else if(e.$is_lstch()){let n=e.$lsib();e.$disconn(),n.$add_rsib(t)}else{let n=e.$rsib();e.$disconn(),n.$add_lsib(t)}return t}var N=class{#t=null;#e={with_id:!1,with_et:!1};constructor(t=!1,r=!1){Au(this),this._fstch=null,this.#e.with_id=t,this.#e.with_et=r,t&&(this.$guid=Ue.gen_guid()),r&&(this.#t=new vn)}get opt(){return this.#e}enable_et(){this.#t=new vn}disable_et(){this.#t=null}get et(){return this.#t}regis_recv_from_handler(t){let r=function(n){t(n.data.src,n.data.msg)};this.et.addEventListener("$msg__",r)}send_to(t,r){t.et.dispatch("$msg__",{src:this,msg:r})}$is_inited(){return Ln(this)}$is_root(){return Zt(this)}$is_fstch(){return Hc(this)}$is_lstch(){return Xc(this)}$is_leaf(){return Wc(this)}$is_lonely(){return zc(this)}$fstch(){return this._fstch}$lstch(){return kn(this)}$which_child(t){return wn(t,this)}$some_children(...t){return xn(this,...t)}$children(){return es(this)}$children_count(){return Jc(this)}$rsib(){return this._rsib}$lsib(){return Uc(this)}$fstsib(t=!1){return yt(this,t)}$lstsib(t=!1){return On(this,t)}$psibs(){return ns(this)}$fsibs(){return Rn(this)}$which_sib(t){return Vc(t,this)}$some_sibs(...t){return Qc(this,...t)}$sibseq(){return Tn(this)}$sibs(t=!1){return jn(this,t)}$sibs_count(t=!1){return Kc(this,t)}$parent(){return ts(this)}$root(){return Zc(this)}$ances(t=!1){return gt(this,t)}$which_ance(t){return eu(t,this)}$some_ances(...t){return tu(this,...t)}$ances_count(t=!1){return su(this,t)}$prepend_child(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,ss(this,t)}$insert_child(t,r){return r=r===void 0?new N(this.#e.with_id,this.#e.with_et):r,En(t,this,r)}$append_child(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,rs(this,t)}$clone(){if(Zt(this)){let t=pt(this);return mt(t)}else{let t=Tn(this),r=ts(this);pe(this);let n=pt(this),i=mt(n);return En(t,r,this),i}}$append_children(t,r){let n=[];for(let i=0;i<t;i++){let l=r===void 0?new N(this.#e.with_id,this.#e.with_et):r.$clone();l=rs(this,l),n.push(l)}return n}$add_rsib(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,Bn(this,t)}$add_lsib(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,pu(this,t)}$rsib_of_fst_ance_having_rsib(){return gu(this)}$sdfs_next(){return mu(this)}$drmost_des(){return Yn(this)}$sdfs_prev(){return bu(this)}$sdfs(){return ge(this)}$dlmost_des(){return yu(this)}$edfs_next(){return $u(this)}$lsib_of_fst_ance_having_lsib(){return vu(this)}$edfs_prev(){return ku(this)}$edfs(){return wu(this)}$offset(){return ou(this)}$sedfs_next(){return Fn(this)}$sedfs_prev(t){return xu(this)}$sedfs(){return Cn(this)}$deses(t=!1){return Sn(this,t)}$lst_lyr_deses(){return fu(this)}$which_lyr_deses(t){return hu(t,this)}$some_lyrs_deses(...t){return du(this,...t)}$count(t=!0){return Sn(this,t).length}$depth(t=!1){return gt(this,t).length}$height(){let t=this.$depth(),n=this.$sdfs().map(l=>l.$depth());return Math.max(...n)-t+1}$pbreadth(){return cu(this)}$breadth(){return uu(this)}$width(){return au(this)}$lyr(){return _u(this)}$lcin(){return iu(this)}$rcin(){return lu(this)}$luncle(){return ru(this)}$runcle(){return nu(this)}$sdfs_repr(t=Iu,r=!1){let n=this.$root(),i=ge(n),c=ge(this).map((u,a)=>t(u,a,i)).join(`
|
|
3
|
+
`);if(console.log(c),r)return c}$sedfs_repr(t=Du,r=!1){let n=this.$root();Gn(n);let _=Cn(this).map((c,u)=>t(c,u)).join(`
|
|
4
|
+
`);if(console.log(_),r)return _}$disconn(){return pe(this)}$rm_fstch(){let t=this._fstch;return pe(t)}$rm_lstch(){let t=kn(this);return pe(t)}$rm_which(t){let r=wn(t,this);return pe(r)}$rm_some_children(...t){return xn(this,...t).map(n=>pe(n))}$rm_all_children(){return es(this).map(r=>pe(r))}$dump(){if(this.$is_root())return pt(this);console.log("only root !!!")}$dump2file(t){if(this.$is_root()){let r=pt(this);Pn.wjson(t,r)}else console.log("only root !!!")}$sdfs2mat(){return An(ge(this))}$nest_dict(t="_children"){let r=An(ge(this));return Cu(r,t)}$index(){return this.$sibseq()}$sdfs_index(){return this.$root().$sdfs().indexOf(this)}$sdfs_leafs(){return this.$root().$sdfs().filter(i=>i.$is_leaf())}$sdfs_nonleafs(){return this.$root().$sdfs().filter(i=>!i.$is_leaf())}$sdfs_leaf_index(){return this.$sdfs_leafs().indexOf(this)}$sdfs_nonleaf_index(){return this.$sdfs_nonleafs().indexOf(this)}$sdfs_next_action_for_srch(){return Pu(this)}$sdfs_srch_action_list(){return Lu(this)}$get_node_with_action(t){let r=this;for(let n=0;n<t.length;n++)r=r[t[n]]();return r}$replace_with(t,r=!0){return ju(this,t,r)}[Symbol.iterator](){return this.$sdfs()[Symbol.iterator]()}get[Symbol.toStringTag](){return this.$guid?this.$guid.substr(0,8):"<empty>"}};Object.defineProperty(N,"name",{value:"\u200D"});function Gn(e){let t=ge(e);return t.forEach((r,n)=>{r._id=n}),t}function Bu(e){let t=new z;return t._id=e._id,t.$guid=e._guid,t}function Nn(e,t){for(;t._id!==e;)t=t._parent;return t}function Je(e,t){let r=Hn(t);for(let n of r)e[n]=t[n];return e}function mt(e){let t=Ue.dict_keys(e)[0],r=de.get_root(e[t],e),n=Bu(r);n=Je(n,r);let i=n,l=r,_=de.get_sdfs_next(l,e),c;for(;_!==null;)if(l._fstch===_._id)c=i.$prepend_child(),c._id=_._id,c.$guid=_._guid,c=Je(c,_),i=c,l=_,_=de.get_sdfs_next(l,e);else if(l._rsib===_._id)c=i.$add_rsib(),c._id=_._id,c.$guid=_._guid,c=Je(c,_),i=c,l=_,_=de.get_sdfs_next(l,e);else if(_._parent!==null&&_._parent!==void 0){let u=_._parent;i=Nn(u,i),c=i.$append_child(),c._id=_._id,c.$guid=_._guid,c=Je(c,_),i=c,l=_,_=de.get_sdfs_next(l,e)}else if(_._parent===void 0){let a=de.get_parent(_,e)._id;i=Nn(a,i),c=i.$append_child(),c._id=_._id,c.$guid=_._guid,c=Je(c,_),i=c,l=_,_=de.get_sdfs_next(l,e)}else console.log("Impossible",i,l,_);return n}function dt(e,t){return e[t]===null?null:e[t]===void 0?void 0:e[t]._id}function Hn(e){return Ue.dict_keys(e).filter(n=>!Gc.includes(n))}function Yu(e,t){let r=Hn(e);for(let n of r)t[n]=e[n];return t}function pt(e){let t=Gn(e),r=e._id,n={};return t.forEach((i,l)=>{let _={};_._tree=r,_._fstch=dt(i,"_fstch"),_._lsib=dt(i,"_lsib"),_._rsib=dt(i,"_rsib"),_._parent=dt(i,"_parent"),_._id=i._id,_._guid=i.$guid,_=Yu(i,_),n[i._id]=_}),n}var z=class extends N{constructor(t=!0,r=!0){super(t,r),this._fstch=null,this._lsib=null,this._rsib=null,this._parent=null,this._tree=this}$is_parent_of(t){return t.$parent()===this}$is_root_of(t){return t.$root()===this}$is_descendant_of(t){return t.$deses(!1).indexOf(this)>=0}$is_inclusive_descendant_of(t){return t.$deses(!0).indexOf(this)>=0}$is_ancestor_of(t){return t.$ances(!1).indexOf(this)>=0}$is_inclusive_ancestor_of(t){return t.$ances(!0).indexOf(this)>=0}$is_sibling_of(t){return t.$sibs(!1).indexOf(this)>=0}$is_inclusive_siblings_of(t){return t.$sibs(!0).indexOf(this)>=0}$is_preceding_of(t){let r=t.$sdfs(),n=r.indexOf(t),i=r.indexof(this);return i>=0&&i<n}$is_following_of(t){let r=t.$sdfs(),n=r.indexOf(t);return r.indexof(this)>n}$is_first_child_of(t){return this===t.$fstch()}$is_child_of(t){return t.$children().indexOf(this)>=0}$is_last_child_of(t){return this===t.$lstch()}$is_previous_sibling_of(t){return this===t.$lsib()}$is_next_sibling_of(t){return this===t.$rsib()}};Object.defineProperty(z,"name",{value:"\u200D"});function Xn(e){if(typeof e=="string"){let t=Pn.rjson(e);return mt(t)}else return typeof e=="object"?mt(e):new z}function Fu(e,t="_children"){return qu(e,t)}function Mu(e){let t=e.$dump();return Xn(ndict)}function is(e,t,...r){let n=t(e,...r);return n=new Buffer.from(n).toString("base64"),n}function Wn(e){let t=e.$ances(!0).map(r=>r.$children().length);return t=t.join("-"),t}function zn(e){return e.$pbreadth()+"-"+e.$breadth()+"-"+e.$depth()}function Jn(e,t,...r){let n=Wn(e);return t&&(out=is(e,t,...r),n=n+"@"+out),n}function Un(e,t,...r){let n=zn(e);return t&&(out=is(e,t,...r),n=n+"@"+out),n}function ls(e,t,r,n,i,...l){let _=r.$sdfs(),c=n.$sdfs();if(_.length!==c.length)return!1;{let u=_.map(f=>t(f,i,...l)),a=c.map(f=>t(f,i,...l));e&&(u.sort(),a.sort());for(let f=0;f<u.length;f++){let v=u[f],T=a[f];if(v!==T)return!1}}return!0}function Gu(e,t,r,...n){return ls(!1,Un,e,t,r,...n)}function Hu(e,t,r,...n){return ls(!0,Jn,e,t,r,...n)}Vn.exports={SDFS_NEXT_BUILD_ACTION_DICT:Mn,build_from_srch_action_list:Ru,SDFS_NEXT_SRCH_ACTIONS:Nu,RESERVED_EVENT_TYPES:["$msg__"],Node:N,Tree:z,Root:z,load:Xn,load_from_nest_dict:Fu,clone:Mu,get_cu_sign:is,get_internal_sign_ignore_order:Wn,get_internal_sign_keep_order:zn,get_sign_keep_order:Un,struct_eq:ls,struct_eq_keep_order:Gu,get_sign_ignore_order:Jn,struct_eq_ignore_order:Hu}});var _s=o((rf,Kn)=>{var Xu=Qn(),Wu=Kt(),zu=jt();Kn.exports={ndfunc:Wu,ndcls:Xu,ndutil:zu}});var kt=o((hf,ei)=>{var C=w(),Ju=_s(),{Root:Uu}=_s().ndcls,{TYPE_DICT:nf,isNode:lf,empty:p,is_bigint_str:_f,is_jsint_str:cf,NUM_TYPE_DICT:uf,parse_abnormal_num:af,parse_int:of,parse_float:ff,parse_num:Vu,to_str:vt}=w(),P=class extends Uu{constructor(t=p){super(!1,!1),this.key=t,this.value=p,this.type=p,this.chtype=p,this.hashes=new Set,this.kcmt=[],this.bvcmt=[],this.avcmt=[]}kto_str(){return this.key===p?p:JSON.stringify(this.key)}is_undefined(){return this.type===C.TYPE_DICT.UndefinedLiteral}is_null(){return this.type===C.TYPE_DICT.NullLiteral}is_boolean(){return this.type>=2&&this.type<=4}is_false(){return this.type===3}is_true(){return this.type===4}is_numerical(){return nd.type>=5&&nd.type<=11}is_int(){return this.type===6}is_float(){return this.type===7}is_bigint(){return this.type===8}is_infi(){return this.type===9||this.type===10}is_pos_infi(){return this.type===9}is_neg_infi(){return this.type===10}is_nan(){return this.type===11}is_str(){return this.type===12}is_ary(){return this.type===13}is_ele(){return this.chtype===14}is_dict(){return this.type===15}is_prop(){return this.chtype===16}is_ref(){return this.type===17}is_leaf(){return!this.is_ary()&&!this.is_dict()}is_cmt(){return this.is_lcmt()||this.is_blcmt()}is_lcmt(){return this.type>=18&&this.type<=22}is_blcmt(){return this.type>=23&&this.type<=27}is_ttcmt(){return this.type===19||this.type===24}is_kcmt(){return this.type===20||this.type===25}is_bvcmt(){return this.type===21||this.type===26}is_avcmt(){return this.type===22||this.type===27}is_prim(){return this.is_leaf()&&!is_cmt()}},cs=class extends P{constructor(t=p){super(t),this.value=void 0,this.type=C.TYPE_DICT.UndefinedLiteral}vto_rawstr(){return vt(this.value)}},us=class extends P{constructor(t=p){super(t),this.value=null,this.type=C.TYPE_DICT.NullLiteral}vto_rawstr(){return vt(this.value)}},as=class extends P{constructor(t,r=p){super(r),t==="true"&&(this.value=!0,this.type=C.TYPE_DICT.BooleanLiteral.TrueLiteral),t==="false"&&(this.value=!1,this.type=C.TYPE_DICT.BooleanLiteral.FalseLiteral)}vto_rawstr(){return vt(this.value)}},os=class extends P{constructor(t,r=p){if(super(r),typeof t=="string"){let n=Vu(t,!0);this.value=n.value,this.type=n.type}else this.value=t.value,this.type=t.type}vto_rawstr(){let t=vt(this.value);return this.type===C.TYPE_DICT.NumericLiteral.Float&&!t.includes(".")&&(t=t+"."),t}};function Ve(e){return e=JSON.stringify(e),e.substr(1,e.length-2)}var fs=class extends P{constructor(t,r=p){super(r),this.value=t,this.type=C.TYPE_DICT.StringLiteral}vto_rawstr(){return Ve(this.value)}};function Qu(e){e instanceof $t?e.type=C.TYPE_DICT.CommentLine.tt:e.type=C.TYPE_DICT.CommentBlock.tt}function Ku(e,t){return{lsib:e.$lsib(),data:t}}function Zn(e,t){Qu(t);let r=Ku(e,t);return e.ttcmt.push(r),r}var hs=class extends P{constructor(t=p){super(t),this.value=[],this.type=C.TYPE_DICT.ArrayExpression._self,this.open=p,this.close=p,this.ttcmt=[]}is_inited(){return this.open===p&&this.close===p}is_opened(){return this.open!==p&&this.close===p}is_closed(){return this.open!==p&&this.close!==p}append_child(t){return t.chtype=C.TYPE_DICT.ArrayExpression.element,t.is_ref()?this.value.push(t.value.value):this.value.push(t.value),this.$append_child(t)}append_ttcmt(t){return Zn(this,t)}},ds=class extends P{constructor(t=p){super(t),this.value={},this.type=C.TYPE_DICT.ObjectExpression._self,this.open=p,this.close=p,this.ttcmt=[]}is_inited(){return this.open===p&&this.close===p}is_opened(){return this.open!==p&&this.close===p}is_closed(){return this.open!==p&&this.close!==p}append_child(t){return t.chtype=C.TYPE_DICT.ObjectExpression.property,t.is_ref()?this.value[t.key]=t.value.value:this.value[t.key]=t.value,this.$append_child(t)}append_ttcmt(t){return Zn(this,t)}},ps=class extends P{constructor(t,r=p){super(r),this.value=t,this.type=C.TYPE_DICT._Ref}vto_rawstr(){if(this.value.is_leaf())return this.value.vto_rawstr();if(this.value.key!==p)return'&"'+Ve(this.value.key)+'"';for(let t of this.value.hashes)return'&"'+Ve(t)+'"'}},$t=class extends P{constructor(t){super(),this.value=t,this.type=C.TYPE_DICT.CommentLine._self}vto_rawstr(t=`
|
|
5
|
+
`){return"//"+Ve(this.value)+t}},gs=class extends P{constructor(t){super(),this.value=t,this.type=C.TYPE_DICT.CommentBlock._self}vto_rawstr(){return"/*"+Ve(this.value)+"*/"}};ei.exports={UndefinedLiteral:cs,NullLiteral:us,BooleanLiteral:as,NumericLiteral:os,StringLiteral:fs,ArrayExpression:hs,ObjectExpression:ds,_Ref:ps,CommentLine:$t,CommentBlock:gs,_ndtree:Ju}});var _i=o((df,li)=>{var{empty:ys}=w(),{UndefinedLiteral:ti,NullLiteral:si,BooleanLiteral:ri,NumericLiteral:ni,StringLiteral:ms,ArrayExpression:Zu,ObjectExpression:ea,CommentLine:ta,CommentBlock:sa,_Ref:bs}=kt();function ra(e,t){let r=ys,n=e;for(;n!==null;){if(n.key===t){r=n;break}else if(n.hashes.has(t)){r=n;break}else if(n.$sibseq().toString()===t){r=n;break}n=n.$sdfs_prev()}return r!==null?r:ys}function ii(e,t){return e instanceof ti?new ti("undefined",t):e instanceof si?new si("null",t):e instanceof ri?new ri(e.vto_rawstr(),t):e instanceof ni?new ni(e.vto_rawstr(),t):e instanceof ms?new ms(e.value,t):e instanceof ta||e instanceof sa?new ms(e.value,t):e instanceof Zu?new bs(e,t):e instanceof ea?new bs(e,t):e instanceof bs?(e=e.value,ii(e,t)):ys}li.exports={find_refnd_with_hash:ra,clone:ii}});var yi=o((pf,me)=>{var na=Array,ia=w(),{empty:y,parse0:la}=w(),Ke=class extends na{get lst(){return this[this.length-1]}set lst(t){this[this.length-1]=t}get top(){return this[this.length-1]}set top(t){this[this.length-1]=t}get fst(){return this[0]}set fst(t){this[0]=t}get bot(){return this[0]}set bot(t){this[0]=t}*gen_from_lst(){for(let t=this.length-1;t>-1;t--)yield this[t]}};function*_a(e){for(let t of e)yield t;e=null}function*ca(e,t){yield*t,yield*e}var Ze=Rt(),$s=ke(),Ce=Yr(),{UndefinedLiteral:ua,NullLiteral:aa,BooleanLiteral:ci,NumericLiteral:oa,StringLiteral:ui,CommentLine:Qe,CommentBlock:fa,ArrayExpression:vs,ObjectExpression:ha}=kt(),H=A(),ai=H.gtv,ne=H.STATE_DICT,ks=H.LEFTED_TYPE,Ee=H.AVND_CACHE_STATE_DICT,G=w(),b=Z(),oi=_i();function*mi(e){for(;e.length>0;)yield e.pop()}function fi(e){let t;return e.__is_sync_mode()?t=Ze.from_generator(e.g,e.ch_cache.curr):t=Ze.from_generator(mi(e.unshift_cache),e.ch_cache.curr),t}function hi(e,t,r){e.lefted.type=ks.quote,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state,quote:r},e.state=H.get_main_eofv_with_code(e.state)}function bi(e,t,r){e.lefted.type=r,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state}}function da(e,t,r){return bi(e,t,r),e.state=H.get_lcmt_eofv_with_code(e.state),e}function pa(e,t,r){return bi(e,t,r),e.state=H.get_blkcmt_eofv_with_code(e.state),e}function ga(e,t){let r;return e.__is_sync_mode()?r=t(e.g,e.ch_cache.curr):r=t(mi(e.unshift_cache),e.ch_cache.curr),r}function di(e,t,r,n){let i=ga(e,r);return i.state!==Ce.STATE_DICT.succ?((t===Qe?da:pa)(e,i,n),y):new t(i.rslt)}function pi(e,t){let r=new t(e.str_cache.k);return e.$set_avnd_cache(r),e.$mv_key_to_nd(r),e.$mv_kcmt_to_kcmt(),e.$mv_bvcmt_to_bvcmt(),r.open=e.ch_cache.curr,e.stack.lst.append_child(r),e.stack.push(r),t===vs?e.state=ne.bv:e.state=ne.bk,e}var ws=Symbol("root_lblk_ch"),gi=Symbol("root_rblk_ch"),qe=class{#t=ai(ne.bv);#e=new Ke;constructor(t,r=" "){if(r!==y){let i=_a(r);t=ca(t,i)}this.g=t,this.lefted={type:y,data:y},this.ch_cache={tmp:y,curr:y},this.str_cache={k:y,v:y,maybe_vquote:y},this.cmt_cache={kcmt:[],bvcmt:[],avcmt:[]};let n=new vs;this.stack.push(n),n.open=ws,this.avnd_cache={state:Ee.handling,data:n},this.unshift_cache=new Ke,this.mode="sync"}__use_sync_mode(){this.mode="sync"}__use_async_mode(){this.mode="async"}__is_sync_mode(){return this.mode==="sync"}__is_async_mode(){return this.mode==="async"}__unshift_g(t){t=t??this.ch_cache.curr;for(let r of t)this.unshift_cache.unshift(r)}$has_yield_sign(){return this.avnd_cache.state===Ee.handled}$set_yield_sign(){this.avnd_cache.state=Ee.handled}$clear_yield_sign(){this.avnd_cache.state=Ee.handling}get state(){return this.#t}set state(t){this.#t=ai(t)}get stack(){return this.#e}$next_ch(){return this.unshift_cache.length>0?this.ch_cache.curr=this.unshift_cache.pop():this.ch_cache.curr=this.g.next().value,this.ch_cache.curr}$is_currch_eof(){return this.ch_cache.curr===void 0}$handle_main_eof(){return this.state=H.get_main_eofv_with_code(this.state),this}$is_currch_comma(){return b.commas.has(this.ch_cache.curr)}$is_currch_colon(){return b.colons.has(this.ch_cache.curr)}$is_currch_ws(){return $s.is_ws(this.ch_cache.curr)}$is_currch_quote(){return b.quotes.has(this.ch_cache.curr)}$is_currch_slash(){return this.ch_cache.curr===b.slash}$is_currch_asterisk(){return this.ch_cache.curr===b.asterisk}$is_currch_ary_lblk(){return b.array_blks.lhas(this.ch_cache.curr)}$is_currch_obj_lblk(){return b.obj_blks.lhas(this.ch_cache.curr)}$is_currch_lblk(){return this.$is_currch_ary_lblk()||this.$is_currch_obj_lblk()}$is_currch_ary_rblk(){return b.array_blks.rhas(this.ch_cache.curr)}$is_currch_obj_rblk(){return b.obj_blks.rhas(this.ch_cache.curr)}$is_currch_rblk(){return this.$is_currch_ary_rblk()||this.$is_currch_obj_rblk()}$is_currch_hash(){return b.hash===this.ch_cache.curr}$is_currch_ref(){return b.ref===this.ch_cache.curr}$mv_avcmt_to_avcmt(){let t=this.avnd_cache.data;t.avcmt=this.cmt_cache.avcmt,this.cmt_cache.avcmt=[]}$change_state_when_end_av(t=y,r=y){return this.stack.lst.is_ary()?t===y?this.state=ne.bv:(this.state=ne.v,this.str_cache.v=t,r===y||(this.str_cache.maybe_vquote=r)):t===y?this.state=ne.bk:(this.state=ne.k,this.str_cache.k=t),this.state}$vcache_to_nd(){let t=this.str_cache.v,r;if(this.str_cache.maybe_vquote===y){let n=la(t,{only_value:!1,with_value:!0,with_type:!0,unknown_as_string:!0});n.type===G.TYPE_DICT.UndefinedLiteral?r=new ua(this.str_cache.k):n.type===G.TYPE_DICT.NullLiteral?r=new aa(this.str_cache.k):n.type===G.TYPE_DICT.BooleanLiteral.TrueLiteral?r=new ci("true",this.str_cache.k):n.type===G.TYPE_DICT.BooleanLiteral.FalseLiteral?r=new ci("false",this.str_cache.k):n.type===G.TYPE_DICT.StringLiteral?r=new ui(n.value,this.str_cache.k):r=new oa(n,this.str_cache.k)}else r=new ui(t,this.str_cache.k);return this.str_cache.v=y,this.str_cache.maybe_vquote=y,r}$mv_kcmt_to_kcmt(){let t=this.avnd_cache.data;t.kcmt=this.cmt_cache.kcmt,this.cmt_cache.kcmt=[]}$mv_bvcmt_to_bvcmt(){let t=this.avnd_cache.data;t.bvcmt=this.cmt_cache.bvcmt,this.cmt_cache.bvcmt=[]}$mv_key_to_nd(){let t=this.avnd_cache.data;return t.key=this.str_cache.k,this.str_cache.k=y,t.key}$set_avnd_cache(t,r=Ee.handling){return this.avnd_cache.data=t,this.avnd_cache.state=r,this.avnd_cache}$setup_leafnd(){let t=this.$vcache_to_nd();this.$set_avnd_cache(t,Ee.handling),this.$mv_key_to_nd(),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),this.$mv_avcmt_to_avcmt(),this.stack.lst.append_child(t)}$handle_quote(t){let r=fi(this);return r.state!==Ze.STATE_DICT.succ?(hi(this,r,t),y):r.rslt}$abandon_key_when_end_bv(){this.cmt_cache.kcmt=[],this.cmt_cache.bvcmt=[],this.str_cache.k=y}$refresh_key(t=y){t===y?this.str_cache.k=this.ch_cache.curr:this.str_cache.k=t,this.cmt_cache.kcmt=[]}$handle_lcmt(){return di(this,Qe,Ce.lc_from_generator,ks.lcmt)}$handle_blkcmt(){return di(this,fa,Ce.blk_from_generator,ks.blkcmt)}$push_kcmt(t){t.type=Ce instanceof Qe?G.TYPE_DICT.CommentLine.k:G.TYPE_DICT.CommentBlock.k,this.cmt_cache.kcmt.push(t)}$push_bvcmt(t){let r=t instanceof Qe?"CommentLine":"CommentBlock";t.type=G.TYPE_DICT[r].bv,this.cmt_cache.bvcmt.push(t)}$push_avcmt(t){t.type=Ce instanceof Qe?G.TYPE_DICT.CommentLine.k:G.TYPE_DICT.CommentBlock.k,this.cmt_cache.avcmt.push(t)}$mv_avcmt_to_ttcmt(t){t=t??this.avnd_cache.data.$parent();for(let r of this.cmt_cache.avcmt)t.$append_child(r);this.cmt_cache.avcmt=[]}$open_nonleaf_nd(){if(b.array_blks.lhas(this.ch_cache.curr))return pi(this,vs);if(b.obj_blks.lhas(this.ch_cache.curr))return pi(this,ha)}$is_rblk_match(){let t=this.stack.lst,r=t.is_ary()?"array_blks":"obj_blks";return b[r].getl(this.ch_cache.curr)===t.open}$close_nonleaf_nd(){let t=this.stack.lst;t.close=this.ch_cache.curr,this.$set_avnd_cache(t),this.stack.pop(),this.state=ne.av}$get_hash_or_ref(t="#"){let r=y,n=this.$next_ch(),i="";for(;!$s.is_ws(n)&&!b.commas.has(n)&&!b.colons.has(n)&&!b.array_blks.has(n)&&!b.obj_blks.has(n)&&n!==b.hash&&n!==b.ref&&n!==b.slash;)if(b.quotes.has(n)){let l=fi(this);if(l.state!==Ze.STATE_DICT.succ)return hi(this,l,this.ch_cache.curr),t===b.hash?this.state=H.get_hash_quote_eofv_with_code(this.state):this.state=H.get_ref_quote_eofv_with_code(this.state),r;i=i+l.rslt,n=this.$next_ch()}else{if(n===void 0)return $handle_main_eof(),r;i=i+n,n=this.$next_ch()}return this.__unshift_g(n),r=i,r}$is_hash_of_pnd(){return this.stack.lst.$children().length===0}$find_ref(t){let r=this.stack.lst,n=r.$lstch();return n===null&&(n=r),oi.find_refnd_with_hash(n,t)}$add_ref_to_parent(t){let r=this.stack.lst,n=oi.clone(t,this.str_cache.k);this.$set_avnd_cache(n),this.$mv_key_to_nd(n),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),r.append_child(n)}};qe[ws]=ws;qe[gi]=gi;qe.MODES=["sync","async"];me.exports=qe;me.exports.Stack=Ke;me.exports._type_util=ia;me.exports._esc=Ze;me.exports._cmt=Ce;me.exports._ws=$s});var wi=o((gf,ki)=>{var{empty:$i}=w(),vi=A(),Ae=vi.gtv,X=vi.STATE_DICT;function ma(e){let t=e.state;return t===Ae(X.bk)||(t===Ae(X.k)||t===Ae(X.ak)?(e.str_cache.k=$i,e.state=X.bk):t===Ae(X.bv)?(e.$abandon_key_when_end_bv(),e.stack.lst.is_ary()?e.state=X.bv:e.state=X.bk):t===Ae(X.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ae(X.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av())),e}ki.exports=ma});var Si=o((bf,Ti)=>{var{empty:mf}=w(),xi=A(),Ie=xi.gtv,ie=xi.STATE_DICT;function ba(e){let t=e.state;return t===Ie(ie.bk)||(t===Ie(ie.k)||t===Ie(ie.ak)?e.state=ie.bv:t===Ie(ie.bv)||(t===Ie(ie.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ie(ie.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av()))),e}Ti.exports=ba});var xs=o(($f,Ci)=>{var{empty:yf}=w(),Ei=A(),De=Ei.gtv,le=Ei.STATE_DICT;function ya(e){let t=e.state;return t===De(le.bk)||(t===De(le.k)?e.state=le.ak:t===De(le.ak)||t===De(le.bv)||(t===De(le.v)?(e.$setup_leafnd(),e.state=le.av):De(le.av))),e}Ci.exports=ya});var Di=o((vf,Ii)=>{var{empty:qi}=w(),Ai=A(),Ne=Ai.gtv,J=Ai.STATE_DICT;function $a(e,t){let r=e.state,n=e.$handle_quote(t);return n===qi||(r===Ne(J.bk)?(e.str_cache.k=n,e.state=J.k):r===Ne(J.k)?e.str_cache.k=e.str_cache.k+n:r===Ne(J.ak)?(e.$refresh_key(n),e.state=J.k):r===Ne(J.bv)?(e.str_cache.maybe_vquote=t,e.str_cache.v=n,e.state=J.v):r===Ne(J.v)?(e.str_cache.v=e.str_cache.v+n,e.str_cache.maybe_vquote=qi):r===Ne(J.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(n,t))),e}Ii.exports=$a});var Oi=o((kf,Li)=>{var{empty:Ni}=w(),Ts=A(),L=Ts.gtv,S=Ts.STATE_DICT,va=Ts.LEFTED_TYPE,be=Z();function Pi(e,t){let r=e.state,n=e[t]();if(n!==Ni){let i=e.stack.lst;if(r===L(S.bk))i.append_ttcmt(n);else if(r===L(S.k))e.$push_kcmt(n),e.state=S.ak;else if(r===L(S.ak))e.$push_kcmt(n);else if(r===L(S.bv))i.is_ary()?i.append_ttcmt(n):i.is_dict()&&e.$push_bvcmt(n);else if(r===L(S.v))e.$setup_leafnd(),e.state=S.av;else if(r===L(S.av)){let l=e.stack.lst;l.is_ary()?(l.append_ttcmt(n),e.state=S.bv):l.is_dict()&&e.$push_avcmt(n)}}return e}function ka(e){return Pi(e,"$handle_lcmt")}function wa(e){return Pi(e,"$handle_blkcmt")}function xa(e){let t=e.state;t===L(S.bk)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=be.slash,e.state=S.k):t===L(S.k)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=e.str_cache.k+be.slash):t===L(S.ak)?(e.__unshift_g(e.ch_cache.curr),e.$refresh_key(be.slash),e.state=S.k):t===L(S.bv)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=be.slash,e.state=S.v):t===L(S.v)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=e.str_cache.v+be.slash,e.str_cache.maybe_vquote=Ni):t===L(S.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(be.slash))}function Ta(e){let t=e.state,r=e.$next_ch();return e.$is_currch_eof()?(e.lefted.data=be.slash,e.lefted.type=va.backslash,e.$handle_main_eof()):e.$is_currch_slash()?ka(e):e.$is_currch_asterisk()?wa(e):xa(e),e}Li.exports=Ta});var Bi=o((xf,ji)=>{var{empty:wf}=w(),Ri=A(),Pe=Ri.gtv,_e=Ri.STATE_DICT;function Sa(e){let t=e.state;return t===Pe(_e.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=_e.k):t===Pe(_e.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Pe(_e.ak)?(e.$refresh_key(),e.state=_e.k):t===Pe(_e.bv)?e.$open_nonleaf_nd():t===Pe(_e.v)?(e.$setup_leafnd(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)):t===Pe(_e.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}ji.exports=Sa});var Gi=o((Tf,Mi)=>{var{empty:Yi}=w(),Fi=A(),Le=Fi.gtv,ye=Fi.STATE_DICT,Ea=xs();function Ca(e){let t=e.state;return t===Le(ye.bk)?e.$close_nonleaf_nd():t===Le(ye.k)?(e.str_cache.k=Yi,e.$close_nonleaf_nd()):t===Le(ye.ak)?(e.$refresh_key(),e.str_cache.k=Yi,e.$close_nonleaf_nd()):t===Le(ye.bv)?(e.$abandon_key_when_end_bv(),e.$close_nonleaf_nd()):t===Le(ye.v)?(e.$setup_leafnd(),e.state=ye.av,e.__unshift_g(e.ch_cache.curr)):t===Le(ye.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),e.$close_nonleaf_nd()):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign(),e.__unshift_g(e.ch_cache.curr))),e}function qa(e){return e.$is_rblk_match()?Ca(e):Ea(e),e}Mi.exports=qa});var zi=o((Sf,Wi)=>{var{empty:Aa}=w(),Xi=A(),Oe=Xi.gtv,ce=Xi.STATE_DICT,Ia=Z(),{CommentLine:Hi}=kt();function Da(e){let t=e.state,r=e.$get_hash_or_ref(Ia.hash);if(r!==Aa){let n=e.stack.lst;if(t===Oe(ce.bk))e.$is_hash_of_pnd()&&n.hashes.add(r);else if(t===Oe(ce.k)){let i=new Hi(r);e.$push_kcmt(i),e.state=ce.ak}else if(t===Oe(ce.ak)){let i=new Hi(r);e.$push_kcmt(i)}else t===Oe(ce.bv)?e.$is_hash_of_pnd()&&n.is_ary()&&n.hashes.add(r):t===Oe(ce.v)?(e.$setup_leafnd(),e.avnd_cache.data.hashes.add(r),e.state=ce.av):t===Oe(ce.av)&&e.avnd_cache.data.hashes.add(r)}return e}Wi.exports=Da});var Vi=o((Ef,Ui)=>{var{empty:Ss}=w(),Ji=A(),Re=Ji.gtv,I=Ji.STATE_DICT,Na=Z();function Pa(e){let t=e.state,r=e.$get_hash_or_ref(Na.ref);if(r!==Ss){let n=e.$find_ref(r);if(n!==Ss){let i=e.stack.lst;t===Re(I.bk)||t===Re(I.k)||t===Re(I.ak)?(e.$refresh_key(n.vto_rawstr()),e.state=I.ak):t===Re(I.bv)?(e.$add_ref_to_parent(n),e.state=I.av):t===Re(I.v)?(e.str_cache.maybe_vquote=Ss,e.$setup_leafnd(),e.state=I.av):t===Re(I.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),i.is_ary()?(e.$add_ref_to_parent(n),e.state=I.av):i.is_dict()&&(e.str_cache.k=n.vto_rawstr(),e.state=I.ak)):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign()))}}return e}Ui.exports=Pa});var Zi=o((Cf,Ki)=>{var{empty:La}=w(),Qi=A(),je=Qi.gtv,U=Qi.STATE_DICT;function Oa(e){let t=e.state;return t===je(U.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=U.k):t===je(U.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===je(U.ak)?(e.$refresh_key(),e.state=U.k):t===je(U.bv)?(e.str_cache.v=e.ch_cache.curr,e.state=U.v):t===je(U.v)?(e.str_cache.v=e.str_cache.v+e.ch_cache.curr,e.str_cache.maybe_vquote=La):t===je(U.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}Ki.exports=Oa});var nl=o((qf,rl)=>{var{empty:Ra}=w(),ja=yi(),Ba=wi(),Ya=Si(),Fa=xs(),Ma=Di(),Ga=Oi(),Ha=Bi(),Xa=Gi(),Wa=zi(),za=Vi(),Ja=Zi(),sl=A(),el=sl.gtv,tl=sl.STATE_DICT,Ua=Z();function*Va(e,t=Ra){let r=new ja(e,t);for(;;)if(r.$next_ch(),r.$is_currch_eof()){r.$handle_main_eof(),yield r;break}else r.$is_currch_comma()?(Ba(r),yield r):r.$is_currch_colon()?(Ya(r),yield r):r.$is_currch_ws()?(Fa(r),yield r):r.$is_currch_quote()?(Ma(r,r.ch_cache.curr),yield r):r.$is_currch_slash()?(Ga(r),yield r):r.$is_currch_lblk()?(Ha(r),yield r):r.$is_currch_rblk()?(Xa(r),yield r):r.$is_currch_hash()?(Wa(r),yield r):r.$is_currch_ref()?r.state===el(tl.av)||r.state===el(tl.v)?r.__unshift_g(Ua.fst_comma+r.ch_cache.curr):(za(r),yield r):(Ja(r),yield r)}rl.exports=Va});var ul=o((Af,cl)=>{var{sync_gen_from_str:Es,sync_gen_from_file:ll,async_gen_chunk_from_file:Qa}=mr(),{is_should_yield:Cs}=A(),R=Z(),{is_nl:Ka,is_ws:il}=ke(),qs=nl(),Za={enable_ref:!1,encoding:"utf8"};function As(e,t={enable_ref:!1}){let r=qs(e),n=r.next().value,i=n.avnd_cache.data.$root(),l=n.state;for(let _ of r){let c=_.state;if(Cs(n,l,c)&&!t.enable_ref){let u=n.avnd_cache.data;u.$disconn(),u=null}l=c}return i}function eo(e,t={enable_ref:!1}){let r=Es(e);return As(r,t)}function to(e,t={enable_ref:!1,encoding:"utf8"}){let r=ll(e,t.encoding);return As(r,t)}function*Is(e,t={enable_ref:!1,encoding:"utf8"}){let r=qs(e),n=r.next().value,i=n.state;for(let l of r){let _=l.state;if(Cs(n,i,_)&&!t.enable_ref){let c=n.avnd_cache.data;yield c,c.$disconn(),c=null}i=_}}function*so(e,t={enable_ref:!1,encoding:"utf8"}){let r=Es(e);yield*Is(r,t)}function*ro(e,t={enable_ref:!1,encoding:"utf8"}){let r=ll(e,t.encoding);yield*Is(r,t)}function no(){return{d:void 0,ppg:void 0,prev:void 0,curr:void 0,can_send:!1,data:"",state:"init",label:"",pstate:""}}function io(e){let t=Es(""),r=qs(t," "),n=r.next().value;n.__use_async_mode();let i=no();return i.rt=n.avnd_cache.data,i.prev=n.state,i.ppg=r,i.d=n,i}function lo(e,t){return e.data=e.data+t,e.state==="init"?t===R.slash?e.state="slash":R.quotes.has(t)?(e.label=t,e.state="quote"):t===R.hash?e.state="hash":t===R.ref?e.state="ref":e.can_send=!0:e.state==="quote"?t==="\\"?(e.state="esc",e.pstate="quote"):t===e.label&&(e.pstate!==""?(e.state=e.pstate,e.pstate=""):e.can_send=!0):e.state==="slash"?t===R.slash?e.state="lcmt":t===R.asterisk?e.state="blkcmt":R.quotes.has(t)?(e.label=t,e.state="quote"):e.can_send=!0:e.state==="lcmt"?t==="\\"?(e.state="esc",e.pstate="lcmt"):Ka(t)&&(e.can_send=!0):e.state==="blkcmt"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===R.asterisk&&(e.state="asterisk"):e.state==="asterisk"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===R.slash&&(e.can_send=!0):e.state==="hash"?il(t)?e.can_send=!0:R.quotes.has(t)&&(e.state="quote",e.pstate="hash"):e.state==="ref"?il(t)?e.can_send=!0:R.quotes.has(t)&&(e.state="quote",e.pstate="ref"):e.state==="esc"?(e.state=e.pstate,e.pstate=""):console.log("impossible"),e}async function*_o(e,t){for(let r of e)lo(t,r),t.can_send&&(yield t,t.data="",t.state="init",t.label="",t.can_send=!1)}async function*co(e){let t=io(e);for await(let r of e)yield*_o(r,t);yield t}function uo(e){let t=e.d.unshift_cache;t.forEach(r=>{e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state}),t=null}async function*ao(e,t){if(e.d.__unshift_g(e.data),e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state,Cs(e.d,e.prev,e.curr)&&!t.enable_ref){let r=e.d.avnd_cache.data;yield r,r.$disconn(),r=null}}async function*_l(e,t={enable_ref:!1,encoding:"utf8"}){e=co(e);let r;for await(r of e)uo(r),yield*ao(r,t);yield r.rt}async function*oo(e,t={enable_ref:!1,encoding:"utf8"}){let r=Qa(e,t.encoding,1024);yield*_l(r,t)}cl.exports={OPT_DICT:Za,parse_from_generator:As,parse_from_str:eo,parse_from_file:to,gen_from_generator:Is,gen_from_str:so,gen_from_file:ro,agen_from_generator:_l,agen_from_file:oo}});var Ns=o((If,tt)=>{var{empty:fo}=w(),ho=Z(),et=ul();function Ds(e){return e.length===1?e[0]:e}function po(){for(let e in et){let t;e.startsWith("gen_")?t=function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=et[e](r,n);for(let l of i)l=Ds(l),yield[l.key,l.value]}:e.startsWith("agen_")?t=async function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=et[e](r,n);for await(let l of i)l=Ds(l),yield[l.key,l.value]}:t=function(r,n={enable_ref:!1,encoding:"utf8"}){let i=et[e](r,n).value;return Ds(i)},Object.defineProperty(t,"name",{value:e}),tt.exports[e]=t}tt.exports.OPT_DICT=et.OPT_DICT}po();tt.exports.CFG=ho;tt.exports.empty=fo});var Ps=o((Df,al)=>{var go=Ns(),mo=(e,t=!1)=>{let r=e.split("-");for(let n=1;n<r.length;++n)r[n]=r[n].charAt(0).toUpperCase()+r[n].slice(1);return t&&(r[0]=r[0].charAt(0).toUpperCase()+r[0].slice(1)),r.join("")},bo=(e,t)=>typeof e=="string"?(e=e.trim().toLowerCase(),e==="false"||e==="0"||e==="no"||e==="off"||e==="fls"||e==="f"||e==="null"||e==="nul"||e==="none"||e==="nu"||e==="n"?!1:e==="true"||e==="1"||e==="yes"||e==="on"||e==="tru"||e==="t"||e==="y"?!0:e===""||e==="undefined"||e==="un"||e==="default"||e==="dflt"?!!t:!!e):e===void 0?!!t:!!e,yo=e=>{let t=e.replace(/[^0-9.-]/g,"");return parseFloat(t)},$o=e=>go.parse_from_str(e+" ");al.exports={dash_to_camel:mo,attr_value_to_bool:bo,css_str_to_num:yo,parse_json_input:$o}});var hl=o((Nf,fl)=>{var ol=()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}),vo=async e=>{for(let t=0;t<e;++t)await ol()},ko=async(e=0)=>new Promise(t=>{setTimeout(()=>{t()},e)});fl.exports={wait_for_layout_ready:ol,wait_for_n_raf:vo,wait:ko}});var gl=o((Pf,pl)=>{var{dash_to_camel:wt}=Ps(),dl=(e,t,r=!1)=>{let n=wt(t,r)+"Element";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelector(`.${t}`):null}})},wo=(e,t)=>{for(let r of t)dl(e,r,!1)},xo=e=>{for(let t in DYN_CLSES){{let n="all"+wt(t,!0)+"Elements";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelectorAll(`.${t}`):null}})}let r=DYN_CLSES[t];for(let n of r){let i=wt(n,!0),l="get"+wt(t,!0)+"ElementBy"+i;e.constructor.prototype.hasOwnProperty(l)||(e.constructor.prototype[l]=function(_){let c=this.shadowRoot;return c?c.querySelector(`.${t}[${n}="${_}"]`):null})}}};pl.exports={add_one_fixed_element_getter:dl,add_fixed_element_getters:wo,add_dyn_element_getters:xo}});var bl=o((Lf,ml)=>{var To=(e,t="error",r=1e3)=>{let n={success:"#38a169",error:"#e53e3e",warning:"#d69e2e",loading:"#3182ce",info:"#667eea"},i=_=>`
|
|
6
|
+
position: fixed;
|
|
7
|
+
top: 50%;
|
|
8
|
+
left: 50%;
|
|
9
|
+
width: 300px;
|
|
10
|
+
height:80px;
|
|
11
|
+
background: ${n[_]||n.info};
|
|
12
|
+
color: white;
|
|
13
|
+
padding: 12px 20px;
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
16
|
+
transform:translate(-50%,-50%);
|
|
17
|
+
z-index: 10001;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
font-size: r0px; /* \u5B57\u4F53\u53D8\u5927 */
|
|
23
|
+
`,l=document.createElement("div");l.style.cssText=i(t),l.textContent=e,document.body.appendChild(l),setTimeout(()=>{document.body.contains(l)&&document.body.removeChild(l)},r)};ml.exports={popmsg:To}});var Mo=o((jf,kl)=>{var V=e=>e.constructor.name==="AsyncFunction",So=e=>{let t=0;for(;e&&e.parentNode;)e=e.parentNode,t++;return t},Eo=(e,t)=>{if(t>0){let r=1;for(;;){let n=e.parentNode;if(r===t)return n;e=n,++r}}else return e},Co=e=>{for(;e.parentNode;)e=e.parentNode;return e},xt=e=>{let t=0;for(;e.lastChild;)e=e.lastChild,++t;return[e,t]},Tt=e=>{let t=0;for(;;){let r=e.firstChild;if(r)++t,e=r;else return[e,t]}},yl=(e,t)=>{if(e.nextSibling)return[e.nextSibling,t];let r=e.parentNode,n=t;for(;r;){if(n-=1,r.nextSibling)return[r.nextSibling,n];r=r.parentNode}return[null,-1]},$e=async(e,t=(r,n)=>{})=>{let[r,n]=xt(e),i=e,l=V(t),_=0;for(;;){let c=!1;if(l?c=await t(i,_):c=t(i,_),c||i===r)return;{let u=i.firstChild;if(u)++_,i=u;else{let a=yl(i,_);if(i=a[0],i)_=a[1];else break}}}},$l=(e,t)=>{if(e.prevSibling)return[e.prevSibling,t];let r=e.parentNode,n=t;for(;r;){if(n-=1,r.prevSibling)return[r.prevSibling,n];r=r.parentNode}return[null,-1]},qo=async(e,t=(r,n)=>{})=>{let[r,n]=Tt(e),i=e,l=V(t),_=0;for(;;){let c=!1;if(l?c=await t(i,_):c=t(i,_),c||i===r)return;{let u=i.firstChild;if(u)++_,i=u;else{let a=$l(i,_);if(i=a[0],i)_=a[1];else break}}}},Ao=async(e,t=(r,n)=>{})=>{let[r,n]=Tt(e),i=V(t);for(;;){let l=!1;if(i?l=await t(r,n):l=t(r,n),l||r===e)return;{let _=r.nextSibling;if(_){let c=Tt(_);n+=c[1],r=c[0]}else{let c=r.parentNode;if(c)--n,r=c;else break}}}},Io=async(e,t=(r,n)=>{})=>{let[r,n]=xt(e),i=V(t);for(;;){let l=!1;if(i?l=await t(r,n):l=t(r,n),l||r===e)return;{let _=r.prevSibling;if(_){let c=xt(_);n+=c[1],r=c[0]}else{let c=r.parentNode;if(c)--n,r=c;else break}}}},m=async(e,t=(n,i)=>{},r=(n,i)=>{})=>{let n=e,i="open",l={open:[r,V(r)],clos:[t,V(t)]},_=0;for(;;){let c=!1,[u,a]=l[i];if(i==="open"){if(a?c=await u(n,_):c=u(n,_),c)return;{let f=n.firstChild;f?(n=f,++_):i="clos"}}else{let f,v,T,Q=n.nextSibling;if(Q?(T="open",f=Q,v=_):(T="clos",f=n.parentNode,v=_-1),a?c=await u(n,_):c=u(n,_),c)return;if(n!==e)i=T,n=f,_=v;else break}}},Do=async(e,t=(n,i)=>{},r=(n,i)=>{})=>{let n=e,i="open",l={open:[r,V(r)],clos:[t,V(t)]},_=0;for(;;){let c=!1,[u,a]=l[i];if(i==="open"){if(a?c=await u(n,_):c=u(n,_),c)return;{let f=n.lastChild;f?(n=f,++_):i="clos"}}else{let f,v,T,Q=n.prevSibling;if(Q?(T="open",f=Q,v=_):(T="clos",f=n.parentNode,v=_-1),a?c=await u(n,_):c=u(n,_),c)return;if(n!==e)i=T,n=f,_=v;else break}}},No=async(e,t)=>{if(typeof t=="string"){let r=[];return await $e(e,async(n,i)=>{(n.tagName?n.tagName.toLowerCase()===t.toLowerCase():!1)&&r.push(n)}),r}else{let r=[];return V(t)?await $e(e,async(n,i)=>{await t(n,i)&&r.push(n)}):await $e(e,async(n,i)=>{t(n,i)&&r.push(n)}),r}},Po=async()=>{let e=document.querySelectorAll("script"),t=[];for(let i of e)if(i.src)t.push(fetch(i.src).then(l=>l.ok?l.text():"").catch(()=>""));else{let l=i.textContent;l.trim()&&t.push(Promise.resolve(l))}return`<script>
|
|
24
|
+
${(await Promise.all(t)).filter(i=>i).join(`
|
|
3
25
|
|
|
4
26
|
`)}
|
|
5
|
-
<\/script>`},
|
|
6
|
-
`}catch{}for(let t of document.querySelectorAll("style"))
|
|
7
|
-
`;return
|
|
27
|
+
<\/script>`},Lo=async()=>{let e="";for(let t of document.querySelectorAll('link[rel="stylesheet"]'))if(t.href)try{e+=await(await fetch(t.href)).text()+`
|
|
28
|
+
`}catch{}for(let t of document.querySelectorAll("style"))e+=t.outerHtml+`
|
|
29
|
+
`;return e};m.rvisit=Do;m.get_depth=So;m.get_ance=Eo;m.get_rt=Co;m.get_dlmost=Tt;m.get_drmost=xt;m.find_rb_of_fst_ance_has_rb=yl;m.find_lb_of_fst_ance_has_lb=$l;m.editonly_sdfs_for_each=$e;m.editonly_rsdfs_for_each=qo;m.editonly_edfs_for_each=Ao;m.editonly_redfs_for_each=Io;m.filter=No;m.get_all_csses=Lo;m.get_all_scripts=Po;var vl=()=>({x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0}),Ls=e=>{let t=vl(),r=e.style.transform;e.style.transform="none";let n=e.getBoundingClientRect();return e.style.transform=r,t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height,t.top=n.top,t.left=n.left,t.right=n.right,t.bottom=n.bottom,t},Oo=(e,t=r=>!0)=>{let r=[];return $e(e,n=>{if(t(n)){let i=Ls(n);r.push({el:n,rect:i})}}),r},Ro=(e,t=r=>!0)=>{let r=[];return $e(e,n=>{if(t(n)){let i=n.getBoundingClientRect();r.push({el:n,rect:i})}}),r},jo=(e,t=r=>!0)=>{let r=[];return $e(e,n=>{if(t(n)){let i=Ls(n),l=n.getBoundingClientRect(),_={x:l.x-i.x,y:l.y-i.y,width:l.width-i.width,height:l.height-i.height,top:l.top-i.top,right:l.right-i.right,bottom:l.bottom-i.bottom,left:l.left-i.left};_.x===0&&_.y===0&&_.width===0&&_.height===0&&_.top===0&&_.right===0&&_.bottom===0&&_.left===0||r.push({el:n,rect:_})}}),r};m.creat_rect_desc=vl;m.get_rect_desc_bfr_transfrom=Ls;m.get_all_positions_bfr_transform=Oo;m.get_all_positions_aft_transform=Ro;m.get_all_positions_transform_diff=jo;var Bo=Ps(),Yo=hl(),Of=gl(),Fo=bl();m._attr=Bo;m._wait=Yo;m._ui=Fo;var Rf=Ns();kl.exports=m});return Mo();})();
|
package/attr.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
const _nvison = require("nvison");
|
|
2
|
+
|
|
3
|
+
const dash_to_camel = (str, initial_upper = false) => {
|
|
4
|
+
let parts = str.split('-');
|
|
5
|
+
for (let i = 1; i < parts.length; ++i) {
|
|
6
|
+
parts[i] = parts[i].charAt(0).toUpperCase() + parts[i].slice(1);
|
|
7
|
+
}
|
|
8
|
+
if (initial_upper) {
|
|
9
|
+
parts[0] = parts[0].charAt(0).toUpperCase() + parts[0].slice(1);
|
|
10
|
+
}
|
|
11
|
+
return parts.join('');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const attr_value_to_bool = (value, dflt) => {
|
|
15
|
+
if (typeof value === 'string') {
|
|
16
|
+
value = value.trim().toLowerCase();
|
|
17
|
+
if (
|
|
18
|
+
value === 'false' ||
|
|
19
|
+
value === '0' ||
|
|
20
|
+
value === 'no' ||
|
|
21
|
+
value === 'off' ||
|
|
22
|
+
value === 'fls' ||
|
|
23
|
+
value === 'f' ||
|
|
24
|
+
value === 'null' ||
|
|
25
|
+
value === 'nul' ||
|
|
26
|
+
value === 'none' ||
|
|
27
|
+
value === 'nu' ||
|
|
28
|
+
value === 'n'
|
|
29
|
+
) {
|
|
30
|
+
return false;
|
|
31
|
+
} else if (
|
|
32
|
+
value === 'true' ||
|
|
33
|
+
value === '1' ||
|
|
34
|
+
value === 'yes' ||
|
|
35
|
+
value === 'on' ||
|
|
36
|
+
value === 'tru' ||
|
|
37
|
+
value === 't' ||
|
|
38
|
+
value === 'y'
|
|
39
|
+
) {
|
|
40
|
+
return true;
|
|
41
|
+
} else if(
|
|
42
|
+
value === '' ||
|
|
43
|
+
value === 'undefined' ||
|
|
44
|
+
value === 'un' ||
|
|
45
|
+
value === 'default' ||
|
|
46
|
+
value === 'dflt'
|
|
47
|
+
) {
|
|
48
|
+
return Boolean(dflt);
|
|
49
|
+
} else {
|
|
50
|
+
return Boolean(value);
|
|
51
|
+
}
|
|
52
|
+
} else if(value === undefined) {
|
|
53
|
+
return Boolean(dflt);
|
|
54
|
+
} else {
|
|
55
|
+
return Boolean(value);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const css_str_to_num = (css_str) => {
|
|
60
|
+
// 移除非数字字符(如 "px", "em", "%" 等)
|
|
61
|
+
let num_str = css_str.replace(/[^0-9.-]/g, '');
|
|
62
|
+
return parseFloat(num_str);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const parse_json_input = (input)=> _nvison.parse_from_str(input+" ");
|
|
66
|
+
|
|
67
|
+
module.exports = {
|
|
68
|
+
dash_to_camel,
|
|
69
|
+
attr_value_to_bool,
|
|
70
|
+
css_str_to_num,
|
|
71
|
+
parse_json_input,
|
|
72
|
+
}
|
package/ele-getter.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const {dash_to_camel} = require("./attr");
|
|
2
|
+
|
|
3
|
+
const add_one_fixed_element_getter = (self, cls, initial_upper = false) => {
|
|
4
|
+
let getter_name = dash_to_camel(cls, initial_upper) + "Element";
|
|
5
|
+
if (!self.constructor.prototype.hasOwnProperty(getter_name)) {
|
|
6
|
+
Object.defineProperty(self.constructor.prototype, getter_name, {
|
|
7
|
+
get: function () {
|
|
8
|
+
const sr = this.shadowRoot;
|
|
9
|
+
if (!sr) return null;
|
|
10
|
+
return sr.querySelector(`.${cls}`);
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const add_fixed_element_getters = (self,FIXED_CLSES) => { for (let cls of FIXED_CLSES) { add_one_fixed_element_getter(self, cls, false); } }
|
|
16
|
+
|
|
17
|
+
const add_dyn_element_getters = (self) => {
|
|
18
|
+
for (let cls in DYN_CLSES) {
|
|
19
|
+
{
|
|
20
|
+
let getter_name = "all" + dash_to_camel(cls, true) + "Elements";
|
|
21
|
+
if (!self.constructor.prototype.hasOwnProperty(getter_name)) {
|
|
22
|
+
Object.defineProperty(self.constructor.prototype, getter_name, {
|
|
23
|
+
get: function () {
|
|
24
|
+
const sr = this.shadowRoot;
|
|
25
|
+
if (!sr) return null;
|
|
26
|
+
return sr.querySelectorAll(`.${cls}`);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
// 添加按不同 data- 属性 获取元素的方法
|
|
32
|
+
// 从配置读取并动态生成
|
|
33
|
+
const dataAttrs = DYN_CLSES[cls];
|
|
34
|
+
for (let dataAttr of dataAttrs) {
|
|
35
|
+
// 将 "data-value" -> "DataValue", "data-row-index" -> "DataRowIndex"
|
|
36
|
+
let suffix = dash_to_camel(dataAttr, true);
|
|
37
|
+
let fname = "get" + dash_to_camel(cls, true) + "ElementBy" + suffix;
|
|
38
|
+
|
|
39
|
+
if (!self.constructor.prototype.hasOwnProperty(fname)) {
|
|
40
|
+
self.constructor.prototype[fname] = function (val) {
|
|
41
|
+
const sr = this.shadowRoot;
|
|
42
|
+
if (!sr) return null;
|
|
43
|
+
return sr.querySelector(`.${cls}[${dataAttr}="${val}"]`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = {
|
|
51
|
+
add_one_fixed_element_getter,
|
|
52
|
+
add_fixed_element_getters,
|
|
53
|
+
add_dyn_element_getters
|
|
54
|
+
}
|
package/index.js
CHANGED
|
@@ -521,6 +521,19 @@ visit.get_rect_desc_bfr_transfrom = get_rect_desc_bfr_transfrom;
|
|
|
521
521
|
visit.get_all_positions_bfr_transform = get_all_positions_bfr_transform;
|
|
522
522
|
visit.get_all_positions_aft_transform = get_all_positions_aft_transform;
|
|
523
523
|
visit.get_all_positions_transform_diff = get_all_positions_transform_diff;
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
const _attr = require("./attr");
|
|
527
|
+
const _wait = require("./wait");
|
|
528
|
+
const _ele_getter = require("./ele-getter");
|
|
529
|
+
const _ui = require("./ui");
|
|
530
|
+
|
|
531
|
+
visit._attr = _attr;
|
|
532
|
+
visit._wait = _wait;
|
|
533
|
+
visit._ui = _ui;
|
|
534
|
+
|
|
535
|
+
const _nvison = require("nvison");
|
|
536
|
+
|
|
524
537
|
module.exports = visit;
|
|
525
538
|
|
|
526
539
|
/*
|
package/package.json
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nv-basic-bw",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
7
|
},
|
|
8
8
|
"author": "",
|
|
9
9
|
"license": "ISC",
|
|
10
|
-
"description": ""
|
|
10
|
+
"description": "",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"nvison": "^1.2.1"
|
|
13
|
+
}
|
|
11
14
|
}
|
package/ui.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const popmsg = (message, type = 'error', delay = 1000) => {
|
|
2
|
+
const ALERT_COLORS = {
|
|
3
|
+
success: '#38a169',
|
|
4
|
+
error: '#e53e3e',
|
|
5
|
+
warning: '#d69e2e',
|
|
6
|
+
loading: '#3182ce',
|
|
7
|
+
info: '#667eea'
|
|
8
|
+
};
|
|
9
|
+
const crest_simple_alert_css = (type) => `
|
|
10
|
+
position: fixed;
|
|
11
|
+
top: 50%;
|
|
12
|
+
left: 50%;
|
|
13
|
+
width: 300px;
|
|
14
|
+
height:80px;
|
|
15
|
+
background: ${ALERT_COLORS[type] || ALERT_COLORS.info};
|
|
16
|
+
color: white;
|
|
17
|
+
padding: 12px 20px;
|
|
18
|
+
border-radius: 8px;
|
|
19
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
20
|
+
transform:translate(-50%,-50%);
|
|
21
|
+
z-index: 10001;
|
|
22
|
+
font-weight: 500;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
font-size: r0px; /* 字体变大 */
|
|
27
|
+
`;
|
|
28
|
+
const alertDiv = document.createElement('div');
|
|
29
|
+
alertDiv.style.cssText = crest_simple_alert_css(type);
|
|
30
|
+
alertDiv.textContent = message;
|
|
31
|
+
document.body.appendChild(alertDiv);
|
|
32
|
+
setTimeout(() => {
|
|
33
|
+
if (document.body.contains(alertDiv)) {
|
|
34
|
+
document.body.removeChild(alertDiv);
|
|
35
|
+
}
|
|
36
|
+
}, delay);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
module.exports = {
|
|
41
|
+
popmsg,
|
|
42
|
+
}
|
package/wait.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const wait_for_layout_ready = () => {
|
|
2
|
+
return new Promise((resolve) => {
|
|
3
|
+
requestAnimationFrame(() => {
|
|
4
|
+
resolve();
|
|
5
|
+
});
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const wait_for_n_raf = async (n) => {
|
|
10
|
+
for (let i = 0; i < n; ++i) {
|
|
11
|
+
await wait_for_layout_ready();
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const wait = async (ms = 0) => {
|
|
16
|
+
return new Promise((resolve) => {
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
resolve();
|
|
19
|
+
}, ms);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
wait_for_layout_ready,
|
|
25
|
+
wait_for_n_raf,
|
|
26
|
+
wait
|
|
27
|
+
}
|