nvhtml2-tree-from-str 1.0.14

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.
@@ -0,0 +1,25 @@
1
+ var nvhtml2treefromstr=(()=>{var mh=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,s)=>(typeof require<"u"?require:e)[s]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var G=p((L0,Bi)=>{var Fi=(t,e)=>typeof t===e,kh=()=>{var t;return((t=globalThis.process)==null?void 0:t.dlopen)!==void 0},wh="repr",Eh=()=>kh()?mh("util").inspect.custom:wh,vh="value",Th="enumerable",Ht=Object,$t=Ht.defineProperty,Sh=(t,...e)=>{for(let s of e)$t(t,s,{[Th]:!1})},Dh=(t,e)=>$t(t,"name",{[vh]:e}),Ih=Ht.assign,Ah=Ht.seal,qh=Array,Rh=Array.from,Oh=Symbol,Gi=Oh.toStringTag,Nh="\u200C",xi="prototype",Mi=(t,e,s,...i)=>{$t(t[xi],e,{get:function(){return s(this,...i)}})},Hi=(t,e,...s)=>{let i=function(){return e(this,...s)},r=Eh();t[xi][r]=i},Ch=(t,e,...s)=>{Mi(t,Gi,function(r){return e(r,...s)})},Pi=(t,e)=>Dh(t,e),As=t=>Fi(t,"string"),Lh=t=>t<=2**32-2&&t>=0,qs=t=>Lh(t)&&is_int(t),Rs=JSON,ji=Rs.stringify,Ui=Rs.parse,Fh=t=>Ui(ji(t)),Gh=(t="")=>{let e="fid_",s=new Date().getTime(),i="_",r=Math.floor(Math.random()*1e6);return e+s+i+r+t},xh=t=>t.slice(0,8),Mh=t=>({minid_:t.minid_,maxid_:t.maxid_,used_:t.used_,lefted_:t.lefted_}),Mt=class extends Array{constructor(e,s){if(super(),s)this[0]=s;else{this[0]=[];for(let i=0;i<e+1;++i)this[0].push(0)}this[1]=e,this[2]=0,this[3]=1}get rented_(){return this[0]}get maxid_(){return this[1]}get used_(){return this[2]}get minid_(){return 1}get lefted_(){return this[1]-this[2]}is_full(){return this[1]===this[2]}reset(){this[2]=0;for(let e=0;e<this.maxid+1;++e)this[0]=0;this[3]=1}rent(){if(this.is_full())return 0;{++this[2];let e=this[1];for(let s=this[3];s<e;++s)if(this[0][s]===0)return this[0][s]=1,this[3]=s+1,s;if(this[0][e]===0)return this[3]=1,this[0][e]=1,e;for(let s=1;s<this[3];++s)if(this[0][s]===0)return this[0][s]=1,this[3]=s+1,s}}rtrn(e){this[0][e]!==0&&(--this[2],this[0][e]=0)}};Hi(Mt,Mh);var Hh=(t="_Kkject",e)=>{class s extends Set{add(_){(As(_)||qs(_))&&(super.add(_),$t(s.prototype,_,{get:function(){return _},configurable:!0}))}delete(_){super.delete(_),delete s.prototype[_]}get[Gi](){return""}}Pi(s,t);let i=new s;for(let r of e)(As(r)||qs(r))&&i.add(r);return i},Ph=(t,e)=>{for(let s=t.length-1;s>-1;s--)e(t[s],s)},jh=(...t)=>{let e=t.length,s=t.slice(0,e-1),i=t[e-1];for(let r=0;r<e-1;r=r+2){let _=t[r],n=t[r+1];if(_)return n}return i};Bi.exports={typof:Fi,_un:void 0,_nu:null,_t:!0,_f:!1,_O:Ht,OD:$t,false_e:Sh,OASGN:Ih,OSEAL:Ah,_A:qh,AFROM:Rh,ZWNJ:Nh,add_getter:Mi,add_repr:Hi,add_str_tag:Ch,rename_cls:Pi,is_str:As,is_ary_idx:qs,_J:Rs,S2J:Ui,J2S:ji,jdcp:Fh,AidPool:Mt,creat_36_lower_id:Gh,get_abbr:xh,kkject:Hh,forlst:Ph,iflet:jh}});var oe=p((F0,zi)=>{var Pt=[["$self_",0],["$fstch_",1],["$rsib_",2],["$parent_",3],["$lsib_",4],["$lstch_",5],["$end_",255]],Yi=Pt.map(t=>t[0]),Uh=Pt.map(t=>t[1]),Ut=new Map(Pt.concat(Pt.map(t=>[t[1],t[0]]))),jt=[["$new",256],["$prepend_child",257],["$add_rsib",258],["$add_parent",259],["$add_lsib",260],["$append_child",261],["$noop",511]],Bh=jt.map(t=>t[0]),Yh=jt.map(t=>t[1]),Bt=new Map(jt.concat(jt.map(t=>[t[1],t[0]])));function Wh(t,e=!1){let s=Ut.get(t)+256;return s==="$parent_"&&!e?s:Bt.get(s)}function Vh(t){let e=Bt.get(t)-256;return e==="$parent_"?"$parent_":Ut.get(e)}function Wi(t){return Ut.get(t)}function Vi(t){return Ut.get(t)}function Ji(t){return Bt.get(t)}function Xi(t){return Bt.get(t)}function Jh(t){return t.map(e=>e<256?Wi(e):Ji(e))}function Xh(t){return t.map(e=>Yi.includes(e)?Vi(e):Xi(e))}var bt=class extends Array{constructor(e,s,i=-1){super(),super.push(e,s,i)}get k(){return this[0]}set k(e){this[0]=e}get d(){return this[1]}slct_down_for_d(){return this[1]=0}slct_right_for_d(){return this[1]=1}slct_up_for_d(){return this[1]=2}slct_left_for_d(){return this[1]=3}set d(e){this[1]=e}get id(){return this[2]}set id(e){this[2]=e}};bt.PROPS=["k","d","id"];bt.DIRECTION={down:0,right:1,up:2,left:3,0:"down",1:"right",2:"up",3:"left"};var zh={open:0,close:1,0:"open",1:"close",lyrfst:2,lyrmid:3,lyrlst:4,lyrbst:5,2:"lyrfst",3:"lyrmid",4:"lyrlst",5:"lyrbst"};zi.exports={SRCH_KS:Yi,BUILD_KS:Bh,SRCH_NS:Uh,BUILD_NS:Yh,srchk_to_buildk:Wh,buildk_to_srchk:Vh,srchn_to_srchk:Wi,srchk_to_srchn:Vi,buildn_to_buildk:Ji,buildk_to_buildn:Xi,actnl_to_actkl:Jh,actkl_to_actnl:Xh,Act:bt,FLAG_DICT:zh}});var Ki=p((G0,Zi)=>{var{_nu:Qh,jdcp:Os}=G(),Yt=Symbol("pele"),Wt="_children";function Ns(t,e,s,i,r){let _=i(e),n;return r?n=_:(n={},Object.assign(n,_)),n[s]=[],n[Yt]=t,n}function Zh(t,e=Wt,s=Os,i){return{ck:e,dump_func:s,ref:t,ele:Ns(Qh,t,e,s,i),using_dump_ele:i}}var Kh={$prepend_child:t=>{let e=t.ele,s=e[t.ck],r=t.ref.$fstch_,_=Ns(e,r,t.ck,t.dump_func,t.using_dump_ele);return s.push(_),t.ref=r,t.ele=_,t},$add_rsib:t=>{let e=t.ele[Yt],s=e[t.ck],r=t.ref.$rsib_,_=Ns(e,r,t.ck,t.dump_func,t.using_dump_ele);return s.push(_),t.ref=r,t.ele=_,t},$parent_:t=>{let e=t.ele[Yt],s=t.ref.$parent_;return t.ref=s,t.ele=e,t}};function ef(t,e=Os,s=Wt,i=Os,r=!1){let _=t.$sdfs_next_build_action_list_,n=Zh(t,s,e,r),l=n.ele;_=_.slice(1);for(let o of _)Kh[o.k](n);return i(l)}var Qi=(t,e,s)=>{for(let i in e)i!==s&&(t[i]=e[i])};function tf(t,e,s,i=Qi,r=Wt){let _=t.node(e);i(_,s,r);let n=[{j:s,nd:_}],l=[];for(;n.length>0;){for(let o of n){let h=o.j[r],f=o.nd;for(let c of h){let u=t.node(e);i(u,c,r),f.$append_child(u),l.push({j:c,nd:u})}}n=l,l=[]}return _}Zi.exports={DFLT_CHILREN_KEY:Wt,SYM_PELE:Yt,dump:ef,DFLT_NEST_LOAD_FUNC:Qi,load:tf}});var sr=p((M0,tr)=>{var{_nu:sf,jdcp:x0,AFROM:rf,rename_cls:_f}=G(),Vt=Symbol("data");function er(t,e){return{nd:e,o:t}}function nf(t,e,s,i,r="WfsCtx"){class _{#e=[];#t=[];#s;#r;#i;constructor(l,o){this.#r=l,this.#i=o,this.#i[Vt]=l,this.#s=er(l,o),this.#e=[this.#s]}get unhandled_(){return this.#e}get next_unhandled_(){return this.#t}get curr_(){return this.#s}*[Symbol.iterator](){for(;this.#e.length>0;){for(let l=0;l<this.#e.length;l++){let o=this.#e[l];this.#s=o,yield o;let h=o.nd,f=o.o;if(!t(f)){let c=e(f),u=[];c.forEach((a,$)=>{let k=s(h,a,$);a=i(a),k[Vt]=a,u.push({nd:k,o:a})}),this.#t=this.#t.concat(u)}}this.#e=this.#t,this.#t=[]}}build(){return rf(this),this.#i}reset(){this.#s=er(ro,rt),this.#e=[this.#s],this.#t=[]}prev(){let{nd:l,o}=this.#s,h=l.$bfs_prev_[0];return h?{nd:h,o:h[Vt]}:sf}}return _f(_,r),_.sym_data=Vt,_}tr.exports=nf});var Gs=p((H0,rr)=>{var{actkl_to_actnl:lf,actnl_to_actkl:of}=oe(),{jdcp:Cs}=G();function ir(t,e=Cs){let s=t.$sdfs_next_build_action_list_;s=s.map(r=>r.k),s=lf(s);let i=t.$sdfs_.map(r=>e(r));return{struct:s,data:i}}var Fs=(t,e)=>(Object.assign(t,e),t);function hf(t,e,s,i=Fs){let{struct:r,data:_}=t,n=of(r),l=e.tree(s);i(l,_[0]);let o=l,h=1;for(let f=1;f<n.length;f++){let c=n[f];c.endsWith("_")?o=o[c]:(o=o[c](),i(o,_[h]),h=h+1)}return l}var Ls=Ki();function ff(t){t.prototype.$dump=function(e=Cs){return ir(this,e)},t.DFLT_LOAD_FUNC=Fs,t.prototype.$to_nest=function(e=Cs,s="_children"){return Ls.dump(this,e,s)},t.DFLT_NEST_LOAD_FUNC=Ls.DFLT_NEST_LOAD_FUNC}var cf=sr();rr.exports={dump:ir,DFLT_LOAD_FUNC:Fs,load_from_dump:hf,add_dump:ff,nest:Ls,wfs_load:cf}});var lr=p((P0,nr)=>{function _r(t,e,s,i,r,_){let n=new Map,l=t.length;r=r??0,_=_??l;let o=r;for(let h=r;h<_;h++)i(s,t[h])&&(t[o]=t[h],n.set(h,o),o=o+1);for(let h=o;h<_;h++)t[h]=e;return n}function af(t,e=void 0,s=void 0,i=void 0){return _r(t,e,e,(r,_)=>_!==r,s,i)}function df(t,e,s=void 0,i=void 0,r=void 0){return _r(t,s,e,(_,n)=>!_.has(n),i,r)}nr.exports={defrag:af,defrag_with_st:df}});var fr=p((j0,hr)=>{var{_un:yt,_nu:xs,OASGN:uf,OSEAL:pf,AFROM:$f,AidPool:or,creat_36_lower_id:bf,jdcp:gf,kkject:yf,false_e:mf}=G(),gt=Gs(),kf=lr(),Be=["fc","pr","rb","lb","lc"],Ms=(t,e,s,i)=>{let r=new t(e,i);return uf(r,s),r};function wf(t,e,s=Ms,i=de){let r=new i(t.maxid,t.fid),_=t.struct.ids,n=t.data??[],{slots_:l}=r;_.forEach((h,f)=>{l[h]=s(e,r,n[f],h),Be.forEach(c=>{r[c][h]=t.struct[c][f]})});let o=new or(t.maxid,l);return r.idpool=o,r}function Ef(t){let e=t.slots_,s=kf.defrag(e,0,1),i=new Set($f(s.keys()));for(let r=1;r<=i.size;r++){let _=e[r];_[_.constructor.SYM_DICT.set_id](r)}return Be.forEach(r=>{let _=t[r];for(let n=1;n<_.length;n++)i.has(n)&&(_[n]=s.get(_[n])??0);for(let[n,l]of s){let o=_[n];_[n]=0,_[l]=o}}),t}function vf(t,e,s){t.fid=s??bf(),t.max_size=e,t.idpool=new or(t.max_size,yt);let i=t.idpool.rented_;Be.forEach(r=>{t[r]=i.slice(0)}),mf(t,...Be),pf(t)}var Tf=yf("Error",["only_can_call_once_when_init_for_rent_rtrn_mode"]),de=class{#e=yt;constructor(e=1e4,s){vf(this,e,s)}get slots_(){return this.idpool.rented_}slot(e){return this.slots_[e]}*gen_entry(){let e=this.slots_.length;for(let s=1;s<e;s++){let i=this.slot(s);i!==0&&(yield[i,s])}}get ids_(){return this.slots_.filter((e,s)=>e!==0).map(e=>e.$id_)}get nodes_(){return this.slots_.filter(e=>e!==0)}get trees_(){return this.nodes_.filter(e=>e.$is_root())}get isolates_(){return this.trees_.filter(e=>e.$is_leaf())}tree(e){let s=this.idpool.rent();if(s<1)return xs;{let i=new e(this,s);return this.slots_[s]=i,i}}node(e){return this.tree(e)}get rent_pool_(){return this.#e}init_rent_pool(e){if(this.#e===yt){this.#e=[];let s=this.tree(e);for(;s!==xs;)this.#e.push(s),s=this.tree(e)}else console.log(Tf.only_can_call_once_when_init_for_rent_rtrn_mode)}rtrn(e){return this.slots_[e.$id_]===e&&!this.#e.includes(e)?(this.#e.push(e),!0):!1}rent(){let e=this.#e.shift();return e!==yt?e:xs}erase_isolated(){let e=this.gen_entry(),s=[];for(let[i,r]of e)i.$is_isolated()&&(i.$erase(),s.push(i));return s}dump(e=gf){let s=this.idpool.maxid_,i=this.fid,r=this.slots_.filter(o=>o!==0),_=r.map(o=>o.$id_),n={ids:_};Be.forEach(o=>{n[o]=_.map(h=>this[o][h])});let l=r.map(o=>e(o));return{fid:i,maxid:s,struct:n,data:l}}load_nd_from_dump(e,s,i=gt.DFLT_LOAD_FUNC){return gt.load_from_dump(s,this,e,i)}load_nd_from_nest(e,s,i=gt.nest.DFLT_NEST_LOAD_FUNC,r="_children"){return gt.nest.load(this,e,s,i,r)}merge(e,s=gt.DFLT_LOAD_FUNC){return e.trees_.map(_=>{let n=_.$dump();return this.load_nd_from_dump(_.constructor,n,s)})}defrag(){return Ef(this)}[Symbol.iterator](){return function*(){let e=this.gen_entry();for(let[s,i]of e)s.$is_root()&&(yield s)}()}};de.PROPS=Be;de.DFLT_LOAD_FUNC=Ms;de.load_from_dump=(t,e,s=Ms,i=de)=>wf(t,e,s,i);de.calc_dflt_max_size=(t,e)=>{let s=t*2;return(e===yt||e<s)&&(e=s),e};hr.exports=de});var Ye=p((U0,dr)=>{var Hs=(t,e)=>t[e]===0,D={};[0,1,2,3,4].forEach(t=>{D["_"+t]=Hs});var Sf=(t,e,s)=>Hs(t,s)&&Hs(e,s);function cr(t,e,s,i,r,_,n){if(D._2(s,_)){var l=t[0][r];return D._7(t[0],s,r,_),l?n?D._8(e,i,_,l):D._8(e,i,l,_):t[1][r]=_,_}return 0}function ar(t,e,s,i,r,_,n,l,o){var h=r[n];return D._2(r,n)||!D._2(r,l)?0:(r[l]=h,t(s,n)&&(e[h]=l),s=s[n],o?(D._8(i,_,n,l),D._8(i,_,l,s)):(D._8(i,_,l,n),D._8(i,_,s,l)),l)}[5,6].forEach(t=>{D["_"+t]=Sf}),D._7=(t,e,s,i)=>{e[t[s]=i]=s},D._8=(t,e,s,i)=>{e[t[i]=s]=i},D._9=(t,e,s,i,r,_)=>{var n=s[_],l=e[_],o=i[_];return D._1(i,_)&&(t[n]=l),D._3(e,_)&&(r[n]=o),s[_]=0,D._8(e,i,l,o),e[_]=0,i[_]=0,_},D._11=(t,e,s,i,r,_,n)=>cr([t,r],e,s,i,_,n,0),D._12=(t,e,s,i,r,_,n)=>cr([r,t],e,s,i,_,n,1),D._14=(t,e,s,i,r,_,n)=>ar(D._3,r,e,e,s,i,_,n,0),D._15=(t,e,s,i,r,_,n)=>ar(D._1,t,i,e,s,i,_,n,1),["$is_empty","$is_fstch","$is_root","$is_lstch","$is_leaf","$is_lonely","$is_isolated","link_pc","link_rl","$disconn","_pend","$prepend_child","$append_child","_asib","$add_rsib","$add_lsib"].forEach((t,e)=>{dr.exports[t]=D["_"+e]})});var Ps=p((B0,ur)=>{var ue=Ye(),Df={$is_empty:(t,e,s,i,r,_,n,l,o)=>ue.$is_empty(t.rented_,n[0]),$is_root:(t,e,s,i,r,_,n,l,o)=>ue.$is_root(i,n[0]),$is_fstch:(t,e,s,i,r,_,n,l,o)=>ue.$is_fstch(r,n[0]),$is_midch:(t,e,s,i,r,_,n,l,o)=>!ue.$is_fstch(r,n[0])&&!ue.$is_lstch(s,n[0]),$is_lstch:(t,e,s,i,r,_,n,l,o)=>ue.$is_lstch(s,n[0]),$is_leaf:(t,e,s,i,r,_,n,l,o)=>ue.$is_leaf(e,n[0]),$is_lonely:(t,e,s,i,r,_,n,l,o)=>ue.$is_lonely(s,r,n[0]),$is_isolated:(t,e,s,i,r,_,n,l,o)=>ue.$is_isolated(e,i,n[0])};ur.exports=Df});var z=p((Y0,gr)=>{var js=Array.from;function*Jt(t,e){let s=t[e];for(;s!==0;)yield s,s=t[s]}function*Xt(t,e,s){let i=t[s];for(;i!==0;)yield i,i=e[i]}var pr=(t,e,s,i)=>Xt(t,e,s[i]);function*$r(t,e){yield e,yield*Jt(t,e)}function If(t,e){let s=e;for(s of t);return s}function Af(t,e){let s=0;for(let i of t){if(s===e)return i;s=s+1}return 0}function qf(t,e){let s=[],i=0;for(let r of t)e.includes(i)&&s.push(r),i=i+1;return s}function Rf(t,e){for(let s of t)if(s===e)return!0;return!1}function Of(t){let e=0;for(let s of t)e=e+1;return e}function Nf(t,e){let s=-1,i=!1;for(let r of t)if(s=s+1,r===e){i=!0;break}return i?s:-1}function Cf(t,e,s){if(e===s)return 0;{let i=1;for(let r of t){if(r===s)return i;i=i+1}return 1/0}}function Lf(t,e,s){if(e===s)return 0;{let i=0,r=1/0;for(let _ of t){if(_===e)if(i===0)r=0,i=1;else return-r;else if(_===s)if(i===0)r=0,i=1;else return r;r=r+1}return 1/0}}function Ff(t,e){let s=js(t);return s.reverse(),s.push(e),s}function*br(t,e,s){for(let i of s)yield*Xt(t,e,i)}function*Gf(t,e,s){let i=s?[s]:[];for(;i.length;)yield js(i),i=js(br(t,e,i))}var xf={lst0:If,which:Af,some:qf,of:Rf,count:Of,seq:Nf,dist_after:Cf,dist_dual:Lf,reverse_then_push_self:Ff,$ance:(t,e)=>Jt(t,e),$drmost:(t,e)=>$r(t,e),$dlmost:(t,e)=>$r(t,e),$fch:(t,e,s)=>Xt(t,e,s),$lch:(t,e,s)=>Xt(t,e,s),$psib:(t,e)=>Jt(t,e),$fsib:(t,e)=>Jt(t,e),$sibff:(t,e,s,i)=>s[i]?pr(t,e,s,i):[i],$sibfl:(t,e,s,i)=>s[i]?pr(t,e,s,i):[i],$nlyr:br,$mat:Gf};gr.exports=xf});var We=p((W0,wr)=>{var Us=Ye(),Re=z(),S={};S.$self_=(t,e,s,i,r,_,n,l,o)=>n[0];S.$root_=(t,e,s,i,r,_,n,l,o)=>{let h=Re.$ance(i,n[0]);return Re.lst0(h,n[0])};S.$parent_=(t,e,s,i,r,_,n,l,o)=>i[n[0]];S.$fstch_=(t,e,s,i,r,_,n,l,o)=>e[n[0]];S.$lstch_=(t,e,s,i,r,_,n,l,o)=>_[n[0]];function yr(t,e,s){let i=e[s[0]];return i!==0?t[i]:0}S.$fstsib_=(t,e,s,i,r,_,n,l,o)=>yr(e,i,n);S.$lstsib_=(t,e,s,i,r,_,n,l,o)=>yr(_,i,n);S.$lsib_=(t,e,s,i,r,_,n,l,o)=>r[n[0]];S.$rsib_=(t,e,s,i,r,_,n,l,o)=>s[n[0]];function mr(t,e,s){let i=e[s[0]],r=i!==0?t[i]:0;return r!==s[0]?r:0}S.$fstpsib_=(t,e,s,i,r,_,n,l,o)=>mr(e,i,n);S.$lstfsib_=(t,e,s,i,r,_,n,l,o)=>mr(_,i,n);S.$dlmost_=(t,e,s,i,r,_,n,l,o)=>{let h=Re.$dlmost(e,n[0]);return Re.lst0(h,n[0])};S.$drmost_=(t,e,s,i,r,_,n,l,o)=>{let h=Re.$drmost(_,n[0]);return Re.lst0(h,n[0])};function zt(t,e,s){let i=Re.$ance(e,s[0]),r=0;for(let _ of i)if(t[_]!==0){r=t[_];break}return r}S.$rsib_of_fst_ance_having_rsib_=(t,e,s,i,r,_,n,l,o)=>zt(s,i,n);S.$lsib_of_fst_ance_having_lsib_=(t,e,s,i,r,_,n,l,o)=>zt(r,i,n);function Bs(t,e,s){let i=e[s[0]];return i!==0?t[i]:0}S.$runcle_=(t,e,s,i,r,_,n,l,o)=>Bs(s,i,n);S.$luncle_=(t,e,s,i,r,_,n,l,o)=>Bs(r,i,n);function kr(t,e,s,i){if(e[i[0]]!==0)return 0;{let r=Bs(e,s,i);return r!==0?t[r]:0}}S.$rcin_=(t,e,s,i,r,_,n,l,o)=>kr(e,s,i,n);S.$lcin_=(t,e,s,i,r,_,n,l,o)=>kr(_,r,i,n);S.$sdfs_next_=(t,e,s,i,r,_,n,l,o)=>{let h=e[n[0]];if(h!==0)return h;{let f=s[n[0]];return f!==0?f:zt(s,i,n)}};S.$sdfs_prev_=(t,e,s,i,r,_,n,l,o)=>{let h=i[n[0]];if(h===0)return 0;{let f=r[n[0]];return Us.$is_leaf(e,n[0])?f!==0?f:h:f!==0?Us.$is_leaf(e,f)?f:S.$drmost_(t,e,s,i,r,_,[f],l,o):h}};S.$edfs_next_=(t,e,s,i,r,_,n,l,o)=>{let h=s[n[0]];return h===0?i[n[0]]:S.$dlmost_(t,e,s,i,r,_,[h],l,o)};S.$edfs_prev_=(t,e,s,i,r,_,n,l,o)=>{if(Us.$is_leaf(e,n[0])){let h=r[n[0]];return h===0?zt(r,i,n):h}else return _[n[0]]};wr.exports=S});var Kt=p((V0,t_)=>{var{_nu:Mf}=G(),{FLAG_DICT:Er}=oe(),Hf=["lib","cate","args","rtrn","getter"];function R(t){let e=[];return t.forEach(s=>{let i={};Hf.forEach((r,_)=>{i[r]=s[_]}),i.getter=i.cate.includes("GETTER"),e.push(i)}),e}var se=(t,e,s,i)=>[[t.$id_],[],[]],Ve=(t,e,s,i)=>[[t.$id_,e.$id_],[],[]],mt=(t,e,s,i)=>[[t.$id_],s,[]],Qt=(t,e,s,i)=>[[t.$id_],[],i],vr=(t,e,s,i)=>[[t.$id_],[],[o0]],Zt=(t,e)=>e,pe=(t,e)=>e===0?Mf:t.slot(e),Oe=(t,e)=>e.map(s=>pe(t,s)),kt=(t,e)=>[pe(t,e[0]),Er[e[1]]],Ys=function*(t,e){for(let s of e)yield pe(t,s)},Tr=function*(t,e){for(let s of e)yield Oe(t,s)},Ws=(t,e)=>e.map(s=>Oe(t,s)),Sr=function*(t,e){yield*e},Dr=(t,e)=>e.map(s=>kt(t,s)),Vs=function*(t,e){for(let[s,i]of e)yield[pe(t,s),Er[i]]},Pf=["$is_empty","$is_root","$is_fstch","$is_midch","$is_lstch","$is_leaf","$is_lonely","$is_isolated"],jf=["$is_lyr_fst","$is_lyr_bst","$is_lyr_lst"],Uf=["$depth_","$children_count_","$sibseq_","$sibs_count_","$psibs_count_","$fsibs_count_","$spl_","$length_","$width_","$nonleaf_length_","$offset_","$sdfs_next_srch_action_list_","$sdfs_next_build_action_list_","$sdfs_prev_srch_action_list_","$sdfs_prev_build_action_list_","$height_","$sdfs_index_","$sdfs_leaf_index_","$sdfs_nonleaf_index_","$edfs_index_","$edfs_leaf_index_","$edfs_nonleaf_index_"],Bf=["$bpl_","$breadth_","$pbreadth_","$bfs_index_","$bfs_leaf_index_","$bfs_nonleaf_index_"],Yf=[["cspis","IS"],["cspbfs","LYR_IS"],["cspbfs","BFS_GETTER"],["cspget","GETTER"]],Ir=R(Yf);Ir.forEach(t=>{t.args=se,t.rtrn=Zt});var Wf=["$sdfs_next_srch_action","$sdfs_next_build_action","$sdfs_prev_srch_action","$sdfs_prev_build_action"],Vf=[["cspact","SDFS_ACTION"]],Ar=R(Vf);Ar.forEach(t=>{t.args=vr,t.rtrn=Zt});var Jf=["$self_","$root_","$parent_","$fstch_","$lstch_","$fstsib_","$lstsib_","$lsib_","$fstpsib_","$rsib_","$lstfsib_","$dlmost_","$drmost_","$lsib_of_fst_ance_having_lsib_","$rsib_of_fst_ance_having_rsib_","$luncle_","$runcle_","$lcin_","$rcin_","$sdfs_next_","$sdfs_prev_","$edfs_next_","$edfs_prev_"],Xf=["$lyr_next_","$lyr_prev_"],zf=[["ndget","ND_GETTER"],["cspbfs","LYR_ND_GETTER"]],qr=R(zf);qr.forEach(t=>{t.args=se,t.rtrn=pe});var Qf=["$is_root_of","$is_parent_of","$is_ance_of","$is_inclusive_ance_of","$is_child_of","$is_fstch_of","$is_lstch_of","$is_des_of","$is_inclusive_des_of","$is_fsib_of","$is_rsib_of","$is_psib_of","$is_lsib_of","$is_sib_of","$is_inclusive_sib_of"],Zf=["$is_des_lyr_fst","$is_des_lyr_bst","$is_des_lyr_lst"],Kf=["$ance_dist","$sib_dist","$sdfs_des_index","$sdfs_des_leaf_index","$sdfs_des_nonleaf_index","$edfs_des_index","$edfs_des_leaf_index","$edfs_des_nonleaf_index","$des_spl","$des_offset"],ec=["$des_breadth","$des_pbreadth","$des_bpl","$bfs_des_index","$bfs_des_leaf_index","$bfs_des_nonleaf_index"],tc=[["cspof","OF"],["cspbfs","REL_LYR_IS"],["getwnd","GET_WITH_ND"],["cspbfs","BFS_GET_WITH_ND"]],Rr=R(tc);Rr.forEach(t=>{t.args=Ve,t.rtrn=Zt});var sc=["$ance","$plance","$child","$sib","$psib","$fsib"],ic=[["ndgetwi","GET_ND_WITH_INDEX"]],Or=R(ic);Or.forEach(t=>{t.args=mt,t.rtrn=pe});var rc=["$some_ances","$some_plances","$some_children","$some_sibs","$some_psibs","$some_fsibs"],_c=[["ndsgetwis","GET_NDS_WITH_INDEXES"]],Nr=R(_c);Nr.forEach(t=>{t.args=mt,t.rtrn=Oe});var nc=["$gen_ance","$gen_child_from_fst","$gen_child_from_lst","$gen_sib_from_fst","$gen_sib_from_lst","$gen_psib","$gen_fsib","$gen_lmost","$gen_rmost","$gen_sdfs_next","$gen_sdfs_next_leaf","$gen_sdfs_next_nonleaf","$gen_sdfs_prev","$gen_sdfs_prev_leaf","$gen_sdfs_prev_nonleaf","$gen_edfs_next","$gen_edfs_next_leaf","$gen_edfs_next_nonleaf","$gen_edfs_prev","$gen_edfs_prev_leaf","$gen_edfs_prev_nonleaf"],lc=["$gen_lyr_next","$gen_lyr_prev"],oc=[["ndgen","GEN_ND"],["cspbfs","GEN_LYR_ND"]],Cr=R(oc);Cr.forEach(t=>{t.args=se,t.rtrn=Ys});var hc=["$gen_des_lyr","$gen_lyr"],fc=[["cspbfs","GEN_NDS"]],Lr=R(fc);Lr.forEach(t=>{t.args=se,t.rtrn=Tr});var cc=["$des_lyrs_","$lyrs_"],ac=[["cspbfs","NDMAT_GETTER"]],Fr=R(ac);Fr.forEach(t=>{t.args=se,t.rtrn=Ws});var dc=["$des_lyr_next","$des_lyr_prev"],uc=[["cspbfs","REL_LYR_ND_GETTER"]],Gr=R(uc);Gr.forEach(t=>{t.args=Ve,t.rtrn=pe});var pc=["$bfs_next_","$bfs_prev_"],$c=["$sedfs_next_after_open_","$sedfs_next_after_close_"],bc=["$sedfs_prev_before_open_","$sedfs_prev_before_close_"],gc=[["cspbfs","BFS_ND_GETTER"],["sedfs","SEDFS_AFTER_ND_GETTER"],["sedfs","SEDFS_BEFORE_ND_GETTER"]],xr=R(gc);xr.forEach(t=>{t.args=se,t.rtrn=kt});var yc=["$bfs_des_next","$bfs_des_prev"],mc=[["cspbfs","REL_BFS_ND_GETTER"]],Mr=R(mc);Mr.forEach(t=>{t.args=Ve,t.rtrn=kt});var kc=["$ances_","$plances_","$children_","$sibs_","$psibs_","$fsibs_","$sdfs_","$sdfs_leafs_","$sdfs_nonleafs_","$edfs_"],wc=["$lst_des_lyr_","$lst_lyr_","$own_lyr_","$plyr_"],Ec=[["ndsget","NDS_GETTER"],["cspbfs","BFS_NDS_GETTER"]],Hr=R(Ec);Hr.forEach(t=>{t.args=se,t.rtrn=Oe});var vc=["$some_des_lyrs","$some_lyrs"],Tc=[["cspbfs","GET_NDMAT_WITH_INDEXES"]],Pr=R(Tc);Pr.forEach(t=>{t.args=mt,t.rtrn=Ws});var Sc=["$des_lyr","$lyr"],Dc=[["cspbfs","GET_NDS_WITH_INDEX"]],jr=R(Dc);jr.forEach(t=>{t.args=mt,t.rtrn=Oe});var Ic=["$des_own_lyr","$des_plyr"],Ac=[["cspbfs","GET_NDS_WITH_ND"]],Ur=R(Ac);Ur.forEach(t=>{t.args=Ve,t.rtrn=Oe});var qc=["$gen_des_lyr_next","$gen_des_lyr_prev"],Rc=[["cspbfs","GEN_LYR_ND_WITH_ND"]],Br=R(Rc);Br.forEach(t=>{t.args=Ve,t.rtrn=Ys});var Oc=["$gen_sdfs_next_srch_action","$gen_sdfs_next_build_action","$gen_sdfs_prev_srch_action","$gen_sdfs_prev_build_action"],Nc=[["cspact","GEN"]],Yr=R(Nc);Yr.forEach(t=>{t.args=se,t.rtrn=Sr});var Cc=["$get_with_spl"],Lc=[["ndgetwo","GET_ND_WITH_PL"]],Wr=R(Lc);Wr.forEach(t=>{t.args=Qt,t.rtrn=pe});var Fc=["$sedfs_next","$sedfs_prev"],Gc=[["sedfs","SEDFS_ND_GETTER"]],Vr=R(Gc);Vr.forEach(t=>{t.args=Qt,t.rtrn=kt});var xc=["$sedfs_"],Mc=["$bfs_","$des_bfs_"],Hc=[["cspbfs","BFS_NDFLAGS_GETTER"],["sedfs","SEDFS_NDS_GETTER"]],Jr=R(Hc);Jr.forEach(t=>{t.args=se,t.rtrn=Dr});var Pc=["$gen_bfs","$gen_des_bfs"],jc=["$gen_sedfs_next_after_open","$gen_sedfs_next_after_close"],Uc=["$gen_sedfs_prev_before_open","$gen_sedfs_prev_before_close"],Bc=[["cspbfs","BFS_GEN_ND_AND_FLAG"],["sedfs","SEDFS_GEN_NEXT_AFTER_ND"],["sedfs","SEDFS_GEN_PREV_BEFORE_ND"]],Xr=R(Bc);Xr.forEach(t=>{t.args=se,t.rtrn=Vs});var Yc=["$gen_sedfs_next","$gen_sedfs_prev"],Wc=[["sedfs","SEDFS_GEN_ND_AND_FLAG"]],zr=R(Wc);zr.forEach(t=>{t.args=Qt,t.rtrn=Vs});var Qr=["$prepend_child","$append_child"],Zr=["$add_rsib","$add_lsib"],Vc=[...Qr,...Zr],Kr=["$prepend_children","$append_children"],e_=["$add_rsibs","$add_lsibs"],Jc=[...Kr,...e_],Xc=["$insert_child_before","$insert_child_after","$insert_children_before","$insert_children_after"],zc=["$connto","$add_parent","$add_parent_and_lsib","$add_or_goto_parent"],Qc=["$disconn","$rm_fstch","$rm_lstch","$rm_children","$rm_child","$rm_some_children"],Zc=["$noop","$erase","$erase_r","$replace_tree","$replace_child_tree_at","$replace_node","$replace_child_node_at","$swap_tree","$swap_node","$clone"],Kc=["$rm_fstch","$rm_lstch","$rm_children","$erase_r"],ea=["$append_child","$prepend_child","$append_children","$prepend_children","$rm_child","$rm_some_children"],ta=["$insert_child_at","$insert_children_at","$replace_child_at"],sa=["$cmmn_ances","$fst_cmmn_ance","$dist","$path_to"],ia=["$has_leaf_sib","$has_nonleaf_sib","$get_leaf_sibs","$get_nonleaf_sibs"],ra=["$deep_lseq","$deep_steq"],_a=["$cond_leaf_sdfs_next","$gen_cond_leaf_sdfs_next","$cond_leaf_sedfs_next","$gen_cond_leaf_sedfs_next"],na=["$is_repr_enabled","$enable_repr","$disable_repr"],la=["$is_disp_enabled","$expand","$foldup","$expand_all","$foldup_all"],oa=["$more_less","$gen_visit","$visit"],ha=["$dump","$to_nest"],fa=["ids_","slots_","slot","gen_entry","nodes_","trees_","isolates_","tree","node","erase_isolated","dump","load_nd_from_dump","load_nd_from_nest","merge","defrag"],ca=["$extract_vertexes"],aa=t=>t.endsWith("_"),da=["$append_child","$append_children","$prepend_child","$prepend_children","$insert_child_after","$insert_child_before","$insert_children_after","$insert_children_before"];t_.exports={is_getter_fn:aa,args_id0:se,args_id01:Ve,args_id0_idxs:mt,args_id0_o0:vr,args_id0_os:Qt,rtrn_orig:Zt,rtrn_nd:pe,rtrn_nds:Oe,rtrn_ndg:Ys,rtrn_ndsg:Tr,rtrn_ndmat:Ws,rtrn_nd_and_flag:kt,rtrn_og:Sr,rtrn_ndflags:Dr,rtrn_ndflagg:Vs,IS:Pf,LYR_IS:jf,BFS_GETTER:Bf,GETTER:Uf,add_$args_id0_$rtrn_orig:Ir,SDFS_ACTION:Wf,add_$args_id0_o0_$rtrn_orig:Ar,ND_GETTER:Jf,LYR_ND_GETTER:Xf,BFS_ND_GETTER:pc,add_$args_id0_$rtrn_nd:qr,OF:Qf,REL_LYR_IS:Zf,GET_WITH_ND:Kf,BFS_GET_WITH_ND:ec,add_$args_id01_$rtrn_orig:Rr,GET_ND_WITH_INDEX:sc,add_$args_id0_idx0_$rtrn_nd:Or,GET_NDS_WITH_INDEXES:rc,add_$args_id0_idxs_$rtrn_nds:Nr,GEN_ND:nc,GEN_LYR_ND:lc,add_$args_id0_$rtrn_ndg:Cr,GEN_NDS:hc,add_$args_id0_$rtrn_ndsg:Lr,NDMAT_GETTER:cc,add_$args_id0_$rtrn_ndmat:Fr,REL_LYR_ND_GETTER:dc,add_$args_id01_$rtrn_nd:Gr,SEDFS_AFTER_ND_GETTER:$c,SEDFS_BEFORE_ND_GETTER:bc,add_$args_id0_$rtrn_nd_and_flag:xr,REL_BFS_ND_GETTER:yc,add_$args_id01_$rtrn_nd_and_flag:Mr,NDS_GETTER:kc,BFS_NDS_GETTER:wc,add_$args_id0_$rtrn_nds:Hr,GET_NDMAT_WITH_INDEXES:vc,add_$args_id0_idxs_$rtrn_ndmat:Pr,GET_NDS_WITH_INDEX:Sc,add_$args_id0_idx0_$rtrn_nds:jr,GET_NDS_WITH_ND:Ic,add_$args_id01_$rtrn_nds:Ur,GEN_LYR_ND_WITH_ND:qc,add_$args_id01_$rtrn_ndg:Br,GEN:Oc,add_$args_id0_$rtrn_og:Yr,GET_ND_WITH_PL:Cc,add_$args_id0_o0_$rtrn_nd:Wr,SEDFS_ND_GETTER:Fc,add_$args_id0_o0_$rtrn_nd_and_flag:Vr,BFS_NDFLAGS_GETTER:Mc,SEDFS_NDS_GETTER:xc,add_$args_id0_$rtrn_ndflags:Jr,BFS_GEN_ND_AND_FLAG:Pc,SEDFS_GEN_NEXT_AFTER_ND:jc,SEDFS_GEN_PREV_BEFORE_ND:Uc,add_$args_id0_$rtrn_ndflagg:Xr,SEDFS_GEN_ND_AND_FLAG:Yc,add_$args_id0_o0_$rtrn_ndflagg:zr,BSC_PEND_OP:Qr,BSC_ASIB_OP:Zr,BSC_ADD_OP:Vc,MULTI_PEND_OP:Kr,MULTI_ASIB_OP:e_,MULTI_ADD_OP:Jc,INSERT_OP:Xc,UPSTREAM_OP:zc,DISCONN_OP:Qc,OP:Zc,COND_LEAF:_a,REPR:na,UI:la,CMP:ra,RELATION_ANCE:sa,RELATION_SIB:ia,CHDES_OP_WITH_ZERO:Kc,CHDES_OP_WITH_ONE:ea,CHDES_OP_WITH_SIBSEQ:ta,VISIT:oa,DUMP:ha,FOREST:fa,UTIL:ca,RM_METHOD_ARY_OF_MUSTLEAF:da}});var h_=p((J0,o_)=>{var E=z(),{FLAG_DICT:B}=oe(),{_un:Js,iflet:es}=G(),he=Array.from,b={};b.$gen_des_lyr=function*(t,e,s,i,r,_,n,l,o){let h=[n[0]];for(;h.length>0;)yield h,h=he(E.$nlyr(e,s,h))};var Ne=b.$gen_des_lyr;b.$gen_lyr=function*(t,e,s,i,r,_,n,l,o){let h=E.lst0(E.$ance(i,n[0]),n[0]);yield*Ne(t,e,s,i,r,_,[h],l,o)};var wt=b.$gen_lyr;b.$des_lyrs_=(t,e,s,i,r,_,n,l,o)=>he(Ne(t,e,s,i,r,_,n,l,o));b.$lyrs_=(t,e,s,i,r,_,n,l,o)=>he(wt(t,e,s,i,r,_,n,l,o));b.$lst_des_lyr_=(t,e,s,i,r,_,n,l,o)=>E.lst0(Ne(t,e,s,i,r,_,n,l,o),n[0]);b.$lst_lyr_=(t,e,s,i,r,_,n,l,o)=>{let h=E.lst0(E.$ance(i,n[0]),n[0]);return E.lst0(wt(t,e,s,i,r,_,[h],l,o),h)};b.$own_lyr_=(t,e,s,i,r,_,n,l,o)=>{let h=wt(t,e,s,i,r,_,n,l,o),f=E.lst0(E.$ance(i,n[0]),n[0]),c=E.dist_after(E.$ance(i,n[0]),n[0],f);return E.which(h,c)};var Ee=b.$own_lyr_;b.$plyr_=(t,e,s,i,r,_,n,l,o)=>{let h=i[n[0]];return h===0?[]:Ee(t,e,s,i,r,_,[h],l,o)};b.$bfs_des_next=(t,e,s,i,r,_,n,l,o)=>{let h=n[1],f=E.dist_after(E.$ance(i,n[0]),n[0],h);if(f===1/0)return[0,Js];let c=[h],u=0;for(;c.length>0&&u!==f;)c=he(E.$nlyr(e,s,c)),u=u+1;let a;for(a=0;a<c.length&&c[a]!==n[0];a++);let $;return a===c.length-1?(c=he(E.$nlyr(e,s,c)),c.length===0?[0,Js]:(c.length===1?$=B.lyrbst:$=B.lyrfst,[c[0],$])):a===c.length-2?[c[c.length-1],B.lyrlst]:[c[a+1],B.lyrmid]};var s_=(t,e,s,i,r,_,n,l,o,h)=>t(e,s,i,r,_,n,[l[0],E.lst0(E.$ance(r,l[0]),l[0])],o,h);b.$bfs_next_=(t,e,s,i,r,_,n,l,o)=>s_(b.$bfs_des_next,t,e,s,i,r,_,n,l,o);b.$bfs_des_prev=(t,e,s,i,r,_,n,l,o)=>{let h=n[1];if(h===n[0])return[0,B.lyrbst];let f=E.dist_after(E.$ance(i,n[0]),n[0],h);if(f===1/0)return[0,Js];let c=[h],u=[],a=0;for(;c.length>0&&a!==f;)u=c,c=he(E.$nlyr(e,s,c)),a=a+1;let $;for($=0;$<c.length&&c[$]!==n[0];$++);let k;return $===0?(c=u,c.length===0||(c.length===1?k=B.lyrbst:k=B.lyrlst),[c[c.length-1],k]):$===1?[c[0],B.lyrfst]:[c[$-1],B.lyrmid]};b.$bfs_prev_=(t,e,s,i,r,_,n,l,o)=>s_(b.$bfs_des_prev,t,e,s,i,r,_,n,l,o);b.$gen_des_bfs=function*(t,e,s,i,r,_,n,l,o){let h=[n[0]];for(yield[n[0],B.lyrbst];h.length>0;)if(h=he(E.$nlyr(e,s,h)),h.length!==0)if(h.length===1)yield[h[0],B.lyrbst];else{yield[h[0],B.lyrfst];for(let f=1;f<h.length-1;f++)yield[h[f],B.lyrmid];yield[h[h.length-1],B.lyrlst]}};var Et=b.$gen_des_bfs;b.$gen_bfs=(t,e,s,i,r,_,n,l,o)=>Et(t,e,s,i,r,_,[E.lst0(E.$ance(i,n[0]),n[0])],l,o);var ts=b.$gen_bfs;b.$bfs_=(t,e,s,i,r,_,n,l,o)=>he(ts(t,e,s,i,r,_,n,l,o));b.$des_bfs_=(t,e,s,i,r,_,n,l,o)=>he(Et(t,e,s,i,r,_,n,l,o));b.$some_des_lyrs=(t,e,s,i,r,_,n,l,o)=>E.some(Ne(t,e,s,i,r,_,n,l,o),l);b.$some_lyrs=(t,e,s,i,r,_,n,l,o)=>E.some(wt(t,e,s,i,r,_,n,l,o),l);b.$des_lyr=(t,e,s,i,r,_,n,l,o)=>E.which(Ne(t,e,s,i,r,_,n,l,o),l[0]);b.$lyr=(t,e,s,i,r,_,n,l,o)=>E.which(wt(t,e,s,i,r,_,n,l,o),l[0]);b.$des_own_lyr=(t,e,s,i,r,_,n,l,o)=>{let h=n[1],f=E.dist_after(E.$ance(i,n[0]),n[0],h);if(f===1/0)return[];{let c=Ne(t,e,s,i,r,_,[h],l,o);return E.which(c,f)}};var ve=b.$des_own_lyr;b.$des_plyr=(t,e,s,i,r,_,n,l,o)=>{let h=i[n[0]];return h===0?[]:ve(t,e,s,i,r,_,[h,n[1]],l,o)};b.$breadth_=(t,e,s,i,r,_,n,l,o)=>Ee(t,e,s,i,r,_,n,l,o).indexOf(n[0]);b.$pbreadth_=(t,e,s,i,r,_,n,l,o)=>b.$plyr_(t,e,s,i,r,_,n,l,o).indexOf(i[n[0]]);b.$des_breadth=(t,e,s,i,r,_,n,l,o)=>ve(t,e,s,i,r,_,n,l,o).indexOf(n[0]);b.$des_pbreadth=(t,e,s,i,r,_,n,l,o)=>b.$des_plyr(t,e,s,i,r,_,n,l,o).indexOf(i[n[0]]);var i_=(t,e,s,i,r,_,n,l,o,h)=>t(e,s,i,r,_,n,l,o,h)[0]===l[0],r_=(t,e,s,i,r,_,n,l,o,h)=>{let f=t(e,s,i,r,_,n,l,o,h);return f[f.length-1]===l[0]},__=(t,e,s,i,r,_,n,l,o,h,f)=>t(s,i,r,_,n,l,o,h,f)&&e(s,i,r,_,n,l,o,h,f);b.$is_lyr_fst=(t,e,s,i,r,_,n,l,o)=>i_(Ee,t,e,s,i,r,_,n,l,o);b.$is_lyr_lst=(t,e,s,i,r,_,n,l,o)=>r_(Ee,t,e,s,i,r,_,n,l,o);b.$is_lyr_bst=(t,e,s,i,r,_,n,l,o)=>__(b.$is_lyr_fst,b.$is_lyr_lst,t,e,s,i,r,_,n,l,o);b.$is_des_lyr_fst=(t,e,s,i,r,_,n,l,o)=>i_(ve,t,e,s,i,r,_,n,l,o);b.$is_des_lyr_lst=(t,e,s,i,r,_,n,l,o)=>r_(ve,t,e,s,i,r,_,n,l,o);b.$is_des_lyr_bst=(t,e,s,i,r,_,n,l,o)=>__(b.$is_des_lyr_fst,b.$is_des_lyr_lst,t,e,s,i,r,_,n,l,o);function*n_(t,e,s,i,r,_,n,l,o,h){let f=t(e,s,i,r,_,n,l,o,h),c=f.indexOf(l[0]);if(!(c<0)){if(c!==f.length-1)for(let u of f.slice(c))yield u}}b.$gen_lyr_next=(t,e,s,i,r,_,n,l,o)=>n_(Ee,t,e,s,i,r,_,n,l,o);b.$gen_des_lyr_next=(t,e,s,i,r,_,n,l,o)=>n_(ve,t,e,s,i,r,_,n,l,o);function*l_(t,e,s,i,r,_,n,l,o,h){let f=t(e,s,i,r,_,n,l,o,h),c=f.indexOf(l[0]);if(c>0){let u=f.slice(c);for(let a=c-1;a>-1;a--)yield f[a]}}b.$gen_lyr_prev=(t,e,s,i,r,_,n,l,o)=>l_(Ee,t,e,s,i,r,_,n,l,o);b.$gen_des_lyr_prev=(t,e,s,i,r,_,n,l,o)=>l_(ve,t,e,s,i,r,_,n,l,o);b.$lyr_next_=(t,e,s,i,r,_,n,l,o)=>{let h=Ee(t,e,s,i,r,_,n,l,o),f=h.indexOf(n[0]);return es(f<0,0,f===h.length-1,0,h[f+1])};b.$lyr_prev_=(t,e,s,i,r,_,n,l,o)=>{let h=Ee(t,e,s,i,r,_,n,l,o),f=h.indexOf(n[0]);return es(f<0,0,f===0,0,h[f-1])};b.$des_lyr_next=(t,e,s,i,r,_,n,l,o)=>{let h=ve(t,e,s,i,r,_,n,l,o),f=h.indexOf(n[0]);return es(f<0,0,f===h.length-1,0,h[f+1])};b.$des_lyr_prev=(t,e,s,i,r,_,n,l,o)=>{let h=ve(t,e,s,i,r,_,n,l,o),f=h.indexOf(n[0]);return es(f<0,0,f===0,0,h[f-1])};function Je(t,e,s,i,r,_,n,l,o,h,f,c,u){if(!i(f[0]))return-1;if(f[1]===f[0])return 0;let a=t?[f[1],f[0]]:f,$=e(r,_,n,l,o,h,a,c,u);$=e(r,_,n,l,o,h,a,c,u);let k=-1;if(!(t===1&&!E.of(E.$ance(l,f[0]),f[1])))for(let[M,U]of $)if(s(M,f[0])){k=k+1;break}else i(M)&&(k=k+1);return k}b.$bfs_index_=(t,e,s,i,r,_,n,l,o)=>Je(0,ts,(h,f)=>h===f,h=>!0,t,e,s,i,r,_,n,l,o);b.$bfs_leaf_index_=(t,e,s,i,r,_,n,l,o)=>Je(0,ts,(h,f)=>h===f&&e[h]===0,h=>e[h]===0,t,e,s,i,r,_,n,l,o);b.$bfs_nonleaf_index_=(t,e,s,i,r,_,n,l,o)=>Je(0,ts,(h,f)=>h===f&&e[h]!==0,h=>e[h]!==0,t,e,s,i,r,_,n,l,o);b.$bfs_des_index=(t,e,s,i,r,_,n,l,o)=>Je(1,Et,(h,f)=>h===f,h=>!0,t,e,s,i,r,_,n,l,o);b.$bfs_des_leaf_index=(t,e,s,i,r,_,n,l,o)=>Je(1,Et,(h,f)=>h===f&&e[h]===0,h=>e[h]===0,t,e,s,i,r,_,n,l,o);b.$bfs_des_nonleaf_index=(t,e,s,i,r,_,n,l,o)=>Je(1,Et,(h,f)=>h===f&&e[h]!==0,h=>e[h]!==0,t,e,s,i,r,_,n,l,o);b.$des_bpl=(t,e,s,i,r,_,n,l,o)=>{let h=[],f=n[1],c=Ne(t,e,s,i,r,_,[f],l,o),u=E.$ance(i,n[0]),a=he(u);if(!a.includes(f)&&n[0]!==f)return[-1];a.reverse(),a.push(n[0]),a=a.slice(a.indexOf(f));for(let $ of a){let M=c.next().value.indexOf($);h.push(M)}return h};b.$bpl_=(t,e,s,i,r,_,n,l,o)=>{let h=E.lst0(E.$ance(i,n[0]),n[0]);return b.$des_bpl(t,e,s,i,r,_,[n[0],h],l,o)};o_.exports=b});var Xs=p((z0,c_)=>{var f_=We(),{Act:y,srchk_to_buildk:ss,FLAG_DICT:X0}=oe(),x={};x.$sdfs_next_srch_action=(t,e,s,i,r,_,n,l,o)=>{let h=o[0],f=n[0];if(h===y.DIRECTION.up){let c=s[f];if(c!==0)return new y("$rsib_",y.DIRECTION.right,c);{let u=i[f];return u===0?new y("$end_",y.DIRECTION.up,u):new y("$parent_",y.DIRECTION.up,u)}}else{let c=e[f];if(c!==0)return new y("$fstch_",y.DIRECTION.down,c);{let u=s[f];if(u!==0)return new y("$rsib_",y.DIRECTION.right,u);{let a=i[f];return a===0?new y("$end_",y.DIRECTION.up,a):new y("$parent_",y.DIRECTION.up,a)}}}};x.$sdfs_next_build_action=(t,e,s,i,r,_,n,l,o)=>{let h=x.$sdfs_next_srch_action(t,e,s,i,r,_,n,l,o);return h.k=h.d===y.DIRECTION.right||h.d===y.DIRECTION.down?ss(h.k):h.k,h};x.$sdfs_prev_srch_action=(t,e,s,i,r,_,n,l,o)=>{let h=o[0],f=n[0];if(h===y.DIRECTION.up){let c=r[f];if(c!==0)return new y("$lsib_",y.DIRECTION.left,c);{let u=i[f];return u===0?new y("$end_",y.DIRECTION.up,u):new y("$parent_",y.DIRECTION.up,u)}}else if(e[f]===0){let c=r[f];if(c!==0)return new y("$lsib_",y.DIRECTION.left,c);{let u=i[f];return u===0?new y("$end_",y.DIRECTION.up,u):new y("$parent_",y.DIRECTION.up,u)}}else{let c=_[f];return new y("$lstch_",y.DIRECTION.down,c)}};x.$sdfs_prev_build_action=(t,e,s,i,r,_,n,l,o)=>{let h=x.$sdfs_prev_srch_action(t,e,s,i,r,_,n,l,o);return h.k=h.d===y.DIRECTION.left||h.d===y.DIRECTION.down?ss(h.k,!0):h.k==="$parent_"&&s[n[0]]===0?"$add_or_goto_parent":h.k,h};x.$gen_sdfs_next_srch_action=function*(t,e,s,i,r,_,n,l,o){let h=f_.$drmost_(t,e,s,i,r,_,n,l,o);yield{k:"$self_",d:y.DIRECTION.down};let f=n[0];if(f!==h){let c=x.$sdfs_next_srch_action(t,e,s,i,r,_,[f],l,[y.DIRECTION.down]);for(;c.id!==0&&(yield{k:c.k,d:c.d},c.id!==h);)c=x.$sdfs_next_srch_action(t,e,s,i,r,_,[c.id],l,[c.d])}};x.$gen_sdfs_next_build_action=function*(t,e,s,i,r,_,n,l,o){let h=x.$gen_sdfs_next_srch_action(t,e,s,i,r,_,n,l,o);for(let f of h)f.k=f.d===y.DIRECTION.right||f.d===y.DIRECTION.down?ss(f.k):f.k,yield f};x.$gen_sdfs_prev_srch_action=function*(t,e,s,i,r,_,n,l,o){let h=f_.$root_(t,e,s,i,r,_,n,l,o);yield{k:"$self_",d:y.DIRECTION.left,id:n[0]};let f=n[0];if(f!==h){let c=x.$sdfs_prev_srch_action(t,e,s,i,r,_,[f],l,[y.DIRECTION.left]);for(;c.id!==0&&(yield{k:c.k,d:c.d,id:c.id},c.id!==h);)c=x.$sdfs_prev_srch_action(t,e,s,i,r,_,[c.id],l,[c.d])}};x.$gen_sdfs_prev_build_action=function*(t,e,s,i,r,_,n,l,o){let h=x.$gen_sdfs_prev_srch_action(t,e,s,i,r,_,n,l,o);for(let f of h)f.k=f.d===y.DIRECTION.left||f.d===y.DIRECTION.down?ss(f.k,!0):f.k==="$parent_"&&s[f.id]===0?"$add_or_goto_parent":f.k,yield f};c_.exports=x});var Tt=p((Q0,d_)=>{var $e=z(),vt=We(),A={};A.$gen_ance=(t,e,s,i,r,_,n,l,o)=>$e.$ance(i,n[0]);A.$gen_child_from_fst=(t,e,s,i,r,_,n,l,o)=>$e.$fch(e,s,n[0]);A.$gen_child_from_lst=(t,e,s,i,r,_,n,l,o)=>$e.$lch(_,r,n[0]);A.$gen_sib_from_fst=(t,e,s,i,r,_,n,l,o)=>$e.$sibff(e,s,i,n[0]);A.$gen_sib_from_lst=(t,e,s,i,r,_,n,l,o)=>$e.$sibfl(_,r,i,n[0]);A.$gen_psib=(t,e,s,i,r,_,n,l,o)=>$e.$psib(r,n[0]);A.$gen_fsib=(t,e,s,i,r,_,n,l,o)=>$e.$fsib(s,n[0]);A.$gen_rmost=(t,e,s,i,r,_,n,l,o)=>$e.$drmost(_,n[0]);A.$gen_lmost=(t,e,s,i,r,_,n,l,o)=>$e.$dlmost(e,n[0]);function*a_(t,e,s,i,r,_,n,l,o,h,f){let c=o[0];for(;c!==0&&(yield c,c!==e);)c=vt[t](s,i,r,_,n,l,[c],h,f)}A.$gen_sdfs_next=function*(t,e,s,i,r,_,n,l,o){let h=vt.$drmost_(t,e,s,i,r,_,n,l,o);yield*a_("$sdfs_next_",h,t,e,s,i,r,_,n,l,o)};A.$gen_sdfs_prev=function*(t,e,s,i,r,_,n,l,o){let h=vt.$root_(t,e,s,i,r,_,n,l,o);yield*a_("$sdfs_prev_",h,t,e,s,i,r,_,n,l,o)};function*is(t,e,s,i,r,_,n,l,o,h){let f=A[t](e,s,i,r,_,n,l,o,h);for(let c of f)s[c]===0&&(yield c)}A.$gen_sdfs_next_leaf=function*(t,e,s,i,r,_,n,l,o){yield*is("$gen_sdfs_next",t,e,s,i,r,_,n,l,o)};A.$gen_sdfs_prev_leaf=function*(t,e,s,i,r,_,n,l,o){yield*is("$gen_sdfs_prev",t,e,s,i,r,_,n,l,o)};function*rs(t,e,s,i,r,_,n,l,o,h){let f=A[t](e,s,i,r,_,n,l,o,h);for(let c of f)s[c]!==0&&(yield c)}A.$gen_sdfs_next_nonleaf=function*(t,e,s,i,r,_,n,l,o){yield*rs("$gen_sdfs_next",t,e,s,i,r,_,n,l,o)};A.$gen_sdfs_prev_nonleaf=function*(t,e,s,i,r,_,n,l,o){yield*rs("$gen_sdfs_prev",t,e,s,i,r,_,n,l,o)};A.$gen_edfs_next=function*(t,e,s,i,r,_,n,l,o){let h=n[0];for(;h!==0;)yield h,h=vt.$edfs_next_(t,e,s,i,r,_,[h],l,o)};A.$gen_edfs_prev=function*(t,e,s,i,r,_,n,l,o){let h=n[0];for(;h!==0;)yield h,h=vt.$edfs_prev_(t,e,s,i,r,_,[h],l,o)};A.$gen_edfs_next_leaf=function*(t,e,s,i,r,_,n,l,o){yield*is("$gen_edfs_next",t,e,s,i,r,_,n,l,o)};A.$gen_edfs_prev_leaf=function*(t,e,s,i,r,_,n,l,o){yield*is("$gen_edfs_prev",t,e,s,i,r,_,n,l,o)};A.$gen_edfs_next_nonleaf=function*(t,e,s,i,r,_,n,l,o){yield*rs("$gen_edfs_next",t,e,s,i,r,_,n,l,o)};A.$gen_edfs_prev_nonleaf=function*(t,e,s,i,r,_,n,l,o){yield*rs("$gen_edfs_prev",t,e,s,i,r,_,n,l,o)};d_.exports=A});var zs=p((Z0,p_)=>{var Q=z(),u_=Tt(),ie={};ie.$ance_dist=(t,e,s,i,r,_,n,l,o)=>Q.dist_after(Q.$ance(i,n[0]),n[0],n[1]);ie.$sib_dist=(t,e,s,i,r,_,n,l,o)=>Q.dist_dual(Q.$sibff(e,s,i,n[0]),n[0],n[1]);function Xe(t,e,s,i,r,_,n,l,o,h){let f=l[0],c=l[1];return Q.of(Q.$ance(r,f),c)?Q.seq(u_[t](e,s,i,r,_,n,[c],o,h),f):-1}ie.$sdfs_des_index=(t,e,s,i,r,_,n,l,o)=>n[0]===n[1]?0:Xe("$gen_sdfs_next",t,e,s,i,r,_,n,l,o);ie.$sdfs_des_leaf_index=(t,e,s,i,r,_,n,l,o)=>n[0]===n[1]&&e[n[0]]===0?0:Xe("$gen_sdfs_next_leaf",t,e,s,i,r,_,n,l,o);ie.$sdfs_des_nonleaf_index=(t,e,s,i,r,_,n,l,o)=>n[0]===n[1]&&e[n[0]]!==0?0:Xe("$gen_sdfs_next_nonleaf",t,e,s,i,r,_,n,l,o);ie.$edfs_des_index=(t,e,s,i,r,_,n,l,o)=>n[0]===n[1]?0:Xe("$gen_edfs_prev",t,e,s,i,r,_,n,l,o);ie.$edfs_des_leaf_index=(t,e,s,i,r,_,n,l,o)=>n[0]===n[1]&&e[n[0]]!==0?0:Xe("$gen_edfs_prev_leaf",t,e,s,i,r,_,n,l,o);ie.$edfs_des_nonleaf_index=(t,e,s,i,r,_,n,l,o)=>n[0]===n[1]&&e[n[0]]!==0?0:Xe("$gen_edfs_prev_nonleaf",t,e,s,i,r,_,n,l,o);ie.$des_spl=(t,e,s,i,r,_,n,l,o)=>{let h=[],f=n[1];if(f===n[0])return[];let c=!1,u=Q.$ance(i,n[0]);for(let a of u){if(a===f){c=!0;break}let $=Q.seq(Q.$sibff(e,s,i,a),a);h.unshift($)}return c?(h.push(Q.seq(Q.$sibff(e,s,i,n[0]),n[0])),h):[-1]};ie.$des_offset=(t,e,s,i,r,_,n,l,o)=>{let h=n[1],f=u_.$gen_sdfs_next(t,e,s,i,r,_,[h],l,o),c=0,u=!1,a=!1;for(let $ of f){if(n[0]===$){if(a=!0,e[$]===0)return c;u=!0}else if(e[$]===0&&u)return c;e[$]===0&&(c=c+1)}return a?c:-1};p_.exports=ie});var g_=p((K0,b_)=>{var L=z(),Qs=We(),_s=Tt(),ua=zs(),$_=Xs(),j={};j.$depth_=(t,e,s,i,r,_,n,l,o)=>L.count(L.$ance(i,n[0]));j.$children_count_=(t,e,s,i,r,_,n,l,o)=>L.count(L.$fch(e,s,n[0]));j.$sibseq_=(t,e,s,i,r,_,n,l,o)=>L.seq(L.$sibff(e,s,i,n[0]),n[0]);j.$sibs_count_=(t,e,s,i,r,_,n,l,o)=>L.count(L.$sibff(e,s,i,n[0]));j.$psibs_count_=(t,e,s,i,r,_,n,l,o)=>L.count(L.$psib(r,n[0]));j.$fsibs_count_=(t,e,s,i,r,_,n,l,o)=>L.count(L.$fsib(s,n[0]));j.$spl_=(t,e,s,i,r,_,n,l,o)=>{let h=L.reverse_then_push_self(L.$ance(i,n[0]),n[0]);return h=h.slice(1),h.map(c=>L.seq(L.$sibff(e,s,i,c),c))};j.$length_=(t,e,s,i,r,_,n,l,o)=>L.count(_s.$gen_sdfs_next(t,e,s,i,r,_,n,l,o));j.$width_=(t,e,s,i,r,_,n,l,o)=>L.count(_s.$gen_sdfs_next_leaf(t,e,s,i,r,_,n,l,o));j.$nonleaf_length_=(t,e,s,i,r,_,n,l,o)=>L.count(_s.$gen_sdfs_next_nonleaf(t,e,s,i,r,_,n,l,o));j.$offset_=(t,e,s,i,r,_,n,l,o)=>{let h=Qs.$root_(t,e,s,i,r,_,n,l,o);return ua.$des_offset(t,e,s,i,r,_,[n[0],h],l)};["sdfs_next_srch_action_list","sdfs_next_build_action_list","sdfs_prev_srch_action_list","sdfs_prev_build_action_list"].forEach(t=>{j["$"+t+"_"]=(e,s,i,r,_,n,l,o,h)=>Array.from($_["$gen_"+t.replace("_list","")](e,s,i,r,_,n,l,o,h))});j.$height_=(t,e,s,i,r,_,n,l,o)=>{let h=1,f=h,c=$_.$gen_sdfs_next_srch_action(t,e,s,i,r,_,[n[0]],l,o);for(let u of c)u.k==="$fstch_"?h=h+1:u.k==="$parent_"&&(h=h-1),h>f&&(f=h);return f};var pa=(t,e,s,i,r,_,n,l,o,h)=>{let f=Qs.$root_(e,s,i,r,_,n,l,o,h),c=t.includes("sdfs")?f:Qs.$dlmost_(e,s,i,r,_,n,[f],o,h),u=_s[t](e,s,i,r,_,n,[c],o,h);return L.seq(u,l[0])};["$gen_sdfs_next","$gen_sdfs_next_leaf","$gen_sdfs_next_nonleaf","$gen_edfs_next","$gen_edfs_next_leaf","$gen_edfs_next_nonleaf"].forEach(t=>{let e=t.replace("gen_","").replace("_next","")+"_index_";j[e]=(s,i,r,_,n,l,o,h,f)=>pa(t,s,i,r,_,n,l,o,h,f)});b_.exports=j});var m_=p((eb,y_)=>{var F=z(),H={};H.$is_root_of=(t,e,s,i,r,_,n,l,o)=>i[n[0]]===0&&n[0]===n[1]||F.lst0(F.$ance(i,n[1]),0)===n[0];H.$is_parent_of=(t,e,s,i,r,_,n,l,o)=>i[n[1]]===n[0];H.$is_ance_of=(t,e,s,i,r,_,n,l,o)=>F.of(F.$ance(i,n[1]),n[0]);H.$is_inclusive_ance_of=(t,e,s,i,r,_,n,l,o)=>n[0]===n[1]||F.of(F.$ance(i,n[1]),n[0]);H.$is_child_of=(t,e,s,i,r,_,n,l,o)=>F.of(F.$fch(e,s,n[1]),n[0]);H.$is_fstch_of=(t,e,s,i,r,_,n,l,o)=>e[n[1]]===n[0];H.$is_lstch_of=(t,e,s,i,r,_,n,l,o)=>_[n[1]]===n[0];H.$is_des_of=(t,e,s,i,r,_,n,l,o)=>F.of(F.$ance(i,n[0]),n[1]);H.$is_inclusive_des_of=(t,e,s,i,r,_,n,l,o)=>n[0]===n[1]||F.of(F.$ance(i,n[0]),n[1]);H.$is_fsib_of=(t,e,s,i,r,_,n,l,o)=>F.of(F.$fsib(s,n[1]),n[0]);H.$is_rsib_of=(t,e,s,i,r,_,n,l,o)=>s[n[1]]===n[0];H.$is_psib_of=(t,e,s,i,r,_,n,l,o)=>F.of(F.$psib(r,n[1]),n[0]);H.$is_lsib_of=(t,e,s,i,r,_,n,l,o)=>r[n[1]]===n[0];H.$is_sib_of=(t,e,s,i,r,_,n,l,o)=>n[0]!==n[1]&&F.of(F.$sibff(e,s,i,n[1]),n[0]);H.$is_inclusive_sib_of=(t,e,s,i,r,_,n,l,o)=>n[0]===n[1]||F.of(F.$sibff(e,s,i,n[1]),n[0]);y_.exports=H});var w_=p((tb,k_)=>{var V=z(),Ce={};Ce.$ance=(t,e,s,i,r,_,n,l,o)=>V.which(V.$ance(i,n[0]),l[0]);Ce.$plance=(t,e,s,i,r,_,n,l,o)=>{let h=V.reverse_then_push_self(V.$ance(i,n[0]),n[0]);return V.which(h,l[0])};Ce.$child=(t,e,s,i,r,_,n,l,o)=>V.which(V.$fch(e,s,n[0]),l[0]);Ce.$sib=(t,e,s,i,r,_,n,l,o)=>V.which(V.$sibff(e,s,i,n[0]),l[0]);Ce.$psib=(t,e,s,i,r,_,n,l,o)=>V.which(V.$psib(r,n[0]),l[0]);Ce.$fsib=(t,e,s,i,r,_,n,l,o)=>V.which(V.$fsib(s,n[0]),l[0]);k_.exports=Ce});var S_=p((sb,T_)=>{var E_=z(),v_={};v_.$get_with_spl=(t,e,s,i,r,_,n,l,o)=>{let h=n[0],f=o[0];for(let c of f)if(h=E_.which(E_.$fch(e,s,h),c),h===0)break;return h};T_.exports=v_});var I_=p((ib,D_)=>{var J=z(),Le={};Le.$some_ances=(t,e,s,i,r,_,n,l,o)=>J.some(J.$ance(i,n[0]),l);Le.$some_plances=(t,e,s,i,r,_,n,l,o)=>{let h=J.reverse_then_push_self(J.$ance(i,n[0]),n[0]);return J.some(h,l)};Le.$some_children=(t,e,s,i,r,_,n,l,o)=>J.some(J.$fch(e,s,n[0]),l);Le.$some_sibs=(t,e,s,i,r,_,n,l,o)=>J.some(J.$sibff(e,s,i,n[0]),l);Le.$some_psibs=(t,e,s,i,r,_,n,l,o)=>J.some(J.$psib(r,n[0]),l);Le.$some_fsibs=(t,e,s,i,r,_,n,l,o)=>J.some(J.$fsib(s,n[0]),l);D_.exports=Le});var R_=p((_b,q_)=>{var rb=Ye(),A_=z(),{FLAG_DICT:Te}=oe(),I={},$a=(t,e,s,i,r,_,n,l,o)=>s[n[0]]?[s[n[0]],0]:[i[n[0]],1];I.$sedfs_next=(t,e,s,i,r,_,n,l,o)=>{if(o[0]===Te.close)return $a(t,e,s,i,r,_,n,l,o);{let f=e[n[0]];return f?[f,Te.open]:[n[0],Te.close]}};I.$sedfs_next_after_open_=(t,e,s,i,r,_,n,l,o)=>I.$sedfs_next(t,e,s,i,r,_,n,l,[0]);I.$sedfs_next_after_close_=(t,e,s,i,r,_,n,l,o)=>I.$sedfs_next(t,e,s,i,r,_,n,l,[1]);I.$gen_sedfs_next=function*(t,e,s,i,r,_,n,l,o){let h=n[0],f=o[0];for(yield[h,f];!(h===n[0]&&f===Te.close);)[h,f]=I.$sedfs_next(t,e,s,i,r,_,[h],[],[f]),yield[h,f]};I.$gen_sedfs_next_after_open=function*(t,e,s,i,r,_,n,l,o){yield*I.$gen_sedfs_next(t,e,s,i,r,_,n,l,[0])};I.$gen_sedfs_next_after_close=function*(t,e,s,i,r,_,n,l,o){yield*I.$gen_sedfs_next(t,e,s,i,r,_,n,l,[1])};I.$sedfs_=(t,e,s,i,r,_,n,l,o)=>Array.from(I.$gen_sedfs_next_after_open(t,e,s,i,r,_,n,l,o));var ba=(t,e,s,i,r,_,n,l,o)=>r[n[0]]?[r[n[0]],1]:[i[n[0]],0];I.$sedfs_prev=(t,e,s,i,r,_,n,l,o)=>o[0]===Te.open?ba(t,e,s,i,r,_,n,l,o):e[n[0]]?[_[n[0]],Te.close]:[n[0],Te.open];I.$sedfs_prev_before_open_=(t,e,s,i,r,_,n,l,o)=>I.$sedfs_prev(t,e,s,i,r,_,n,l,[0]);I.$sedfs_prev_before_close_=(t,e,s,i,r,_,n,l,o)=>I.$sedfs_prev(t,e,s,i,r,_,n,l,[1]);I.$gen_sedfs_prev=function*(t,e,s,i,r,_,n,l,o){let h=A_.lst0(A_.$ance(i,n[0]),n[0]),f=n[0],c=o[0];for(yield[f,c];!(f===h&&c===Te.open);)[f,c]=I.$sedfs_prev(t,e,s,i,r,_,[f],l,[c]),yield[f,c]};I.$gen_sedfs_prev_before_open=function*(t,e,s,i,r,_,n,l,o){yield*I.$gen_sedfs_prev(t,e,s,i,r,_,n,l,[0])};I.$gen_sedfs_prev_before_close=function*(t,e,s,i,r,_,n,l,o){yield*I.$gen_sedfs_prev(t,e,s,i,r,_,n,l,[1])};q_.exports=I});var N_=p((nb,O_)=>{var Fe=z(),ze=Tt(),re=Array.from,X={};X.$ances_=(t,e,s,i,r,_,n,l,o)=>re(Fe.$ance(i,n[0]));X.$plances_=(t,e,s,i,r,_,n,l,o)=>Fe.reverse_then_push_self(Fe.$ance(i,n[0]),n[0]);X.$children_=(t,e,s,i,r,_,n,l,o)=>re(Fe.$fch(e,s,n[0]));X.$sibs_=(t,e,s,i,r,_,n,l,o)=>re(Fe.$sibff(e,s,i,n[0]));X.$psibs_=(t,e,s,i,r,_,n,l,o)=>re(Fe.$psib(r,n[0]));X.$fsibs_=(t,e,s,i,r,_,n,l,o)=>re(Fe.$fsib(s,n[0]));X.$sdfs_=(t,e,s,i,r,_,n,l,o)=>re(ze.$gen_sdfs_next(t,e,s,i,r,_,n,l,o));X.$sdfs_leafs_=(t,e,s,i,r,_,n,l,o)=>re(ze.$gen_sdfs_next_leaf(t,e,s,i,r,_,n,l,o));X.$sdfs_nonleafs_=(t,e,s,i,r,_,n,l,o)=>re(ze.$gen_sdfs_next_nonleaf(t,e,s,i,r,_,n,l,o));X.$edfs_=(t,e,s,i,r,_,n,l,o)=>re(ze.$gen_edfs_next(t,e,s,i,r,_,n,l,o));X.$edfs_leafs_=(t,e,s,i,r,_,n,l,o)=>re(ze.$gen_edfs_next_leaf(t,e,s,i,r,_,n,l,o));X.$edfs_nonleafs_=(t,e,s,i,r,_,n,l,o)=>re(ze.$gen_edfs_next_nonleaf(t,e,s,i,r,_,n,l,o));O_.exports=X});var F_=p((lb,L_)=>{var{_un:ga,_nu:Z,forlst:ya}=G(),Qe=Ye(),O={},be={cant_add_sib_to_root:new Error("cant_add_sib_to_root"),only_root_can_add_parent:new Error("only_root_can_add_parent"),can_not_connto_nonleaf:new Error("can_not_connto_nonleaf"),already_in_a_tree:new Error("already_in_a_tree"),can_not_replace_tree_with_nonroot:new Error("can_not_replace_with_nonroot"),can_not_replace_node_with_non_isolated:new Error("ERROR_DICT.can_not_replace_with_non_isolated"),in_same_ance_chain:new Error("in_same_ance_chain")};O.ERROR_DICT=be;O.pend=(t,e,s,i,r)=>{let{fc:_,rb:n,pr:l,lb:o,lc:h}=e,f=i.$id_;if(r=r??e.node(s),r!==Z)if(Qe.$is_root(l,r.$id_)&&f!==r.$id_)Qe[t](_,n,l,o,h,f,r.$id_);else throw be.already_in_a_tree;return r};O.asib=(t,e,s,i,r)=>{let{fc:_,rb:n,pr:l,lb:o,lc:h}=e,f=i.$id_;if(Qe.$is_root(l,f))throw be.cant_add_sib_to_root;if(r=r??e.node(s),r!==Z)if(Qe.$is_root(l,r.$id_)&&f!==r.$id_)Qe[t](_,n,l,o,h,f,r.$id_);else throw be.already_in_a_tree;return r};O.multi_add=(t,e,s,i,r,_,n)=>{let l;return _ instanceof Array?l=_:l=Array.from({length:_}).map(o=>s.node(i)),n?ya(l,o=>e(t,s,i,r,o)):l.forEach(o=>e(t,s,i,r,o)),l.filter(o=>o!==Z)};O.$insert_child_at=(t,e,s,i)=>{let r=e.$children_count_-1;s<0&&(s=0),s>r&&(s=r);let _=e.$child(s);return t==="before"?_===Z?e.$prepend_child(i):_.$add_lsib(i):_===Z?e.$append_child(i):_.$add_rsib(i)};O.$insert_children_at=(t,e,s,i,r,_)=>{let n=i.$children_count_-1;r<0&&(r=0),r>n&&(r=n);let l=_ instanceof Array?_:Array.from({length:_}).map(h=>e.node(s)),o=i.$child(r);return t==="before"?o===Z?i.$prepend_children(l):o.$add_lsibs(l):o===Z?i.$append_children(l):o.$add_rsibs(l)};O.$add_parent=(t,e,s)=>{if(s.$is_root()){let i=t.node(e);return i===Z||i.$prepend_child(s),i}else throw be.only_root_can_add_parent};O.$connto=(t,e)=>{if(e.$is_leaf())return e.$prepend_child(t),t;throw be.can_not_connto_nonleaf};O.$disconn=(t,e)=>{if(!e.$is_root()){let{fc:s,rb:i,pr:r,lb:_,lc:n}=t;Qe.$disconn(s,i,r,_,n,e.$id_)}return e};O.$rm_fstch=t=>{if(t.$is_leaf())return Z;{let e=t.$fstch_;return e.$disconn(),e}};O.$rm_lstch=t=>{if(t.$is_leaf())return Z;{let e=t.$lstch_;return e.$disconn(),e}};O.$rm_child=(t,e)=>{if(t.$is_leaf())return Z;{let s=t.$child(e);return s.$disconn(),s}};O.$rm_children=t=>{if(t.$is_leaf())return[];{let e=t.$children_;return e.forEach(s=>{s.$disconn()}),e}};O.$rm_some_children=(t,e)=>{if(t.$is_leaf())return[];{let s=t.$some_children(e);return s.forEach(i=>{i.$disconn()}),s}};function C_(t,e){if(!t.$is_root()){let s=t.$lsib_;if(s===Z){let i=t.$parent_;t.$disconn(),i.$prepend_child(e)}else t.$disconn(),s.$add_rsib(e)}}O.$replace_tree=(t,e)=>{if(e.$is_root())return C_(t,e),e;throw be.can_not_replace_tree_with_nonroot};O.$replace_node=(t,e)=>{if(e.$is_isolated()){let s=t.$rm_children();return e.$append_children(s),C_(t,e),e}else throw be.can_not_replace_node_with_non_isolated};function ma(t,e){return!t.$is_inclusive_ance_of(e)&&!e.$is_inclusive_ance_of(t)}O.$swap_tree=(t,e)=>{if(!ma(t,e))throw be.in_same_ance_chain;if(t.$is_root()){if(!e.$is_root()){let s=e.$replace_tree();s.$replace_tree(t),s.$erase()}}else if(e.$is_root()){let s=t.$replace_tree();s.$replace_tree(e),s.$erase()}else{let s=t.$replace_tree(),i=e.$replace_tree();s.$replace_tree(e),i.$replace_tree(t),s.$erase(),i.$erase()}return e};O.$swap_node=(t,e)=>{let s=t.$replace_node(),i=e.$replace_node();return s.$replace_node(e),i.$replace_node(t),s.$erase(),i.$erase(),e};O.$erase=(t,e,s)=>{if(t.rent_pool_!==ga&&t.rent_pool_.includes(s)){let _=t.rent_pool_.indexOf(s);t.rent_pool_.splice(_,1)}let i=s.$id_,r=s.$rm_children();return s.$disconn(),t.idpool.rtrn(i),t.slots_[i]=0,t.fc[i]=0,t.rb[i]=0,t.pr[i]=0,t.lb[i]=0,t.lc[i]=0,s[e.SYM_DICT.release_forest](),r};O.$rtrn=(t,e,s)=>{let i=s.$id_,r=s.$rm_children();return s.$disconn(),t.rtrn(s),t.fc[i]=0,t.rb[i]=0,t.pr[i]=0,t.lb[i]=0,t.lc[i]=0,r};L_.exports=O});var H_=p((hb,M_)=>{var{_nu:Dt}=G(),fe=Kt(),ob=Ye(),{buildk_to_srchk:ka}=oe(),wa=Ps(),Ea=h_(),va=Xs(),Ta=g_(),Sa=We(),Da=m_(),Ia=zs(),Aa=w_(),qa=S_(),Ra=I_(),Oa=Tt(),Na=R_(),Ca=N_(),La={cspis:wa,cspbfs:Ea,cspact:va,cspget:Ta,ndget:Sa,cspof:Da,getwnd:Ia,ndgetwi:Aa,ndsgetwis:Ra,ndgen:Oa,sedfs:Na,ndsget:Ca,ndgetwo:qa};function Fa(){let t={};for(let e in fe)e.slice(0,4)==="add_"&&(t[e]=fe[e]);return t}var x_=Fa(),Ga=new Set(["IS"]);function xa(t){let e={};for(let s of t)Ga.has(s.cate)||fe[s.cate].forEach(i=>{e[i]=La[s.lib][i]});return e}function q(t,e){let s=e.$forest_,i=e[t.SYM_DICT.get_ctor],{idpool:r,fc:_,rb:n,pr:l,lb:o,lc:h}=s;return[s,i,r,_,n,l,o,h]}var Ma=t=>{let e=t.split("$");return{args:e[1],rtrn:e[2]}},Ha=(t,e,s,i)=>{let[r,_,n,l,o,h,f,c]=q(t,i),u=[i.$id_],a=s(n,l,o,h,f,c,u,[],[]);return fe[e](r,a)},Pa=(t,e,s,i,r)=>{let[_,n,l,o,h,f,c,u]=q(t,i),a=[i.$id_,r.$id_],$=s(l,o,h,f,c,u,a,[],[]);return fe[e](_,$)},ja=(t,e,s,i,r)=>{let[_,n,l,o,h,f,c,u]=q(t,i),a=[i.$id_],$=s(l,o,h,f,c,u,a,[r],[]);return fe[e](_,$)},Ua=(t,e,s,i,r)=>{let[_,n,l,o,h,f,c,u]=q(t,i),a=[i.$id_],$=s(l,o,h,f,c,u,a,[],[r]);return fe[e](_,$)},Ba=(t,e,s,i,r)=>{let[_,n,l,o,h,f,c,u]=q(t,i),a=[i.$id_],$=s(l,o,h,f,c,u,a,r,[]);return fe[e](_,$)},T={};function Ya(t,e,s,i,r){Object.defineProperty(t.prototype,e,{get:function(){return i(t,r,s,this)}})}function St(t,e,s){T[t]=i=>{let r=xa(x_[t]);for(let _ in r){let n=r[_];_[_.length-1]==="_"?Ya(i,_,n,s,e):i.prototype[_]=function(o){return s(i,e,n,this,o)}}}}function Wa(){for(let t in x_){let{args:e,rtrn:s}=Ma(t);e==="args_id0_"?St(t,s,Ha):e==="args_id01_"?St(t,s,Pa):e==="args_id0_idx0_"?St(t,s,ja):e==="args_id0_o0_"?St(t,s,Ua):e==="args_id0_idxs_"&&St(t,s,Ba)}}Wa();var v=F_();function G_(t,e,s){fe[e].forEach(i=>{t.prototype[i]=function(r){let[_,n,l,o,h,f,c,u]=q(t,this);return s(i,_,n,this,r)}})}T.add_bsc_add_op=t=>{G_(t,"BSC_PEND_OP",v.pend),G_(t,"BSC_ASIB_OP",v.asib)};function ns(t,e,s,i,r){t.prototype[e]=function(_){let[n,l,o,h,f,c,u,a]=q(t,this);return v.multi_add(s,i,n,l,this,_,r)}}T.add_multi_add_op=t=>{ns(t,"$prepend_children","$prepend_child",v.pend,!0),ns(t,"$append_children","$append_child",v.pend,!1),ns(t,"$add_lsibs","$add_lsib",v.asib,!1),ns(t,"$add_rsibs","$add_rsib",v.asib,!0)};T.add_$insert_child_before=t=>{t.prototype.$insert_child_before=function(e,s){let[i,r,_,n,l,o,h,f]=q(t,this);return v.$insert_child_at("before",this,e,s)}};T.add_$insert_child_after=t=>{t.prototype.$insert_child_after=function(e,s){let[i,r,_,n,l,o,h,f]=q(t,this);return v.$insert_child_at("after",this,e,s)}};T.add_$insert_children_before=t=>{t.prototype.$insert_children_before=function(e,s){let[i,r,_,n,l,o,h,f]=q(t,this);return v.$insert_children_at("before",i,r,this,e,s)}};T.add_$insert_children_after=t=>{t.prototype.$insert_children_after=function(e,s){let[i,r,_,n,l,o,h,f]=q(t,this);return v.$insert_children_at("after",i,r,this,e,s)}};T.add_$add_parent=t=>{t.prototype.$add_parent=function(){let[e,s,i,r,_,n,l,o]=q(t,this);return v.$add_parent(e,s,this)}};T.add_$connto=t=>{t.prototype.$connto=function(e){return v.$connto(this,e)}};T.add_$add_parent_and_lsib=t=>{t.prototype.$add_parent_and_lsib=function(){let[e,s,i,r,_,n,l,o]=q(t,this),h=v.$add_parent(e,s,this),f=v.asib("$add_lsib",e,s,this);return[h,f]}};T.add_$add_or_goto_parent=t=>{t.prototype.$add_or_goto_parent=function(){let[e,s,i,r,_,n,l,o]=q(t,this);return this.$parent_!==Dt?this.$parent_:v.$add_parent(e,s,this)}};T.add_$disconn=t=>{t.prototype.$disconn=function(){let[e,s,i,r,_,n,l,o]=q(t,this);return v.$disconn(e,this)}};T.add_$rm_fstch=t=>{t.prototype.$rm_fstch=function(){return v.$rm_fstch(this)}};T.add_$rm_lstch=t=>{t.prototype.$rm_lstch=function(){return v.$rm_lstch(this)}};T.add_$rm_child=t=>{t.prototype.$rm_child=function(e){return v.$rm_child(this,e)}};T.add_$rm_children=t=>{t.prototype.$rm_children=function(){return v.$rm_children(this)}};T.add_$rm_some_children=t=>{t.prototype.$rm_some_children=function(e){return v.$rm_some_children(this,e)}};T.add_$replace_tree=t=>{t.prototype.$replace_tree=function(e){let[s,i,r,_,n,l,o,h]=q(t,this);return e=e??s.tree(i),v.$replace_tree(this,e)}};T.add_$replace_child_tree_at=t=>{t.prototype.$replace_child_tree_at=function(e,s){let i=this.$child(e);return i===Dt?Dt:i.$replace_tree(s)}};T.add_$replace_node=t=>{t.prototype.$replace_node=function(e){let[s,i,r,_,n,l,o,h]=q(t,this);return e=e??s.node(i),v.$replace_node(this,e)}};T.add_$replace_child_node_at=t=>{t.prototype.$replace_child_node_at=function(e,s){let i=this.$child(e);return i===Dt?Dt:i.$replace_node(s)}};T.add_$swap_tree=t=>{t.prototype.$swap_tree=function(e){let[s,i,r,_,n,l,o,h]=q(t,this);return v.$swap_tree(this,e)}};T.add_$swap_node=t=>{t.prototype.$swap_node=function(e){let[s,i,r,_,n,l,o,h]=q(t,this);return v.$swap_node(this,e)}};T.add_$clone=t=>{t.prototype.$gen_sdfs_next_build_ctors=function*(){let e=this.$gen_sdfs_next_srch_action(),s=this;for(let i of e){let{k:r,d:_}=i;s=s[r],ctor=s.constructor,yield ctor}},t.prototype.$clone=function(e=t.DFLT_CLONE_FUNC){let[s,i,r,_,n,l,o,h]=q(t,this),f=this.$sdfs_next_build_action_list_,c=this.$new();e(this,c);let u=this,a=c,$=Array.from(this.$gen_sdfs_next_build_ctors()).slice(1);return f.slice(1).forEach((k,M)=>{let U=fe.is_getter_fn(k.k);if(U)a=a[k.k];else{let le=s.node($[M]);a=a[k.k](le)}let te=U?k.k:ka(k.k);u=u[te],e(u,a)}),c}};T.add_$erase=t=>{t.prototype.$erase=function(){let[e,s,i,r,_,n,l,o]=q(t,this);return v.$erase(e,s,this)}};T.add_$erase_r=t=>{t.prototype.$erase_r=function(){let[e,s,i,r,_,n,l,o]=q(t,this),h=this.$sdfs_;return h.forEach(f=>v.$erase(e,s,f)),h}};T.add_$rtrn=t=>{t.prototype.$rtrn=function(){let[e,s,i,r,_,n,l,o]=q(t,this);return v.$rtrn(e,s,this)}};T.add_$rtrn_r=t=>{t.prototype.$rtrn_r=function(){let[e,s,i,r,_,n,l,o]=q(t,this),h=this.$sdfs_;return h.forEach(f=>v.$rtrn(e,s,f)),h}};M_.exports=T});var B_=p((cb,U_)=>{var{_nu:ls}=G(),{RELATION_ANCE:Va,RELATION_SIB:fb}=Kt();function os(t,e){if(t.$forest_===ls||e.$forest_===ls)return[];if(t.$fid_!==e.$fid_)return[];{let s=t.$plances_,i=e.$plances_,r=-1,_=s.length<=i.length?s.length:i.length;for(let n=0;n<_&&s[n]===i[n];n++)r=n;return r>=0?[s.slice(0,r+1),s,i]:[]}}var Ja=(t,e)=>{let s=os(t,e);return s.length>0?s[0]:ls},Xa=(t,e)=>{let s=os(t,e);return s.length>0?s[0][s[0].length-1]:ls};function za(t,e){let s=os(t,e);if(s.length>0){let[i,r,_]=s;return _.length-i.length+r.length-i.length}else return 1/0}function Qa(t,e){let s=os(t,e);if(s.length>0){let[i,r,_]=s;return r=r.slice(i.length),r.reverse(),_=_.slice(i.length),r.concat(_)}else return[]}var Za={$cmmn_ances:Ja,$fst_cmmn_ance:Xa,$dist:za,$path_to:Qa};function Ka(t){for(let e of Va)t.prototype[e]=function(s){return Za[e](this,s)}}function P_(t,e,s){let i=e.$gen_sib_from_fst(),r=[];for(let _ of i)_[t]()&&(s||_!==e)&&r.push(_);return r}function j_(t,e,s){let i=e.$gen_sib_from_fst();for(let r of i)if(r[t]()){if(s)return!0;if(r!==e)return!0}return!1}function ed(t){t.prototype.$has_leaf_sib=function(e=!0){return j_("$is_leaf",this,e)},t.prototype.$has_nonleaf_sib=function(e=!0){return j_("$is_nonleaf",this,e)},t.prototype.$get_leaf_sibs=function(e=!0){return P_("$is_leaf",this,e)},t.prototype.$get_nonleaf_sibs=function(e=!0){return P_("$is_nonleaf",this,e)}}U_.exports={add_ance_relation:Ka,add_sib_relation:ed}});var X_=p((ab,J_)=>{var{_un:Y_,OASGN:td}=G();function W_(t,e=(s,i)=>{}){let i=t.$clone(e).$lyrs_;for(let r=i.length-1;r>-1;r--){let _=i[r];for(let n=0;n<_.length;n++){let l=_[n];td(l,{height:i.length-r,children_count:0,length:1})}}for(let r=i.length-1;r>0;r--){let _=i[r];for(let n=0;n<_.length;n++){let l=_[n],o=l.$parent_;o.children_count=o.children_count+1,o.length=o.length+l.length}}return i}function sd(t,e=(s,i)=>0){return t.sort((s,i)=>{let r=s.length-i.length;return r=r===0?s.height-i.height:r,r=r===0?s.children_count-i.children_count:r,r=r===0?e(s,i):r,r}),t}function id(t,e=(s,i)=>0){let s=t.$rm_children();sd(s,e),t.$append_children(s)}function Zs(t,e=(s,i)=>0){let s=W_(t);for(let i=0;i<s.length-1;i++){let r=s[i];for(let _=0;_<r.length;_++){let n=r[_];id(n,e)}}return s[0][0]}function Ks(t,e,s=(i,r)=>!0){let i=t.$gen_sdfs_next_srch_action(),r=e.$gen_sdfs_next_srch_action(),_=t,n=e;for(let l of i){let o=r.next().value;if(o===Y_)return!1;if(l.k!==o.k)return!1;if(_=_[l.k],n=n[o.k],!s(_,n))return!1}return r.next().value===Y_}function V_(t,e,s=(r,_)=>0,i=(r,_)=>!0){let r=Zs(t,s),_=Zs(e,s),n=Ks(r,_,i);return r.$erase_r(),_.$erase_r(),n}function rd(t){t.prototype.$deep_steq=function(e,s=(i,r)=>!0){return Ks(this,e,s)}}function _d(t){t.prototype.$deep_lseq=function(e,s=(r,_)=>0,i=(r,_)=>!0){return V_(this,e,s,i)}}J_.exports={creat_ele_mat:W_,dcp_and_sort_nd:Zs,strict_eq:Ks,loose_eq:V_,add_deep_steq:rd,add_deep_lseq:_d}});var Q_=p((db,z_)=>{var{_nu:ei}=G(),{FLAG_DICT:Ge}=oe();function hs(t,e){if(t(e)){let s=e.$rsib_;return s!==ei?s:e.$rsib_of_fst_ance_having_rsib_}else return e.$sdfs_next_}function*ld(t,e){let i=e.$drmost_.$sdfs_next_;for(;e!==i;)yield e,e=hs(t,e)}function It(t,e,s){return t(e)?s===Ge.open?[e,"close"]:e.$sedfs_next_after_close_:e.$sedfs_next(s)}function*od(t,e){let s="open",[i,r]=e.$sedfs_next(Ge.close);for(;e!==i||s!==r;)yield[e,s],[e,s]=It(t,e,Ge[s])}function hd(t){t.prototype.$cond_leaf_sdfs_next=function(e){return hs(e,this)}}function fd(t){t.prototype.$gen_cond_leaf_sdfs_next=function*(e){yield*ld(e,this)}}function ad(t){t.prototype.$cond_leaf_sedfs_next=function(e,s){return It(e,this,s)}}function dd(t){t.prototype.$gen_cond_leaf_sedfs_next=function*(e){yield*od(e,this)}}function ud(t){let e=s=>s.$is_blocked()||s.$is_leaf();t.prototype.$is_ance_blocked=function(){return!this.$is_self_blocked()&&this.$is_blocked()},t.prototype.$is_blocked=function(){return this.$blocked_!==ei},Object.defineProperty(t.prototype,"$blocked_",{get:function(){if(this.$is_self_blocked())return this;{let s=this.$gen_ance();for(let i of s)if(i.$is_self_blocked())return i;return ei}}}),t.prototype.$gen_sdfs_next_ignore_blocked=function*(){let i=this.$drmost_.$sdfs_next_,r=this;for(;r!==i;)yield r,r=hs(e,r)},Object.defineProperty(t.prototype,"$sdfs_next_ignore_blocked_",{get:function(){return hs(e,this)}}),Object.defineProperty(t.prototype,"$sdfs_ignore_blocked_",{get:function(){let s=this.$gen_sdfs_next_ignore_blocked();return Array.from(s)}}),t.prototype.$gen_sedfs_next_ignore_blocked=function*(){let s="open",i=this,[r,_]=i.$sedfs_next(Ge.close);for(;i!==r||s!==_;)yield[i,s],[i,s]=It(e,i,Ge[s])},Object.defineProperty(t.prototype,"$sedfs_next_ignore_blocked_when_open_",{get:function(){return It(e,this,Ge.open)}}),Object.defineProperty(t.prototype,"$sedfs_next_ignore_blocked_when_close_",{get:function(){return It(e,this,Ge.close)}}),Object.defineProperty(t.prototype,"$sedfs_ignore_blocked_",{get:function(){let s=this.$gen_sedfs_next_ignore_blocked();return Array.from(s)}})}z_.exports={add_cond_leaf_sdfs_next:hd,add_gen_cond_leaf_sdfs_next:fd,add_cond_leaf_sedfs_next:ad,add_gen_cond_leaf_sedfs_next:dd,add_method_for_block:ud}});var At=p((pb,rn)=>{var pd=String,ti=Array,{_nu:xe,add_repr:Z_,add_str_tag:$d,get_abbr:bd}=G(),{FLAG_DICT:ub}=oe(),fs={p:"[+]",n:"[-]",l:"[.]"},K_={t:" \u251C\u2500\u2500 ",v:" \u2502 ",l:" \u2514\u2500\u2500 ",ws:" "},en={t:"\u251C\u2500\u2500 ",v:"\u2502 ",l:"\u2514\u2500\u2500 ",ws:" "};function tn(t,e,s=0){let i=[];e.$is_root()||(e.$is_lstch()?i.unshift(t.l):i.unshift(t.t));let r=e.$ances_;for(let _=0;_<r.length-1;_++)r[_].$is_lstch()?i.unshift(t.ws):i.unshift(t.v);return i=i.slice(s),i.join("")}function cs(t){return t.$forest_!==xe?bd(t.$fid_)+":"+t.$id_:""}var gd="%";function yd(t){$d(t,e=>(e.$tag_??e.$id_)+" %"+cs(e)+"% ")}var sn=(t,e=1)=>t.$is_leaf()||t.$depth_===e;function md(t,e){let s=r=>sn(r,e);return ti.from(t.$gen_cond_leaf_sdfs_next(s))}var Ze=t=>t.$tag_??t.$id_;function kd(t,e=1,s=Ze,i=100){if(t.$forest_===xe)return"%erased% {}";let _=(t.$tag_??t.$id_)+" %"+cs(t)+"% "+JSON.stringify(t,xe,4);if(t.$is_leaf()||!t.$is_repr_enabled())return _;{let n=t.$depth_,l=md(t,n+e),o=l.slice(0,i);for(let h=0;h<o.length;h++){let f=o[h];o[h]=" "+tn(en,f,n)+s(f),f.$depth_===n+e&&!f.$is_leaf()&&(o[h]=o[h]+" [...] ")}return l.length>i&&o.push("... "+pd(l.length-i)+" more items"),_+` [
2
+ `+o.join(`
3
+ `)+`
4
+ ]`}}function wd(t,e=1,s=Ze,i=100){Z_(t,kd,e,s,i)}var Ed=t=>t.$is_leaf()||!t.$is_disp_enabled();function vd(t){return ti.from(t.$gen_cond_leaf_sdfs_next(Ed))}var Td=t=>t.$is_leaf()?fs.l:t.$is_disp_enabled()?fs.n:fs.p;function Sd(t,e=Ze){if(t.$forest_===xe)return"%erased% {}";let i=(t.$tag_??t.$id_)+" %"+cs(t)+"% "+JSON.stringify(t,xe,4);if(t.$is_leaf())return i;{let r=t.$depth_,_=vd(t);for(let n=0;n<_.length;n++){let l=_[n];_[n]=" "+tn(K_,l,r)+Td(l)+e(l)}return i+` [
5
+ `+_.join(`
6
+ `)+`
7
+ ]`}}function Dd(t,e=Ze){t.prototype.$display=function(s=!1){let i=Sd(this,e=Ze);if(s)return i;console.log(i)}}function Id(t,e){let s=r=>sn(r,e);return ti.from(t.$gen_cond_leaf_sedfs_next(s))}var si=(t,e)=>{let s=t.$tag_??t.$id_;return e==="open"?"<"+s+">":"</"+s+">"};function Ad(t,e=1,s=si,i=100){if(t.$forest_===xe)return"%erased% {}";let _=(t.$tag_??t.$id_)+" %"+cs(t)+"% "+JSON.stringify(t,xe,4),n=[];if(t.$is_leaf())return _+` [
8
+ `+s(t,"open")+s(t,"close")+`
9
+ ]`;{let l=t.$depth_,o=Id(t,l+e),h=o.length,f=o.slice(0,i);for(let c=0;c<f.length;c++){let[u,a]=f[c],$=" ".repeat(u.$depth_-l);f[c]=" "+$+s(u,a),u.$depth_===l+e&&!u.$is_leaf()&&a==="open"&&(f[c]=f[c]+`
10
+ `+$+" <.../>")}return h>i&&f.push("... "+h-i+" more items"),_+` [
11
+ `+f.join(`
12
+ `)+`
13
+ ]`}}function qd(t,e=1,s=si,i=100){Z_(t,Ad,e,s,i)}function Rd(t){t.prototype.$simple_sdfs_repr=function(e=!1,s){s=s??"$id_";let i=this.$sdfs_,r=[];for(let n of i){let l=" ".repeat(n.$depth_)+`${n[s]}`;r.push(l)}let _=r.join(`
14
+ `);if(e)return _;console.log(_)},t.prototype.$simple_sedfs_repr=function(e=!1,s){s=s??"$id_";let i=this.$sedfs_,r=[];for(let n of i){let[l,o]=n,h="";o==="open"?l.$is_leaf()?h=" ".repeat(l.$depth_)+`<${l[s]}></${l[s]}>`:h=" ".repeat(l.$depth_)+`<${l[s]}>`:l.$is_leaf()||(h=" ".repeat(l.$depth_)+`</${l[s]}>`),h&&r.push(h)}let _=r.join(`
15
+ `);if(e)return _;console.log(_)}}rn.exports={NATIVE_QUOTE:gd,_add_str_tag:yd,FOLDUP_SIGN_DICT:fs,REPR_PREFIX_DICT:en,UI_PREFIX_DICT:K_,DFLT_REPR_LFN:Ze,_add_repr:wd,_add_disp:Dd,DFLT_SEDFS_LFN:si,_add_sedfs_repr:qd,_add_simple:Rd}});var an=p(($b,cn)=>{var{_un:ii,_nu:ri}=G(),{FLAG_DICT:Od}=oe();function Nd(t){let e=t,s=t,i=t.$drmost_,r=!1,_=!1;function n(h=1){_=!1;let f=[];for(;f.length<h;)r?(s=e,r=!1):(s=s.$sdfs_next_,s===ri&&(s=e)),s===i&&(r=!0),s===e&&(_=!0),f.push(s);return f}function l(){return s}function o(h=1){r=!1;let f=[];for(;f.length<h;)_?(s=i,_=!1):(s=s.$sdfs_prev_,s===ri&&(s=i)),s===i&&(r=!0),s===e&&(_=!0),f.unshift(s);return f}return[n,l,o]}function _n(t){t.prototype.$more_less=function(){return Nd(this)}}var Ke=(t,e)=>{},nn=Symbol("open"),ln=Symbol("close"),_i=class{#e=0;#t=ii;#s;get action_(){return this.#e}get val_(){return this.#t}[nn](){this.#s=0}[ln](){this.#s=1}is_opened(){return this.#s===0}is_closed(){return this.#s===1}yield(){this.#e=0}skip(){this.#e=1}disconn(){this.#e=2}add_lsib(e){this.#e=3,this.#t=e}add_rsib(e){this.#e=4,this.#t=e}add_child(e){this.#e=5,this.#t=e}replace_with(e){this.#e=6,this.#t=e}erase(){this.#e=7,this.#t=ii}replace_tree(e){this.#e=8,this.#t=e}replace_node(e){this.#e=9,this.#t=e}reset(){this.#e=0,this.#t=ii}},as={add_child:"add-child-only-can-be-applied-on-leaf;for-nonleaf,using add_?sib on child",replace:"use-replace-tree or replace-node; replace_with is a old API, have NO effect"};function K(t,e){let[s,i]=t.$sedfs_next(e);return e=Od[i],[s,e]}function*ni(t,e=Ke){let s=new _i,[i,r]=K(t,0);for(;i!==ri;){if(r===0?s[nn]():s[ln](),e(i,s),s.action_===0)yield i,[i,r]=K(i,r);else if(s.action_===1)[i,r]=K(i,r);else if(s.action_===2)if(r===0){i.$rm_children();let _=i;[i,r]=K(i,r),_.$disconn()}else{yield i;let _=i;[i,r]=K(i,r),_.$disconn()}else if(s.action_===3){let _=i.$add_lsib(s.val_);yield i,[i,r]=K(i,r)}else if(s.action_===4)if(yield i,r===0)i.$add_rsib(s.val_),[i,r]=K(i,r);else{let _=i;[i,r]=K(i,r),_.$add_rsib(s.val_)}else if(s.action_===5)if(yield i,!i.$is_leaf())console.log(as.add_child);else if(r===0)i.$append_child(s.val_),[i,r]=K(i,r);else{let _=i;[i,r]=K(i,r),_.$append_child(s.val_)}else if(s.action_===6)i.$replace_with?r===0?(i=i.$replace_with(s.val_),r=0,yield i):(yield i,i=i.$replace_with(s.val_),r=1):console.log(as.replace);else if(s.action_===7)if(r===0){i.$rm_children();let _=i;[i,r]=K(i,r),_.$erase()}else{yield i;let _=i;[i,r]=K(i,r),_.$erase()}else s.action_===8?r===0?(i=i.$replace_tree(s.val_),r=0,yield i):(yield i,i=i.$replace_tree(s.val_),r=1):s.action_===9&&(r===0?(i=i.$replace_node(s.val_),r=0,yield i):(yield i,i=i.$replace_node(s.val_),r=1));s.reset()}}function on(t,e=Ke){for(let s of ni(t,e));}function hn(t){t.prototype.$gen_visit=function(e=Ke){return ni(this,e)},t.prototype.$visit=function(e=Ke){on(this,e)}}var fn={is_opened:"visitor.is_opened()",is_closed:"visitor.is_closed()",skip:"visitor.skip()",disconn:"visitor.disconn()",add_lsib:"visitor.add_lsib(new_node||undefined)",add_rsib:"visitor.add_rsib(new_node||undefined)",add_child:"visitor.add_child(new_node||undefined)",replace_with:"visitor.replace_with(new_node||undefined)",erase:"visitor.erase()",replace_tree:"visitor.replace_tree(new_tree||undefined)",replace_node:"visitor.replace_node(new_node||undefined)"};function Cd(t){_n(t),hn(t),t.Visitor={DFLT_VISIT_FUNC:Ke,ACTION_DICT:fn,ALRM_DICT:as}}cn.exports={add_more_less:_n,DFLT_VISIT_FUNC:Ke,ACTION_DICT:fn,ALRM_DICT:as,gen:ni,visit:on,add_visit:hn,add_mlv:Cd}});var wn=p((bb,kn)=>{var{_nu:dn}=G(),oi={index_not_valid:"index_not_valid",nds_must_be_sibs:"nds_must_be_sibs"};function un(t,e,s,i,r){return e<s&&i<r&&e>=0&&i>=0&&s<=t&&r<=t?s<=i||r<=e:!1}function pn(t,e){let s=t.$children_,i=s.length;if(i===0)return s;{let r;i%2?r=(i-1)/2:r=i/2;for(let _=0;_<r;_++){let n=s[_],l=s[i-_-1];n[e](l)}return t.$children_}}function $n(t){return pn(t,"$swap_node")}function bn(t){return pn(t,"$swap_tree")}function gn(t,e){let s=[t],i=[];for(;s.length>0;){for(let r of s){let _=r[e]();i=i.concat(_.filter(n=>!n.$is_leaf()))}s=i,i=[]}return t}function li(t){return gn(t,"$reverse_children")}function Ld(t){return gn(t,"$reverse_children_tree")}function hi(t,e,s){let i=t.$children_,[r,_]=e,[n,l]=s;if(un(i.length,r,_,n,l)){let h=[r,_,n,l].sort(($,k)=>$-k),f=i.slice(h[0],h[1]),c=i.slice(h[2],h[3]),u=i[h[0]].$lsib_,a=i[h[2]].$lsib_;return a===f[h[1]-1]&&(a=c[c.length-1]),f.forEach($=>$.$disconn()),c.forEach($=>$.$disconn()),u===dn?t.$prepend_children(c):u.$add_rsibs(c),a.$add_rsibs(f),t}else return console.log(oi.index_not_valid),t}function yn(t){let e=t[0].$parent_;if(e===dn)return!1;for(let s of t.slice(1))if(!(e===s.$parent_))return!1;return!0}function mn(t,e,s){let i=[...e,...s];return are_sibs(i)?(e.sort((r,_)=>r.$sibseq_-_.$sibseq_),s.sort((r,_)=>r.$sibseq_-_.$sibseq_),e=e.map(r=>r.$sibseq_),s=s.map(r=>r.$sibseq_),hi(t,e,s)):(console.log(oi.nds_must_be_sibs),t)}function Fd(t){t.prototype.$are_sibs=function(e){return yn([this,...e])}}function Gd(t){t.prototype.$reverse_children=function(){return $n(this)},t.prototype.$reverse_children_tree=function(){return bn(this)},t.prototype.$reverse=function(){return li(this)},t.prototype.$reverse_tree=function(){return li(this)},t.prototype.$swap_self_children_with_idx_range=function(e,s){return hi(this,e,s)},t.prototype.$swap_self_children_with_nd_range=function(e,s){return mn(this,e,s)}}kn.exports={ERROR:oi,_is_valid_idxs:un,$are_sibs:yn,add_are_sibs:Fd,$reverse_children:$n,$reverse_children_tree:bn,$reverse:li,$reverse_tree:Ld,$swap_self_children_with_idx_range:hi,$swap_self_children_with_nd_range:mn,add_swap_self_children:Gd}});var vn=p((gb,En)=>{var fi=class{lyrs=[];ready=[];is_triggered=e=>{};set_triggered=e=>{};reset=()=>{}};function xd(t,e,s,i){let r=t.$lyrs_;r.reverse(),r=r.map(l=>new Set(l));let _=[];for(let l of r)for(let o of l)o.$is_leaf()&&(_.push(o),l.delete(o));r.shift();let n=new fi;return n.is_triggered=e,n.set_triggered=s,n.lyrs=r,n.ready=_,n.reset=()=>{t.$sdfs_.forEach(o=>i(o))},n.ready.forEach(l=>s(l)),n}function Md(t){let{lyrs:e,ready:s,is_triggered:i,set_triggered:r}=t,_=s.map(n=>n.$parent_);return _=Array.from(new Set(_)),_=_.filter(n=>{if(e[0].has(n))return n;{let l=n.$gen_child_from_fst(),o=!0;for(let h of l)if(!i(h)){o=!1;break}if(o)return n}}),e.shift(),t.ready=_,t.ready.forEach(n=>r(n)),t}En.exports={_init:xd,_next:Md}});var Dn=p((yb,Sn)=>{var{_A:Hd,_nu:Pd}=G(),ci=t=>t.is_resolved(),et=class extends Hd{constructor(e=new Set,s=new Set,i=ci){super(),super.push(e,s,i)}get curr(){return this[0]}set curr(e){this[0]=e}get lefted(){return this[1]}set lefted(e){this[1]=e}get rfunc_is_resolved(){return this[2]}set rfunc_is_resolved(e){this[2]=e}};et.PROPS=["curr","lefted","rfunc_is_resolved"];et.DFLT_RFUNC_IS_RESOLVED=ci;function jd(t,e=ci){let s=new et;return s.rfunc_is_resolved=e,s.curr=new Set(t.$sdfs_leafs_),s.lefted=new Set,s}var Tn=(t,e)=>{let s=e.$gen_child_from_fst(),i=!0;for(let r of s)if(!t.rfunc_is_resolved(r)){i=!1;break}return i};function Ud(t,e,s,i){let r=i.$parent_;r!==Pd&&(Tn(t,r)?e.add(r):s.add(r))}function Bd(t){let e=new Set,s=new Set;for(let i of t.curr)Ud(t,e,s,i);for(let i of t.lefted)Tn(t,i)?e.add(i):s.add(i);return t.curr=e,t.lefted=s,t}Sn.exports={Ctx:et,_init:jd,_next:Bd}});var Ln=p((mb,Cn)=>{var di=Symbol("sym_rslt_key");function Yd(t,e,s){let i=t.$children_;return e(t,i,s)}function In(t,e,s,i){let r=e[t.c];return r.forEach(_=>{_[s]=Yd(_,i,s)}),t.c=t.c+1,r}function Wd(t,e,s,i){t.reverse();let r={c:0},_=In(r,t,e,s);for(;r.c<t.length;){let n=In(r,t,e,s);i&&_.forEach(l=>{delete l[e]}),_=n}}function qn(t,e,s,i){let r=t.$lyrs_;Wd(r,s,e,i);let _=t[s];return i&&delete t[s],_}function Rn(t){t.prototype.$bot2up_sync_calc=function(e,s=di,i=!0){return qn(this,e,s,i)},t.DFLT_CALC_RSLT_KEY=di}var ds=Symbol("triggered"),Vd=t=>{t[ds]=!0},Jd=t=>{t[ds]=!1},Xd=t=>t[ds],An=vn();function On(t){t.prototype.$bot2up_gen_ready=function*(e=Xd,s=Vd,i=Jd){let r=An._init(this,e,s,i);for(yield r.ready;r.lyrs.length>0;)r=An._next(r),yield r.ready;yield r.reset},t.DFLT_TRIGGERED_FLAG=ds}var ai=Dn();function Nn(t){t.prototype.$bot2up_gen_opened=function*(e=ai.DFLT_RFUNC_IS_RESOLVED){let s=ai._init(this,e);for(yield s.curr;s.curr.size>0;)s=ai._next(s),yield s.curr}}function zd(t){Rn(t),On(t),Nn(t)}Cn.exports={DFLT_CALC_RSLT_KEY:di,$bot2up_sync_calc:qn,_add_$bot2up_sync_calc:Rn,_add_$bot2up_gen_ready:On,_add_$bot2up_gen_opened:Nn,_add_calcs:zd}});var Pn=p((Eb,Hn)=>{var Se=Ps(),kb=We(),{_un:us,_nu:w,_A:Qd,ZWNJ:Rt,add_getter:Zd,add_repr:Kd,OD:ge}=G(),qt={release_forest:Symbol("release_forest"),get_ctor:Symbol("get_ctor"),set_id:Symbol("set_id")},ui=class{parent=w;lsib=w;children=[];rsib=w;flat(){return[this.parent,this.lsib,this.children,this.rsib].flat()}},g=class extends Qd{constructor(e=w,s=-1,i=!1){super(e,s,i)}get[qt.get_forest](){return this[0]}get[qt.get_ctor](){return this.constructor}[qt.release_forest](){this[0]=w}[qt.set_id](e){this[1]=e}get $forest_(){return this[0]}get $fid_(){return this[0].fid}get $id_(){return this[1]}$is_self_blocked(){return this[2]}$block(){this[2]=!0}$unblock(){this[2]=!1}$noop(){}$rent(){return this[0].rent()}$new(e){return e=e??this.constructor,this[0].node(e)}$is_empty(){let{idpool:e,fc:s,rb:i,pr:r,lb:_,lc:n}=this[0];return Se.$is_empty(e,s,i,r,_,n,[this[1]],[],[])}$is_root(){let{idpool:e,fc:s,rb:i,pr:r,lb:_,lc:n}=this[0];return Se.$is_root(e,s,i,r,_,n,[this[1]],[],[])}$is_fstch(){let{idpool:e,fc:s,rb:i,pr:r,lb:_,lc:n}=this[0];return Se.$is_fstch(e,s,i,r,_,n,[this[1]],[],[])}$is_midch(){let{idpool:e,fc:s,rb:i,pr:r,lb:_,lc:n}=this[0];return Se.$is_midch(e,s,i,r,_,n,[this[1]],[],[])}$is_lstch(){let{idpool:e,fc:s,rb:i,pr:r,lb:_,lc:n}=this[0];return Se.$is_lstch(e,s,i,r,_,n,[this[1]],[],[])}$is_leaf(){let{idpool:e,fc:s,rb:i,pr:r,lb:_,lc:n}=this[0];return Se.$is_leaf(e,s,i,r,_,n,[this[1]],[],[])}$is_lonely(){let{idpool:e,fc:s,rb:i,pr:r,lb:_,lc:n}=this[0];return Se.$is_lonely(e,s,i,r,_,n,[this[1]],[],[])}$is_isolated(){let{idpool:e,fc:s,rb:i,pr:r,lb:_,lc:n}=this[0];return Se.$is_isolated(e,s,i,r,_,n,[this[1]],[],[])}get $chids_(){return this.$children_.map(e=>e.$id_)}*$gen_nbr(){yield this.$parent_,yield this.$lsib_,yield*this.$gen_child_from_fst(),yield this.$rsib_}get $nbrs_(){let e=new ui;return e.parent=this.$parent_,e.lsib=this.$lsib_,e.children=this.$children_,e.rsib=this.$rsib_,e}*$gen_edfs_next_until_self(){let s=this.$dlmost_.$gen_edfs_next();for(let i of s)if(yield i,i===this)break}get $edfs_of_deses_(){let e=this.$dlmost_,s=[],i=e;for(;s.push(i),!(i===this||i===null);)i=i.$edfs_next_;return s}$snxt(e=s=>s.$is_leaf()){if(e(this)){let s=this.$rsib_;return s!==null?s:this.$rsib_of_fst_ance_having_rsib_}else return this.$fstch_}$drmost(e=s=>s.$is_leaf()){if(e(this))return this;{let s=this.$lstch_;for(;;){if(e(s))return s;s=s.$lstch_}}}$visit_using_snxt(e=i=>{},s=i=>i.$is_leaf()){let i=this,r=this.$drmost(s);for(;i!==r;){let _=i.$snxt(s);e(i),i=_}e(i)}$dlmost(e=s=>s.$is_leaf()){if(e(this))return this;{let s=this.$fstch_;for(;;){if(e(s))return s;s=s.$fstch_}}}$enxt(e=s=>s.$is_leaf()){let s=this.$rsib_;return s===null?this.$parent_:s.$dlmost(e)}$visit_using_enxt(e=i=>{},s=i=>i.$is_leaf()){let i=this,r=this.$dlmost(s);for(;r!==i;){let _=r.$enxt(s);e(r),r=_}e(r)}$senxt(e="open",s=i=>i.$is_leaf()){return e==="open"?s(this)?[this,"clos"]:[this.$fstch_,"open"]:this.$rsib_!==null?[this.$rsib_,"open"]:[this.$parent_,"clos"]}$visit_using_senxt(e=r=>{},s=r=>{},i=r=>r.$is_leaf()){let r=this,_=this,n="open";for(;;)if(n==="open")e(_),[_,n]=_.$senxt(n,i);else{let l=_.$senxt(n,i);if(s(_),_===r)break;_=l[0],n=l[1]}}$visit_using_senxt_merge_leaf_act(e=_=>{},s=_=>{},i=_=>{},r=_=>_.$is_leaf()){let _=this,n=this,l="open";for(;;){let o=r(n);if(l==="open")o?(s(n),[n,l]=n.$senxt("clos",r)):(e(n),[n,l]=n.$senxt(l,r));else{let h=n.$senxt(l,r);if(i(n),n===_)break;n=h[0],l=h[1]}}}$show(e="@",s=r=>r.$is_leaf(),i={}){let r={indent:" ",L:"[",R:"]",leaf_ser:a=>JSON.stringify(a[e]),only_show:!0};for(let a in r)Object.hasOwn(i,a)&&(r[a]=i[a]);let{indent:_,L:n,R:l,leaf_ser:o,only_show:h}=r,f,c,u;if(h)f=a=>console.log(_.repeat(a.$depth_)+n),c=a=>console.log(_.repeat(a.$depth_)+o(a)),u=a=>console.log(_.repeat(a.$depth_)+l),this.$visit_using_senxt_merge_leaf_act(f,c,u,s);else{let a="";return f=$=>{a=a+_.repeat($.$depth_)+n},c=$=>{a=a+_.repeat($.$depth_)+o($)},u=$=>{a=a+_.repeat($.$depth_)+l},this.$visit_using_senxt_merge_leaf_act(f,c,u,s),a}}};g.ALGN_SIZE=3;g.ALGN_DESC=["forest","id","blocked"];var eu=t=>{let e=mro(C),s=0;for(let i=0;i<e.length;i++){let r=e[i];if(r===Array)break;s=s+r.ALGN_SIZE}return s};g.ROW_NAMES=["fc","rb","pr","lb","lc"];g.ROW_NAMES.forEach(t=>{g.prototype[`#${t}`]=function(e){let i=this.$forest_[t],r=this.$id_;if(e===us)return i[r];i[r]=e}});g.prototype.$is_nonleaf=function(){return!this.$is_leaf()};g.prototype["#6"]=function(){let t=this.$forest_,e=this.$id_,{fc:s,rb:i,pr:r,lb:_,lc:n}=t;return[e,s[e],i[e],r[e],_[e],n[e]]};g.prototype.$sort_children=function(t=(e,s)=>e.$id_-s.$id_){let e=this.$children_;if(e.length>0){e.sort(t);let s=this.$id_,i=this.$forest_,{fc:r,rb:_,pr:n,lb:l,lc:o}=i,h=e[0].$id_;r[s]=h,l[h]=0;for(let c=0;c<e.length-1;++c){let u=e[c].$id_,a=e[c+1].$id_;_[u]=a,l[a]=u}let f=e[e.length-1].$id_;o[s]=f,_[f]=0}return e};g.prototype.$child_slice_from_fst=function(t=0,e=1/0){let s=this.$fstch_,i=0,r=[];if(s!==null){let _=s;for(;_!==null&&i!==t;)_=_.$rsib_,++i;for(;_!==null&&i!==e;)r.push(_),_=_.$rsib_,++i}return r};g.prototype.$child_slice_from_lst=function(t=0,e=1/0){let s=this.$lstch_,i=0,r=[];if(s!==null){let _=s;for(;_!==null&&i!==t;)_=_.$lsib_,++i;for(;_!==null&&i!==e;)r.push(_),_=_.$lsib_,++i}return r};g.prototype.$splice_children=function(t,e=0,...s){let i=this.$child(t),r=0,_=[];if(i!==null)for(;r!==e;){let n=i.$rsib_;if(i.$disconn(),_.push(i),++r,n===null)break;i=n}for(let n of s)this.$append_child(n);return _};g.prototype.$splice_erase_r_children=function(t,e=0,...s){let i=this.$child(t),r=0,_=[];if(i!==null)for(;r!==e;){let n=i.$rsib_;if(i.$erase_r(),_.push(i),++r,n===null)break;i=n}for(let n of s)this.$append_child(n);return _};g.prototype.$spread=function(){let t=this.$parent_,e=this.$children_;if(t!==w&&e.length>0){let s=this,i=this.$lsib_,r=this.$rsib_,_=this.$id_,n=t.$id_,l=this.$forest_,{fc:o,rb:h,pr:f,lb:c,lc:u}=l;if(i===w&&r===w){for(let a of e)f[a.$id_]=n;o[n]=e[0].$id_,u[n]=e[e.length-1].$id_}else if(i===w){for(let $ of e)f[$.$id_]=n;o[n]=e[0].$id_;let a=e[e.length-1];h[a.$id_]=r.$id_,c[r.$id_]=a.$id_}else if(r===w){for(let $ of e)f[$.$id_]=n;u[n]=e[e.length-1].$id_;let a=e[0];c[a.$id_]=i.$id_,h[i.$id_]=a.$id_}else{for(let k of e)f[k.$id_]=n;let a=e[e.length-1];h[a.$id_]=r.$id_,c[r.$id_]=a.$id_;let $=e[0];c[$.$id_]=i.$id_,h[i.$id_]=$.$id_}return o[_]=0,h[_]=0,f[_]=0,c[_]=0,u[_]=0,{old:this,new:t,children:e}}else return{old:this,new:this,children:e}};g.prototype.$edfs_scalc_ignore_leaf=function(t=e=>{}){let e=this.$dlmost_;for(;e.$is_leaf()||t(e),e=e.$edfs_next_,e!==this;);};g.prototype.$edfs_scalc=function(t=s=>{},e=s=>{}){let s=this.$dlmost_;for(;s.$is_leaf()?e(s):t(s),s=s.$edfs_next_,s!==this;);};g.prototype.$sedfs_scalc=function(t=s=>{},e=s=>{}){let s=this,i=0;for(;;){if(i===0)if(t(s),s.$is_leaf()){e(s);let r=s.$rsib_;r===null?(s=s.$parent_,i=1):s=r}else s=s.$fstch_;else{e(s);let r=s.$rsib_;r===null?s=s.$parent_:(s=r,i=0)}if(s===this)break}};g.prototype.$sedfs_scalc_with_4handle=function({nonleaf_open_handle:t,nonleaf_clos_handle:e,leaf_open_handle:s,leaf_clos_handle:i}){let r=this,_=0;for(;;){if(_===0)if(s&&s(r),r.$is_leaf()){i&&i(r);let n=r.$rsib_;n===null?(r=r.$parent_,_=1):r=n}else t&&t(r),r=r.$fstch_;else{e&&e(r);let n=r.$rsib_;n===null?r=r.$parent_:(r=n,_=0)}if(r===this)break}};Zd(g,"$neighbors_",t=>{let e=[t.$parent_,t.$rsib_,t.$lsib_];return e=e.filter(s=>s!==w),e=e.concat(t.$children_),e});g.SYM_DICT=qt;g.DFLT_CLONE_FUNC=(t,e)=>{Object.assign(e,t)};var Fn=H_();for(let t in Fn)t!=="ERROR_DICT"&&Fn[t](g);var{add_ance_relation:tu,add_sib_relation:su}=B_();tu(g);su(g);var{add_deep_steq:iu,add_deep_lseq:ru}=X_();iu(g);ru(g);var{add_cond_leaf_sdfs_next:_u,add_gen_cond_leaf_sdfs_next:nu,add_cond_leaf_sedfs_next:lu,add_gen_cond_leaf_sedfs_next:ou,add_method_for_block:hu}=Q_();_u(g);nu(g);lu(g);ou(g);hu(g);var{_add_str_tag:fu}=At();fu(g);var{add_mlv:cu}=an();cu(g);var{add_dump:au,load_from_dump:wb}=Gs();au(g);var{add_are_sibs:du,add_swap_self_children:uu}=wn();du(g);uu(g);ge(g,"name",{value:Rt});var{_add_calcs:pu}=Ln();pu(g);var{RM_METHOD_ARY_OF_MUSTLEAF:$u}=Kt(),De=class extends g{};De.ALGN_SIZE=0;$u.forEach(t=>{De.prototype[t]=function(){console.log("can NOT add child to MustLeaf Node")}});ge(De,"name",{value:"\u03B5"});var st=class extends De{constructor(e,s,i,r=w){super(e,s,i),this.push(r)}get ref_(){return this[3]}set ref_(e){return this[3]=e}is_ref(){return!0}};st.ALGN_SIZE=1;ge(st,"name",{value:"&"});var He=class extends De{constructor(e,s,i,r=us){super(e,s,i),this.push(r)}unwrap(e){return this[3]}wrap(e){return this[3]=e}is_val(){return!0}};He.ALGN_SIZE=1;ge(He,"name",{value:"<V>"});Kd(He,t=>t.unwrap());var pi=(t,e)=>{let i=t.$forest_.node(st);return e instanceof g&&(i.ref_=e),i};g.prototype.$add_lsib_ref=function(t){return this.$add_lsib(pi(this,t))};g.prototype.$add_rsib_ref=function(t){return this.$add_rsib(pi(this,t))};g.prototype.$append_child_ref=function(t){return this.$append_child(pi(this,t))};var $i=(t,e)=>{let i=t.$forest_.node(He);return i.wrap(e),i};g.prototype.$add_lsib_val=function(t){return this.$add_lsib($i(this,t))};g.prototype.$add_rsib_val=function(t){return this.$add_rsib($i(this,t))};g.prototype.$append_child_val=function(t){return this.$append_child($i(this,t))};var Pe=class extends g{constructor(e,s,i,r=!1){super(e,s,i),this.push(r)}$is_repr_enabled(){return this[3]}$enable_repr(){this[3]=!0}$disable_repr(){this[3]=!1}};Pe.ALGN_SIZE=1;var{_add_repr:xn}=At();xn(Pe,2);ge(Pe,"name",{value:Rt});var tt=Symbol(""),Mn=Symbol(""),it=Symbol(""),bu=(t,e)=>{let s=new Set(t.refed_by_);for(let i of s)e.includes(i)||(i[it](w),t.refed_by_.delete(i));if(t.is_slink()){let i=t.ref_;i!==w&&(e.includes(i)||(t[it](w),i.refed_by_.delete(t)))}},Y={update:0,insert:1,delete:2,0:"update",1:"insert",2:"delete"};function*Gn(t,e,s,i,r){let _=new Set(t.refed_by_);for(let n of _)e.includes(n)||(s?yield[Y.update,n]:yield n,r&&(n[it](w),t.refed_by_.delete(n)));if(t.is_slink()){let n=t.ref_;n!==w&&(e.includes(n)||(s?yield[Y.update,n]:yield n,r&&(t[it](w),n.refed_by_.delete(t))))}s?i?yield[Y.delete,t]:yield[Y.update,t]:yield t}var P=class extends Pe{constructor(e,s,i,r=!1,_="",n=0,l=us,o=new Set){super(e,s,i,r),this.push(_,n,l,o)}get $tag_(){if(this.$is_leaf()){if(this.is_dir())return this[4]+"{}";if(this.is_slink()){let e=this[5]?this[5].nvpath_:"<empty>";return this[4]+" -> "+e}else return this[4]}else return this[4]}get $_raw_tag_(){return this[4]}get nvpath_(){let i=this.$plances_.map(r=>r.$_raw_tag_).join("/");return this.is_dir()&&(i=i+"/"),i}get $_chtags_(){return this.$children_.map(s=>s.$_raw_tag_)}$_is_chtag_exist(e){let s=this.$gen_child_from_fst();for(let i of s)if(i.$_raw_tag_===e)return!0;return!1}$_is_sibtag_exist(e){let s=this.$parent_;return s===w?!0:s.$_is_chtag_exist(e)}[tt](e){this[4]=e}set $tag_(e){this.$_is_sibtag_exist(e)||(this[4]=e)}$_child(e){let s=this.$gen_child_from_fst();for(let i of s)if(i.$_raw_tag_===e)return i;return w}$_des(e){let s=this,i=s,r=!0;for(let _ of e)if(s=s.$_child(_),s!==w)i=s;else{r=!1;break}return r?i:w}is_unknown(){return this[5]===0}is_dir(){return this[5]===1}is_file(){return this[5]===2}is_slink(){return this[5]===3}get ftype_num_(){return this[5]}get ftype_name_(){return P.FTYPE[this[5]]}[Mn](e){this[5]=e}set_as_dir(){this.is_unknown()&&(this[5]=1)}set_as_file(){this.is_unknown()&&(this[5]=2)}set_as_slink(){this.is_unknown()&&(this[5]=3)}set_ftype_with_name(e){if(this.is_unknown()){let s=P.FTYPE[e];s!==us&&(this[5]=s)}}is_in_same_root(e){return e.$root_===this.$root_&&this.$root_!==w}[it](e){this[6]=e}get ref_(){return this[6]}set ref_(e){return this.is_slink()&&this.is_in_same_root(e)?(this[6]=e,e.refed_by_.add(this),e):(this[6]=w,w)}get refid_(){return this.is_slink()?this[6]===w?0:this[6].$id_:-1}get refed_by_(){return this[7]}get refed_by_ids_(){let e=[];for(let s of this[7])e.push(s.$id_);return e}del(e=!0){this.$disconn();let s=this.$sdfs_;for(let i of s)bu(i,s);return e&&this.$erase_r(),this}*gen_del_affected_for_bakup(){let e=this.$rsib_,s=this.$parent_,i=this.$lsib_;e!==w&&(yield e),s!==w&&(yield s),i!==w&&(yield i);let r=this.$sdfs_;for(let _ of r)yield*Gn(_,r,!1,!1,!1)}*gen_del(e=!0){let s=this.$rsib_,i=this.$parent_,r=this.$lsib_;this.$disconn(),s!==w&&(yield[Y.update,s]),i!==w&&(yield[Y.update,i]),r!==w&&(yield[Y.update,r]);let _=this.$sdfs_;for(let n of _)yield*Gn(n,_,!0,e,!0);e&&this.$erase_r()}*gen_pend_child_affected_for_bakup(e){if(!this.$_is_chtag_exist(e)){let i=this.$lstch_;i!==w&&(yield i),yield this}}*gen_pend_child(e){if(!this.$_is_chtag_exist(e)){let i=this.$lstch_,r=this.$append_child();r[tt](e),yield[Y.insert,r],i!==w&&(yield[Y.update,i]),yield[Y.update,this]}}*gen_pend_des_affected_for_bakup(e){let s=this;for(let i of e){let r=s.$_child(i);if(r!==w)s=r;else{let _=s.$lstch_;_!==w&&(yield _),yield s,s=r}}}*gen_pend_des(e){for(let s of e){let i=nd.$_child(s);if(i!==w)nd=i;else{let r=nd.$lstch_,_=nd.$append_child();_[tt](s),yield[Y.insert,_],r!==w&&(yield[Y.update,r]),yield[Y.update,nd],nd=_}}}};P.ALGN_SIZE=4;P.prototype.$_pend_child=function(t){if(this.$_is_chtag_exist(t))return w;{let s=this.$append_child();return s[tt](t),s}};P.prototype.$_pend_children=function(t){let e=[];for(let s of t){let i=this.$_pend_child(s);i!==w&&e.push(i)}return e};P.prototype.$_pend_des=function(t){let e=[],s=this;for(let i of t){let r=s.$_child(i);if(r!==w)s=r;else{let _=s.$append_child();_[tt](i),e.push(_),s=_}}return e};P.prototype.$_pend_deses=function(t){let e=[];for(let s of t){let i=this.$_pend_des(s);for(let r of i)e.push(r)}return e};P.FTYPE={unknown:0,dir:1,file:2,slink:3,0:"unknown",1:"dir",2:"file",3:"slink"};P.FGEN_ACTION=Y;ge(P,"SYM",{value:{tag:tt,type:Mn,ref:it},enumerable:!1});xn(P,4);ge(P,"name",{value:Rt});var _t=class extends g{constructor(e,s,i,r=!1){super(e,s,i),this.push(r)}$is_disp_enabled(){return this[3]}$expand(){this[3]=!0}$expand_all(){this.$sdfs_.forEach(e=>e.$expand())}$foldup(){this[3]=!1}$foldup_all(){this.$sdfs_.forEach(e=>e.$foldup())}};_t.ALGN_SIZE=1;var{_add_disp:gu}=At();gu(_t);ge(_t,"name",{value:Rt});function Me(t,e,s){let i=t.constructor,r=t.$forest_,_=Array.from({length:s}).map(n=>r.node(i));return _.forEach(n=>n.$tag_=e),_}var nt=class extends g{constructor(e,s,i,r=""){super(e,s,i),this.push(r)}get $tag_(){return this[3]}set $tag_(e){this[3]=e}$prepend(e="",s=1){let i=Me(this,e,s);return this.$prepend_children(i),i}$append(e="",s=1){let i=Me(this,e,s);return this.$append_children(i),i}$insert_before(e,s="",i=1){let r=Me(this,s,i);return this.$insert_children_before(e,r),r}$insert_after(e,s="",i=1){let r=Me(this,s,i);return this.$insert_children_after(e,r),r}$arsib(e="",s=1){let i=Me(this,e,s);return this.$add_rsibs(i),i}$alsib(e="",s=1){let i=Me(this,e,s);return this.$add_lsibs(i),i}$aparent(e=""){let s=Me(this,e,1);return this.$add_parent(s[0])}};nt.ALGN_SIZE=1;var{_add_sedfs_repr:yu}=At();yu(nt,2);ge(nt,"name",{value:Rt});Hn.exports={LEX_GET_ALGN_OFFSET:eu,_Node:g,_TermNode:Pe,_UiNode:_t,_TagNode:nt,_FileNode:P,_MustLeaf:De,_RefNode:st,_ValNode:He}});var gi=p((Tb,Wn)=>{var jn=fr(),{is_str:vb}=G(),{LEX_GET_ALGN_OFFSET:mu,_Node:ps,_TermNode:ku,_UiNode:wu,_TagNode:Eu,_FileNode:vu,_MustLeaf:Tu,_RefNode:Su,_ValNode:Du}=Pn(),bi=(t=2**16-1,e)=>new jn(t,e),Un=(t=ps,e=2**16-1,s)=>bi(e,s).node(t),Iu=(t=1,e=ps,s=2**16-1,i)=>{let r=Un(e,s,i);return r.$append_children(t),r},Bn=(t,e,s)=>{for(let i=0;i<e.length;++i){let r=t.$append_child();Array.isArray(e[i])?Bn(r,e[i],s):r[s]=e[i]}},Yn=(t=[],e="@",s=ps,i,r=2**16-1,_)=>{i=i??bi(r,_);let n=i.node(s);return Bn(n,t,e),n};Yn.DFLT_DATAK="@";Wn.exports={Forest:jn,creat_forest:bi,LEX_GET_ALGN_OFFSET:mu,_Node:ps,_TermNode:ku,_UiNode:wu,_TagNode:Eu,_FileNode:vu,_MustLeaf:Tu,_RefNode:Su,_ValNode:Du,creat_root:Un,creat_list:Iu,from_nary:Yn}});var Ot=p((Sb,Jn)=>{var Au=t=>t===void 0,qu=t=>t===null,$s=t=>t==null,Ru=t=>t===!0,Ou=t=>t===!1,Vn=t=>t===!0||t===!1,Nu=t=>$s(t)||Vn(t),Cu=t=>$s(t)?null:t,Lu=t=>$s(t)?void 0:t;Jn.exports={_u:void 0,_n:null,_t:!0,_f:!1,is_untf:Nu,is_unnu:$s,is_un:Au,is_nu:qu,is_bl:Vn,is_tru:Ru,is_fls:Ou,unize:Lu,nuize:Cu}});var tl=p((Db,lt)=>{var yi=Object,Nt=yi.defineProperty,Xn=(t,e,s)=>{let i=t.prototype;Nt(i,e,{get:s})},Fu=(t,e,s)=>{let i=t.prototype;Nt(i,e,{set:s})},Gu=(t,e,s,i)=>{let r=t.prototype;Nt(r,e,{get:s,set:i})},xu=(t,...e)=>{for(let s of e)Nt(t,s,{enumerable:!1})},zn=(t,e)=>{Nt(t,"name",{value:e})},Qn=t=>zn(t,"\u200D"),Zn=(t,e)=>Xn(t,Symbol.toStringTag,e),Mu=(t,e)=>{Qn(t),Zn(t,e)},Hu=(t,e)=>Reflect.setPrototypeOf(e.prototype,t.prototype),Pu=t=>{let e=[],s=Reflect.getPrototypeOf(t);for(;s!==null;)e.push(s),s=Reflect.getPrototypeOf(s);return e},ju=t=>{let e=[],s=Reflect.getPrototypeOf(t);for(;s!==null;){let i={y:[],s:[]};i.y=yi.getOwnPropertySymbols(s),i.s=yi.getOwnPropertyNames(s),e.push(i),s=Reflect.getPrototypeOf(s)}return e},mi={add_getter:Xn,add_setter:Fu,add_accessor:Gu,hide:xu,rename:zn,noname:Qn,add_tag:Zn,tag_only:Mu,add_mthds_from_to:Hu,mro:Pu,mro_desc_ks:ju},Kn=Object.keys(mi),el=()=>{for(var t of Kn)Object.defineProperty(globalThis,"_"+t,{value:mi[t],enumerable:!1})},Uu=()=>{for(var t of Kn)delete globalThis["_"+t]};lt.exports=(t=!0)=>(t&&el(),lt.exports);Object.defineProperty(lt.exports,"patch_to_global",{value:el,enumerable:!1,configurable:!1});Object.defineProperty(lt.exports,"unpatch_fr_global",{value:Uu,enumerable:!1,configurable:!1});Object.assign(lt.exports,mi)});var cl=p((Ab,fl)=>{var sl=String,Bu=t=>sl.fromCodePoint(t),Yu=t=>t.codePointAt(0),Wu=t=>sl.fromCharCode(t),Vu=t=>t.charCodeAt(0),Ju=(t,e)=>t.charCodeAt(e),Xu=0,zu=128,il=t=>t<128,Qu=il,Zu=t=>(t&128)===0,Ku=128,ep=2048,rl=t=>t>=128&&t<2048,tp=rl,sp=t=>(t&224)===192,ip=2048,rp=55296,_p=57344,np=65536,_l=t=>t>=2048&&t<55296||t>=57344,lp=_l,op=t=>(t&240)===224,hp=t=>t<55296||t>=57344,ys=t=>t>=55296&&t<=56319,bs=t=>t>=56320&&t<=57343,wi=t=>t>=55296&&t<=57343,fp=55296,cp=56320,ap=56320,dp=57344,up=65536,pp=1114112,$p=t=>t>=65536&&cd<1114112,bp=t=>(t&248)===240,gp=t=>(t&192)===128,yp=[[0,128,1,1],[128,2048,2,1],[2048,55296,3,1],[55296,56320,4,2],[56320,57344,0,1],[57344,65536,3,1]],mp=[128,2048,55296,56320,57344],kp=[[0,55296,2,1],[55296,56320,4,2],[56320,57344,0,1],[57344,65536,2,1]],wp=[55296,56320,57344],Lt=(t,e)=>((t&1023)<<10)+(e&1023)+65536,Ep=t=>{let e=t&255,s=t>>8;return[e,s]},vp=t=>{t=t-65536;let e=t&1023|56320;return[t>>10|55296,e]},Ei=t=>{let e=192|t>>6&31,s=128|t&63;return[e,s]},Ct=t=>{let e=224|t>>12&15,s=128|t>>6&63,i=128|t&63;return[e,s,i]},ms=t=>{let e=240|t>>18&7,s=128|t>>12&63,i=128|t>>6&63,r=128|t&63;return[e,s,i,r]},Tp=(t,e)=>((t&31)<<6)+(e&63),Sp=(t,e,s)=>((t&15)<<12)+((e&63)<<6)+(s&63),Dp=(t,e,s,i)=>((t&7)<<18)+((e&63)<<12)+((s&63)<<6)+(i&63),Ip="true",Ap="false",qp="null",Rp="[",Op="]",Np="{",Cp="}",Lp=",",Fp=":",Gp=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000b","\\f","\\r","\\u000e","\\u000f","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001a","\\u001b","\\u001c","\\u001d","\\u001e","\\u001f"," ","!",'\\"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\\\\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","\x7F"],xp='\\"',Mp="\\\\",ee=[];for(let t=0;t<48;++t)ee[t]=-1;for(let t=48;t<58;++t)ee[t]=t-48;for(let t=58;t<65;++t)ee[t]=-1;for(let t=65;t<71;++t)ee[t]=t-55;for(let t=71;t<97;++t)ee[t]=-1;for(let t=97;t<103;++t)ee[t]=t-87;for(let t=103;t<256;++t)ee[t]=-1;var Hp=(t,e,s,i)=>ee[t]<<24|ee[e]<<16|ee[s]<<8|ee[i],ye=[];for(let t=0;t<256;++t)ye[t]=-1;ye[92]=92;ye[34]=34;ye[98]=8;ye[116]=9;ye[110]=10;ye[102]=12;ye[114]=13;var Pp=t=>ye[t],me=[];for(let t=0;t<256;++t)me[t]=[-1,-1];me[92]=[92,92];me[34]=[92,34];me[98]=[92,8];me[116]=[92,9];me[110]=[92,10];me[102]=[92,12];me[114]=[92,13];var jp=t=>me[t],nl=[[92,117,48,48,48,48],[92,117,48,48,48,49],[92,117,48,48,48,50],[92,117,48,48,48,51],[92,117,48,48,48,52],[92,117,48,48,48,53],[92,117,48,48,48,54],[92,117,48,48,48,55],[92,98],[92,116],[92,110],[92,117,48,48,48,98],[92,102],[92,114],[92,117,48,48,48,101],[92,117,48,48,48,102],[92,117,48,48,49,48],[92,117,48,48,49,49],[92,117,48,48,49,50],[92,117,48,48,49,51],[92,117,48,48,49,52],[92,117,48,48,49,53],[92,117,48,48,49,54],[92,117,48,48,49,55],[92,117,48,48,49,56],[92,117,48,48,49,57],[92,117,48,48,49,97],[92,117,48,48,49,98],[92,117,48,48,49,99],[92,117,48,48,49,100],[92,117,48,48,49,101],[92,117,48,48,49,102]],Up=t=>nl[t],Bp=(t,e)=>ms(Lt(t,e)),Yp=t=>t<=7||t>=14&&t<=31||t===11?6:t===8||t===9||t===10||t===12||t===13||t===34||t===92?2:t<128?1:t<2048?2:t<65536?3:4,Wp=t=>t<=7||t>=14&&t<=31||t===11?6:t===8||t===9||t===10||t===12||t===13||t===34||t===92?2:t<128?1:t<2048?2:t<55296||t>=57344?3:4,Vp=t=>t<=7||t>=14&&t<=31||t===11?6:t===8||t===9||t===10||t===12||t===13||t===34||t===92?2:t<65536?1:2,Jp=t=>t<=7||t>=14&&t<=31||t===11?6:t===8||t===9||t===10||t===12||t===13||t===34||t===92?2:t<128?1:wi(t)?2:1,Xp=t=>{let e,s=0;for(;s<t.length;){if(e=t.charCodeAt(s),e===34||e===92||e<32)return!1;ys(e)&&++s,++s}return!0},zp=t=>{let e,s=0,i=!0,r=0;for(;s<t.length;)e=t.charCodeAt(s),e<128?(r+=1,++s):e<2048?(r+=2,++s,i=!1):e<55296?(r+=3,++s,i=!1):e<56320?(r+=4,s+=2,i=!1):(e<57344,r+=3,++s,i=!1);return[i,r]},Qp=t=>{var e=t.charCodeAt(0);return e<128?e:e<2048?Ei(e)[0]:e<55296?Ct(e)[0]:e<56320?ms(Lt(e,t.charCodeAt(1)))[0]:e<57344?239:Ct(e)[0]},Zp=t=>{var e=t.charCodeAt(t.length-1);return e<128?e:e<2048?Ei(e)[1]:e<55296?Ct(e)[2]:e<56320?189:e<57344?ms(Lt(t.charCodeAt(t.length-2),e))[3]:Ct(e)[2]},Kp=536870889,gs=2**26,e$=(t,e)=>t*gs+e,t$=t=>{let e=t%gs;return[(t-e)/gs,e]},s$=()=>{let t=[];for(let e=0;e<1024;++e)for(let s=0;s<1024;++s)t.push(-1);return t},ll=(t,e,s)=>t[(e-55296<<10)+(s-56320)];ll.LEX="mat[((hi - 55296)<<10) + (lo-56320)]";var ol=(t,e,s,i=-1)=>t[(e-55296<<10)+(s-56320)]=i;ol.LEX="mat[((hi - 55296)<<10) + (lo-56320)] = v";var i$=()=>{let t=[];for(let e=0;e<1024;++e){let s=e+55296;for(let i=0;i<1024;++i){let r=i+56320;t.push(Lt(s,r))}}return t},r$=i$(),_$=()=>{let t=[],e=0;for(let s=0;s<256;++s)t.push(-1);e=1;for(let s=0;s<256;++s)s<=127?t.push(1):s>=192&&s<224?t.push(2):s>=224&&s<240?t.push(3):s>=240&&s<248?t.push(5):t.push(-1);e=2;for(let s=0;s<256;++s)s>=128&&s<192?t.push(1):t.push(-1);e=3;for(let s=0;s<256;++s)s>=128&&s<192?t.push(4):t.push(-1);e=4;for(let s=0;s<256;++s)s>=128&&s<192?t.push(1):t.push(-1);e=5;for(let s=0;s<256;++s)s>=128&&s<192?t.push(6):t.push(-1);e=6;for(let s=0;s<256;++s)s>=128&&s<192?t.push(7):t.push(-1);e=7;for(let s=0;s<256;++s)s>=128&&s<192?t.push(1):t.push(-1);return t},ke=_$();ke.init=1;ke.wait_for_u82_1=2;ke.wait_for_u83_1=3;ke.wait_for_u83_2=4;ke.wait_for_u84_1=5;ke.wait_for_u84_2=6;ke.wait_for_u84_3=7;var n$=(t,e)=>ke[(t<<8)+e],ki=class{state=1;val=-1;input(e){let s=this.state,i=n$(this.state,e);switch(this.state=i,s){case 1:{if(i===1)return e;if(i===2)this.val=(e&31)<<6;else if(i===3)this.val=(e&15)<<12;else if(i===5)this.val=(e&7)<<18;else return i;break}case 2:if(i===1){let r=this.val+(e&63);return this.val=-1,r}else return i;case 3:if(i===4){this.val=this.val+((e&63)<<6);break}else return i;case 4:if(i===1){let r=this.val+(e&63);return this.val=-1,r}else return i;case 5:if(i===6){this.val=this.val+((e&63)<<12);break}else return i;case 6:if(i===7){this.val=this.val+((e&63)<<6);break}else return i;case 7:if(i===1){let r=this.val+(e&63);return this.val=-1,r}else return i;default:return s}}reset(){this.state=1,this.val=-1}},hl=()=>new ki,Ib=hl(),l$=65533,o$=String.fromCharCode(65533),h$=[239,191,189],f$=t=>t<=255&&t>=0,c$=t=>t>=128&&t<=255,a$=t=>t>=256&&t<2048,d$=t=>ys(t.charCodeAt(t.length-1)),u$=t=>bs(t.charCodeAt(0)),p$=t=>{for(let e=0;e<t.length;++e){let s=t.charCodeAt(e);if(wi(s))return!1}return!0},$$=t=>{for(let e=0;e<t.length;++e){let s=t.charCodeAt(e);if(bs(s))return!1;if(ys(s)){if(++e,e===t.length)return!1;{let i=t.charCodeAt(e);if(bs(s))++e;else return!1}}}return!0};fl.exports={cpt2ch:Bu,ch2cpt:Yu,cd2ch:Wu,ch2cd:Vu,cd_at:Ju,U81_CD_SI:Xu,U81_CD_EI:zu,is_u81_cd:il,is_u81_cpt:Qu,is_u81_head_byte:Zu,U82_CD_SI:Ku,U82_CD_EI:ep,is_u82_cd:rl,is_u82_cpt:tp,cpt_to_u82:Ei,is_u82_head_byte:sp,u82_to_cpt:Tp,U83_CD_SI0:ip,U83_CD_EI0:rp,U83_CD_SI1:_p,U83_CD_EI1:np,is_u83_cd:_l,is_u83_cpt:lp,cpt_to_u83:Ct,is_u83_head_byte:op,u83_to_cpt:Sp,U16_HI_CD_SI:fp,U16_HI_CD_EI:cp,U16_LO_CD_SI:ap,U16_LO_CD_EI:dp,is_len1_u16_cd:hp,is_u16_hi_cd:ys,is_u16_lo_cd:bs,is_u16_hilo_cd:wi,cpt_to_hilo:vp,hilo_to_cpt:Lt,cpt_to_u16_len1_pair:Ep,U84_CPT_SI:up,U84_CPT_EI:pp,is_u84_cpt:$p,cpt_to_u84:ms,is_u84_head_byte:bp,u84_to_cpt:Dp,is_u8_follow_byte:gp,ITER_ON_STR_FOR_U8X_HINT_MAT:yp,ITER_ON_STR_FOR_U8X_HINT_ARY:mp,ITER_ON_STR_FOR_U16_HINT_MATINT:kp,ITER_ON_STR_FOR_U16_HINT_ARY:wp,TRU_STR:Ip,FLS_STR:Ap,NU_STR:qp,LBK_CH:Rp,RBK_CH:Op,LBC_CH:Np,RBC_CH:Cp,COMMA_CH:Lp,COLON_CH:Fp,JSON_SER_1_to_31_ARY:Gp,JSON_SER_34:xp,JSON_SER_92:Mp,HEXA:ee,esc_u_to_cd:Hp,esc_charcd_to_realcd:Pp,esc_realcd_to_cdpair:jp,hilo_to_utf8_slice:Bp,JSON_1TO31_SER_SLICE:nl,json_1to31_ser_slice:Up,u8blen_after_jstringify_with_cpt:Yp,u8blen_after_jstringify_with_cd:Wp,slen_after_jstringify_with_cpt:Vp,slen_after_jstringify_with_cd:Jp,can_just_quote_when_json_stringify:Xp,JS_MAX_SLEN_EI:Kp,NV_MAX_SLEN_EI:gs,encd_srng:e$,decd_srng:t$,creat_hilo_mat:s$,get_from_hilo_mat:ll,set_hilo_mat_at:ol,HILO_CPT_MAT:r$,UTF8_STATE_MAT:ke,creat_utf8_cpt_cache:hl,bad_utf8_cd:l$,bad_utf8_char:o$,bad_utf83_tuple:h$,is_latin1_cd:f$,is_latin1_but_not_ascii_cd:c$,is_u82_but_not_latin1_cd:a$,is_str_end_with_hi:d$,is_str_begin_with_lo:u$,is_good_utf16_str:p$,is_valid_utf16_str:$$,utf8_encd_info:zp,fst_utf8_byte:Qp,lst_utf8_byte:Zp}});var al=p((Cb,je)=>{var{_u:ks,_n:qb,_t:Rb,_f:Ob}=Ot(),Nb=cl(),ws=92,_e=t=>t===9||t===32,ce=10,ae=13,b$=t=>t===10||t===13,Ft=t=>_e(t)||b$(t),N=t=>t===39||t===34||t===96,d={init:0,word:1,q:2,q_esc:3,wsnl:4,op:5,esc_r:6,ws:40},ot=class{lefted="";q=-1;state=0;words=[];si=0;i=0;init_with(e,s=[46,91,93]){let i=e.charCodeAt(0);return this.si=0,Ft(i)?this.state=d.wsnl:N(i)?(this.state=d.q,this.q=i):s.includes(i)?this.state=d.op:this.state=d.word,this.i=1,e}continue_with(e,s=[46,91,93]){return this.state===0?this.init_with(e,s):(e=this.lefted+e,this.si=0,this.i=this.lefted.length,this.lefted="",e)}},g$=(t,e,s=[".","[","]"])=>{let i=s.map(n=>n.charCodeAt(0)),r=[];e===ks?(e=new ot,t=e.init_with(t,i)):t=e.continue_with(t,i);let _=t.length;for(;e.i<_;){let n=t.charCodeAt(e.i);e.state===d.word?(Ft(n)?(r.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.wsnl):N(n)?(r.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.q,e.q=n):i.includes(n)&&(r.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.op),++e.i):e.state===d.q?n===ws?(e.state=d.q_esc,++e.i):N(n)?(n===e.q?(r.push(t.slice(e.si,e.i+1)),e.q=-1,++e.i,e.state=d.init):++e.i,e.si=e.i):++e.i:e.state===d.q_esc?(++e.i,e.state=d.q):e.state===d.wsnl?(Ft(n)||(N(n)?(e.si=e.i,e.state=d.q,e.q=n):i.includes(n)?(e.si=e.i,e.state=d.op):(e.si=e.i,e.state=d.word)),++e.i):e.state===d.op?(Ft(n)?(r.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.wsnl):N(n)?(r.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.q,e.q=n):i.includes(n)||(r.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.word),++e.i):(Ft(n)?(e.state=d.wsnl,e.si=e.i):N(n)?(e.si=e.i,e.state=d.q,e.q=n):i.includes(n)?(e.si=e.i,e.state=d.op):(e.si=e.i,e.state=d.word),++e.i)}return e.lefted=t.slice(e.si,e.i),e.si=0,e.i=0,[r,e]},y$=(t,e)=>{let s=[];e===ks?e=new ot:(t=e.lefted+t,e.si=0,e.i=e.lefted.length,e.lefted="");let i=t.length;for(;e.i<i;){let r=t.charCodeAt(e.i);e.state===d.init?(r===10?(s.push(t.slice(e.si,e.i)),e.si=e.i+1):N(r)?(e.state=d.q,e.q=r):r===13&&(s.push(t.slice(e.si,e.i)),e.si=e.i+1,e.state=d.esc_r),++e.i):e.state===d.q?r===ws?(e.state=d.q_esc,++e.i):N(r)&&r===e.q?(e.q=-1,++e.i,e.state=d.init):++e.i:e.state===d.q_esc?(++e.i,e.state=d.q):(r===10?(e.si=e.i+1,e.state=d.init):N(r)?(e.state=d.q,e.q=r):r===13?(s.push(""),e.si=e.i+1):e.state=d.init,++e.i)}return e.lefted=t.slice(e.si,e.i),e.si=0,e.i=0,[s,e]},vi=["!","%","&","*","+","-",".","/",":","<","=",">","?","^","|","~",",",";","#","@","(",")","[","]","{","}","\u3010","\u3011","\uFF08","\uFF09","\u300A","\u300B","\xAB","\xBB","\uFF3B","\uFF3D","\uFF5B","\uFF5D"],m$=(t,e,s=vi)=>{let i=s.map(l=>l.charCodeAt(0)),r=[],_=[];e===ks?(e=new ot,t=e.init_with(t,i)):t=e.continue_with(t,i);let n=t.length;for(;e.i<n;){let l=t.charCodeAt(e.i);e.state===d.word?(l===ce?(_.push(t.slice(e.si,e.i)),r.push(_),_=[],e.si=e.i+1,e.state=d.init):l===ae?(_.push(t.slice(e.si,e.i)),r.push(_),_=[],e.si=e.i+1,e.state=d.esc_r):_e(l)?(_.push(t.slice(e.si,e.i)),e.si=e.i+1,e.state=d.ws):N(l)?(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.q,e.q=l):i.includes(l)&&(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.op),++e.i):e.state===d.esc_r?(l===ce?(e.si=e.i+1,e.state=d.init):l===ae?(r.push([]),_=[],e.si=e.i+1):_e(l)?(_.push(""),e.si=e.i+1,e.state=d.ws):N(l)?(e.si=e.i,e.state=d.q,e.q=l):i.includes(l)?(e.si=e.i,e.state=d.op):(e.si=e.i,e.state=d.word),++e.i):e.state===d.q?l===ws?(e.state=d.q_esc,++e.i):N(l)?(l===e.q?(_.push(t.slice(e.si,e.i+1)),e.q=-1,++e.i,e.state=d.init):++e.i,e.si=e.i):++e.i:e.state===d.q_esc?(++e.i,e.state=d.q):e.state===d.ws?(l===ce?(_.push(""),r.push(_),_=[],e.si=e.i+1,e.state=d.init):l===ae?(_.push(""),r.push(_),_=[],e.si=e.i+1,e.state=d.esc_r):_e(l)||(N(l)?(e.si=e.i,e.state=d.q,e.q=l):i.includes(l)?(e.si=e.i,e.state=d.op):(e.si=e.i,e.state=d.word)),++e.i):e.state===d.op?(l===ce?(_.push(t.slice(e.si,e.i)),r.push(_),_=[],e.si=e.i+1,e.state=d.init):l===ae?(_.push(t.slice(e.si,e.i)),r.push(_),_=[],e.si=e.i+1,e.state=d.esc_r):_e(l)?(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.ws):N(l)?(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.q,e.q=l):i.includes(l)||(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.word),++e.i):(l===ce?(r.push(_),_=[],e.si=e.i+1):l===ae?e.state=d.esc_r:_e(l)?(e.state=d.ws,e.si=e.i,e.wscnt=0):N(l)?(e.si=e.i,e.state=d.q,e.q=l):i.includes(l)?(e.si=e.i,e.state=d.op):(e.si=e.i,e.state=d.word),++e.i)}return e.lefted=t.slice(e.si,e.i),e.si=0,e.i=0,[r,_,e]},Ti=(t,e,s=vi)=>{let i=s.map(l=>l.charCodeAt(0)),r=[],_=[];e===ks?(e=new ot,t=e.init_with(t,i),e.wscnt=0,e.ln=_):(t=e.continue_with(t,i),_=e.ln);let n=t.length;for(;e.i<n;){let l=t.charCodeAt(e.i);e.state===d.word?(l===ce?(_.push(t.slice(e.si,e.i)),r.push(_),_=[],e.si=e.i+1,e.state=d.init):l===ae?(_.push(t.slice(e.si,e.i)),r.push(_),_=[],e.si=e.i+1,e.state=d.esc_r):_e(l)?(_.push(t.slice(e.si,e.i)),e.si=e.i+1,e.state=d.ws,e.wscnt=0):N(l)?(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.q,e.q=l):i.includes(l)&&(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.op),++e.i):e.state===d.esc_r?(l===ce?(e.si=e.i+1,e.state=d.init):l===ae?(r.push([]),_=[],e.si=e.i+1):_e(l)?(_.push(""),e.si=e.i+1,e.state=d.ws,e.wscnt=0):N(l)?(e.si=e.i,e.state=d.q,e.q=l):i.includes(l)?(e.si=e.i,e.state=d.op):(e.si=e.i,e.state=d.word),++e.i):e.state===d.q?l===ws?(e.state=d.q_esc,++e.i):N(l)?(l===e.q?(_.push(t.slice(e.si,e.i+1)),e.q=-1,++e.i,e.state=d.init):++e.i,e.si=e.i):++e.i:e.state===d.q_esc?(++e.i,e.state=d.q):e.state===d.ws?(l===ce?(e.wscnt!==0&&_.push(" ".repeat(e.wscnt)),e.wscnt=0,_.push(""),r.push(_),_=[],e.si=e.i+1,e.state=d.init):l===ae?(e.wscnt!==0&&_.push(" ".repeat(e.wscnt)),e.wscnt=0,_.push(""),r.push(_),_=[],e.si=e.i+1,e.state=d.esc_r):_e(l)?++e.wscnt:N(l)?(e.wscnt!==0&&_.push(" ".repeat(e.wscnt)),e.wscnt=0,e.si=e.i,e.state=d.q,e.q=l):i.includes(l)?(e.wscnt!==0&&_.push(" ".repeat(e.wscnt)),e.wscnt=0,e.si=e.i,e.state=d.op):(e.wscnt!==0&&_.push(" ".repeat(e.wscnt)),e.wscnt=0,e.si=e.i,e.state=d.word),++e.i):e.state===d.op?(l===ce?(_.push(t.slice(e.si,e.i)),r.push(_),_=[],e.si=e.i+1,e.state=d.init):l===ae?(_.push(t.slice(e.si,e.i)),r.push(_),_=[],e.si=e.i+1,e.state=d.esc_r):_e(l)?(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.ws,e.wscnt=0):N(l)?(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.q,e.q=l):i.includes(l)||(_.push(t.slice(e.si,e.i)),e.si=e.i,e.state=d.word),++e.i):(l===ce?(r.push(_),_=[],e.si=e.i+1):l===ae?e.state=d.esc_r:_e(l)?(e.state=d.ws,e.si=e.i,e.wscnt=0):N(l)?(e.si=e.i,e.state=d.q,e.q=l):i.includes(l)?(e.si=e.i,e.state=d.op):(e.si=e.i,e.state=d.word),++e.i)}return e.lefted=t.slice(e.si,e.i),e.si=0,e.i=0,e.ln=_,[r,e]};Ti.to_str=(t,e)=>{var s=m.map(r=>r.join("")).join(`
16
+ `),i=e.ln.slice(0);return i.push(e.lefted),s+`
17
+ `+i.join("")};je.exports=t=>{var[e,s]=Ti(t),i=s.ln.slice(0);return i.push(s.lefted),e.push(i),e};je.exports.split_with_wsnl=g$;je.exports.split_with_nl_ignore_op=y$;je.exports.MAYBE_SIGNS=vi;je.exports.split_to_mat=m$;je.exports.split_to_mat_keep_ws=Ti});var ul=p((Lb,dl)=>{var Si=Array;dl.exports=()=>{Si.prototype._ibfr=function(t,e){return this.splice(t,0,e),this},Si.prototype._iaft=function(t,e){return this.splice(t+1,0,e),this},Si.prototype._rm=function(t){return this.splice(t,1),this}}});var yl=p((xb,gl)=>{var k$=JSON.stringify,{_u:w$,_n:E$,_t:Fb,_f:Gb}=Ot(),{split_with_nl_ignore_op:v$}=al(),pl=ul();pl();var T$=t=>t>=55296&&t<=56319,S$=t=>{let e,s=0;for(;s<t.length;){if(e=t.charCodeAt(s),e===34||e===92||e<32)return!1;T$(e)&&++s,++s}return!0},$l=t=>{let e="";for(let s in t){e=e+s;let i=t[s];i===E$||i===w$||(i=k$(i),e=e+"="+i),e=e+" "}return e=e.trim(),e},D$=(t,e,s=0,i=`
18
+ `)=>{let r=" ".repeat(s);e=$l(e);let _;return e.length===0?_=r+"<"+t+">"+i:_=r+"<"+t+" "+e+">"+i,_},bl=t=>{t=t.trim();let[e,s]=v$(t),i=s.lefted.trim();return i===""||e.push(i),e=e.map(r=>r.trim()),e.join(`
19
+ `)},I$=(t,e=0,s=`
20
+ `,i=!1)=>e!==0?(t=" ".repeat(e)+bl(t),t=i?encodeURIComponent(t):t,t+s):(t=t.trim(),t=i?encodeURIComponent(t):t,t+s),A$=(t,e=0,s=`
21
+ `)=>" ".repeat(e)+"</"+t+">"+s;gl.exports={can_just_quote_when_json_stringify:S$,creat_attr_str:$l,creat_stag:D$,creat_text:I$,trim_lines:bl,creat_etag:A$,_ary_patch:pl}});var Sl=p((Mb,Tl)=>{var q$=Object,ht={un:"undefined",bl:"boolean",str:"string",num:"number",obj:"object",sym:"symbol",bi:"bigint",func_like:"function"},ft=(t,e)=>typeof t===e,R$=(t,e)=>t instanceof e,O$=t=>ft(t,ht.str),N$=t=>ft(t,ht.sym),C$=t=>Symbol.keyFor(t)!==void 0,L$=t=>Symbol.keyFor(t)===void 0,F$=t=>ft(t,ht.bi),ml=t=>ft(t,ht.num),kl=t=>q$.is(t,NaN),wl=t=>t===1/0,El=t=>t===-1/0,vl=t=>kl(t)||wl(t)||El(t),G$=t=>!vl(t)&&ml(t),x$=t=>1/t===1/0,M$=t=>1/t===-1/0,H$=t=>ft(t,ht.func_like);Tl.exports={TNAMED:ht,typof:ft,is_str:O$,is_num:ml,is_sym:N$,is_glb_sym:C$,is_non_glb_sym:L$,is_bi:F$,istof:R$,is_abnormal_num:vl,is_nan:kl,is_pos_infi:wl,is_neg_infi:El,is_normal_num:G$,is_pos_zero:x$,is_neg_zero:M$,is_func_like:H$}});var Ii=p((Vb,Il)=>{var{is_bl:Hb,_u:Pb,_n:Dl,_t:jb,_f:Ub}=Ot(),{typof:Bb,istof:P$,is_str:Yb,is_num:Wb}=Sl(),j$=Array.isArray,U$=t=>P$(t,Object),Di=t=>{if(j$(t)){let e=[];for(let s=0;s<t.length;++s)e.push(Di(t[s]));return e}else{if(t===Dl)return Dl;if(U$(t)){let e={};for(let s in t)e[s]=Di(t[s]);return e}else return t}},B$=t=>{let e=0;for(let s=0;s<t.length;++s)(t[s]==="<"||t[s]===">")&&++e;return e*2},Es=t=>{let e=0;if(Array.isArray(t))for(let s=0;s<t.length;++s)e+=Es(t[s]);else if(t!==null){if(t instanceof Object)for(let s in t)e+=Es(t[s])}return++e,e},Y$=t=>Es(t)/3;Il.exports={jdcp:Di,estimate_cnt_from_html_text:B$,jcnt:Es,estimate_cnt_from_ntac:Y$}});var ct=p((Jb,Al)=>{var W$=()=>({buildNTAC:!0,buildHTML:!0,compressedHTML:!1,decodeEntities:!0,recognizeSelfClosing:!0,recognizeCDATA:!0}),V$=()=>({buildNTAC:!0,buildHTML:!0,compressedHTML:!1});Al.exports={HTML_DFLT_PARSER_CFG:W$,NTAC_DFLT_PARSER_CFG:V$}});var Rl=p((Xb,ql)=>{var J$=(t,e)=>{for(let s in t)s in e&&(e[s]=t[s]);return e},X$=(t,e)=>{for(let s in t)s in e||(e[s]=t[s]);return e},z$=(t,e)=>{for(let s in t)e[s]=t[s];return e};ql.exports={update_only_for_exist:J$,extend_without_change_exist:X$,update_and_extend:z$}});var Nl=p((zb,Ol)=>{Ol.exports=function(){let t=this.rslts.length-4;for(;t>=0;){let e=this.rslts[t],s=this.rslts[t+1];if(e===2&&s===-1)return t;if(s===-1&&(e===3||e===4))return-1;t-=4}return-1}});var Gl=p((Qb,Fl)=>{var at=Symbol("dummy");function Q$(t,e,s=!0){let i=t.toString(2),r=Array.from(i).map(n=>parseInt(n));e=e===void 0?r.length:e;let _=e-r.length;if(_>0){let n=Array.from({length:_}).map(l=>0);return s?n.concat(r):r.concat(n)}else return s?r.slice(0,e):r.slice(-_)}function*Z$(t){for(let e=0;e<2**t.length;e++){let s=Q$(e,t.length).reverse();yield t.filter((r,_)=>s[_]===1)}}function K$(t){return t.cache.filter(e=>e===at).length===0}function e1(t){return t.depth===0}function t1(t){let e=Array.from({length:t.length}).map(r=>at),s=Object.entries(t).map(r=>[parseInt(r[0]),{origi:parseInt(r[0]),cachei:null,origv:r[1]}]);return{desc:Object.fromEntries(s),cache:e,ctrl:null,depth:0}}function s1(t){let e=t.cache.indexOf(at);return e>=0?(t.ctrl=t.desc[t.depth],t.ctrl.cachei=e,t.cache[e]=t.ctrl,t.depth=t.depth+1,t):null}function Cl(t){if(e1(t))return null;{let e=t.ctrl.origi-1,s=e>=0?t.desc[e]:null,i=t.ctrl.cachei;return t.cache[i]=at,t.ctrl.cachei=null,t.ctrl=s,t.depth=t.depth-1,t}}function i1(t){if(t.ctrl===null)return null;let s=t.ctrl.cachei+1,i=!1;for(;s<t.cache.length;)if(t.cache[s]===at){i=!0;break}else s=s+1;return i?s:null}function Ll(t){let e=i1(t);return e!==null?(t.cache[t.ctrl.cachei]=at,t.cache[e]=t.ctrl,t.ctrl.cachei=e,t):null}function r1(t){let e=Cl(t);for(;e!==null;){let s=Ll(e);if(s!==null)return s;e=Cl(e)}return e}function _1(t){let e=s1(t);if(e!==null)return e;{let s=Ll(t);return s!==null?s:r1(t)}}function*n1(t){let e=t1(t);for(;e!==null;)K$(e)&&(yield e.cache.map(s=>s.origv)),e=_1(e)}Fl.exports={comb:Z$,perm:n1}});var Ml=p((Zb,xl)=>{xl.exports=(t,e,...s)=>{let i=s.map(l=>Array.isArray(l)?[l[0],l[1]]:[l,l+1]).filter(([l,o])=>l<e&&o>t);i=i.map(([l,o])=>[Math.max(l,t),Math.min(o,e)]),i.sort((l,o)=>l[0]-o[0]);let r=[];if(i.length>0){let l=i[0];for(let o=1;o<i.length;o++){let h=i[o];h[0]<l[1]?l[1]=Math.max(l[1],h[1]):(r.push(l),l=h)}r.push(l)}let _=[],n=t;for(let[l,o]of r)l>n&&_.push([!1,n,l]),_.push([!0,l,o]),n=o;return n<e&&_.push([!1,n,e]),_}});var Pl=p((Kb,Hl)=>{var l1=Ml(),Gt=(t,e,...s)=>{let i=l1(0,t.length,...s),r="";for(let[_,n,l]of i)_?r+=e(n,l,t):r+=t.slice(n,l);return r},o1=(t,...e)=>Gt(t,(s,i,r)=>r.slice(s,i).toUpperCase(),...e),h1=(t,...e)=>Gt(t,(s,i,r)=>r.slice(s,i).toLowerCase(),...e);Gt.up=o1;Gt.lo=h1;Hl.exports=Gt});var Ul=p((eg,jl)=>{var{comb:f1}=Gl(),c1=Pl(),a1=(t,e=new Set)=>{t=t.toUpperCase();let s=Array.from({length:t.length}).map((r,_)=>_),i=f1(s);for(let r of i){let _=c1.lo(t,...r);e.add(_)}return e};jl.exports=t=>{let e=new Set;for(let s of t)a1(s,e);return Object.freeze(e),e}});var Ue=p((tg,zl)=>{var Ai=Ul(),Bl=Ai(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);Object.freeze(Bl);var Yl=Ai(["style","script","textarea","title"]);Object.freeze(Yl);var Wl=Ai(["class","rel","sandbox","allow","headers","aria-describedby","aria-labelledby"]);Object.freeze(Wl);var Vl=-(2**31),Jl=Vl+1,d1=Jl+1,u1=-1,Xl=JSON.parse(JSON.stringify({text:1,open:2,leaf:3,clos:4}));Object.freeze(Xl);zl.exports={VOID_TAGS:Bl,RAW_TAGS:Yl,NEED_TO_SP_ATTR_NMS:Wl,EOF:Vl,NUL:Jl,EMPTY_STR:d1,UNKNOWN:u1,TYPES:Xl}});var Zl=p((sg,Ql)=>{var{NUL:p1,EMPTY_STR:$1}=Ue();Ql.exports=function(t){let e=[],s=this.rslts;for(let i=0;i<s.length;i+=4){let r=s[i],_=s[i+1],n=s[i+2],l=s[i+3];if(_!==-1){let o=t.slice(r,_),h;n===p1?h=null:n===$1?h="":h=t.slice(n,l),e.push([o,h])}else{let o=r,h=t.slice(n,l);e.push([o,h])}}return e}});var eo=p((ig,Kl)=>{Kl.exports=function(t){let e=this.lefted.length,s=this.lefted+t;return this.lefted="",[s,e]}});var so=p((rg,to)=>{var b1=t=>t===9||t===11||t===12||t===65279,g1=t=>t===32||t===160||t===5760||t>=8192&&t<=8202||t===8239||t===8287||t===12288,y1=t=>t===32||t===9||t===11||t===12||t===160||t===5760||t===65279||t>=8192&&t<=8202||t===8239||t===8287||t===12288;to.exports={is_ws:y1,is_not_usp:b1,is_usp:g1,esc_t_cd:9,esc_v_cd:11,esc_f_cd:12,sp_cd:32,sp160_cd:160,_5760_cd:5760,_2000_cd:8192,_2001_cd:8193,_2002_cd:8194,_2003_cd:8195,_2004_cd:8196,_2005_cd:8197,_2006_cd:8198,_2007_cd:8199,_2008_cd:8200,_2009_cd:8201,_200a_cd:8202,_202f_cd:8239,_205f_cd:8287,_3000_cd:12288,_feff_cd:65279}});var _o=p((_g,io)=>{var m1=t=>t===10||t===13||t===8232||t===8233,k1=t=>t===8232||t===8233,w1=t=>t===13;io.exports={is_nl:m1,can_in_single_q_slit_except_for_ln_conti:k1,can_be_lefted:w1,esc_n_cd:10,esc_r_cd:13,_8232_cd:8232,_8233_cd:8233}});var co=p((ng,fo)=>{var E1=t=>t>=55296&&t<=56319,no=t=>t>=48&&t<=57,v1=t=>t===oo||t===ho,T1=t=>t>=65&&t<=90||t>=97&&t<=122,lo=t=>T1(t)||t===95||t===45,S1=t=>lo(t)||no(t)||t===58,{is_ws:D1}=so(),{is_nl:I1}=_o(),A1=t=>D1(t)||I1(t)||t===44||t===59,q1=60,R1=62,O1=47,oo=34,N1=61,C1=33,ho=39,L1=58,F1=45;fo.exports={is_u16_hi_cd:E1,is_digit:no,is_sp:A1,is_start:lo,is_follow:S1,is_q:v1,LT:q1,GT:R1,DIV:O1,DQ:oo,EQ:N1,BANG:C1,SQ:ho,COLON:L1,DASH:F1}});var Do=p((fg,So)=>{var{is_u16_hi_cd:G1,is_sp:x1,is_digit:M1,is_start:H1,is_follow:lg,is_q:og,LT:P1,GT:j1,DIV:U1,DQ:B1,EQ:Y1,BANG:W1,SQ:V1,COLON:J1,DASH:hg}=co(),ao=1,uo=2,po=3,$o=4,bo=5,go=6,yo=7,mo=8,ko=9,wo=10,Eo=11,vo=12,To=13,W=t=>H1(t)?ao:M1(t)?uo:t===J1?po:x1(t)?$o:t===P1?bo:t===U1?go:t===j1?yo:t===Y1?mo:t===B1?ko:t===V1?wo:t===W1?Eo:G1(t)?vo:To;W.HISTART=ao;W.HIDIGIT=uo;W.HICOLON=po;W.HISP=$o;W.HILT=bo;W.HIDIV=go;W.HIGT=yo;W.HIEQ=mo;W.HIDQ=ko;W.HISQ=wo;W.HIBANG=Eo;W.HI_INVALID_ADV_2=vo;W.HI_INVALID_ADV_1=To;So.exports=W});var qo=p((cg,Ao)=>{var{VOID_TAGS:Io,NEED_TO_SP_ATTR_NMS:vs}=Ue(),X1=Do();Ao.exports=function(t,e){for(;e<t.length;){let s=X1(t.charCodeAt(e));switch(this.stt){case 1:{switch(s){case 5:{this.tei=e,this.tei-this.tsi>0&&this.rslts.push(1,-1,this.tsi,this.tei),this.tsi=-1,this.tei=-1,this.stt=12,e+=1;break}case 12:{e+=2;break}default:{e+=1;break}}break}case 2:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.tei=e,Io.has(t.slice(this.tsi,this.tei))?(this.rslts.push(3,-1,this.tsi,this.tei),this.stt=14):(this.rslts.push(2,-1,this.tsi,this.tei),this.stt=15),this.tsi=-1,this.tei=-1,e+=1;break}case 6:{this.tei=e,this.rslts.push(3,-1,this.tsi,this.tei),this.tsi=-1,this.tei=-1,this.stt=32,e+=1;break}case 7:{this.tei=e,Io.has(t.slice(this.tsi,this.tei))?this.rslts.push(3,-1,this.tsi,this.tei):this.rslts.push(2,-1,this.tsi,this.tei),this.tei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 12:{this.tsi=-1,this.tei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.tsi=-1,this.tei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 3:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.tei=e,this.rslts.push(4,-1,this.tsi,this.tei),this.tsi=-1,this.tei=-1,this.stt=32,e+=1;break}case 6:{this.tei=e,this.rslts.push(4,-1,this.tsi,this.tei),this.tsi=-1,this.tei=-1,this.stt=32,e+=1;break}case 7:{this.tei=e,this.rslts.push(4,-1,this.tsi,this.tei),this.tei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 12:{this.tsi=-1,this.tei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.tsi=-1,this.tei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 4:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.kei=e,this.stt=22,e+=1;break}case 6:{this.kei=e,this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.stt=32,e+=1;break}case 7:{this.kei=e,this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 8:{this.kei=e,this.stt=16,e+=1;break}case 12:{this.ksi=-1,this.kei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.ksi=-1,this.kei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 5:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.kei=e,this.stt=23,e+=1;break}case 6:{this.rslts[this.find_lst_open_tag_idx_in_rslts()]=3,this.kei=e,this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.stt=32,e+=1;break}case 7:{this.kei=e,this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 8:{this.kei=e,this.stt=17,e+=1;break}case 12:{this.ksi=-1,this.kei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.ksi=-1,this.kei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 6:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=14,e+=1;break}case 6:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=32,e+=1;break}case 7:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 12:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 7:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=15,e+=1;break}case 6:{this.rslts[this.find_lst_open_tag_idx_in_rslts()]=3,this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=32,e+=1;break}case 7:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 12:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 8:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.vsi=-1,this.vei=-1,this.stt=18,e+=1;break}case 9:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=14,e+=1;break}case 12:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 9:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.vsi=-1,this.vei=-1,this.stt=19,e+=1;break}case 9:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=15,e+=1;break}case 12:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 10:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.vsi=-1,this.vei=-1,this.stt=20,e+=1;break}case 10:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=14,e+=1;break}case 12:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 11:{switch(s){case 1:{e+=1;break}case 2:{e+=1;break}case 3:{e+=1;break}case 4:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.vsi=-1,this.vei=-1,this.stt=21,e+=1;break}case 10:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=15,e+=1;break}case 12:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.vsi=-1,this.vei=-1,this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 12:{switch(s){case 1:{this.tsi=e,this.stt=2,e+=1;break}case 4:{e+=1;break}case 6:{this.stt=13,e+=1;break}case 7:{this.tsi=e+1,this.stt=1,e+=1;break}case 11:{this.stt=32,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 13:{switch(s){case 1:{this.tsi=e,this.stt=3,e+=1;break}case 4:{e+=1;break}case 6:{e+=1;break}case 7:{this.tsi=e+1,this.stt=1,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 14:{switch(s){case 1:{this.ksi=e,this.stt=4,e+=1;break}case 4:{e+=1;break}case 6:{this.stt=32,e+=1;break}case 7:{this.tsi=e+1,this.stt=1,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 15:{switch(s){case 1:{this.ksi=e,this.stt=5,e+=1;break}case 4:{e+=1;break}case 6:{this.rslts[this.find_lst_open_tag_idx_in_rslts()]=3,this.stt=32,e+=1;break}case 7:{this.tsi=e+1,this.stt=1,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 16:{switch(s){case 1:{this.vsi=e,this.stt=6,e+=1;break}case 4:{e+=1;break}case 6:{this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.tsi=-1,this.tei=-1,this.ksi=-1,this.kei=-1,this.stt=32,e+=1;break}case 7:{this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 9:{vs.has(t.slice(this.ksi,this.kei))?this.stt=18:this.stt=28,e+=1;break}case 10:{vs.has(t.slice(this.ksi,this.kei))?this.stt=20:this.stt=30,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 17:{switch(s){case 1:{this.vsi=e,this.stt=7,e+=1;break}case 4:{e+=1;break}case 6:{this.rslts[this.find_lst_open_tag_idx_in_rslts()]=3,this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.stt=32,e+=1;break}case 7:{this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 9:{vs.has(t.slice(this.ksi,this.kei))?this.stt=19:this.stt=29,e+=1;break}case 10:{vs.has(t.slice(this.ksi,this.kei))?this.stt=21:this.stt=31,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 18:{switch(s){case 1:{this.vsi=e,this.stt=8,e+=1;break}case 4:{e+=1;break}case 9:{this.ksi=-1,this.kei=-1,this.stt=14,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 19:{switch(s){case 1:{this.vsi=e,this.stt=9,e+=1;break}case 4:{e+=1;break}case 9:{this.ksi=-1,this.kei=-1,this.stt=15,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 20:{switch(s){case 1:{this.vsi=e,this.stt=10,e+=1;break}case 4:{e+=1;break}case 10:{this.ksi=-1,this.kei=-1,this.stt=14,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 21:{switch(s){case 1:{this.vsi=e,this.stt=11,e+=1;break}case 4:{e+=1;break}case 10:{this.ksi=-1,this.kei=-1,this.stt=15,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 22:{switch(s){case 4:{e+=1;break}case 6:{this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.stt=32,e+=1;break}case 7:{this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 8:{this.stt=16,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 23:{switch(s){case 4:{e+=1;break}case 6:{this.rslts[this.find_lst_open_tag_idx_in_rslts()]=3,this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.stt=32,e+=1;break}case 7:{this.rslts.push(this.ksi,this.kei,-2147483647,-2147483647),this.ksi=-1,this.kei=-1,this.tsi=e+1,this.stt=1,e+=1;break}case 8:{this.stt=17,e+=1;break}case 12:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=2;break}default:{this.stt<12?this.stt=this.stt+10<<8:this.stt=this.stt<<8,e+=1;break}}break}case 24:{switch(s){case 9:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=14,e+=1;break}case 12:{e+=2;break}default:{e+=1;break}}break}case 25:{switch(s){case 9:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=15,e+=1;break}case 12:{e+=2;break}default:{e+=1;break}}break}case 26:{switch(s){case 10:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=14,e+=1;break}case 12:{e+=2;break}default:{e+=1;break}}break}case 27:{switch(s){case 10:{this.vei=e,this.rslts.push(this.ksi,this.kei,this.vsi,this.vei),this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.stt=15,e+=1;break}case 12:{e+=2;break}default:{e+=1;break}}break}case 28:{switch(s){case 9:{this.rslts.push(this.ksi,this.kei,-2147483646,-2147483646),this.ksi=-1,this.kei=-1,this.stt=14,e+=1;break}case 12:{this.vsi=e,this.stt=24,e+=2;break}default:{this.vsi=e,this.stt=24,e+=1;break}}break}case 29:{switch(s){case 9:{this.rslts.push(this.ksi,this.kei,-2147483646,-2147483646),this.ksi=-1,this.kei=-1,this.stt=15,e+=1;break}case 12:{this.vsi=e,this.stt=25,e+=2;break}default:{this.vsi=e,this.stt=25,e+=1;break}}break}case 30:{switch(s){case 10:{this.rslts.push(this.ksi,this.kei,-2147483646,-2147483646),this.ksi=-1,this.kei=-1,this.stt=14,e+=1;break}case 12:{this.vsi=e,this.stt=26,e+=2;break}default:{this.vsi=e,this.stt=26,e+=1;break}}break}case 31:{switch(s){case 10:{this.rslts.push(this.ksi,this.kei,-2147483646,-2147483646),this.ksi=-1,this.kei=-1,this.stt=15,e+=1;break}case 12:{this.vsi=e,this.stt=27,e+=2;break}default:{this.vsi=e,this.stt=27,e+=1;break}}break}case 32:{switch(s){case 7:{this.tsi=e+1,this.stt=1,e+=1;break}case 12:{e+=2;break}default:{e+=1;break}}break}default:{this.stt=this.stt>>8,e+=1;break}}}}});var Oo=p((ag,Ro)=>{Ro.exports=function(){let t=[];if(this.rslts.length>0){let e=-1;if((this.stt===2||this.stt%2===1&&this.stt!==3&&this.stt!==13)&&(e=this.find_lst_open_tag_idx_in_rslts()),e!==-1){let i=this.rslts.slice(e);this.rslts.splice(e,1/0),t=this.rslts,this.rslts=i}else t=this.rslts,this.rslts=[]}return t}});var Co=p((dg,No)=>{No.exports=function(t){let e=t.length;if(this.rslts.length>0)for(let s=0;s<this.rslts.length;s+=4){let i=this.rslts[s+1];i!==-1&&i<e&&(e=i);let r=this.rslts[s+2];r!==-1&&r<e&&(e=r);let _=this.rslts[s+3];_!==-1&&_<e&&(e=_)}if(this.tsi!==-1&&this.tsi<e&&(e=this.tsi),this.ksi!==-1&&this.ksi<e&&(e=this.ksi),this.vsi!==-1&&this.vsi<e&&(e=this.vsi),this.lefted=t.slice(e),e>0){this.tsi!==-1&&(this.tsi-=e),this.tei!==-1&&(this.tei-=e),this.ksi!==-1&&(this.ksi-=e),this.kei!==-1&&(this.kei-=e),this.vsi!==-1&&(this.vsi-=e),this.vei!==-1&&(this.vei-=e);for(let s=0;s<this.rslts.length;s+=4)this.rslts[s+1]!==-1&&(this.rslts[s+1]-=e),this.rslts[s+2]!==-1&&(this.rslts[s+2]-=e),this.rslts[s+3]!==-1&&(this.rslts[s+3]-=e)}}});var Fo=p((ug,Lo)=>{Lo.exports=function(){let[t,e]=this.conti(" >");this.input(t,e);let s=this.pause();return[t,s]}});var xo=p((pg,Go)=>{Go.exports=function(){this.stt=1,this.tsi=0,this.tei=-1,this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.lefted="",this.rslts=[]}});var dt=p(($g,Mo)=>{function we(){this.stt=1,this.tsi=0,this.tei=-1,this.ksi=-1,this.kei=-1,this.vsi=-1,this.vei=-1,this.lefted="",this.rslts=[]}we.prototype.find_lst_open_tag_idx_in_rslts=Nl();we.prototype.transform_rslts=Zl();we.prototype.conti=eo();we.prototype.input=qo();we.prototype.pause=Oo();we.prototype.commit=Co();we.prototype.finish=Fo();we.prototype.reset=xo();Mo.exports=we});var Po=p((bg,Ho)=>{var z1=dt(),Q1=new z1,{RAW_TAGS:Z1}=Ue();Ho.exports=(t,e=Q1)=>{let[s,i]=e.conti(t);e.input(s,i);let r=e.pause();e.commit(s);let _;[s,_]=e.finish();let n=["root",{},[]],l=[n],o=-1,h=(c,u)=>t.slice(c,u),f=c=>{for(let u=0;u<c.length;u+=4){let a=c[u],$=c[u+1],k=c[u+2],M=c[u+3],U=l[l.length-1];if(o!==-1){a===4&&h(k,M)===U[0]&&(U[2].push(["",{___text___:h(o,k)},[]]),o=-1,l.pop());continue}if(a===1)U[2].push(["",{___text___:h(k,M)},[]]);else if(a===2||a===3){let te=h(k,M),le=[te,{},[]];U[2].push(le),a===2&&(l.push(le),Z1.has(te)&&(o=M))}else if(a===4)l.length>1&&l.pop();else{let te=h(a,$),le=h(k,M);U[1][te]=le}}};return f(r),f(_),n[2]}});var Bo=p((gg,Uo)=>{var K1=dt(),e0=new K1,{RAW_TAGS:jo}=Ue();Uo.exports=(t,e=e0)=>{let[s,i]=e.conti(t);e.input(s,i);let r=e.pause();e.commit(s);let _;[s,_]=e.finish();let n={},l=[n],o=[{tag:"root",id:"",cls:[]}],h=0,f=(a,$)=>t.slice(a,$);function c(){if(o.length<=1)return;let a=o.pop();l.pop();let $=l[l.length-1],k=a.tag;a.id&&(k+=`#${a.id}`),a.cls.length>0&&(k+=`.${a.cls.join(".")}`);let M=Object.keys(a.children_obj).length>0;$[k]=M?a.children_obj:null}let u=a=>{for(let $=0;$<a.length;$+=4){let k=a[$],M=a[$+1],U=a[$+2],te=a[$+3],le=o[o.length-1];if(h>0){if(k===4){let qe=f(U,te);jo.has(qe)&&(h--,h===0&&c())}continue}if(k===2||k===3){let qe=f(U,te),pt={tag:qe,id:"",cls:[],children_obj:{}};o.push(pt),l.push(pt.children_obj),jo.has(qe)?h++:k===3&&c()}else if(k===4)c();else if(k>4){let qe=f(k,M);if(qe==="id")le.id=f(U,te);else if(qe==="class"){let pt=f(U,te);le.cls.includes(pt)||le.cls.push(pt)}}}};return u(r),u(_),n}});var Yo=p((yg,qi)=>{var{RAW_TAGS:t0}=Ue(),s0=dt(),i0=(t,e)=>t.toLowerCase()===e.toLowerCase(),r0=t=>t0.has(t),Ts=class extends s0{_depth=0;_id=1;_lst_open_id=-1;_attr={};_stack=[];_top=0;_text_cache_between_raw_tag="";_pending={type:0,tag:"",id:-1};open;clos;leaf;text;reset_cb({open:e,clos:s,leaf:i,text:r}={}){this.open=e,this.clos=s,this.leaf=i,this.text=r}reset_ctx(){this._depth=0,this._id=1,this._lst_open_id=-1,this._attr={},this._stack=[],this._top=0,this._text_cache_between_raw_tag="",this._pending={type:0,tag:"",id:-1}}constructor(e){super(),this.reset_cb(e),this.reset_ctx()}_flush(){if(this._pending.type===0)return;let{type:e,tag:s,id:i}=this._pending;e===2?(this.open&&this.open(s,this._attr,i,this._depth),this._stack[this._top++]=i,this._stack[this._top++]=s,this._depth++):e===3&&this.leaf&&this.leaf(s,this._attr,i,this._depth),this._attr={},this._pending.type=0,this._pending.tag="",this._pending.id=-1}_consume(e,s){for(let i=0;i<e.length;i+=4){let r=e[i],_=e[i+1],n=e[i+2],l=e[i+3];if(_!==-1){this._attr[s.slice(r,_)]=s.slice(n,l);continue}if(this._top>0){let o=this._stack[this._top-1];if(r0(o)){if(r===4){let h=s.slice(n,l);if(i0(o,h)){this.text&&this.text(this._text_cache_between_raw_tag,this._id++,this._depth),this._text_cache_between_raw_tag="";let f=this._stack[this._top-2];this._top-=2,this._depth--,this.clos&&this.clos(h,this._id++,this._depth,f);continue}}r===1&&(this._text_cache_between_raw_tag+=s.slice(n,l));continue}}switch(r){case 1:this._flush(),this.text?this.text(s.slice(n,l),this._id++,this._depth):this._id++;break;case 2:case 3:this._flush(),this._pending.type=r,this._pending.tag=s.slice(n,l),this._pending.id=this._id++;break;case 4:this._flush();let o=s.slice(n,l);this._depth--;let h=this._top>0?this._stack[this._top-2]:-1;this._top>0&&(this._top-=2),this.clos?this.clos(o,this._id++,this._depth,h):this._id++;break}}}exe(e){let[s,i]=this.conti(e);this.input(s,i);let r=this.pause();this._consume(r,s),this.commit(s)}fin(){let[e,s]=this.finish();this._consume(s,e),this.reset(),this.reset_ctx()}};qi.exports=t=>new Ts(t);qi.exports.SyncMach=Ts});var Wo=p((mg,Ri)=>{var{RAW_TAGS:_0}=Ue(),n0=dt(),l0=(t,e)=>t.toLowerCase()===e.toLowerCase(),h0=t=>_0.has(t),Ie=t=>{var e;return((e=t==null?void 0:t.constructor)==null?void 0:e.name)==="AsyncFunction"},Ss=class extends n0{_depth=0;_id=1;_lst_open_id=-1;_attr={};_stack=[];_top=0;_text_cache_between_raw_tag="";_pending={type:0,tag:"",id:-1};_asyncs={open:!1,clos:!1,leaf:!1,text:!1};open;clos;leaf;text;reset_cb({open:e,clos:s,leaf:i,text:r}={}){this.open=e,this._asyncs.open=Ie(e),this.clos=s,this._asyncs.clos=Ie(s),this.leaf=i,this._asyncs.leaf=Ie(i),this.text=r,this._asyncs.text=Ie(r)}set_open(e){this.open=e,this._asyncs.open=Ie(e)}set_clos(e){this.clos=e,this._asyncs.clos=Ie(e)}set_leaf(e){this.leaf=e,this._asyncs.leaf=Ie(e)}set_text(e){this.text=e,this._asyncs.text=Ie(e)}reset_ctx(){this._depth=0,this._id=1,this._lst_open_id=-1,this._attr={},this._stack=[],this._top=0,this._text_cache_between_raw_tag="",this._pending={type:0,tag:"",id:-1},this._asyncs={open:!1,clos:!1,leaf:!1,text:!1}}are_all_sync(){return!Object.values(this._asyncs).includes(!0)}constructor(e){super(),this.reset_cb(e),this.reset_ctx()}async _flush(){if(this._pending.type===0)return;let{type:e,tag:s,id:i}=this._pending;e===2?(this.open&&(this._asyncs.open?await this.open(s,this._attr,i,this._depth):this.open(s,this._attr,i,this._depth)),this._stack[this._top++]=i,this._stack[this._top++]=s,this._depth++):e===3&&this.leaf&&(this._asyncs.leaf?await this.leaf(s,this._attr,i,this._depth):this.leaf(s,this._attr,i,this._depth)),this._attr={},this._pending.type=0,this._pending.tag="",this._pending.id=-1}async _consume(e,s){for(let i=0;i<e.length;i+=4){let r=e[i],_=e[i+1],n=e[i+2],l=e[i+3];if(_!==-1){this._attr[s.slice(r,_)]=s.slice(n,l);continue}if(this._top>0){let o=this._stack[this._top-1];if(h0(o)){if(r===4){let h=s.slice(n,l);if(l0(o,h)){this.text?this._asyncs.text?await this.text(this._text_cache_between_raw_tag,this._id++,this._depth):this.text(this._text_cache_between_raw_tag,this._id++,this._depth):this._id++,this._text_cache_between_raw_tag="";let f=this._stack[this._top-2];this._top-=2,this._depth--,this.clos?this._asyncs.clos?await this.clos(h,this._id++,this._depth,f):this.clos(h,this._id++,this._depth,f):this._id++;continue}}r===1&&(this._text_cache_between_raw_tag+=s.slice(n,l));continue}}switch(r){case 1:await this._flush(),this.text?this._asyncs.text?await this.text(s.slice(n,l),this._id++,this._depth):this.text(s.slice(n,l),this._id++,this._depth):this._id++;break;case 2:case 3:await this._flush(),this._pending.type=r,this._pending.tag=s.slice(n,l),this._pending.id=this._id++;break;case 4:await this._flush();let o=s.slice(n,l);this._depth--;let h=this._top>0?this._stack[this._top-2]:-1;this._top>0&&(this._top-=2),this.clos?this._asyncs.clos?await this.clos(o,this._id++,this._depth,h):this.clos(o,this._id++,this._depth,h):this._id++;break}}}async exe(e){let[s,i]=this.conti(e);this.input(s,i);let r=this.pause();await this._consume(r,s),this.commit(s)}async fin(){let[e,s]=this.finish();await this._consume(s,e),await this._flush(),this.reset(),this.reset_ctx()}};Ri.exports=t=>new Ss(t);Ri.exports.AsyncMach=Ss});var Jo=p((kg,ne)=>{var f0=dt(),c0=Po(),a0=Bo(),xt=Yo(),Is=Wo(),Ds=t=>{var e;return((e=t==null?void 0:t.constructor)==null?void 0:e.name)==="AsyncFunction"},Vo=t=>Ds(t.open)||Ds(t.leaf)||Ds(t.clos)||Ds(t.text),d0=async(t,e,s="utf-8")=>{let i=xt(e),r=new TextDecoderStream(s),n=t.pipeThrough(r).getReader();for(;;){let{done:l,value:o}=await n.read();if(l)break;i.exe(o)}i.fin()},u0=async(t,e,s="utf-8")=>{let i=Vo(e),r=i?Is(e):xt(e),_=new TextDecoderStream(s),l=t.pipeThrough(_).getReader();for(;;){let{done:o,value:h}=await l.read();if(o)break;i?await r.exe(h):r.exe(h)}i?await r.fin():r.fin()};ne.exports=async(t,{open:e,leaf:s,clos:i,text:r})=>{let _={open:e,leaf:s,clos:i,text:r},n=Vo(_),l=n?Is(_):xt(_);return n?(await l.exe(t),await l.fin()):(l.exe(t),l.fin()),l};ne.exports.Mach=f0;ne.exports.SyncMach=xt.SyncMach;ne.exports.AsyncMach=Is.AsyncMach;ne.exports.s2tac=c0;ne.exports.s2hson=a0;ne.exports.crsync=xt;ne.exports.crasyn=Is;ne.exports.from_stream_using_sync=d0;ne.exports.from_stream=u0});var zo=p((Eg,Xo)=>{var{HTML_DFLT_PARSER_CFG:wg}=ct(),{crsync:p0}=Jo(),$0=(t,e={})=>{let s=t,r=p0({open:(_,n,l,o)=>{let h=_.toLowerCase(),f=s.$append_child();f.init(),f.T=h,f.A=n,s=f},leaf:(_,n,l,o)=>{let h=_.toLowerCase(),f=s.$append_child();f.init(),f.T=h,f.A=n},text:(_,n,l)=>{if(_=_.trim(),_!==""){let o=s.$append_child();o.init(),o.T="",o.A=_}},clos:(_,n,l,o)=>{let h=_.toLowerCase(),f=s;for(;f&&f.T!==h&&f!==t;)f=f.$parent_;f&&f!==t&&(s=f.$parent_)}});return{write:_=>r.exe(_),end:()=>r.fin(),mach:r}};Xo.exports=$0});var eh=p((vg,Ko)=>{var{NTAC_DFLT_PARSER_CFG:Qo}=ct(),Zo=(t,e,s,i,r)=>{for(let n of e){let l=n[0],o=n[1];if(l===""){if(o=o.trim(),o!==""){let h=t.$append_child();h.init(),h.T=l,h.A=o,s&&t["#ntac"][2].push(["",text,[]]),i&&(r?t["#html"].push(h.compressed_text_if_text_):t["#html"].push(h.text_if_text_))}}else{let h=t.$append_child();h.init(),h.T=l,h.A=o,s&&(h["#ntac"]=[l,o,[]]),i&&(h["#html"]=[]);let f=n[2];Zo(h,f,s,i,r)}}let _=t.$parent_;s&&_["#ntac"][2].push(t["#ntac"]),i&&_["#html"].push(t.get_html(r))},b0=(t,e,s=Qo())=>{let i=Qo();Object.assign(i,s);let r=t,_=e[0],n=e[1],{buildNTAC:l,buildHTML:o,compressedHTML:h}=i;l&&(r["#ntac"]=[_,n,[]]),o&&(r["#html"]=[]);let f=e[2];return Zo(r,f,l,o,h),r};Ko.exports=b0});var Oi=p((Tg,nh)=>{var{update_only_for_exist:th}=Rl(),g0=zo(),y0=eh(),{HTML_DFLT_PARSER_CFG:sh,NTAC_DFLT_PARSER_CFG:ih}=ct(),rh=(t,e,s)=>{let i=sh();th(s,i);let r=g0(e,i);return r.write(t),r.end(),e},m0=(t,e,s)=>{let i=t.$forest_,r=t.constructor,_=i.node(r);return _.init(),_=rh(e,_,s),_},_h=(t,e,s)=>{let i=ih();return th(s,i),y0(e,t),e},k0=(t,e,s)=>{let i=t.$forest_,r=t.constructor,_=i.node(r);return _.init(),_=_h(html_text,_,s),_},w0=(t,e)=>{for(let s of t)s.$disconn(),e.buildNTAC&&s.build_ntac(),e.buildHTML&&s.build_html(e.compressedHTML)};nh.exports={HTML_DFLT_PARSER_CFG:sh,_from_str_eng:rh,_from_str_with_known_node:m0,NTAC_DFLT_PARSER_CFG:ih,_from_ntac_eng:_h,_from_ntac_with_known_node:k0,_build_on_children:w0}});var uh=p((Dg,dh)=>{var{_u:lh,_n:Ae,_t:Ni,_f:Sg}=Ot(),{hide:E0}=tl(),{_Node:v0}=gi(),{creat_stag:oh,creat_etag:hh,creat_text:fh}=yl(),{jdcp:ch}=Ii(),{HTML_DFLT_PARSER_CFG:ut,NTAC_DFLT_PARSER_CFG:ah}=ct(),{_from_str_with_known_node:T0,_from_ntac_with_known_node:S0}=Oi(),Ci=class extends v0{"#ntac"=[Ae,Ae,[]];"#html"=[];T=Ae;A=Ae;init(){E0(this,"#ntac","#html")}is_root(){return this.T===Ae}is_ele(){return this.T!==""}is_text(){return this.T===""}get stag_if_ele_(){return oh(this.T,this.A,this.$depth_,`
22
+ `)}get etag_if_ele_(){return hh(this.T,this.$depth_,`
23
+ `)}get text_if_text_(){return fh(this.A,this.$depth_,`
24
+ `,!1)}get compressed_stag_if_ele_(){return oh(this.T,this.A,0,"")}get compressed_etag_if_ele_(){return hh(this.T,0,"")}get compressed_text_if_text_(){return fh(this.A,0,"",!1)}build_ntac(){if(this.$is_root()){let e=this,s="open";for(;Ni;)if(s==="open"){let i=[e.T,e.A,[]];e.is_text()?(e.$parent_["#ntac"][2].push(i),[e,s]=e.$sedfs_next_after_close_):(e["#ntac"]=i,[e,s]=e.$sedfs_next_after_open_)}else{if(e===this)return this["#ntac"];{e.$parent_["#ntac"][2].push(e["#ntac"]);let r=e.$sedfs_next_after_close_;e=r[0],s=r[1]}}}else console.log("build_ntac should only be used on root")}get ntac_(){return this["#ntac"]}get_ntac(){return ch(this["#ntac"])}build_html(e=!1){if(this.$is_root()){let s=this,i="open";for(;Ni;)if(i==="open")if(s.is_text()){let r=s.$parent_;e?r["#html"].push(s.compressed_text_if_text_):r["#html"].push(s.text_if_text_),[s,i]=s.$sedfs_next_after_close_}else s["#html"]=[],[s,i]=s.$sedfs_next_after_open_;else{let r=s.get_html(e),_=s.$parent_;if(s===this)return r;{s.$parent_["#html"].push(r);let l=s.$sedfs_next_after_close_;s=l[0],i=l[1]}}}else console.log("build_html should only be used on root")}get_html(e=!1){if(this.is_ele()){let s,i,r;return e?(s=this.compressed_stag_if_ele_,i=this["#html"].join(`
25
+ `),r=this.compressed_etag_if_ele_):(s=this.stag_if_ele_,i=this["#html"].join(""),r=this.etag_if_ele_),s+i+r}else return e?this.compressed_text_if_text_:this.text_if_text_}get_html_and_encd(e=!1){return encodeURIComponent(this.get_html(e))}updt_ance_html(e=!1){let s=this;for(;Ni;){let i=s.$parent_;if(i!==Ae){let r=i["#html"],_=s.$sibseq_;r[_]=s.get_html(e),s=i}else break}}set_and_updt(e,s,i=!1,r=!1,_=!1){if(e!==lh&&(this.T=e),s!==lh&&(this.A=s),!this.$is_root()){if(i){let l=this.$parent_["#ntac"][2],o=l.indexOf(this["#ntac"]);this.ntac[0]=this.T,this.ntac[1]=this.A,l[o]=this.ntac}r&&this.updt_ance_html(_)}}rm_and_updt(e=!1,s=!1){if(!this.$is_root()){if(e){let r=this.$parent_["#ntac"][2],_=r.indexOf(this["#ntac"]);r.splice(_,1)}if(s){let i=this.$parent_,r=i["#html"],_=this.$sibseq_;r.splice(_,1),i.updt_ance_html()}}}append_node(e,s=!1,i=!1,r=!1){this.$append_child(e);let _=this;return s&&_["#ntac"][2].push(e["#ntac"]),i&&(_["#html"].push(e.get_html(r)),_.updt_ance_html(r)),e}insert_node_before_and_updt(e,s=!1,i=!1,r=!1){if(this.$is_root())return console.log("root cant use insert_before_and_updt"),Ae;{let _=this.$sibseq_;this.$add_lsib(e);let n=this.$parent_;return s&&n["#ntac"][2]._ibfr(_,e["#ntac"]),i&&(n["#html"]._ibfr(_,e.get_html(r)),n.updt_ance_html(r)),e}}insert_node_after_and_updt(e,s=!1,i=!1,r=!1){if(this.$is_root())return console.log("root cant use insert_before_and_updt"),Ae;{let _=this.$sibseq_;this.$add_rsib(e);let n=this.$parent_;return s&&n["#ntac"][2]._iaft(_,e["#ntac"]),i&&(n["#html"]._iaft(_,e.get_html(r)),n.updt_ance_html(r)),e}}creat_nd_from_html(e,s=ut()){return T0(this,e,s)}append_html(e,s=ut()){let i=this.creat_nd_from_html(e,s),r=s.buildNTAC,_=s.buildHTML,n=s.compressedHTML;r&&i.build_ntac(),_&&i.build_html();let l=i.$children_;i.$erase();for(let o of l)this.append_node(o,r,_,n);return l}insert_html_before_and_updt(e,s=ut()){let i=this.creat_nd_from_html(e,s),r=s.buildNTAC,_=s.buildHTML,n=s.compressedHTML;r&&i.build_ntac(),_&&i.build_html();let l=i.$children_;i.$erase();for(let o of l)this.insert_node_before_and_updt(o,r,_,n);return l}insert_html_after_and_updt(e,s=ut()){let i=this.creat_nd_from_html(e,s),r=s.buildNTAC,_=s.buildHTML,n=s.compressedHTML;r&&i.build_ntac(),_&&i.build_html();let l=i.$children_;i.$erase();for(let o of l)this.insert_node_after_and_updt(o,r,_,n);return l}creat_nd_from_ntac(e,s=ah()){return S0(this,e,s)}append_ntac(e,s=ah()){let i=this.creat_nd_from_ntac(e,s),r=s.buildNTAC,_=s.buildHTML,n=s.compressedHTML;r&&i.build_ntac(),_&&i.build_html();let l=i.$children_;i.$erase();for(let o of l)this.append_node(o,r,_,n);return l}insert_ntac_before_and_updt(e,s=ut()){let i=this.creat_nd_from_ntac(ntac,s),r=s.buildNTAC,_=s.buildHTML,n=s.compressedHTML;r&&i.build_ntac(),_&&i.build_html();let l=i.$children_;i.$erase();for(let o of l)this.insert_node_before_and_updt(o,r,_,n);return l}insert_ntac_after_and_updt(e,s=ut()){let i=this.creat_nd_from_ntac(e,s),r=s.buildNTAC,_=s.buildHTML,n=s.compressedHTML;r&&i.build_ntac(),_&&i.build_html();let l=i.$children_;i.$erase();for(let o of l)this.insert_node_after_and_updt(o,r,_,n);return l}filter(e=s=>!0){let s=[],i=this.$gen_sdfs_next();for(let r of i)e(r)&&s.push(r);return s}clone(e=!1,s=!1,i=!1){let r=this.$clone((_,n)=>{n.T=_.T,n.A=ch(_.A)});return s&&r.build_ntac(),e&&r.build_html(i),r}};dh.exports=Ci});var N0=p((Ig,yh)=>{var{creat_root:ph}=gi(),Li=uh(),{estimate_cnt_from_html_text:D0,estimate_cnt_from_ntac:I0}=Ii(),{HTML_DFLT_PARSER_CFG:$h,NTAC_DFLT_PARSER_CFG:bh}=ct(),{_from_str_eng:A0,_from_ntac_eng:q0,_build_on_children:gh}=Oi(),R0=(t,e=$h(),s)=>{s=s??D0(t);let i=ph(Li,s);i.init(),i=A0(t,i,e);let r=i.$children_;return gh(r,e),i.$erase(),r},O0=(t,e=bh(),s)=>{s=s??I0(t);let i=ph(Li,s);i.init(),i=q0(t,i,e);let r=i.$children_;return gh(r,e),i.$erase(),r};yh.exports={HTML_DFLT_PARSER_CFG:$h,from_str:R0,NTAC_DFLT_PARSER_CFG:bh,from_ntac:O0,Node:Li}});return N0();})();