update CAT

This commit is contained in:
qist committed 2024-05-07 17:30:00 +08:00
1 parent 828cfd67fe
commit 3a9658cbb6
17 files changed
+33299 -463

No files matched your search

+225 -217
View File
@@ -1,71 +1,71 @@
var CK=Object.create;var kc=Object.defineProperty;var kK=Object.getOwnPropertyDescriptor;var PK=Object.getOwnPropertyNames;var DK=Object.getPrototypeOf,LK=Object.prototype.hasOwnProperty;var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),dx=(t,e)=>{for(var n in e)kc(t,n,{get:e[n],enumerable:!0})},hx=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of PK(e))!LK.call(t,l)&&l!==n&&kc(t,l,{get:()=>e[l],enumerable:!(r=kK(e,l))||r.enumerable});return t};var br=(t,e,n)=>(n=t!=null?CK(DK(t)):{},hx(e||!t||!t.__esModule?kc(n,"default",{value:t,enumerable:!0}):n,t)),FK=t=>hx(kc({},"__esModule",{value:!0}),t);var gx=C(($Ee,mx)=>{"use strict";function MK(t){var e=new t,n=e;function r(){var i=e;return i.next?e=i.next:(e=new t,n=e),i.next=null,i}function l(i){n.next=i,n=i}return{get:r,release:l}}mx.exports=MK});var _p=C((jEe,vp)=>{"use strict";var $K=gx();function yx(t,e,n){if(typeof t=="function"&&(n=e,e=t,t=null),!(n>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var r=$K(jK),l=null,i=null,s=0,a=null,o={push:_,drain:m2,saturated:m2,pause:f,paused:!1,get concurrency(){return n},set concurrency(w){if(!(w>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=w,!o.paused)for(;l&&s<n;)s++,T()},running:c,resume:h,idle:g,length:p,getQueue:m,unshift:S,empty:m2,kill:x,killAndDrain:v,error:b};return o;function c(){return s}function f(){o.paused=!0}function p(){for(var w=l,N=0;w;)w=w.next,N++;return N}function m(){for(var w=l,N=[];w;)N.push(w.value),w=w.next;return N}function h(){if(o.paused)for(o.paused=!1;l&&s<n;)s++,T()}function g(){return s===0&&o.length()===0}function _(w,N){var O=r.get();O.context=t,O.release=T,O.value=w,O.callback=N||m2,O.errorHandler=a,s>=n||o.paused?i?(i.next=O,i=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function S(w,N){var O=r.get();O.context=t,O.release=T,O.value=w,O.callback=N||m2,O.errorHandler=a,s>=n||o.paused?l?(O.next=l,l=O):(l=O,i=O,o.saturated()):(s++,e.call(t,O.value,O.worked))}function T(w){w&&r.release(w);var N=l;N&&s<=n?o.paused?s--:(i===l&&(i=null),l=N.next,N.next=null,e.call(t,N.value,N.worked),i===null&&o.empty()):--s===0&&o.drain()}function x(){l=null,i=null,o.drain=m2}function v(){l=null,i=null,o.drain(),o.drain=m2}function b(w){a=w}}function m2(){}function jK(){this.value=null,this.callback=m2,this.next=null,this.release=m2,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var l=t.callback,i=t.errorHandler,s=t.value;t.value=null,t.callback=m2,t.errorHandler&&i(n,s),l.call(t.context,n,r),t.release(t)}}function UK(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(f,p){e.call(this,f).then(function(m){p(null,m)},p)}var l=yx(t,r,n),i=l.push,s=l.unshift;return l.push=a,l.unshift=o,l.drained=c,l;function a(f){var p=new Promise(function(m,h){i(f,function(g,_){if(g){h(g);return}m(_)})});return p.catch(m2),p}function o(f){var p=new Promise(function(m,h){s(f,function(g,_){if(g){h(g);return}m(_)})});return p.catch(m2),p}function c(){if(l.idle())return new Promise(function(m){m()});var f=l.drain,p=new Promise(function(m){l.drain=function(){f(),m()}});return p}}vp.exports=yx;vp.exports.promise=UK});var bp=C((UEe,vx)=>{"use strict";var{inherits:BK,format:Ep}=require("util");function oa(t,e,n=Error){if(!t)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function r(l,i,s){if(!new.target)return new r(l,i,s);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",l&&i&&s?this.message=Ep(e,l,i,s):l&&i?this.message=Ep(e,l,i):l?this.message=Ep(e,l):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},BK(r,n),r}vx.exports={createError:oa,AVV_ERR_EXPOSE_ALREADY_DEFINED:oa("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:oa("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:oa("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:oa("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:oa("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:oa("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var Ex=C((BEe,_x)=>{_x.exports=function t(e,n,r){n===void 0&&(n=""),r||(r={});var l=function(o){var c={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return r.unicode===!1?c[o]:o};typeof e=="string"&&(e={label:e});var i=e.nodes||[],s=(e.label||"").split(`
`),a=`
`+n+(i.length?l("\u2502"):" ")+" ";return n+s.join(a)+`
`+i.map(function(o,c){var f=c===i.length-1,p=o.nodes&&o.nodes.length,m=n+(f?" ":l("\u2502"))+" ";return n+l(f?"\u2514":"\u251C")+l("\u2500")+l(p?"\u252C":"\u2500")+" "+t(o,m,r).slice(n.length+2)}).join("")}});var wx=C((HEe,Ax)=>{"use strict";var HK=Ex(),bx=Symbol("avvio.TimeTree.untrackNode"),Tp=Symbol("avvio.TimeTree.trackNode"),Tx=Symbol("avvio.TimeTree.getParent"),Sx=Symbol("avvio.TimeTree.getNode"),xx=Symbol("avvio.TimeTree.addNode"),Sp=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Tp](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[bx](e){this.tableId.delete(e.id);let n=this.tableLabel.get(e.label);if(n.id){this.tableLabel.delete(e.label);return}n.pop(),n.length===0&&this.tableLabel.delete(e.label)}[Tx](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[Sx](e){return this.tableId.get(e)}[xx](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Tp](this.root),this.root.id;let i=this[Tx](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:r,label:n,nodes:[]};return i.nodes.push(a),this[Tp](a),s}start(e,n,r=Date.now()){return this[xx](e,n,r)}stop(e,n=Date.now()){let r=this[Sx](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[bx](r))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=r=>(r.label=`${r.label} ${r.diff} ms`,r.nodes.length>0&&(r.nodes=r.nodes.map(l=>e(l))),r),n=e(this.toJSON());return HK(n)}};Ax.exports=Sp});var Ox=C((qEe,Rx)=>{var Co=1e3,ko=Co*60,Po=ko*60,ua=Po*24,qK=ua*7,VK=ua*365.25;Rx.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return zK(t);if(n==="number"&&isFinite(t))return e.long?XK(t):GK(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function zK(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*VK;case"weeks":case"week":case"w":return n*qK;case"days":case"day":case"d":return n*ua;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Po;case"minutes":case"minute":case"mins":case"min":case"m":return n*ko;case"seconds":case"second":case"secs":case"sec":case"s":return n*Co;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function GK(t){var e=Math.abs(t);return e>=ua?Math.round(t/ua)+"d":e>=Po?Math.round(t/Po)+"h":e>=ko?Math.round(t/ko)+"m":e>=Co?Math.round(t/Co)+"s":t+"ms"}function XK(t){var e=Math.abs(t);return e>=ua?Pc(t,e,ua,"day"):e>=Po?Pc(t,e,Po,"hour"):e>=ko?Pc(t,e,ko,"minute"):e>=Co?Pc(t,e,Co,"second"):t+" ms"}function Pc(t,e,n,r){var l=e>=n*1.5;return Math.round(t/n)+" "+r+(l?"s":"")}});var xp=C((VEe,Nx)=>{function WK(t){n.debug=n,n.default=n,n.coerce=o,n.disable=i,n.enable=l,n.enabled=s,n.humanize=Ox(),n.destroy=c,Object.keys(t).forEach(f=>{n[f]=t[f]}),n.names=[],n.skips=[],n.formatters={};function e(f){let p=0;for(let m=0;m<f.length;m++)p=(p<<5)-p+f.charCodeAt(m),p|=0;return n.colors[Math.abs(p)%n.colors.length]}n.selectColor=e;function n(f){let p,m=null,h,g;function _(...S){if(!_.enabled)return;let T=_,x=Number(new Date),v=x-(p||x);T.diff=v,T.prev=p,T.curr=x,p=x,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let b=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(N,O)=>{if(N==="%%")return"%";b++;let k=n.formatters[O];if(typeof k=="function"){let j=S[b];N=k.call(T,j),S.splice(b,1),b--}return N}),n.formatArgs.call(T,S),(T.log||n.log).apply(T,S)}return _.namespace=f,_.useColors=n.useColors(),_.color=n.selectColor(f),_.extend=r,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(h!==n.namespaces&&(h=n.namespaces,g=n.enabled(f)),g),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function r(f,p){let m=n(this.namespace+(typeof p>"u"?":":p)+f);return m.log=this.log,m}function l(f){n.save(f),n.namespaces=f,n.names=[],n.skips=[];let p,m=(typeof f=="string"?f:"").split(/[\s,]+/),h=m.length;for(p=0;p<h;p++)m[p]&&(f=m[p].replace(/\*/g,".*?"),f[0]==="-"?n.skips.push(new RegExp("^"+f.slice(1)+"$")):n.names.push(new RegExp("^"+f+"$")))}function i(){let f=[...n.names.map(a),...n.skips.map(a).map(p=>"-"+p)].join(",");return n.enable(""),f}function s(f){if(f[f.length-1]==="*")return!0;let p,m;for(p=0,m=n.skips.length;p<m;p++)if(n.skips[p].test(f))return!1;for(p=0,m=n.names.length;p<m;p++)if(n.names[p].test(f))return!0;return!1}function a(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function o(f){return f instanceof Error?f.stack||f.message:f}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Nx.exports= Line truncated
var ZK=Object.create;var M6=Object.defineProperty;var eY=Object.getOwnPropertyDescriptor;var nY=Object.getOwnPropertyNames;var lY=Object.getPrototypeOf,tY=Object.prototype.hasOwnProperty;var C=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Ox=(n,e)=>{for(var l in e)M6(n,l,{get:e[l],enumerable:!0})},Rx=(n,e,l,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of nY(e))!tY.call(n,r)&&r!==l&&M6(n,r,{get:()=>e[r],enumerable:!(t=eY(e,r))||t.enumerable});return n};var xt=(n,e,l)=>(l=n!=null?ZK(lY(n)):{},Rx(e||!n||!n.__esModule?M6(l,"default",{value:n,enumerable:!0}):l,n)),rY=n=>Rx(M6({},"__esModule",{value:!0}),n);var Ix=C((hbe,Nx)=>{"use strict";function iY(n){var e=new n,l=e;function t(){var i=e;return i.next?e=i.next:(e=new n,l=e),i.next=null,i}function r(i){l.next=i,l=i}return{get:t,release:r}}Nx.exports=iY});var Op=C((mbe,wp)=>{"use strict";var sY=Ix();function Cx(n,e,l){if(typeof n=="function"&&(l=e,e=n,n=null),!(l>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var t=sY(uY),r=null,i=null,s=0,u=null,a={push:_,drain:g3,saturated:g3,pause:f,paused:!1,get concurrency(){return l},set concurrency(w){if(!(w>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(l=w,!a.paused)for(;r&&s<l;)s++,T()},running:c,resume:h,idle:g,length:p,getQueue:m,unshift:S,empty:g3,kill:x,killAndDrain:v,error:b};return a;function c(){return s}function f(){a.paused=!0}function p(){for(var w=r,N=0;w;)w=w.next,N++;return N}function m(){for(var w=r,N=[];w;)N.push(w.value),w=w.next;return N}function h(){if(a.paused)for(a.paused=!1;r&&s<l;)s++,T()}function g(){return s===0&&a.length()===0}function _(w,N){var R=t.get();R.context=n,R.release=T,R.value=w,R.callback=N||g3,R.errorHandler=u,s>=l||a.paused?i?(i.next=R,i=R):(r=R,i=R,a.saturated()):(s++,e.call(n,R.value,R.worked))}function S(w,N){var R=t.get();R.context=n,R.release=T,R.value=w,R.callback=N||g3,R.errorHandler=u,s>=l||a.paused?r?(R.next=r,r=R):(r=R,i=R,a.saturated()):(s++,e.call(n,R.value,R.worked))}function T(w){w&&t.release(w);var N=r;N&&s<=l?a.paused?s--:(i===r&&(i=null),r=N.next,N.next=null,e.call(n,N.value,N.worked),i===null&&a.empty()):--s===0&&a.drain()}function x(){r=null,i=null,a.drain=g3}function v(){r=null,i=null,a.drain(),a.drain=g3}function b(w){u=w}}function g3(){}function uY(){this.value=null,this.callback=g3,this.next=null,this.release=g3,this.context=null,this.errorHandler=null;var n=this;this.worked=function(l,t){var r=n.callback,i=n.errorHandler,s=n.value;n.value=null,n.callback=g3,n.errorHandler&&i(l,s),r.call(n.context,l,t),n.release(n)}}function aY(n,e,l){typeof n=="function"&&(l=e,e=n,n=null);function t(f,p){e.call(this,f).then(function(m){p(null,m)},p)}var r=Cx(n,t,l),i=r.push,s=r.unshift;return r.push=u,r.unshift=a,r.drained=c,r;function u(f){var p=new Promise(function(m,h){i(f,function(g,_){if(g){h(g);return}m(_)})});return p.catch(g3),p}function a(f){var p=new Promise(function(m,h){s(f,function(g,_){if(g){h(g);return}m(_)})});return p.catch(g3),p}function c(){if(r.idle())return new Promise(function(m){m()});var f=r.drain,p=new Promise(function(m){r.drain=function(){f(),m()}});return p}}wp.exports=Cx;wp.exports.promise=aY});var Np=C((gbe,kx)=>{"use strict";var{inherits:oY,format:Rp}=require("util");function cu(n,e,l=Error){if(!n)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function t(r,i,s){if(!new.target)return new t(r,i,s);Error.captureStackTrace(this,t),this.code=n,this.message=e,this.name="AvvioError",r&&i&&s?this.message=Rp(e,r,i,s):r&&i?this.message=Rp(e,r,i):r?this.message=Rp(e,r):this.message=e}return t.prototype[Symbol.toStringTag]="Error",t.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},oY(t,l),t}kx.exports={createError:cu,AVV_ERR_EXPOSE_ALREADY_DEFINED:cu("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:cu("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:cu("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:cu("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:cu("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:cu("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var Dx=C((ybe,Px)=>{Px.exports=function n(e,l,t){l===void 0&&(l=""),t||(t={});var r=function(a){var c={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return t.unicode===!1?c[a]:a};typeof e=="string"&&(e={label:e});var i=e.nodes||[],s=(e.label||"").split(`
`),u=`
`+l+(i.length?r("\u2502"):" ")+" ";return l+s.join(u)+`
`+i.map(function(a,c){var f=c===i.length-1,p=a.nodes&&a.nodes.length,m=l+(f?" ":r("\u2502"))+" ";return l+r(f?"\u2514":"\u251C")+r("\u2500")+r(p?"\u252C":"\u2500")+" "+n(a,m,t).slice(l.length+2)}).join("")}});var Ux=C((vbe,jx)=>{"use strict";var cY=Dx(),Lx=Symbol("avvio.TimeTree.untrackNode"),Ip=Symbol("avvio.TimeTree.trackNode"),Fx=Symbol("avvio.TimeTree.getParent"),Mx=Symbol("avvio.TimeTree.getNode"),$x=Symbol("avvio.TimeTree.addNode"),Cp=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Ip](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[Lx](e){this.tableId.delete(e.id);let l=this.tableLabel.get(e.label);if(l.id){this.tableLabel.delete(e.label);return}l.pop(),l.length===0&&this.tableLabel.delete(e.label)}[Fx](e){if(e===null)return this.root;let l=this.tableLabel.get(e);return l.id?l:l[l.length-1]}[Mx](e){return this.tableId.get(e)}[$x](e,l,t){if(e===null)return this.root={id:"root",label:l,start:t,nodes:[]},this[Ip](this.root),this.root.id;let i=this[Fx](e),s=`${l}-${Math.random()}`,u={id:s,parent:e,start:t,label:l,nodes:[]};return i.nodes.push(u),this[Ip](u),s}start(e,l,t=Date.now()){return this[$x](e,l,t)}stop(e,l=Date.now()){let t=this[Mx](e);t&&(t.stop=l,t.diff=t.stop-t.start||0,this[Lx](t))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=t=>(t.label=`${t.label} ${t.diff} ms`,t.nodes.length>0&&(t.nodes=t.nodes.map(r=>e(r))),t),l=e(this.toJSON());return cY(l)}};jx.exports=Cp});var Hx=C((_be,Bx)=>{var Pa=1e3,Da=Pa*60,La=Da*60,fu=La*24,fY=fu*7,pY=fu*365.25;Bx.exports=function(n,e){e=e||{};var l=typeof n;if(l==="string"&&n.length>0)return dY(n);if(l==="number"&&isFinite(n))return e.long?mY(n):hY(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function dY(n){if(n=String(n),!(n.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(e){var l=parseFloat(e[1]),t=(e[2]||"ms").toLowerCase();switch(t){case"years":case"year":case"yrs":case"yr":case"y":return l*pY;case"weeks":case"week":case"w":return l*fY;case"days":case"day":case"d":return l*fu;case"hours":case"hour":case"hrs":case"hr":case"h":return l*La;case"minutes":case"minute":case"mins":case"min":case"m":return l*Da;case"seconds":case"second":case"secs":case"sec":case"s":return l*Pa;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function hY(n){var e=Math.abs(n);return e>=fu?Math.round(n/fu)+"d":e>=La?Math.round(n/La)+"h":e>=Da?Math.round(n/Da)+"m":e>=Pa?Math.round(n/Pa)+"s":n+"ms"}function mY(n){var e=Math.abs(n);return e>=fu?$6(n,e,fu,"day"):e>=La?$6(n,e,La,"hour"):e>=Da?$6(n,e,Da,"minute"):e>=Pa?$6(n,e,Pa,"second"):n+" ms"}function $6(n,e,l,t){var r=e>=l*1.5;return Math.round(n/l)+" "+t+(r?"s":"")}});var kp=C((Ebe,qx)=>{function gY(n){l.debug=l,l.default=l,l.coerce=a,l.disable=i,l.enable=r,l.enabled=s,l.humanize=Hx(),l.destroy=c,Object.keys(n).forEach(f=>{l[f]=n[f]}),l.names=[],l.skips=[],l.formatters={};function e(f){let p=0;for(let m=0;m<f.length;m++)p=(p<<5)-p+f.charCodeAt(m),p|=0;return l.colors[Math.abs(p)%l.colors.length]}l.selectColor=e;function l(f){let p,m=null,h,g;function _(...S){if(!_.enabled)return;let T=_,x=Number(new Date),v=x-(p||x);T.diff=v,T.prev=p,T.curr=x,p=x,S[0]=l.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let b=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(N,R)=>{if(N==="%%")return"%";b++;let k=l.formatters[R];if(typeof k=="function"){let j=S[b];N=k.call(T,j),S.splice(b,1),b--}return N}),l.formatArgs.call(T,S),(T.log||l.log).apply(T,S)}return _.namespace=f,_.useColors=l.useColors(),_.color=l.selectColor(f),_.extend=t,_.destroy=l.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(h!==l.namespaces&&(h=l.namespaces,g=l.enabled(f)),g),set:S=>{m=S}}),typeof l.init=="function"&&l.init(_),_}function t(f,p){let m=l(this.namespace+(typeof p>"u"?":":p)+f);return m.log=this.log,m}function r(f){l.save(f),l.namespaces=f,l.names=[],l.skips=[];let p,m=(typeof f=="string"?f:"").split(/[\s,]+/),h=m.length;for(p=0;p<h;p++)m[p]&&(f=m[p].replace(/\*/g,".*?"),f[0]==="-"?l.skips.push(new RegExp("^"+f.slice(1)+"$")):l.names.push(new RegExp("^"+f+"$")))}function i(){let f=[...l.names.map(u),...l.skips.map(u).map(p=>"-"+p)].join(",");return l.enable(""),f}function s(f){if(f[f.length-1]==="*")return!0;let p,m;for(p=0,m=l.skips.length;p<m;p++)if(l.skips[p].test(f))return!1;for(p=0,m=l.names.length;p<m;p++)if(l.names[p].test(f))return!0;return!1}function u(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function a(f){return f instanceof Error?f.stack||f.message:f}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return l.enable(l.load()),l}qx.exports= Line truncated
`).join(`
`+i),t.push(l+"m+"+Fc.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=aY()+e+" "+t[0]}function aY(){return zr.inspectOpts.hideDate?"":new Date().toISOString()+" "}function oY(...t){return process.stderr.write(Lc.format(...t)+`
`)}function uY(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function cY(){return process.env.DEBUG}function fY(t){t.inspectOpts={};let e=Object.keys(zr.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=zr.inspectOpts[e[n]]}Fc.exports=xp()(zr);var{formatters:Lx}=Fc.exports;Lx.o=function(t){return this.inspectOpts.colors=this.useColors,Lc.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};Lx.O=function(t){return this.inspectOpts.colors=this.useColors,Lc.inspect(t,this.inspectOpts)}});var Mc=C((XEe,wp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?wp.exports=Ix():wp.exports=Fx()});var Mx=C((WEe,Np)=>{"use strict";var pY=_p(),dY=require("events").EventEmitter,hY=require("util").inherits,Lr=Mc()("avvio"),{AVV_ERR_READY_TIMEOUT:mY}=bp(),Rp=Symbol.for("plugin-meta");function gY(t,e){return t[Rp]&&t[Rp].name?t[Rp].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:t.name?t.name:t.toString().split(`
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function yY(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function Lo(t,e,n,r,l){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=l===void 0?t._timeout:l,this.name=gY(e,n),this.isAfter=r,this.q=pY(t,vY,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}hY(Lo,dY);Lo.prototype.exec=function(t,e){let n=this.func,r=!1,l=this.name;if(this.parent._error&&!this.isAfter){Lr("skipping loading of plugin as parent errored and it is not an after",l),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(o){return Lr("override errored",l),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Lr("exec",l);let i,s=o=>{if(r){Lr("loading complete",l);return}this._error=o,Lr(o?"exec errored":"exec completed",l),r=!0,i&&clearTimeout(i),e(o)};this.timeout>0&&(Lr("setting up timeout",l,this.timeout),i=setTimeout(function(){Lr("timed out",l),i=null;let o=new mY(l);o.fn=n,s(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,s);a&&typeof a.then=="function"&&(Lr("exec: resolving promise",l),a.then(()=>process.nextTick(s),o=>process.nextTick(s,o)))};Lo.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(Lr("rejecting promise",this.name,n),this._promise.reject(n)):(Lr("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(r,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=yY(),e=this._promise.promise,this.server?t():this.on("start",t)),e};Lo.prototype.enqueue=function(t,e){Lr("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};Lo.prototype.finish=function(t,e){Lr("finish",this.name,t);let n=()=>{this.loaded||(Lr("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(t))};if(t){this._promise&&(this._promise.reject(t),this._promise=null),n();return}let r=()=>{if(Lr("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let l=()=>{Lr("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(l,l),this._promise=null}else n();else Lr("delayed",this.name),this.q.drain=()=>{Lr("drain",this.name),this.q.drain=_Y,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function vY(t,e){let n=this;process.nextTick(Op.bind(n),t,e)}function Op(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,Op.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,r=>{t.finish(r,l=>{this._current.shift(),e(l)})})}function _Y(){}Np.exports=Lo;Np.exports.loadPlugin=Op});var Hx=C((KEe,Dp)=>{"use strict";var $x=_p(),EY=require("events").EventEmitter,bY=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ip,AVV_ERR_CALLBACK_NOT_FN:Y4,AVV_ERR_PLUGIN_NOT_VALID:TY,AVV_ERR_ROOT_PLG_BOOTED:SY,AVV_ERR_READY_TIMEOUT:xY}=bp(),AY=wx(),Pp=Mx(),Fo=Mc()("avvio"),$c=Symbol("kAvvio"),Cp=Symbol("kThenifyDoNotWrap");function wY(t,e,n){let r=e.expose||{},l=r.use||"use",i=r.after||"after",s=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[l])throw new Ip(l);if(t[i])throw new Ip(i);if(t[s])throw new Ip(s);t[l]=function(c,f){return n.use(c,f),this},Object.defineProperty(t,"then",{get:Ux.bind(n)}),t[$c]=!0,t[i]=function(c){return typeof c!="function"?n._loadRegistered():(n.after(kp(c,this)),this)},t[s]=function(c){if(c&&typeof c!="function")throw new Y4(s,typeof c);return n.ready(c?kp(c,this):void 0)},t[a]=function(c){if(typeof c!="function")throw new Y4(a,typeof c);return n.onClose(CY(c,this)),this},t[o]=function(c){if(c&&typeof c!="function")throw new Y4(o,typeof c);return c?(n.close(kp(c,this)),this):n.close()}}function Fr(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof Fr)){let r=new Fr(t,e,n);return t&&wY(t,e,r),r}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new AY,this._readyQ=$x(this,Bx,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=jx},this._closeQ=$x(this,IY,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=jx},this._doStart=null,this._root=new Pp(this,RY.bind(this),e,!1,0),this._root.once("start",(r,l,i)=>{let s=this.pluginTree.start(null,l,i);this._root.once("loaded",(a,o,c)=>{th Line truncated
causes have become circular...`;let r=Kp(t);return r?(e.add(t),n+`
caused by: `+bA(r,e)):n},GJ=t=>bA(t,new Set),TA=(t,e,n)=>{if(!e1(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let l=Kp(t);if(l){e.add(t);let i=typeof t.cause=="function";return r+(i?"":": ")+TA(l,e,i)}else return r},XJ=t=>TA(t,new Set);SA.exports={isErrorLike:e1,getErrorCause:Kp,stackWithCauses:GJ,messageWithCauses:XJ}});var Jp=C((obe,AA)=>{"use strict";var WJ=Symbol("circular-ref-tag"),Kc=Symbol("pino-raw-err-ref"),xA=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[Kc]},set:function(t){this[Kc]=t}}});Object.defineProperty(xA,Kc,{writable:!0,value:{}});AA.exports={pinoErrProto:xA,pinoErrorSymbols:{seen:WJ,rawSymbol:Kc}}});var OA=C((ube,RA)=>{"use strict";RA.exports=Zp;var{messageWithCauses:KJ,stackWithCauses:YJ,isErrorLike:wA}=Yp(),{pinoErrProto:JJ,pinoErrorSymbols:QJ}=Jp(),{seen:Qp}=QJ,{toString:ZJ}=Object.prototype;function Zp(t){if(!wA(t))return t;t[Qp]=void 0;let e=Object.create(JJ);e.type=ZJ.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=KJ(t),e.stack=YJ(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Zp(n)));for(let n in t)if(e[n]===void 0){let r=t[n];wA(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,Qp)&&(e[n]=Zp(r)):e[n]=r}return delete t[Qp],e.raw=t,e}});var IA=C((cbe,NA)=>{"use strict";NA.exports=Jc;var{isErrorLike:ed}=Yp(),{pinoErrProto:eQ,pinoErrorSymbols:tQ}=Jp(),{seen:Yc}=tQ,{toString:nQ}=Object.prototype;function Jc(t){if(!ed(t))return t;t[Yc]=void 0;let e=Object.create(eQ);e.type=nQ.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>Jc(n))),ed(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,Yc)&&(e.cause=Jc(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];ed(r)?Object.prototype.hasOwnProperty.call(r,Yc)||(e[n]=Jc(r)):e[n]=r}return delete t[Yc],e.raw=t,e}});var DA=C((fbe,PA)=>{"use strict";PA.exports={mapHttpRequest:rQ,reqSerializer:kA};var td=Symbol("pino-raw-req-ref"),CA=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[td]},set:function(t){this[td]=t}}});Object.defineProperty(CA,td,{writable:!0,value:{}});function kA(t){let e=t.info||t.socket,n=Object.create(CA);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let r=t.path;n.url=typeof r=="string"?r:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function rQ(t){return{req:kA(t)}}});var $A=C((pbe,MA)=>{"use strict";MA.exports={mapHttpResponse:lQ,resSerializer:FA};var nd=Symbol("pino-raw-res-ref"),LA=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[nd]},set:function(t){this[nd]=t}}});Object.defineProperty(LA,nd,{writable:!0,value:{}});function FA(t){let e=Object.create(LA);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function lQ(t){return{res:FA(t)}}});var ld=C((dbe,jA)=>{"use strict";var rd=OA(),iQ=IA(),Qc=DA(),Zc=$A();jA.exports={err:rd,errWithCause:iQ,mapHttpRequest:Qc.mapHttpRequest,mapHttpResponse:Zc.mapHttpResponse,req:Qc.reqSerializer,res:Zc.resSerializer,wrapErrorSerializer:function(e){return e===rd?e:function(r){return e(rd(r))}},wrapRequestSerializer:function(e){return e===Qc.reqSerializer?e:function(r){return e(Qc.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===Zc.resSerializer?e:function(r){return e(Zc.resSerializer(r))}}}});var id=C((hbe,UA)=>{"use strict";function sQ(t,e){return e}UA.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=sQ;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),l=[];for(let i of r)i&&l.push(i.getFileName());return l}});var HA=C((mbe,BA)=>{"use strict";BA.exports=aQ;function aQ(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=r=>`fast-redact \u2013 Invalid path (${r})`}=t;return function({paths:l}){l.forEach(i=>{if(typeof i!="string")throw Error(e());try{if(/〇/.test(i))throw Error();let s=(i[0]==="["?"":".")+i.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if( Line truncated
`+i),n.push(r+"m+"+B6.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=NY()+e+" "+n[0]}function NY(){return Xt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function IY(...n){return process.stderr.write(U6.format(...n)+`
`)}function CY(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function kY(){return process.env.DEBUG}function PY(n){n.inspectOpts={};let e=Object.keys(Xt.inspectOpts);for(let l=0;l<e.length;l++)n.inspectOpts[e[l]]=Xt.inspectOpts[e[l]]}B6.exports=kp()(Xt);var{formatters:Kx}=B6.exports;Kx.o=function(n){return this.inspectOpts.colors=this.useColors,U6.inspect(n,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};Kx.O=function(n){return this.inspectOpts.colors=this.useColors,U6.inspect(n,this.inspectOpts)}});var H6=C((Sbe,Dp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Dp.exports=Vx():Dp.exports=Yx()});var Jx=C((xbe,Mp)=>{"use strict";var DY=Op(),LY=require("events").EventEmitter,FY=require("util").inherits,Mt=H6()("avvio"),{AVV_ERR_READY_TIMEOUT:MY}=Np(),Lp=Symbol.for("plugin-meta");function $Y(n,e){return n[Lp]&&n[Lp].name?n[Lp].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:n.name?n.name:n.toString().split(`
`).slice(0,2).map(l=>l.trim()).join(" -- ")}function jY(){let n={};return n.promise=new Promise((e,l)=>{n.resolve=e,n.reject=l}),n}function Ma(n,e,l,t,r){this.started=!1,this.func=e,this.opts=l,this.onFinish=null,this.parent=n,this.timeout=r===void 0?n._timeout:r,this.name=$Y(e,l),this.isAfter=t,this.q=DY(n,UY,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}FY(Ma,LY);Ma.prototype.exec=function(n,e){let l=this.func,t=!1,r=this.name;if(this.parent._error&&!this.isAfter){Mt("skipping loading of plugin as parent errored and it is not an after",r),process.nextTick(e);return}if(this.isAfter)this.server=n;else try{this.server=this.parent.override(n,l,this.opts)}catch(a){return Mt("override errored",r),e(a)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Mt("exec",r);let i,s=a=>{if(t){Mt("loading complete",r);return}this._error=a,Mt(a?"exec errored":"exec completed",r),t=!0,i&&clearTimeout(i),e(a)};this.timeout>0&&(Mt("setting up timeout",r,this.timeout),i=setTimeout(function(){Mt("timed out",r),i=null;let a=new MY(r);a.fn=l,s(a)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let u=l(this.server,this.opts,s);u&&typeof u.then=="function"&&(Mt("exec: resolving promise",r),u.then(()=>process.nextTick(s),a=>process.nextTick(s,a)))};Ma.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let n=()=>{this.server.after((l,t)=>{this._error=l,this.q.pause(),l?(Mt("rejecting promise",this.name,l),this._promise.reject(l)):(Mt("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(t,l)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=jY(),e=this._promise.promise,this.server?n():this.on("start",n)),e};Ma.prototype.enqueue=function(n,e){Mt("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,e)};Ma.prototype.finish=function(n,e){Mt("finish",this.name,n);let l=()=>{this.loaded||(Mt("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(n))};if(n){this._promise&&(this._promise.reject(n),this._promise=null),l();return}let t=()=>{if(Mt("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let r=()=>{Mt("wrap"),queueMicrotask(t)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else l();else Mt("delayed",this.name),this.q.drain=()=>{Mt("drain",this.name),this.q.drain=BY,queueMicrotask(t)}};queueMicrotask(t),this.q.resume()};function UY(n,e){let l=this;process.nextTick(Fp.bind(l),n,e)}function Fp(n,e){if(typeof n.func.then=="function"){n.func.then(t=>{typeof t.default=="function"&&(t=t.default),n.func=t,Fp.call(this,n,e)},e);return}let l=this._current[0];this._current.unshift(n),n.exec(l&&l.server||this._server,t=>{n.finish(t,r=>{this._current.shift(),e(r)})})}function BY(){}Mp.exports=Ma;Mp.exports.loadPlugin=Fp});var lA=C((Abe,Hp)=>{"use strict";var Qx=Op(),HY=require("events").EventEmitter,qY=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:$p,AVV_ERR_CALLBACK_NOT_FN:e0,AVV_ERR_PLUGIN_NOT_VALID:VY,AVV_ERR_ROOT_PLG_BOOTED:zY,AVV_ERR_READY_TIMEOUT:GY}=Np(),XY=Ux(),Bp=Jx(),$a=H6()("avvio"),q6=Symbol("kAvvio"),jp=Symbol("kThenifyDoNotWrap");function WY(n,e,l){let t=e.expose||{},r=t.use||"use",i=t.after||"after",s=t.ready||"ready",u=t.onClose||"onClose",a=t.close||"close";if(n[r])throw new $p(r);if(n[i])throw new $p(i);if(n[s])throw new $p(s);n[r]=function(c,f){return l.use(c,f),this},Object.defineProperty(n,"then",{get:eA.bind(l)}),n[q6]=!0,n[i]=function(c){return typeof c!="function"?l._loadRegistered():(l.after(Up(c,this)),this)},n[s]=function(c){if(c&&typeof c!="function")throw new e0(s,typeof c);return l.ready(c?Up(c,this):void 0)},n[u]=function(c){if(typeof c!="function")throw new e0(u,typeof c);return l.onClose(ZY(c,this)),this},n[a]=function(c){if(c&&typeof c!="function")throw new e0(a,typeof c);return c?(l.close(Up(c,this)),this):l.close()}}function $t(n,e,l){if(typeof n=="function"&&arguments.length===1&&(l=n,e={},n=null),typeof e=="function"&&(l=e,e={}),e=e||{},!(this instanceof $t)){let t=new $t(n,e,l);return n&&WY(n,e,t),t}e.autostart!==!1&&(e.autostart=!0),n=n||this,this._timeout=Number(e.timeout)||0,this._server=n,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),l&&this.once("start",l),this.started=!1,this.booted=!1,this.pluginTree=new XY,this._readyQ=Qx(this,nA,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=Zx},this._closeQ=Qx(this,QY,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=Zx},this._doStart=null,this._root=new Bp(this,KY.bind(this),e,!1,0),this._root.once("start",(t,r,i)=>{let s=this.pluginTree.start(null,r,i);this._root.once("loaded",(u,a,c)=>{th Line truncated
causes have become circular...`;let t=td(n);return t?(e.add(n),l+`
caused by: `+LA(t,e)):l},hQ=n=>LA(n,new Set),FA=(n,e,l)=>{if(!r0(n))return"";let t=l?"":n.message||"";if(e.has(n))return t+": ...";let r=td(n);if(r){e.add(n);let i=typeof n.cause=="function";return t+(i?"":": ")+FA(r,e,i)}else return t},mQ=n=>FA(n,new Set);MA.exports={isErrorLike:r0,getErrorCause:td,stackWithCauses:hQ,messageWithCauses:mQ}});var sd=C(($be,jA)=>{"use strict";var gQ=Symbol("circular-ref-tag"),e8=Symbol("pino-raw-err-ref"),$A=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[e8]},set:function(n){this[e8]=n}}});Object.defineProperty($A,e8,{writable:!0,value:{}});jA.exports={pinoErrProto:$A,pinoErrorSymbols:{seen:gQ,rawSymbol:e8}}});var HA=C((jbe,BA)=>{"use strict";BA.exports=ad;var{messageWithCauses:yQ,stackWithCauses:vQ,isErrorLike:UA}=rd(),{pinoErrProto:_Q,pinoErrorSymbols:EQ}=sd(),{seen:ud}=EQ,{toString:bQ}=Object.prototype;function ad(n){if(!UA(n))return n;n[ud]=void 0;let e=Object.create(_Q);e.type=bQ.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,e.message=yQ(n),e.stack=vQ(n),Array.isArray(n.errors)&&(e.aggregateErrors=n.errors.map(l=>ad(l)));for(let l in n)if(e[l]===void 0){let t=n[l];UA(t)?l!=="cause"&&!Object.prototype.hasOwnProperty.call(t,ud)&&(e[l]=ad(t)):e[l]=t}return delete n[ud],e.raw=n,e}});var VA=C((Ube,qA)=>{"use strict";qA.exports=l8;var{isErrorLike:od}=rd(),{pinoErrProto:TQ,pinoErrorSymbols:SQ}=sd(),{seen:n8}=SQ,{toString:xQ}=Object.prototype;function l8(n){if(!od(n))return n;n[n8]=void 0;let e=Object.create(TQ);e.type=xQ.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,e.message=n.message,e.stack=n.stack,Array.isArray(n.errors)&&(e.aggregateErrors=n.errors.map(l=>l8(l))),od(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,n8)&&(e.cause=l8(n.cause));for(let l in n)if(e[l]===void 0){let t=n[l];od(t)?Object.prototype.hasOwnProperty.call(t,n8)||(e[l]=l8(t)):e[l]=t}return delete n[n8],e.raw=n,e}});var WA=C((Bbe,XA)=>{"use strict";XA.exports={mapHttpRequest:AQ,reqSerializer:GA};var cd=Symbol("pino-raw-req-ref"),zA=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[cd]},set:function(n){this[cd]=n}}});Object.defineProperty(zA,cd,{writable:!0,value:{}});function GA(n){let e=n.info||n.socket,l=Object.create(zA);if(l.id=typeof n.id=="function"?n.id():n.id||(n.info?n.info.id:void 0),l.method=n.method,n.originalUrl)l.url=n.originalUrl;else{let t=n.path;l.url=typeof t=="string"?t:n.url?n.url.path||n.url:void 0}return n.query&&(l.query=n.query),n.params&&(l.params=n.params),l.headers=n.headers,l.remoteAddress=e&&e.remoteAddress,l.remotePort=e&&e.remotePort,l.raw=n.raw||n,l}function AQ(n){return{req:GA(n)}}});var QA=C((Hbe,JA)=>{"use strict";JA.exports={mapHttpResponse:wQ,resSerializer:YA};var fd=Symbol("pino-raw-res-ref"),KA=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[fd]},set:function(n){this[fd]=n}}});Object.defineProperty(KA,fd,{writable:!0,value:{}});function YA(n){let e=Object.create(KA);return e.statusCode=n.headersSent?n.statusCode:null,e.headers=n.getHeaders?n.getHeaders():n._headers,e.raw=n,e}function wQ(n){return{res:YA(n)}}});var dd=C((qbe,ZA)=>{"use strict";var pd=HA(),OQ=VA(),t8=WA(),r8=QA();ZA.exports={err:pd,errWithCause:OQ,mapHttpRequest:t8.mapHttpRequest,mapHttpResponse:r8.mapHttpResponse,req:t8.reqSerializer,res:r8.resSerializer,wrapErrorSerializer:function(e){return e===pd?e:function(t){return e(pd(t))}},wrapRequestSerializer:function(e){return e===t8.reqSerializer?e:function(t){return e(t8.reqSerializer(t))}},wrapResponseSerializer:function(e){return e===r8.resSerializer?e:function(t){return e(r8.resSerializer(t))}}}});var hd=C((Vbe,ew)=>{"use strict";function RQ(n,e){return e}ew.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=RQ;let l=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(l))return;let t=l.slice(2),r=[];for(let i of t)i&&r.push(i.getFileName());return r}});var lw=C((zbe,nw)=>{"use strict";nw.exports=NQ;function NQ(n={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:l=t=>`fast-redact \u2013 Invalid path (${t})`}=n;return function({paths:r}){r.forEach(i=>{if(typeof i!="string")throw Error(e());try{if(/〇/.test(i))throw Error();let s=(i[0]==="["?"":".")+i.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if( Line truncated
'use strict'
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
const \u3007 = null;
o${s}
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(i))}})}}});var e6=C((gbe,qA)=>{"use strict";qA.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var zA=C((ybe,VA)=>{"use strict";var oQ=e6();VA.exports=uQ;function uQ({paths:t}){let e=[];var n=0;let r=t.reduce(function(l,i,s){var a=i.match(oQ).map(f=>f.replace(/'|"|`/g,""));let o=i[0]==="[";a=a.map(f=>f[0]==="["?f.substr(1,f.length-2):f);let c=a.indexOf("*");if(c>-1){let f=a.slice(0,c),p=f.join("."),m=a.slice(c+1,a.length),h=m.length>0;n++,e.push({before:f,beforeStr:p,after:m,nested:h})}else l[i]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(i),leadingBracket:o};return l},{});return{wildcards:e,wcLen:n,secret:r}}});var XA=C((vbe,GA)=>{"use strict";var cQ=e6();GA.exports=fQ;function fQ({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:l,censorFctTakesPath:i},s){let a=Function("o",`
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(l(i))}})}}});var i8=C((Gbe,tw)=>{"use strict";tw.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var iw=C((Xbe,rw)=>{"use strict";var IQ=i8();rw.exports=CQ;function CQ({paths:n}){let e=[];var l=0;let t=n.reduce(function(r,i,s){var u=i.match(IQ).map(f=>f.replace(/'|"|`/g,""));let a=i[0]==="[";u=u.map(f=>f[0]==="["?f.substr(1,f.length-2):f);let c=u.indexOf("*");if(c>-1){let f=u.slice(0,c),p=f.join("."),m=u.slice(c+1,u.length),h=m.length>0;l++,e.push({before:f,beforeStr:p,after:m,nested:h})}else r[i]={path:u,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(i),leadingBracket:a};return r},{});return{wildcards:e,wcLen:l,secret:t}}});var uw=C((Wbe,sw)=>{"use strict";var kQ=i8();sw.exports=PQ;function PQ({secret:n,serialize:e,wcLen:l,strict:t,isCensorFct:r,censorFctTakesPath:i},s){let u=Function("o",`
if (typeof o !== 'object' || o == null) {
${mQ(r,e)}
${MQ(t,e)}
}
const { censor, secret } = this
${pQ(t,l,i)}
${DQ(n,r,i)}
this.compileRestore()
${dQ(n>0,l,i)}
${hQ(e)}
`).bind(s);return e===!1&&(a.restore=o=>s.restore(o)),a}function pQ(t,e,n){return Object.keys(t).map(r=>{let{escPath:l,leadingBracket:i,path:s}=t[r],a=i?1:0,o=i?"":".",c=[];for(var f;(f=cQ.exec(r))!==null;){let[,g]=f,{index:_,input:S}=f;_>a&&c.push(S.substring(0,_-(g?0:1)))}var p=c.map(g=>`o${o}${g}`).join(" && ");p.length===0?p+=`o${o}${r} != null`:p+=` && o${o}${r} != null`;let m=`
${LQ(l>0,r,i)}
${FQ(e)}
`).bind(s);return e===!1&&(u.restore=a=>s.restore(a)),u}function DQ(n,e,l){return Object.keys(n).map(t=>{let{escPath:r,leadingBracket:i,path:s}=n[t],u=i?1:0,a=i?"":".",c=[];for(var f;(f=kQ.exec(t))!==null;){let[,g]=f,{index:_,input:S}=f;_>u&&c.push(S.substring(0,_-(g?0:1)))}var p=c.map(g=>`o${a}${g}`).join(" && ");p.length===0?p+=`o${a}${t} != null`:p+=` && o${a}${t} != null`;let m=`
switch (true) {
${c.reverse().map(g=>`
case o${o}${g} === censor:
secret[${l}].circle = ${JSON.stringify(g)}
case o${a}${g} === censor:
secret[${r}].circle = ${JSON.stringify(g)}
break
`).join(`
`)}
}
`,h=n?`val, ${JSON.stringify(s)}`:"val";return`
`,h=l?`val, ${JSON.stringify(s)}`:"val";return`
if (${p}) {
const val = o${o}${r}
const val = o${a}${t}
if (val === censor) {
secret[${l}].precensored = true
secret[${r}].precensored = true
} else {
secret[${l}].val = val
o${o}${r} = ${e?`censor(${h})`:"censor"}
secret[${r}].val = val
o${a}${t} = ${e?`censor(${h})`:"censor"}
${m}
}
}
`}).join(`
`)}function dQ(t,e,n){return t===!0?`
`)}function LQ(n,e,l){return n===!0?`
{
const { wildcards, wcLen, groupRedact, nestedRedact } = this
for (var i = 0; i < wcLen; i++) {
const { before, beforeStr, after, nested } = wildcards[i]
if (nested === true) {
secret[beforeStr] = secret[beforeStr] || []
nestedRedact(secret[beforeStr], o, before, after, censor, ${e}, ${n})
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${n})
nestedRedact(secret[beforeStr], o, before, after, censor, ${e}, ${l})
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${l})
}
}
`:""}function hQ(t){return t===!1?"return o":`
`:""}function FQ(n){return n===!1?"return o":`
var s = this.serialize(o)
this.restore(o)
return s
`}function mQ(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var ad=C((_be,YA)=>{"use strict";YA.exports={groupRedact:yQ,groupRestore:gQ,nestedRedact:_Q,nestedRestore:vQ};function gQ({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var l=0;l<r;l++){let i=t[l];n[i]=e[l]}}function yQ(t,e,n,r,l){let i=WA(t,e);if(i==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(i),a=s.length,o=e.length,c=l?[...e]:void 0,f=new Array(a);for(var p=0;p<a;p++){let m=s[p];f[p]=i[m],l?(c[o]=m,i[m]=n(i[m],c)):r?i[m]=n(i[m]):i[m]=n}return{keys:s,values:f,target:i,flat:!0}}function vQ(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:l}=t[e],i=n;for(let s=r.length-1;s>0;s--)i=i[r[s]];i[r[0]]=l}}function _Q(t,e,n,r,l,i,s){let a=WA(e,n);if(a==null)return;let o=Object.keys(a),c=o.length;for(var f=0;f<c;f++){let p=o[f];EQ(t,a,p,n,r,l,i,s)}return t}function sd(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function EQ(t,e,n,r,l,i,s,a){let o=l.length,c=o-1,f=n;var p=-1,m,h,g,_=null,S=null,T,x,v=!1,b=0,w=0,N=bQ();if(g=m=e[n],typeof m=="object"){for(;m!=null&&++p<o&&(w+=1,n=l[p],_=g,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(v=!0),S=n,p!==c))){if(S){let k=Object.keys(m);for(var O=0;O<k.length;O++){let j=k[O];if(x=m[j],T=n==="*",v)N=i3(N,j,w),b=p,g=KA(x,b-1,n,r,l,i,s,a,f,m,h,g,T,j,p,c,N,t,e[f],w+1);else if(T||typeof x=="object"&&x!==null&&n in x){if(T?g=x:g=x[n],h=p!==c?g:s?a?i(g,[...r,f,...l]):i(g):i,T){let L=t1(i3(N,j,w),g,e[f]);t.push(L),m[j]=h}else if(x[n]!==h)if(h===void 0&&i!==void 0||sd(x,n)&&h===g)N=i3(N,j,w);else{N=i3(N,j,w);let L=t1(i3(N,n,w+1),g,e[f]);t.push(L),x[n]=h}}}S=null}else{if(g=m[n],N=i3(N,n,w),h=p!==c?g:s?a?i(g,[...r,f,...l]):i(g):i,!(sd(m,n)&&h===g||h===void 0&&i!==void 0)){let k=t1(N,g,e[f]);t.push(k),m[n]=h}m=m[n]}if(typeof m!="object")break}}}function WA(t,e){for(var n=-1,r=e.length,l=t;l!=null&&++n<r;)l=l[e[n]];return l}function KA(t,e,n,r,l,i,s,a,o,c,f,p,m,h,g,_,S,T,x,v){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?p=t:p=t[n],f=g!==_?p:s?a?i(p,[...r,o,...l]):i(p):i,m){let b=t1(S,p,x);T.push(b),c[h]=f}else if(t[n]!==f){if(!(f===void 0&&i!==void 0||sd(t,n)&&f===p)){let b=t1(i3(S,n,v+1),p,x);T.push(b),t[n]=f}}}for(let b in t)typeof t[b]=="object"&&(S=i3(S,b,v),KA(t[b],e-1,n,r,l,i,s,a,o,c,f,p,m,h,g,_,S,T,x,v+1))}function bQ(){return{parent:null,key:null,children:[],depth:0}}function i3(t,e,n){if(t.depth===n)return i3(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function t1(t,e,n){let r=t,l=[];do l.push(r.key),r=r.parent;while(r.parent!=null);return{path:l,value:e,target:n}}});var QA=C((Ebe,JA)=>{"use strict";var{groupRestore:TQ,nestedRestore:SQ}=ad();JA.exports=xQ;function xQ({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),l=AQ(t,r),i=e>0,s=i?{secret:t,groupRestore:TQ,nestedRestore:SQ}:{secret:t};this.restore=Function("o",wQ(l,r,i)).bind(s)}}function AQ(t,e){return e.map(n=>{let{circle:r,escPath:l,leadingBracket:i}=t[n],a=r?`o.${r} = secret[${l}].val`:`o${i?"":"."}${n} = secret[${l}].val`,o=`secret[${l}].val = undefined`;return`
if (secret[${l}].val !== undefined) {
try { ${a} } catch (e) {}
${o}
`}function MQ(n,e){return n===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var gd=C((Kbe,cw)=>{"use strict";cw.exports={groupRedact:jQ,groupRestore:$Q,nestedRedact:BQ,nestedRestore:UQ};function $Q({keys:n,values:e,target:l}){if(l==null)return;let t=n.length;for(var r=0;r<t;r++){let i=n[r];l[i]=e[r]}}function jQ(n,e,l,t,r){let i=aw(n,e);if(i==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(i),u=s.length,a=e.length,c=r?[...e]:void 0,f=new Array(u);for(var p=0;p<u;p++){let m=s[p];f[p]=i[m],r?(c[a]=m,i[m]=l(i[m],c)):t?i[m]=l(i[m]):i[m]=l}return{keys:s,values:f,target:i,flat:!0}}function UQ(n){for(let e=0;e<n.length;e++){let{target:l,path:t,value:r}=n[e],i=l;for(let s=t.length-1;s>0;s--)i=i[t[s]];i[t[0]]=r}}function BQ(n,e,l,t,r,i,s){let u=aw(e,l);if(u==null)return;let a=Object.keys(u),c=a.length;for(var f=0;f<c;f++){let p=a[f];HQ(n,u,p,l,t,r,i,s)}return n}function md(n,e){return n!=null?"hasOwn"in Object?Object.hasOwn(n,e):Object.prototype.hasOwnProperty.call(n,e):!1}function HQ(n,e,l,t,r,i,s,u){let a=r.length,c=a-1,f=l;var p=-1,m,h,g,_=null,S=null,T,x,v=!1,b=0,w=0,N=qQ();if(g=m=e[l],typeof m=="object"){for(;m!=null&&++p<a&&(w+=1,l=r[p],_=g,!(l!=="*"&&!S&&!(typeof m=="object"&&l in m)));)if(!(l==="*"&&(S==="*"&&(v=!0),S=l,p!==c))){if(S){let k=Object.keys(m);for(var R=0;R<k.length;R++){let j=k[R];if(x=m[j],T=l==="*",v)N=si(N,j,w),b=p,g=ow(x,b-1,l,t,r,i,s,u,f,m,h,g,T,j,p,c,N,n,e[f],w+1);else if(T||typeof x=="object"&&x!==null&&l in x){if(T?g=x:g=x[l],h=p!==c?g:s?u?i(g,[...t,f,...r]):i(g):i,T){let L=i0(si(N,j,w),g,e[f]);n.push(L),m[j]=h}else if(x[l]!==h)if(h===void 0&&i!==void 0||md(x,l)&&h===g)N=si(N,j,w);else{N=si(N,j,w);let L=i0(si(N,l,w+1),g,e[f]);n.push(L),x[l]=h}}}S=null}else{if(g=m[l],N=si(N,l,w),h=p!==c?g:s?u?i(g,[...t,f,...r]):i(g):i,!(md(m,l)&&h===g||h===void 0&&i!==void 0)){let k=i0(N,g,e[f]);n.push(k),m[l]=h}m=m[l]}if(typeof m!="object")break}}}function aw(n,e){for(var l=-1,t=e.length,r=n;r!=null&&++l<t;)r=r[e[l]];return r}function ow(n,e,l,t,r,i,s,u,a,c,f,p,m,h,g,_,S,T,x,v){if(e===0&&(m||typeof n=="object"&&n!==null&&l in n)){if(m?p=n:p=n[l],f=g!==_?p:s?u?i(p,[...t,a,...r]):i(p):i,m){let b=i0(S,p,x);T.push(b),c[h]=f}else if(n[l]!==f){if(!(f===void 0&&i!==void 0||md(n,l)&&f===p)){let b=i0(si(S,l,v+1),p,x);T.push(b),n[l]=f}}}for(let b in n)typeof n[b]=="object"&&(S=si(S,b,v),ow(n[b],e-1,l,t,r,i,s,u,a,c,f,p,m,h,g,_,S,T,x,v+1))}function qQ(){return{parent:null,key:null,children:[],depth:0}}function si(n,e,l){if(n.depth===l)return si(n.parent,e,l);var t={parent:n,key:e,depth:l,children:[]};return n.children.push(t),t}function i0(n,e,l){let t=n,r=[];do r.push(t.key),t=t.parent;while(t.parent!=null);return{path:r,value:e,target:l}}});var pw=C((Ybe,fw)=>{"use strict";var{groupRestore:VQ,nestedRestore:zQ}=gd();fw.exports=GQ;function GQ({secret:n,wcLen:e}){return function(){if(this.restore)return;let t=Object.keys(n),r=XQ(n,t),i=e>0,s=i?{secret:n,groupRestore:VQ,nestedRestore:zQ}:{secret:n};this.restore=Function("o",WQ(r,t,i)).bind(s)}}function XQ(n,e){return e.map(l=>{let{circle:t,escPath:r,leadingBracket:i}=n[l],u=t?`o.${t} = secret[${r}].val`:`o${i?"":"."}${l} = secret[${r}].val`,a=`secret[${r}].val = undefined`;return`
if (secret[${r}].val !== undefined) {
try { ${u} } catch (e) {}
${a}
}
`}).join("")}function wQ(t,e,n){return`
`}).join("")}function WQ(n,e,l){return`
const secret = this.secret
${n===!0?`
${l===!0?`
const keys = Object.keys(secret)
const len = keys.length
for (var i = len - 1; i >= ${e.length}; i--) {
@@ -76,51 +76,51 @@ caused by: `+bA(r,e)):n},GJ=t=>bA(t,new Set),TA=(t,e,n)=>{if(!e1(t))return"";let
secret[k] = null
}
`:""}
${t}
${n}
return o
`}});var ew=C((bbe,ZA)=>{"use strict";ZA.exports=RQ;function RQ(t){let{secret:e,censor:n,compileRestore:r,serialize:l,groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}=t,c=[{secret:e,censor:n,compileRestore:r}];return l!==!1&&c.push({serialize:l}),o>0&&c.push({groupRedact:i,nestedRedact:s,wildcards:a,wcLen:o}),Object.assign(...c)}});var rw=C((Tbe,nw)=>{"use strict";var tw=HA(),OQ=zA(),NQ=XA(),IQ=QA(),{groupRedact:CQ,nestedRedact:kQ}=ad(),PQ=ew(),DQ=e6(),LQ=tw(),od=t=>t;od.restore=od;var FQ="[REDACTED]";ud.rx=DQ;ud.validator=tw;nw.exports=ud;function ud(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,r=t.remove;if(r===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let l=r===!0?void 0:"censor"in t?t.censor:FQ,i=typeof l=="function",s=i&&l.length>1;if(e.length===0)return n||od;LQ({paths:e,serialize:n,censor:l});let{wildcards:a,wcLen:o,secret:c}=OQ({paths:e,censor:l}),f=IQ({secret:c,wcLen:o}),p="strict"in t?t.strict:!0;return NQ({secret:c,wcLen:o,serialize:n,strict:p,isCensorFct:i,censorFctTakesPath:s},PQ({secret:c,censor:l,compileRestore:f,serialize:n,groupRedact:CQ,nestedRedact:kQ,wildcards:a,wcLen:o}))}});var Uo=C((Sbe,lw)=>{"use strict";var MQ=Symbol("pino.setLevel"),$Q=Symbol("pino.getLevel"),jQ=Symbol("pino.levelVal"),UQ=Symbol("pino.levelComp"),BQ=Symbol("pino.useLevelLabels"),HQ=Symbol("pino.useOnlyCustomLevels"),qQ=Symbol("pino.mixin"),VQ=Symbol("pino.lsCache"),zQ=Symbol("pino.chindings"),GQ=Symbol("pino.asJson"),XQ=Symbol("pino.write"),WQ=Symbol("pino.redactFmt"),KQ=Symbol("pino.time"),YQ=Symbol("pino.timeSliceIndex"),JQ=Symbol("pino.stream"),QQ=Symbol("pino.stringify"),ZQ=Symbol("pino.stringifySafe"),eZ=Symbol("pino.stringifiers"),tZ=Symbol("pino.end"),nZ=Symbol("pino.formatOpts"),rZ=Symbol("pino.messageKey"),lZ=Symbol("pino.errorKey"),iZ=Symbol("pino.nestedKey"),sZ=Symbol("pino.nestedKeyStr"),aZ=Symbol("pino.mixinMergeStrategy"),oZ=Symbol("pino.msgPrefix"),uZ=Symbol("pino.wildcardFirst"),cZ=Symbol.for("pino.serializers"),fZ=Symbol.for("pino.formatters"),pZ=Symbol.for("pino.hooks"),dZ=Symbol.for("pino.metadata");lw.exports={setLevelSym:MQ,getLevelSym:$Q,levelValSym:jQ,levelCompSym:UQ,useLevelLabelsSym:BQ,mixinSym:qQ,lsCacheSym:VQ,chindingsSym:zQ,asJsonSym:GQ,writeSym:XQ,serializersSym:cZ,redactFmtSym:WQ,timeSym:KQ,timeSliceIndexSym:YQ,streamSym:JQ,stringifySym:QQ,stringifySafeSym:ZQ,stringifiersSym:eZ,endSym:tZ,formatOptsSym:nZ,messageKeySym:rZ,errorKeySym:lZ,nestedKeySym:iZ,wildcardFirstSym:uZ,needsMetadataGsym:dZ,useOnlyCustomLevelsSym:HQ,formattersSym:fZ,hooksSym:pZ,nestedKeyStrSym:sZ,mixinMergeStrategySym:aZ,msgPrefixSym:oZ}});var pd=C((xbe,ow)=>{"use strict";var fd=rw(),{redactFmtSym:hZ,wildcardFirstSym:t6}=Uo(),{rx:cd,validator:mZ}=fd,iw=mZ({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),sw="[Redacted]",aw=!1;function gZ(t,e){let{paths:n,censor:r}=yZ(t),l=n.reduce((a,o)=>{cd.lastIndex=0;let c=cd.exec(o),f=cd.exec(o),p=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(p==="*"&&(p=t6),f===null)return a[p]=null,a;if(a[p]===null)return a;let{index:m}=f,h=`${o.substr(m,o.length-1)}`;return a[p]=a[p]||[],p!==t6&&a[p].length===0&&a[p].push(...a[t6]||[]),p===t6&&Object.keys(a).forEach(function(g){a[g]&&a[g].push(h)}),a[p].push(h),a},{}),i={[hZ]:fd({paths:n,censor:r,serialize:e,strict:aw})},s=(...a)=>e(typeof r=="function"?r(...a):r);return[...Object.keys(l),...Object.getOwnPropertySymbols(l)].reduce((a,o)=>{if(l[o]===null)a[o]=c=>s(c,[o]);else{let c=typeof r=="function"?(f,p)=>r(f,[o,...p]):r;a[o]=fd({paths:l[o],censor:c,serialize:e,strict:aw})}return a},i)}function yZ(t){if(Array.isArray(t))return t={paths:t,censor:sw},iw(t),t;let{paths:e,censor:n=sw,remove:r}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return r===!0&&(n=void 0),iw({paths:e,censor:n}),{paths:e,censor:n}}ow.exports=gZ});var cw=C((Abe,uw)=>{"use strict";var vZ=()=>"",_Z=()=>`,"time":${Date.now()}`,EZ=()=>`,"time":${Math.round(Date.now()/1e3)}`,bZ=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;uw.exports={nullTime:vZ,epochTime:_Z,unixTime:EZ,isoTime:bZ}});var pw=C((wbe,fw)=>{"use strict";function TZ(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}fw.exports=SZ;function SZ(t,e,n){var r=n&&n.stringify||TZ,l=1;if(typeof t=="object"&&t!==null){var i=e.length+l;if(i===1)return t;var s=new Array(i);s[0]=r(t);for(var a=1;a<i;a++)s[a]=r(e[a]);return s.join(" ")}if(typeof t!="string")return t;var o=e.length;if(o===0)return t;for(var c="",f=1-l,p=-1,m=t&&t.length||0,h=0;h<m;){if(t.charCodeAt(h)===37&&h+1<m){switch(p=p>-1?p:0,t.charCodeAt(h+1)){case 100:case 102:if(f>=o||e[f]==null)break;p<h&&(c+=t.slice(p,h)),c+=Number(e[f]),p=h+2,h++;break;case 105:if(f>=o||e[f]==null)break;p<h&&(Line truncated
`}});var hw=C((Jbe,dw)=>{"use strict";dw.exports=KQ;function KQ(n){let{secret:e,censor:l,compileRestore:t,serialize:r,groupRedact:i,nestedRedact:s,wildcards:u,wcLen:a}=n,c=[{secret:e,censor:l,compileRestore:t}];return r!==!1&&c.push({serialize:r}),a>0&&c.push({groupRedact:i,nestedRedact:s,wildcards:u,wcLen:a}),Object.assign(...c)}});var yw=C((Qbe,gw)=>{"use strict";var mw=lw(),YQ=iw(),JQ=uw(),QQ=pw(),{groupRedact:ZQ,nestedRedact:eZ}=gd(),nZ=hw(),lZ=i8(),tZ=mw(),yd=n=>n;yd.restore=yd;var rZ="[REDACTED]";vd.rx=lZ;vd.validator=mw;gw.exports=vd;function vd(n={}){let e=Array.from(new Set(n.paths||[])),l="serialize"in n&&(n.serialize===!1||typeof n.serialize=="function")?n.serialize:JSON.stringify,t=n.remove;if(t===!0&&l!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let r=t===!0?void 0:"censor"in n?n.censor:rZ,i=typeof r=="function",s=i&&r.length>1;if(e.length===0)return l||yd;tZ({paths:e,serialize:l,censor:r});let{wildcards:u,wcLen:a,secret:c}=YQ({paths:e,censor:r}),f=QQ({secret:c,wcLen:a}),p="strict"in n?n.strict:!0;return JQ({secret:c,wcLen:a,serialize:l,strict:p,isCensorFct:i,censorFctTakesPath:s},nZ({secret:c,censor:r,compileRestore:f,serialize:l,groupRedact:ZQ,nestedRedact:eZ,wildcards:u,wcLen:a}))}});var Ha=C((Zbe,vw)=>{"use strict";var iZ=Symbol("pino.setLevel"),sZ=Symbol("pino.getLevel"),uZ=Symbol("pino.levelVal"),aZ=Symbol("pino.levelComp"),oZ=Symbol("pino.useLevelLabels"),cZ=Symbol("pino.useOnlyCustomLevels"),fZ=Symbol("pino.mixin"),pZ=Symbol("pino.lsCache"),dZ=Symbol("pino.chindings"),hZ=Symbol("pino.asJson"),mZ=Symbol("pino.write"),gZ=Symbol("pino.redactFmt"),yZ=Symbol("pino.time"),vZ=Symbol("pino.timeSliceIndex"),_Z=Symbol("pino.stream"),EZ=Symbol("pino.stringify"),bZ=Symbol("pino.stringifySafe"),TZ=Symbol("pino.stringifiers"),SZ=Symbol("pino.end"),xZ=Symbol("pino.formatOpts"),AZ=Symbol("pino.messageKey"),wZ=Symbol("pino.errorKey"),OZ=Symbol("pino.nestedKey"),RZ=Symbol("pino.nestedKeyStr"),NZ=Symbol("pino.mixinMergeStrategy"),IZ=Symbol("pino.msgPrefix"),CZ=Symbol("pino.wildcardFirst"),kZ=Symbol.for("pino.serializers"),PZ=Symbol.for("pino.formatters"),DZ=Symbol.for("pino.hooks"),LZ=Symbol.for("pino.metadata");vw.exports={setLevelSym:iZ,getLevelSym:sZ,levelValSym:uZ,levelCompSym:aZ,useLevelLabelsSym:oZ,mixinSym:fZ,lsCacheSym:pZ,chindingsSym:dZ,asJsonSym:hZ,writeSym:mZ,serializersSym:kZ,redactFmtSym:gZ,timeSym:yZ,timeSliceIndexSym:vZ,streamSym:_Z,stringifySym:EZ,stringifySafeSym:bZ,stringifiersSym:TZ,endSym:SZ,formatOptsSym:xZ,messageKeySym:AZ,errorKeySym:wZ,nestedKeySym:OZ,wildcardFirstSym:CZ,needsMetadataGsym:LZ,useOnlyCustomLevelsSym:cZ,formattersSym:PZ,hooksSym:DZ,nestedKeyStrSym:RZ,mixinMergeStrategySym:NZ,msgPrefixSym:IZ}});var bd=C((eTe,Tw)=>{"use strict";var Ed=yw(),{redactFmtSym:FZ,wildcardFirstSym:s8}=Ha(),{rx:_d,validator:MZ}=Ed,_w=MZ({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:n=>`pino \u2013 redact paths array contains an invalid path (${n})`}),Ew="[Redacted]",bw=!1;function $Z(n,e){let{paths:l,censor:t}=jZ(n),r=l.reduce((u,a)=>{_d.lastIndex=0;let c=_d.exec(a),f=_d.exec(a),p=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(p==="*"&&(p=s8),f===null)return u[p]=null,u;if(u[p]===null)return u;let{index:m}=f,h=`${a.substr(m,a.length-1)}`;return u[p]=u[p]||[],p!==s8&&u[p].length===0&&u[p].push(...u[s8]||[]),p===s8&&Object.keys(u).forEach(function(g){u[g]&&u[g].push(h)}),u[p].push(h),u},{}),i={[FZ]:Ed({paths:l,censor:t,serialize:e,strict:bw})},s=(...u)=>e(typeof t=="function"?t(...u):t);return[...Object.keys(r),...Object.getOwnPropertySymbols(r)].reduce((u,a)=>{if(r[a]===null)u[a]=c=>s(c,[a]);else{let c=typeof t=="function"?(f,p)=>t(f,[a,...p]):t;u[a]=Ed({paths:r[a],censor:c,serialize:e,strict:bw})}return u},i)}function jZ(n){if(Array.isArray(n))return n={paths:n,censor:Ew},_w(n),n;let{paths:e,censor:l=Ew,remove:t}=n;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return t===!0&&(l=void 0),_w({paths:e,censor:l}),{paths:e,censor:l}}Tw.exports=$Z});var xw=C((nTe,Sw)=>{"use strict";var UZ=()=>"",BZ=()=>`,"time":${Date.now()}`,HZ=()=>`,"time":${Math.round(Date.now()/1e3)}`,qZ=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Sw.exports={nullTime:UZ,epochTime:BZ,unixTime:HZ,isoTime:qZ}});var ww=C((lTe,Aw)=>{"use strict";function VZ(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}Aw.exports=zZ;function zZ(n,e,l){var t=l&&l.stringify||VZ,r=1;if(typeof n=="object"&&n!==null){var i=e.length+r;if(i===1)return n;var s=new Array(i);s[0]=t(n);for(var u=1;u<i;u++)s[u]=t(e[u]);return s.join(" ")}if(typeof n!="string")return n;var a=e.length;if(a===0)return n;for(var c="",f=1-r,p=-1,m=n&&n.length||0,h=0;h<m;){if(n.charCodeAt(h)===37&&h+1<m){switch(p=p>-1?p:0,n.charCodeAt(h+1)){case 100:case 102:if(f>=a||e[f]==null)break;p<h&&(c+=n.slice(p,h)),c+=Number(e[f]),p=h+2,h++;break;case 105:if(f>=a||e[f]==null)break;p<h&&(Line truncated
${T}`,b=`,
${T}`);let Q=Math.min(x.length,s),Y=0;for(;Y<Q-1;Y++){let ve=a(String(Y),x,g,_,S,T);v+=ve!==void 0?ve:"null",v+=b}let Z=a(String(Y),x,g,_,S,T);if(v+=Z!==void 0?Z:"null",x.length-1>s){let ve=x.length-s-1;v+=`${b}"... ${pa(ve)} not stringified"`}return S!==""&&(v+=`
${w}`),g.pop(),`[${v}]`}let N=Object.keys(x),O=N.length;if(O===0)return"{}";if(i<g.length+1)return'"[Object]"';let k="",j="";S!==""&&(T+=S,b=`,
${T}`,k=" ");let L=Math.min(O,s);l&&!Md(x)&&(N=Fd(N)),g.push(x);for(let Q=0;Q<L;Q++){let Y=N[Q],Z=a(Y,x,g,_,S,T);Z!==void 0&&(v+=`${j}${H3(Y)}:${k}${Z}`,j=b)}if(O>s){let Q=O-s;v+=`${j}"...":${k}"${pa(Q)} not stringified"`,j=b}return S!==""&&j.length>1&&(v=`
${T}`);let Q=Math.min(x.length,s),Y=0;for(;Y<Q-1;Y++){let ve=u(String(Y),x,g,_,S,T);v+=ve!==void 0?ve:"null",v+=b}let Z=u(String(Y),x,g,_,S,T);if(v+=Z!==void 0?Z:"null",x.length-1>s){let ve=x.length-s-1;v+=`${b}"... ${hu(ve)} not stringified"`}return S!==""&&(v+=`
${w}`),g.pop(),`[${v}]`}let N=Object.keys(x),R=N.length;if(R===0)return"{}";if(i<g.length+1)return'"[Object]"';let k="",j="";S!==""&&(T+=S,b=`,
${T}`,k=" ");let L=Math.min(R,s);r&&!Gd(x)&&(N=zd(N)),g.push(x);for(let Q=0;Q<L;Q++){let Y=N[Q],Z=u(Y,x,g,_,S,T);Z!==void 0&&(v+=`${j}${qi(Y)}:${k}${Z}`,j=b)}if(R>s){let Q=R-s;v+=`${j}"...":${k}"${hu(Q)} not stringified"`,j=b}return S!==""&&j.length>1&&(v=`
${T}${v}
${w}`),g.pop(),`{${v}}`}case"number":return isFinite(x)?String(x):e?e(x):"null";case"boolean":return x===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(x);default:return e?e(x):void 0}}function o(m,h,g,_,S,T){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(m)),typeof h){case"string":return H3(h);case"object":{if(h===null)return"null";if(g.indexOf(h)!==-1)return n;let x=T,v="",b=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S!==""&&(T+=S,v+=`
${w}`),g.pop(),`{${v}}`}case"number":return isFinite(x)?String(x):e?e(x):"null";case"boolean":return x===!0?"true":"false";case"undefined":return;case"bigint":if(t)return String(x);default:return e?e(x):void 0}}function a(m,h,g,_,S,T){switch(typeof h=="object"&&h!==null&&typeof h.toJSON=="function"&&(h=h.toJSON(m)),typeof h){case"string":return qi(h);case"object":{if(h===null)return"null";if(g.indexOf(h)!==-1)return l;let x=T,v="",b=",";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S!==""&&(T+=S,v+=`
${T}`,b=`,
${T}`);let O=Math.min(h.length,s),k=0;for(;k<O-1;k++){let L=o(String(k),h[k],g,_,S,T);v+=L!==void 0?L:"null",v+=b}let j=o(String(k),h[k],g,_,S,T);if(v+=j!==void 0?j:"null",h.length-1>s){let L=h.length-s-1;v+=`${b}"... ${pa(L)} not stringified"`}return S!==""&&(v+=`
${T}`);let R=Math.min(h.length,s),k=0;for(;k<R-1;k++){let L=a(String(k),h[k],g,_,S,T);v+=L!==void 0?L:"null",v+=b}let j=a(String(k),h[k],g,_,S,T);if(v+=j!==void 0?j:"null",h.length-1>s){let L=h.length-s-1;v+=`${b}"... ${hu(L)} not stringified"`}return S!==""&&(v+=`
${x}`),g.pop(),`[${v}]`}g.push(h);let w="";S!==""&&(T+=S,b=`,
${T}`,w=" ");let N="";for(let O of _){let k=o(O,h[O],g,_,S,T);k!==void 0&&(v+=`${N}${H3(O)}:${w}${k}`,N=b)}return S!==""&&N.length>1&&(v=`
${T}`,w=" ");let N="";for(let R of _){let k=a(R,h[R],g,_,S,T);k!==void 0&&(v+=`${N}${qi(R)}:${w}${k}`,N=b)}return S!==""&&N.length>1&&(v=`
${T}${v}
${x}`),g.pop(),`{${v}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function c(m,h,g,_,S){switch(typeof h){case"string":return H3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return c(m,h,g,_,S);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let T=S;if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S+=_;let k=`
${x}`),g.pop(),`{${v}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(t)return String(h);default:return e?e(h):void 0}}function c(m,h,g,_,S){switch(typeof h){case"string":return qi(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return c(m,h,g,_,S);if(h===null)return"null"}if(g.indexOf(h)!==-1)return l;let T=S;if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h),S+=_;let k=`
${S}`,j=`,
${S}`,L=Math.min(h.length,s),Q=0;for(;Q<L-1;Q++){let Z=c(String(Q),h[Q],g,_,S);k+=Z!==void 0?Z:"null",k+=j}let Y=c(String(Q),h[Q],g,_,S);if(k+=Y!==void 0?Y:"null",h.length-1>s){let Z=h.length-s-1;k+=`${j}"... ${pa(Z)} not stringified"`}return k+=`
${S}`,L=Math.min(h.length,s),Q=0;for(;Q<L-1;Q++){let Z=c(String(Q),h[Q],g,_,S);k+=Z!==void 0?Z:"null",k+=j}let Y=c(String(Q),h[Q],g,_,S);if(k+=Y!==void 0?Y:"null",h.length-1>s){let Z=h.length-s-1;k+=`${j}"... ${hu(Z)} not stringified"`}return k+=`
${T}`,g.pop(),`[${k}]`}let x=Object.keys(h),v=x.length;if(v===0)return"{}";if(i<g.length+1)return'"[Object]"';S+=_;let b=`,
${S}`,w="",N="",O=Math.min(v,s);Md(h)&&(w+=cR(h,b,s),x=x.slice(h.length),O-=h.length,N=b),l&&(x=Fd(x)),g.push(h);for(let k=0;k<O;k++){let j=x[k],L=c(j,h[j],g,_,S);L!==void 0&&(w+=`${N}${H3(j)}: ${L}`,N=b)}if(v>s){let k=v-s;w+=`${N}"...": "${pa(k)} not stringified"`,N=b}return N!==""&&(w=`
${S}`,w="",N="",R=Math.min(v,s);Gd(h)&&(w+=xO(h,b,s),x=x.slice(h.length),R-=h.length,N=b),r&&(x=zd(x)),g.push(h);for(let k=0;k<R;k++){let j=x[k],L=c(j,h[j],g,_,S);L!==void 0&&(w+=`${N}${qi(j)}: ${L}`,N=b)}if(v>s){let k=v-s;w+=`${N}"...": "${hu(k)} not stringified"`,N=b}return N!==""&&(w=`
${S}${w}
${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function f(m,h,g){switch(typeof h){case"string":return H3(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return f(m,h,g);if(h===null)return"null"}if(g.indexOf(h)!==-1)return n;let _="";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h);let b=Math.min(h.length,s),w=0;for(;w<b-1;w++){let O=f(String(w),h[w],g);_+=O!==void 0?O:"null",_+=","}let N=f(String(w),h[w],g);if(_+=N!==void 0?N:"null",h.length-1>s){let O=h.length-s-1;_+=`,"... ${pa(O)} not stringified"`}return g.pop(),`[${_}]`}let S=Object.keys(h),T=S.length;if(T===0)return"{}";if(i<g.length+1)return'"[Object]"';let x="",v=Math.min(T,s);Md(h)&&(_+=cR(h,",",s),S=S.slice(h.length),v-=h.length,x=","),l&&(S=Fd(S)),g.push(h);for(let b=0;b<v;b++){let w=S[b],N=f(w,h[w],g);N!==void 0&&(_+=`${x}${H3(w)}:${N}`,x=",")}if(T>s){let b=T-s;_+=`${x}"...":"${pa(b)} not stringified"`}return g.pop(),`{${_}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(h);default:return e?e(h):void 0}}function p(m,h,g){if(arguments.length>1){let _="";if(typeof g=="number"?_=" ".repeat(Math.min(g,10)):typeof g=="string"&&(_=g.slice(0,10)),h!=null){if(typeof h=="function")return a("",{"":m},[],h,_,"");if(Array.isArray(h))return o("",m,[],Hte(h),_,"")}if(_.length!==0)return c("",m,[],_,"")}return f("",m,[])}return p}});var yR=C((Bbe,gR)=>{"use strict";var Ud=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:mR}=f6(),Vte=mR.info;function zte(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(mR);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(f=>{r[f]=e.levels[f]});let l={write:i,add:a,flushSync:s,end:o,minLevel:0,streams:[],clone:c,[Ud]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,l):a.call(l,t),t=null,l;function i(f){let p,m=this.lastLevel,{streams:h}=this,g=0,_;for(let S=Xte(h.length,e.dedupe);Kte(S,h.length,e.dedupe);S=Wte(S,e.dedupe))if(p=h[S],p.level<=m){if(g!==0&&g!==p.level)break;if(_=p.stream,_[Ud]){let{lastTime:T,lastMsg:x,lastObj:v,lastLogger:b}=this;_.lastLevel=m,_.lastTime=T,_.lastMsg=x,_.lastObj=v,_.lastLogger=b}_.write(f),e.dedupe&&(g=p.level)}else if(!e.dedupe)break}function s(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync()}function a(f){if(!f)return l;let p=typeof f.write=="function"||f.stream,m=f.write?f:f.stream;if(!p)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:h,streamLevels:g}=this,_;typeof f.levelVal=="number"?_=f.levelVal:typeof f.level=="string"?_=g[f.level]:typeof f.level=="number"?_=f.level:_=Vte;let S={stream:m,level:_,levelVal:void 0,id:n++};return h.unshift(S),h.sort(Gte),this.minLevel=h[0].level,l}function o(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync(),f.end()}function c(f){let p=new Array(this.streams.length);for(let m=0;m<p.length;m++)p[m]={level:f,stream:this.streams[m].stream};return{write:i,add:a,minLevel:f,streams:p,clone:c,flushSync:s,[Ud]:!0}}}function Gte(t,e){return t.level-e.level}function Xte(t,e){return e?t-1:0}function Wte(t,e){return e?t-1:t+1}function Kte(t,e,n){return n?t>=0:t<e}gR.exports=zte});var IR=C((Hbe,g2)=>{"use strict";var Yte=require("os"),AR=ld(),Jte=id(),Qte=pd(),wR=cw(),Zte=uR(),RR=Uo(),{configure:ene}=hR(),{assertDefaultLevelFound:tne,mappings:OR,genLsCache:nne,genLevelComparison:rne,assertLevelComparison:lne}=Cd(),{DEFAULT_LEVELS:ine,SORTING_ORDER:sne}=f6(),{createArgsNormalizer:ane,asChindings:one,buildSafeSonicBoom:vR,buildFormatters:une,stringify:Bd,normalizeDestFileDescriptor:_R,noop:cne}=c6(),{version:fne}=kd(),{chindingsSym:ER,redactFmtSym:pne,serializersSym:bR,timeSym:dne,timeSliceIndexSym:hne,streamSym:mne,stringifySym:TR,stringifySafeSym:Hd,stringifiersSym:SR,setLevelSym:gne,endSym:yne,formatOptsSym:vne,messageKeySym:_ne,errorKeySym:Ene,nestedKeySym:bne,mixinSym:Tne,levelCompSym:Sne,useOnlyCustomLevelsSym:xne,formattersSym:xR,hooksSym:Ane,nestedKeyStrSym:wne,mixinMergeStrategySym:Rne,msgPrefixSym:One}=RR,{epochTime:NR,nullTime:Nne}=wR,{pid:Ine}=process,Cne=Yte.hostname(),kne=AR.err,Pne={level:"info",levelComparison:sne.ASC,levels:ine,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Ine,hostname:Cne},serializers:Object.assign(Object.create(null),{err:kne}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:NR,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Dne=ane(Pne),Lne=Object.assign(Object.create(null),AR);function qd(...t){let e={},{opts:n,stream:r}=Dne(e,Jte(),...t),{redact:l,crlf:i,s Line truncated
${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(t)return String(h);default:return e?e(h):void 0}}function f(m,h,g){switch(typeof h){case"string":return qi(h);case"object":{if(h===null)return"null";if(typeof h.toJSON=="function"){if(h=h.toJSON(m),typeof h!="object")return f(m,h,g);if(h===null)return"null"}if(g.indexOf(h)!==-1)return l;let _="";if(Array.isArray(h)){if(h.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(h);let b=Math.min(h.length,s),w=0;for(;w<b-1;w++){let R=f(String(w),h[w],g);_+=R!==void 0?R:"null",_+=","}let N=f(String(w),h[w],g);if(_+=N!==void 0?N:"null",h.length-1>s){let R=h.length-s-1;_+=`,"... ${hu(R)} not stringified"`}return g.pop(),`[${_}]`}let S=Object.keys(h),T=S.length;if(T===0)return"{}";if(i<g.length+1)return'"[Object]"';let x="",v=Math.min(T,s);Gd(h)&&(_+=xO(h,",",s),S=S.slice(h.length),v-=h.length,x=","),r&&(S=zd(S)),g.push(h);for(let b=0;b<v;b++){let w=S[b],N=f(w,h[w],g);N!==void 0&&(_+=`${x}${qi(w)}:${N}`,x=",")}if(T>s){let b=T-s;_+=`${x}"...":"${hu(b)} not stringified"`}return g.pop(),`{${_}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";case"boolean":return h===!0?"true":"false";case"undefined":return;case"bigint":if(t)return String(h);default:return e?e(h):void 0}}function p(m,h,g){if(arguments.length>1){let _="";if(typeof g=="number"?_=" ".repeat(Math.min(g,10)):typeof g=="string"&&(_=g.slice(0,10)),h!=null){if(typeof h=="function")return u("",{"":m},[],h,_,"");if(Array.isArray(h))return a("",m,[],cle(h),_,"")}if(_.length!==0)return c("",m,[],_,"")}return f("",m,[])}return p}});var CO=C((yTe,IO)=>{"use strict";var Kd=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:NO}=g8(),ple=NO.info;function dle(n,e){let l=0;n=n||[],e=e||{dedupe:!1};let t=Object.create(NO);t.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(f=>{t[f]=e.levels[f]});let r={write:i,add:u,flushSync:s,end:a,minLevel:0,streams:[],clone:c,[Kd]:!0,streamLevels:t};return Array.isArray(n)?n.forEach(u,r):u.call(r,n),n=null,r;function i(f){let p,m=this.lastLevel,{streams:h}=this,g=0,_;for(let S=mle(h.length,e.dedupe);yle(S,h.length,e.dedupe);S=gle(S,e.dedupe))if(p=h[S],p.level<=m){if(g!==0&&g!==p.level)break;if(_=p.stream,_[Kd]){let{lastTime:T,lastMsg:x,lastObj:v,lastLogger:b}=this;_.lastLevel=m,_.lastTime=T,_.lastMsg=x,_.lastObj=v,_.lastLogger=b}_.write(f),e.dedupe&&(g=p.level)}else if(!e.dedupe)break}function s(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync()}function u(f){if(!f)return r;let p=typeof f.write=="function"||f.stream,m=f.write?f:f.stream;if(!p)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:h,streamLevels:g}=this,_;typeof f.levelVal=="number"?_=f.levelVal:typeof f.level=="string"?_=g[f.level]:typeof f.level=="number"?_=f.level:_=ple;let S={stream:m,level:_,levelVal:void 0,id:l++};return h.unshift(S),h.sort(hle),this.minLevel=h[0].level,r}function a(){for(let{stream:f}of this.streams)typeof f.flushSync=="function"&&f.flushSync(),f.end()}function c(f){let p=new Array(this.streams.length);for(let m=0;m<p.length;m++)p[m]={level:f,stream:this.streams[m].stream};return{write:i,add:u,minLevel:f,streams:p,clone:c,flushSync:s,[Kd]:!0}}}function hle(n,e){return n.level-e.level}function mle(n,e){return e?n-1:0}function gle(n,e){return e?n-1:n+1}function yle(n,e,l){return l?n>=0:n<e}IO.exports=dle});var VO=C((vTe,y3)=>{"use strict";var vle=require("os"),jO=dd(),_le=hd(),Ele=bd(),UO=xw(),ble=SO(),BO=Ha(),{configure:Tle}=RO(),{assertDefaultLevelFound:Sle,mappings:HO,genLsCache:xle,genLevelComparison:Ale,assertLevelComparison:wle}=Ud(),{DEFAULT_LEVELS:Ole,SORTING_ORDER:Rle}=g8(),{createArgsNormalizer:Nle,asChindings:Ile,buildSafeSonicBoom:kO,buildFormatters:Cle,stringify:Yd,normalizeDestFileDescriptor:PO,noop:kle}=m8(),{version:Ple}=Bd(),{chindingsSym:DO,redactFmtSym:Dle,serializersSym:LO,timeSym:Lle,timeSliceIndexSym:Fle,streamSym:Mle,stringifySym:FO,stringifySafeSym:Jd,stringifiersSym:MO,setLevelSym:$le,endSym:jle,formatOptsSym:Ule,messageKeySym:Ble,errorKeySym:Hle,nestedKeySym:qle,mixinSym:Vle,levelCompSym:zle,useOnlyCustomLevelsSym:Gle,formattersSym:$O,hooksSym:Xle,nestedKeyStrSym:Wle,mixinMergeStrategySym:Kle,msgPrefixSym:Yle}=BO,{epochTime:qO,nullTime:Jle}=UO,{pid:Qle}=process,Zle=vle.hostname(),ete=jO.err,nte={level:"info",levelComparison:Rle.ASC,levels:Ole,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Qle,hostname:Zle},serializers:Object.assign(Object.create(null),{err:ete}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:qO,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},lte=Nle(nte),tte=Object.assign(Object.create(null),jO);function Qd(...n){let e={},{opts:l,stream:t}=lte(e,_le(),...n),{redact:r,crlf:i,s Line truncated
`:`
`),Ne=one.bind(null,{[ER]:"",[bR]:s,[SR]:Y,[TR]:Bd,[Hd]:j,[xR]:L}),pe="";p!==null&&(m===void 0?pe=Ne(p):pe=Ne(Object.assign({},p,{name:m})));let ae=a instanceof Function?a:a?NR:Nne,ye=ae().indexOf(":")+1;if(x&&!g)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(k&&typeof k!="string")throw Error(`Unknown msgPrefix type "${typeof k}" - expected "string"`);tne(h,g,x);let q=OR(g,x);lne(_);let le=rne(_);return Object.assign(e,{levels:q,[Sne]:le,[xne]:x,[mne]:r,[dne]:ae,[hne]:ye,[TR]:Bd,[Hd]:j,[SR]:Y,[yne]:ve,[vne]:Z,[_ne]:o,[Ene]:c,[bne]:f,[wne]:f?`,${JSON.stringify(f)}:{`:"",[bR]:s,[Tne]:S,[Rne]:T,[ER]:pe,[xR]:L,[Ane]:b,silent:cne,onChild:O,[One]:k}),Object.setPrototypeOf(e,Zte()),nne(e),e[gne](h),e}g2.exports=qd;g2.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=_R(t.dest||process.stdout.fd),vR(t)):vR({dest:_R(t),minLength:0});g2.exports.transport=Ad();g2.exports.multistream=yR();g2.exports.levels=OR();g2.exports.stdSerializers=Lne;g2.exports.stdTimeFunctions=Object.assign({},wR);g2.exports.symbols=RR;g2.exports.version=fne;g2.exports.default=qd;g2.exports.pino=qd});var r1=C((qbe,LR)=>{"use strict";var Fne=EA(),d6=IR(),{serializersSym:CR}=d6.symbols,{FST_ERR_LOG_INVALID_DESTINATION:Mne,FST_ERR_LOG_INVALID_LOGGER:$ne}=al();function kR(t){if(t.stream&&t.file)throw new Mne;t.file&&(t.stream=d6.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,r=null;return e?(t.logger=void 0,t.genReqId=void 0,e[CR]&&(t.serializers=Object.assign({},t.serializers,e[CR])),r=e.child({},t),t.logger=e,t.genReqId=n):r=d6(t,t.stream),r}var Vd={req:function(e){return{method:e.method,url:e.url,version:e.headers&&e.headers["accept-version"],hostname:e.hostname,remoteAddress:e.ip,remotePort:e.socket?e.socket.remotePort:void 0}},err:d6.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function jne(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function Une(t){if(!t.logger){let r=Fne;return r.child=()=>r,{logger:r,hasLogger:!1}}if(PR(t.logger))return{logger:kR({logger:t.logger,serializers:Object.assign({},Vd,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(r=>{Object.defineProperty(e,r,{value:t.logger[r],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},Vd,e.serializers),t.logger=e,{logger:kR(t.logger),hasLogger:!0}}function PR(t,e){let n=["info","error","debug","fatal","warn","trace","child"],r=t?n.filter(l=>!t[l]||typeof t[l]!="function"):n;if(r.length){if(r.length===n.length&&!e)return!1;throw $ne(r.join(","))}else return!0}function Bne(t,e,n,r,l){let i={[t.requestIdLogLabel]:r},s=t.childLoggerFactory.call(t.server,e,i,l||{},n);return t.childLoggerFactory!==DR&&PR(s,!0),s}function DR(t,e,n){return t.child(e,n)}LR.exports={createLogger:Une,createChildLogger:Bne,defaultChildLoggerFactory:DR,serializers:Vd,now:jne}});var l1=C((Vbe,FR)=>{"use strict";FR.exports=Hne;function qo(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Hne(t){if(t=t||{},t.circles)return qne(t);return t.proto?r:n;function e(l,i){for(var s=Object.keys(l),a=new Array(s.length),o=0;o<s.length;o++){var c=s[o],f=l[c];typeof f!="object"||f===null?a[c]=f:f instanceof Date?a[c]=new Date(f):ArrayBuffer.isView(f)?a[c]=qo(f):a[c]=i(f)}return a}function n(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,n);if(l instanceof Map)return new Map(e(Array.from(l),n));if(l instanceof Set)return new Set(e(Array.from(l),n));var i={};for(var s in l)if(Object.hasOwnProperty.call(l,s)!==!1){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),n)):a instanceof Set?i[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?i[s]=qo(a):i[s]=n(a)}return i}function r(l){if(typeof l!="object"||l===null)return l;if(l instanceof Date)return new Date(l);if(Array.isArray(l))return e(l,r);if(l instanceof Map)return new Map(e(Array.from(l),r));if(l instanceof Set)return new Set(e(Array.from(l),r));var i={};for(var s in l){var a=l[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),r)):a instanceof Set?i[s]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?i[s]=qo(a):i[s]=r(a)}return i}}function qne(t){var e=[],n=[];return t.proto?i:l;function r(s,a){for(var o=Object.keys(s),c=new Array(o.length),f=0;f<o.length;f++){var p=o[f],m=s[p];if(typeof m!="object"||m===null)c[p]=m;else if(m instanceof Date)c[p]=new Date(m);else if(ArrayBuffer.isView(m))c[p]=qo(m);else{var h=e.indexOf(m);h!==-1?c[p]=n[h]:c[p]=a(m)}}return c}function l(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.is Line truncated
`:""},this._extScope=e,this._scope=new B2.Scope({parent:e}),this._nodes=[new ih]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,l){let i=this._scope.toName(n);return r!==void 0&&l&&(this._constants[i.str]=r),this._leafNode(new Zd(e,i,r)),i}const(e,n,r){return this._def(B2.varKinds.const,e,n,r)}let(e,n,r){return this._def(B2.varKinds.let,e,n,r)}var(e,n,r){return this._def(B2.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new v6(e,n,r))}add(e,n){return this._leafNode(new eh(e,Tt.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Mt.nil&&this._leafNode(new lh(e)),this}object(...e){let n=["{"];for(let[r,l]of e)n.length>1&&n.push(","),n.push(r),(r!==l||this.opts.es5)&&(n.push(":"),(0,Mt.addCodeArg)(n,l));return n.push("}"),new Mt._Code(n)}if(e,n,r){if(this._blockNode(new ma(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new ma(e))}else(){return this._elseNode(new zo)}endIf(){return this._endBlockNode(ma,zo)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new sh(e),n)}forRange(e,n,r,l,i=this.opts.es5?B2.varKinds.var:B2.varKinds.let){let s=this._scope.toName(e);return this._for(new ah(i,s,n,r),()=>l(s))}forOf(e,n,r,l=B2.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Mt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Mt._)`${s}.length`,a=>{this.var(i,(0,Mt._)`${s}[${a}]`),r(i)})}return this._for(new _6("of",l,i,n),()=>r(i))}forIn(e,n,r,l=this.opts.es5?B2.varKinds.var:B2.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Mt._)`Object.keys(${n})`,r);let i=this._scope.toName(e);return this._for(new _6("in",l,i,n),()=>r(i))}endFor(){return this._endBlockNode(ga)}label(e){return this._leafNode(new th(e))}break(e){return this._leafNode(new nh(e))}return(e){let n=new c1;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(c1)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let l=new oh;if(this._blockNode(l),this.code(e),n){let i=this.name("e");this._currNode=l.catch=new f1(i),n(i)}return r&&(this._currNode=l.finally=new p1,this.code(r)),this._endBlockNode(f1,p1)}throw(e){return this._leafNode(new rh(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Mt.nil,r,l){return this._blockNode(new u1(e,n,r)),l&&this.code(l).endFunc(),this}endFunc(){return this._endBlockNode(u1)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof ma))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};Tt.CodeGen=uh;function ya(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function E6(t,e){return e instanceof Mt._CodeOrName?ya(t,e.names):t}function Go(t,e,n){if(t instanceof Mt.Name)return r(t);if(!l(t))return t;return new Mt._Code(t._items.reduce((i,s)=>(s instanceof Mt.Name&&(s=r(s)),s instanceof Mt._Code?i.push(...s._items):i.push(s),i),[]));function r(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function l(i){return i instanceof Mt._Code&&i._items.some(s=>s instanceof Mt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function ure(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function zR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Mt._)`!${ch(t)}`}Tt.not=zR;var cre=GR(Tt.operators.AND);function fre(...t){return t.reduce(cre)}Tt.and=fre;var pre=GR(Tt.operators.OR);function dre(...t){return t.reduce(pre)}Tt.or=dre;function GR(t){return(e,n)=>e===Mt.nil?n:n===Mt.nil?e:(0,Mt._)`${ch(e)} ${t} ${ch(n)}`}function ch(t){return t instanceof Mt.Name?t:(0, Line truncated
|| (${s} == "string" && ${l} && ${l} == +${l})`).assign(a,(0,vt._)`+${l}`);return;case"integer":r.elseIf((0,vt._)`${s} === "boolean" || ${l} === null
|| (${s} === "string" && ${l} && ${l} == +${l} && !(${l} % 1))`).assign(a,(0,vt._)`+${l}`);return;case"boolean":r.elseIf((0,vt._)`${l} === "false" || ${l} === 0 || ${l} === null`).assign(a,!1).elseIf((0,vt._)`${l} === "true" || ${l} === 1`).assign(a,!0);return;case"null":r.elseIf((0,vt._)`${l} === "" || ${l} === 0 || ${l} === false`),r.assign(a,null);return;case"array":r.elseIf((0,vt._)`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${l} === null`).assign(a,(0,vt._)`[${l}]`)}}}function Jre({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,vt._)`${e} !== undefined`,()=>t.assign((0,vt._)`${e}[${n}]`,r))}function gh(t,e,n,r=h1.Correct){let l=r===h1.Correct?vt.operators.EQ:vt.operators.NEQ,i;switch(t){case"null":return(0,vt._)`${e} ${l} null`;case"array":i=(0,vt._)`Array.isArray(${e})`;break;case"object":i=(0,vt._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,vt._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,vt._)`typeof ${e} ${l} ${t}`}return r===h1.Correct?i:(0,vt.not)(i);function s(a=vt.nil){return(0,vt.and)((0,vt._)`typeof ${e} == "number"`,a,n?(0,vt._)`isFinite(${e})`:vt.nil)}}Gr.checkDataType=gh;function yh(t,e,n,r){if(t.length===1)return gh(t[0],e,n,r);let l,i=(0,oO.toHash)(t);if(i.array&&i.object){let s=(0,vt._)`typeof ${e} != "object"`;l=i.null?s:(0,vt._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else l=vt.nil;i.number&&delete i.integer;for(let s in i)l=(0,vt.and)(l,gh(s,e,n,r));return l}Gr.checkDataTypes=yh;var Qre={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,vt._)`{type: ${t}}`:(0,vt._)`{type: ${e}}`};function vh(t){let e=Zre(t);(0,Gre.reportError)(e,Qre)}Gr.reportTypeError=vh;function Zre(t){let{gen:e,data:n,schema:r}=t,l=(0,oO.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:l,schemaValue:l,parentSchema:r,params:{},it:t}}});var pO=C(S6=>{"use strict";Object.defineProperty(S6,"__esModule",{value:!0});S6.assignDefaults=void 0;var Ko=Ze(),ele=_t();function tle(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let l in n)fO(t,l,n[l].default);else e==="array"&&Array.isArray(r)&&r.forEach((l,i)=>fO(t,i,l.default))}S6.assignDefaults=tle;function fO(t,e,n){let{gen:r,compositeRule:l,data:i,opts:s}=t;if(n===void 0)return;let a=(0,Ko._)`${i}${(0,Ko.getProperty)(e)}`;if(l){(0,ele.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,Ko._)`${a} === undefined`;s.useDefaults==="empty"&&(o=(0,Ko._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,Ko._)`${a} = ${(0,Ko.stringify)(n)}`)}});var Xr=C(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.validateUnion=vn.validateArray=vn.usePattern=vn.callValidateCode=vn.schemaProperties=vn.allSchemaProperties=vn.noPropertyInData=vn.propertyInData=vn.isOwnProperty=vn.hasPropFunc=vn.reportMissingProp=vn.checkMissingProp=vn.checkReportMissingProp=void 0;var Dn=Ze(),_h=_t(),z3=v2(),nle=_t();function rle(t,e){let{gen:n,data:r,it:l}=t;n.if(bh(n,r,e,l.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Dn._)`${e}`},!0),t.error()})}vn.checkReportMissingProp=rle;function lle({gen:t,data:e,it:{opts:n}},r,l){return(0,Dn.or)(...r.map(i=>(0,Dn.and)(bh(t,e,i,n.ownProperties),(0,Dn._)`${l} = ${i}`)))}vn.checkMissingProp=lle;function ile(t,e){t.setParams({missingProperty:e},!0),t.error()}vn.reportMissingProp=ile;function dO(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Dn._)`Object.prototype.hasOwnProperty`})}vn.hasPropFunc=dO;function Eh(t,e,n){return(0,Dn._)`${dO(t)}.call(${e}, ${n})`}vn.isOwnProperty=Eh;function sle(t,e,n,r){let l=(0,Dn._)`${e}${(0,Dn.getProperty)(n)} !== undefined`;return r?(0,Dn._)`${l} && ${Eh(t,e,n)}`:l}vn.propertyInData=sle;function bh(t,e,n,r){let l=(0,Dn._)`${e}${(0,Dn.getProperty)(n)} === undefined`;return r?(0,Dn.or)(l,(0,Dn.not)(Eh(t,e,n))):l}vn.noPropertyInData=bh;function hO(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}vn.allSchemaProperties=hO;function ale(t,e){return hO(e).filter(n=>!(0,_h.alwaysValidSchema)(t,e[n]))}vn.schemaProperties=ale;function ole({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:l,errorPath:i},it:s},a,o,c){let f=c?(0,Dn._)`${t}, ${e}, ${r}${l}`:e,p=[[z3.default.instancePath,(0,Dn.strConcat)(z3.default.instancePath,i)],[z3.default.parentData,s.parentData],[z3.default.parentDataProperty,s.parentDataProperty],[z3.default.rootData,z3.default.rootData]];s.opts.dynamicRef&&p.push([z3.default.dynamicAnchors,z3.default.dynamicAnchors]);let m=(0,Dn._)`${f}, ${n.object(...p)}`;return o!==Dn.nil?(0,Dn._)`${a}.call(${o}, ${m})`:(0,Dn._)`${a}(${m})`}vn.callValidateCode=ole;var ule=(0,Dn._)`new RegExp`;function cle({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:l}=e.code,i=l(n,r);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Dn._)`${l.code==="new RegExp"?ule:(0,nle.useFunc)(t,l)}(${n}, ${r})`})}vn.usePattern=cle;function fle(t){let{gen:e,data:n,keyword:r,it:l}=t,i=e.name("valid");if(l.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let o=e.const("len",(0,Dn._)`${n}.length`);e.forRange("i",0,o,c=>{t.subschema({keyword:r,dataProp:c,dataPropType:_h.Type.Num},i),e.if((0,Dn.not)(i),a)})}}vn.validateArray=fle;function ple(t){let{gen:e,schema:n,keyword:r,it:l}=t;if(! Line truncated
missingProperty: ${r},
`),Ne=Ile.bind(null,{[DO]:"",[LO]:s,[MO]:Y,[FO]:Yd,[Jd]:j,[$O]:L}),pe="";p!==null&&(m===void 0?pe=Ne(p):pe=Ne(Object.assign({},p,{name:m})));let ue=u instanceof Function?u:u?qO:Jle,ye=ue().indexOf(":")+1;if(x&&!g)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(k&&typeof k!="string")throw Error(`Unknown msgPrefix type "${typeof k}" - expected "string"`);Sle(h,g,x);let q=HO(g,x);wle(_);let re=Ale(_);return Object.assign(e,{levels:q,[zle]:re,[Gle]:x,[Mle]:t,[Lle]:ue,[Fle]:ye,[FO]:Yd,[Jd]:j,[MO]:Y,[jle]:ve,[Ule]:Z,[Ble]:a,[Hle]:c,[qle]:f,[Wle]:f?`,${JSON.stringify(f)}:{`:"",[LO]:s,[Vle]:S,[Kle]:T,[DO]:pe,[$O]:L,[Xle]:b,silent:kle,onChild:R,[Yle]:k}),Object.setPrototypeOf(e,ble()),xle(e),e[$le](h),e}y3.exports=Qd;y3.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=PO(n.dest||process.stdout.fd),kO(n)):kO({dest:PO(n),minLength:0});y3.exports.transport=Dd();y3.exports.multistream=CO();y3.exports.levels=HO();y3.exports.stdSerializers=tte;y3.exports.stdTimeFunctions=Object.assign({},UO);y3.exports.symbols=BO;y3.exports.version=Ple;y3.exports.default=Qd;y3.exports.pino=Qd});var u0=C((_Te,KO)=>{"use strict";var rte=DA(),v8=VO(),{serializersSym:zO}=v8.symbols,{FST_ERR_LOG_INVALID_DESTINATION:ite,FST_ERR_LOG_INVALID_LOGGER:ste}=a2();function GO(n){if(n.stream&&n.file)throw new ite;n.file&&(n.stream=v8.destination(n.file),delete n.file);let e=n.logger,l=n.genReqId,t=null;return e?(n.logger=void 0,n.genReqId=void 0,e[zO]&&(n.serializers=Object.assign({},n.serializers,e[zO])),t=e.child({},n),n.logger=e,n.genReqId=l):t=v8(n,n.stream),t}var Zd={req:function(e){return{method:e.method,url:e.url,version:e.headers&&e.headers["accept-version"],hostname:e.hostname,remoteAddress:e.ip,remotePort:e.socket?e.socket.remotePort:void 0}},err:v8.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function ute(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}function ate(n){if(!n.logger){let t=rte;return t.child=()=>t,{logger:t,hasLogger:!1}}if(XO(n.logger))return{logger:GO({logger:n.logger,serializers:Object.assign({},Zd,n.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(n.logger)==="[object Object]"&&Reflect.ownKeys(n.logger).forEach(t=>{Object.defineProperty(e,t,{value:n.logger[t],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},Zd,e.serializers),n.logger=e,{logger:GO(n.logger),hasLogger:!0}}function XO(n,e){let l=["info","error","debug","fatal","warn","trace","child"],t=n?l.filter(r=>!n[r]||typeof n[r]!="function"):l;if(t.length){if(t.length===l.length&&!e)return!1;throw ste(t.join(","))}else return!0}function ote(n,e,l,t,r){let i={[n.requestIdLogLabel]:t},s=n.childLoggerFactory.call(n.server,e,i,r||{},l);return n.childLoggerFactory!==WO&&XO(s,!0),s}function WO(n,e,l){return n.child(e,l)}KO.exports={createLogger:ate,createChildLogger:ote,defaultChildLoggerFactory:WO,serializers:Zd,now:ute}});var a0=C((ETe,YO)=>{"use strict";YO.exports=cte;function za(n){return n instanceof Buffer?Buffer.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function cte(n){if(n=n||{},n.circles)return fte(n);return n.proto?t:l;function e(r,i){for(var s=Object.keys(r),u=new Array(s.length),a=0;a<s.length;a++){var c=s[a],f=r[c];typeof f!="object"||f===null?u[c]=f:f instanceof Date?u[c]=new Date(f):ArrayBuffer.isView(f)?u[c]=za(f):u[c]=i(f)}return u}function l(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return e(r,l);if(r instanceof Map)return new Map(e(Array.from(r),l));if(r instanceof Set)return new Set(e(Array.from(r),l));var i={};for(var s in r)if(Object.hasOwnProperty.call(r,s)!==!1){var u=r[s];typeof u!="object"||u===null?i[s]=u:u instanceof Date?i[s]=new Date(u):u instanceof Map?i[s]=new Map(e(Array.from(u),l)):u instanceof Set?i[s]=new Set(e(Array.from(u),l)):ArrayBuffer.isView(u)?i[s]=za(u):i[s]=l(u)}return i}function t(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return e(r,t);if(r instanceof Map)return new Map(e(Array.from(r),t));if(r instanceof Set)return new Set(e(Array.from(r),t));var i={};for(var s in r){var u=r[s];typeof u!="object"||u===null?i[s]=u:u instanceof Date?i[s]=new Date(u):u instanceof Map?i[s]=new Map(e(Array.from(u),t)):u instanceof Set?i[s]=new Set(e(Array.from(u),t)):ArrayBuffer.isView(u)?i[s]=za(u):i[s]=t(u)}return i}}function fte(n){var e=[],l=[];return n.proto?i:r;function t(s,u){for(var a=Object.keys(s),c=new Array(a.length),f=0;f<a.length;f++){var p=a[f],m=s[p];if(typeof m!="object"||m===null)c[p]=m;else if(m instanceof Date)c[p]=new Date(m);else if(ArrayBuffer.isView(m))c[p]=za(m);else{var h=e.indexOf(m);h!==-1?c[p]=l[h]:c[p]=u(m)}}return c}function r(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.is Line truncated
`:""},this._extScope=e,this._scope=new H3.Scope({parent:e}),this._nodes=[new hh]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,l){let t=this._extScope.value(e,l);return(this._values[t.prefix]||(this._values[t.prefix]=new Set)).add(t),t}getScopeValue(e,l){return this._extScope.getValue(e,l)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,l,t,r){let i=this._scope.toName(l);return t!==void 0&&r&&(this._constants[i.str]=t),this._leafNode(new ah(e,i,t)),i}const(e,l,t){return this._def(H3.varKinds.const,e,l,t)}let(e,l,t){return this._def(H3.varKinds.let,e,l,t)}var(e,l,t){return this._def(H3.varKinds.var,e,l,t)}assign(e,l,t){return this._leafNode(new S8(e,l,t))}add(e,l){return this._leafNode(new oh(e,Sn.operators.ADD,l))}code(e){return typeof e=="function"?e():e!==jn.nil&&this._leafNode(new dh(e)),this}object(...e){let l=["{"];for(let[t,r]of e)l.length>1&&l.push(","),l.push(t),(t!==r||this.opts.es5)&&(l.push(":"),(0,jn.addCodeArg)(l,r));return l.push("}"),new jn._Code(l)}if(e,l,t){if(this._blockNode(new yu(e)),l&&t)this.code(l).else().code(t).endIf();else if(l)this.code(l).endIf();else if(t)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new yu(e))}else(){return this._elseNode(new Xa)}endIf(){return this._endBlockNode(yu,Xa)}_for(e,l){return this._blockNode(e),l&&this.code(l).endFor(),this}for(e,l){return this._for(new mh(e),l)}forRange(e,l,t,r,i=this.opts.es5?H3.varKinds.var:H3.varKinds.let){let s=this._scope.toName(e);return this._for(new gh(i,s,l,t),()=>r(s))}forOf(e,l,t,r=H3.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=l instanceof jn.Name?l:this.var("_arr",l);return this.forRange("_i",0,(0,jn._)`${s}.length`,u=>{this.var(i,(0,jn._)`${s}[${u}]`),t(i)})}return this._for(new x8("of",r,i,l),()=>t(i))}forIn(e,l,t,r=this.opts.es5?H3.varKinds.var:H3.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,jn._)`Object.keys(${l})`,t);let i=this._scope.toName(e);return this._for(new x8("in",r,i,l),()=>t(i))}endFor(){return this._endBlockNode(vu)}label(e){return this._leafNode(new ch(e))}break(e){return this._leafNode(new fh(e))}return(e){let l=new h0;if(this._blockNode(l),this.code(e),l.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(h0)}try(e,l,t){if(!l&&!t)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new yh;if(this._blockNode(r),this.code(e),l){let i=this.name("e");this._currNode=r.catch=new m0(i),l(i)}return t&&(this._currNode=r.finally=new g0,this.code(t)),this._endBlockNode(m0,g0)}throw(e){return this._leafNode(new ph(e))}block(e,l){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(l),this}endBlock(e){let l=this._blockStarts.pop();if(l===void 0)throw new Error("CodeGen: not in self-balancing block");let t=this._nodes.length-l;if(t<0||e!==void 0&&t!==e)throw new Error(`CodeGen: wrong number of nodes: ${t} vs ${e} expected`);return this._nodes.length=l,this}func(e,l=jn.nil,t,r){return this._blockNode(new d0(e,l,t)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(d0)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,l){let t=this._currNode;if(t instanceof e||l&&t instanceof l)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${l?`${e.kind}/${l.kind}`:e.kind}"`)}_elseNode(e){let l=this._currNode;if(!(l instanceof yu))throw new Error('CodeGen: "else" without "if"');return this._currNode=l.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let l=this._nodes;l[l.length-1]=e}};Sn.CodeGen=vh;function _u(n,e){for(let l in e)n[l]=(n[l]||0)+(e[l]||0);return n}function A8(n,e){return e instanceof jn._CodeOrName?_u(n,e.names):n}function Wa(n,e,l){if(n instanceof jn.Name)return t(n);if(!r(n))return n;return new jn._Code(n._items.reduce((i,s)=>(s instanceof jn.Name&&(s=t(s)),s instanceof jn._Code?i.push(...s._items):i.push(s),i),[]));function t(i){let s=l[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function r(i){return i instanceof jn._Code&&i._items.some(s=>s instanceof jn.Name&&e[s.str]===1&&l[s.str]!==void 0)}}function Cte(n,e){for(let l in e)n[l]=(n[l]||0)-(e[l]||0)}function iR(n){return typeof n=="boolean"||typeof n=="number"||n===null?!n:(0,jn._)`!${_h(n)}`}Sn.not=iR;var kte=sR(Sn.operators.AND);function Pte(...n){return n.reduce(kte)}Sn.and=Pte;var Dte=sR(Sn.operators.OR);function Lte(...n){return n.reduce(Dte)}Sn.or=Lte;function sR(n){return(e,l)=>e===jn.nil?l:l===jn.nil?e:(0,jn._)`${_h(e)} ${n} ${_h(l)}`}function _h(n){return n instanceof jn.Name?n:(0, Line truncated
|| (${s} == "string" && ${r} && ${r} == +${r})`).assign(u,(0,_n._)`+${r}`);return;case"integer":t.elseIf((0,_n._)`${s} === "boolean" || ${r} === null
|| (${s} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(u,(0,_n._)`+${r}`);return;case"boolean":t.elseIf((0,_n._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(u,!1).elseIf((0,_n._)`${r} === "true" || ${r} === 1`).assign(u,!0);return;case"null":t.elseIf((0,_n._)`${r} === "" || ${r} === 0 || ${r} === false`),t.assign(u,null);return;case"array":t.elseIf((0,_n._)`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${r} === null`).assign(u,(0,_n._)`[${r}]`)}}}function _2e({gen:n,parentData:e,parentDataProperty:l},t){n.if((0,_n._)`${e} !== undefined`,()=>n.assign((0,_n._)`${e}[${l}]`,t))}function Ah(n,e,l,t=v0.Correct){let r=t===v0.Correct?_n.operators.EQ:_n.operators.NEQ,i;switch(n){case"null":return(0,_n._)`${e} ${r} null`;case"array":i=(0,_n._)`Array.isArray(${e})`;break;case"object":i=(0,_n._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,_n._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,_n._)`typeof ${e} ${r} ${n}`}return t===v0.Correct?i:(0,_n.not)(i);function s(u=_n.nil){return(0,_n.and)((0,_n._)`typeof ${e} == "number"`,u,l?(0,_n._)`isFinite(${e})`:_n.nil)}}Wt.checkDataType=Ah;function wh(n,e,l,t){if(n.length===1)return Ah(n[0],e,l,t);let r,i=(0,TR.toHash)(n);if(i.array&&i.object){let s=(0,_n._)`typeof ${e} != "object"`;r=i.null?s:(0,_n._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else r=_n.nil;i.number&&delete i.integer;for(let s in i)r=(0,_n.and)(r,Ah(s,e,l,t));return r}Wt.checkDataTypes=wh;var E2e={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:e})=>typeof n=="string"?(0,_n._)`{type: ${n}}`:(0,_n._)`{type: ${e}}`};function Oh(n){let e=b2e(n);(0,h2e.reportError)(e,E2e)}Wt.reportTypeError=Oh;function b2e(n){let{gen:e,data:l,schema:t}=n,r=(0,TR.schemaRefOrVal)(n,t,"type");return{gen:e,keyword:"type",data:l,schema:t.type,schemaCode:r,schemaValue:r,parentSchema:t,params:{},it:n}}});var wR=C(R8=>{"use strict";Object.defineProperty(R8,"__esModule",{value:!0});R8.assignDefaults=void 0;var Ja=Ze(),T2e=En();function S2e(n,e){let{properties:l,items:t}=n.schema;if(e==="object"&&l)for(let r in l)AR(n,r,l[r].default);else e==="array"&&Array.isArray(t)&&t.forEach((r,i)=>AR(n,i,r.default))}R8.assignDefaults=S2e;function AR(n,e,l){let{gen:t,compositeRule:r,data:i,opts:s}=n;if(l===void 0)return;let u=(0,Ja._)`${i}${(0,Ja.getProperty)(e)}`;if(r){(0,T2e.checkStrictMode)(n,`default is ignored for: ${u}`);return}let a=(0,Ja._)`${u} === undefined`;s.useDefaults==="empty"&&(a=(0,Ja._)`${a} || ${u} === null || ${u} === ""`),t.if(a,(0,Ja._)`${u} = ${(0,Ja.stringify)(l)}`)}});var Kt=C(_l=>{"use strict";Object.defineProperty(_l,"__esModule",{value:!0});_l.validateUnion=_l.validateArray=_l.usePattern=_l.callValidateCode=_l.schemaProperties=_l.allSchemaProperties=_l.noPropertyInData=_l.propertyInData=_l.isOwnProperty=_l.hasPropFunc=_l.reportMissingProp=_l.checkMissingProp=_l.checkReportMissingProp=void 0;var Fl=Ze(),Rh=En(),Gi=_3(),x2e=En();function A2e(n,e){let{gen:l,data:t,it:r}=n;l.if(Ih(l,t,e,r.opts.ownProperties),()=>{n.setParams({missingProperty:(0,Fl._)`${e}`},!0),n.error()})}_l.checkReportMissingProp=A2e;function w2e({gen:n,data:e,it:{opts:l}},t,r){return(0,Fl.or)(...t.map(i=>(0,Fl.and)(Ih(n,e,i,l.ownProperties),(0,Fl._)`${r} = ${i}`)))}_l.checkMissingProp=w2e;function O2e(n,e){n.setParams({missingProperty:e},!0),n.error()}_l.reportMissingProp=O2e;function OR(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Fl._)`Object.prototype.hasOwnProperty`})}_l.hasPropFunc=OR;function Nh(n,e,l){return(0,Fl._)`${OR(n)}.call(${e}, ${l})`}_l.isOwnProperty=Nh;function R2e(n,e,l,t){let r=(0,Fl._)`${e}${(0,Fl.getProperty)(l)} !== undefined`;return t?(0,Fl._)`${r} && ${Nh(n,e,l)}`:r}_l.propertyInData=R2e;function Ih(n,e,l,t){let r=(0,Fl._)`${e}${(0,Fl.getProperty)(l)} === undefined`;return t?(0,Fl.or)(r,(0,Fl.not)(Nh(n,e,l))):r}_l.noPropertyInData=Ih;function RR(n){return n?Object.keys(n).filter(e=>e!=="__proto__"):[]}_l.allSchemaProperties=RR;function N2e(n,e){return RR(e).filter(l=>!(0,Rh.alwaysValidSchema)(n,e[l]))}_l.schemaProperties=N2e;function I2e({schemaCode:n,data:e,it:{gen:l,topSchemaRef:t,schemaPath:r,errorPath:i},it:s},u,a,c){let f=c?(0,Fl._)`${n}, ${e}, ${t}${r}`:e,p=[[Gi.default.instancePath,(0,Fl.strConcat)(Gi.default.instancePath,i)],[Gi.default.parentData,s.parentData],[Gi.default.parentDataProperty,s.parentDataProperty],[Gi.default.rootData,Gi.default.rootData]];s.opts.dynamicRef&&p.push([Gi.default.dynamicAnchors,Gi.default.dynamicAnchors]);let m=(0,Fl._)`${f}, ${l.object(...p)}`;return a!==Fl.nil?(0,Fl._)`${u}.call(${a}, ${m})`:(0,Fl._)`${u}(${m})`}_l.callValidateCode=I2e;var C2e=(0,Fl._)`new RegExp`;function k2e({gen:n,it:{opts:e}},l){let t=e.unicodeRegExp?"u":"",{regExp:r}=e.code,i=r(l,t);return n.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,Fl._)`${r.code==="new RegExp"?C2e:(0,x2e.useFunc)(n,r)}(${l}, ${t})`})}_l.usePattern=k2e;function P2e(n){let{gen:e,data:l,keyword:t,it:r}=n,i=e.name("valid");if(r.allErrors){let u=e.let("valid",!0);return s(()=>e.assign(u,!1)),u}return e.var(i,!0),s(()=>e.break()),i;function s(u){let a=e.const("len",(0,Fl._)`${l}.length`);e.forRange("i",0,a,c=>{n.subschema({keyword:t,dataProp:c,dataPropType:Rh.Type.Num},i),e.if((0,Fl.not)(i),u)})}}_l.validateArray=P2e;function D2e(n){let{gen:e,schema:l,keyword:t,it:r}=n;if(! Line truncated
missingProperty: ${t},
depsCount: ${e},
deps: ${n}}`};var Uie={keyword:"dependencies",type:"object",schemaType:"object",error:vi.error,code(t){let[e,n]=Bie(t);wN(t,e),RN(t,n)}};function Bie({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let l=Array.isArray(t[r])?e:n;l[r]=t[r]}return[e,n]}function wN(t,e=t.schema){let{gen:n,data:r,it:l}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let o=(0,k1.propertyInData)(n,r,s,l.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),l.allErrors?n.if(o,()=>{for(let c of a)(0,k1.checkReportMissingProp)(t,c)}):(n.if((0,am._)`${o} && (${(0,k1.checkMissingProp)(t,a,i)})`),(0,k1.reportMissingProp)(t,i),n.else())}}vi.validatePropertyDeps=wN;function RN(t,e=t.schema){let{gen:n,data:r,keyword:l,it:i}=t,s=n.name("valid");for(let a in e)(0,jie.alwaysValidSchema)(i,e[a])||(n.if((0,k1.propertyInData)(n,r,a,i.opts.ownProperties),()=>{let o=t.subschema({keyword:l,schemaProp:a},s);t.mergeValidEvaluated(o,s)},()=>n.var(s,!0)),t.ok(s))}vi.validateSchemaDeps=RN;vi.default=Uie});var IN=C(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});var NN=Ze(),Hie=_t(),qie={message:"property name must be valid",params:({params:t})=>(0,NN._)`{propertyName: ${t.propertyName}}`},Vie={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:qie,code(t){let{gen:e,schema:n,data:r,it:l}=t;if((0,Hie.alwaysValidSchema)(l,n))return;let i=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,NN.not)(i),()=>{t.error(!0),l.allErrors||e.break()})}),t.ok(i)}};om.default=Vie});var cm=C(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});var M6=Xr(),V2=Ze(),zie=v2(),$6=_t(),Gie={message:"must NOT have additional properties",params:({params:t})=>(0,V2._)`{additionalProperty: ${t.additionalProperty}}`},Xie={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Gie,code(t){let{gen:e,schema:n,parentSchema:r,data:l,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=s;if(s.props=!0,o.removeAdditional!=="all"&&(0,$6.alwaysValidSchema)(s,n))return;let c=(0,M6.allSchemaProperties)(r.properties),f=(0,M6.allSchemaProperties)(r.patternProperties);p(),t.ok((0,V2._)`${i} === ${zie.default.errors}`);function p(){e.forIn("key",l,S=>{!c.length&&!f.length?g(S):e.if(m(S),()=>g(S))})}function m(S){let T;if(c.length>8){let x=(0,$6.schemaRefOrVal)(s,r.properties,"properties");T=(0,M6.isOwnProperty)(e,x,S)}else c.length?T=(0,V2.or)(...c.map(x=>(0,V2._)`${S} === ${x}`)):T=V2.nil;return f.length&&(T=(0,V2.or)(T,...f.map(x=>(0,V2._)`${(0,M6.usePattern)(t,x)}.test(${S})`))),(0,V2.not)(T)}function h(S){e.code((0,V2._)`delete ${l}[${S}]`)}function g(S){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){h(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,$6.alwaysValidSchema)(s,n)){let T=e.name("valid");o.removeAdditional==="failing"?(_(S,T,!1),e.if((0,V2.not)(T),()=>{t.reset(),h(S)})):(_(S,T),a||e.if((0,V2.not)(T),()=>e.break()))}}function _(S,T,x){let v={keyword:"additionalProperties",dataProp:S,dataPropType:$6.Type.Str};x===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(v,T)}}};um.default=Xie});var PN=C(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});var Wie=Qo(),CN=Xr(),fm=_t(),kN=cm(),Kie={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:l,it:i}=t;i.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&kN.default.code(new Wie.KeywordCxt(i,kN.default,"additionalProperties"));let s=(0,CN.allSchemaProperties)(n);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=fm.mergeEvaluated.props(e,(0,fm.toHash)(s),i.props));let a=s.filter(p=>!(0,fm.alwaysValidSchema)(i,n[p]));if(a.length===0)return;let o=e.name("valid");for(let p of a)c(p)?f(p):(e.if((0,CN.propertyInData)(e,l,p,i.opts.ownProperties)),f(p),i.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(p),t.ok(o);function c(p){return i.opts.useDefaults&&!i.compositeRule&&n[p].default!==void 0}function f(p){t.subschema({keyword:"properties",schemaProp:p,dataProp:p},o)}}};pm.default=Kie});var MN=C(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var DN=Xr(),j6=Ze(),LN=_t(),FN=_t(),Yie={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:l,it:i}=t,{opts:s}=i,a=(0,DN.allSchemaProperties)(n),o=a.filter(_=>(0,LN.alwaysValidSchema)(i,n[_]));if(a.length===0||o.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&l.properties,f=e.name("valid");i.props!==!0&&!(i.props instanc Line truncated
`,l+=`const validator = Validator.restoreFromState(validatorState)
`):l+=`const validator = null
deps: ${l}}`};var aie={keyword:"dependencies",type:"object",schemaType:"object",error:_r.error,code(n){let[e,l]=oie(n);UN(n,e),BN(n,l)}};function oie({schema:n}){let e={},l={};for(let t in n){if(t==="__proto__")continue;let r=Array.isArray(n[t])?e:l;r[t]=n[t]}return[e,l]}function UN(n,e=n.schema){let{gen:l,data:t,it:r}=n;if(Object.keys(e).length===0)return;let i=l.let("missing");for(let s in e){let u=e[s];if(u.length===0)continue;let a=(0,F0.propertyInData)(l,t,s,r.opts.ownProperties);n.setParams({property:s,depsCount:u.length,deps:u.join(", ")}),r.allErrors?l.if(a,()=>{for(let c of u)(0,F0.checkReportMissingProp)(n,c)}):(l.if((0,gm._)`${a} && (${(0,F0.checkMissingProp)(n,u,i)})`),(0,F0.reportMissingProp)(n,i),l.else())}}_r.validatePropertyDeps=UN;function BN(n,e=n.schema){let{gen:l,data:t,keyword:r,it:i}=n,s=l.name("valid");for(let u in e)(0,uie.alwaysValidSchema)(i,e[u])||(l.if((0,F0.propertyInData)(l,t,u,i.opts.ownProperties),()=>{let a=n.subschema({keyword:r,schemaProp:u},s);n.mergeValidEvaluated(a,s)},()=>l.var(s,!0)),n.ok(s))}_r.validateSchemaDeps=BN;_r.default=aie});var VN=C(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});var qN=Ze(),cie=En(),fie={message:"property name must be valid",params:({params:n})=>(0,qN._)`{propertyName: ${n.propertyName}}`},pie={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:fie,code(n){let{gen:e,schema:l,data:t,it:r}=n;if((0,cie.alwaysValidSchema)(r,l))return;let i=e.name("valid");e.forIn("key",t,s=>{n.setParams({propertyName:s}),n.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,qN.not)(i),()=>{n.error(!0),r.allErrors||e.break()})}),n.ok(i)}};ym.default=pie});var _m=C(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});var H8=Kt(),z3=Ze(),die=_3(),q8=En(),hie={message:"must NOT have additional properties",params:({params:n})=>(0,z3._)`{additionalProperty: ${n.additionalProperty}}`},mie={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:hie,code(n){let{gen:e,schema:l,parentSchema:t,data:r,errsCount:i,it:s}=n;if(!i)throw new Error("ajv implementation error");let{allErrors:u,opts:a}=s;if(s.props=!0,a.removeAdditional!=="all"&&(0,q8.alwaysValidSchema)(s,l))return;let c=(0,H8.allSchemaProperties)(t.properties),f=(0,H8.allSchemaProperties)(t.patternProperties);p(),n.ok((0,z3._)`${i} === ${die.default.errors}`);function p(){e.forIn("key",r,S=>{!c.length&&!f.length?g(S):e.if(m(S),()=>g(S))})}function m(S){let T;if(c.length>8){let x=(0,q8.schemaRefOrVal)(s,t.properties,"properties");T=(0,H8.isOwnProperty)(e,x,S)}else c.length?T=(0,z3.or)(...c.map(x=>(0,z3._)`${S} === ${x}`)):T=z3.nil;return f.length&&(T=(0,z3.or)(T,...f.map(x=>(0,z3._)`${(0,H8.usePattern)(n,x)}.test(${S})`))),(0,z3.not)(T)}function h(S){e.code((0,z3._)`delete ${r}[${S}]`)}function g(S){if(a.removeAdditional==="all"||a.removeAdditional&&l===!1){h(S);return}if(l===!1){n.setParams({additionalProperty:S}),n.error(),u||e.break();return}if(typeof l=="object"&&!(0,q8.alwaysValidSchema)(s,l)){let T=e.name("valid");a.removeAdditional==="failing"?(_(S,T,!1),e.if((0,z3.not)(T),()=>{n.reset(),h(S)})):(_(S,T),u||e.if((0,z3.not)(T),()=>e.break()))}}function _(S,T,x){let v={keyword:"additionalProperties",dataProp:S,dataPropType:q8.Type.Str};x===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(v,T)}}};vm.default=mie});var XN=C(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});var gie=eo(),zN=Kt(),Em=En(),GN=_m(),yie={keyword:"properties",type:"object",schemaType:"object",code(n){let{gen:e,schema:l,parentSchema:t,data:r,it:i}=n;i.opts.removeAdditional==="all"&&t.additionalProperties===void 0&&GN.default.code(new gie.KeywordCxt(i,GN.default,"additionalProperties"));let s=(0,zN.allSchemaProperties)(l);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Em.mergeEvaluated.props(e,(0,Em.toHash)(s),i.props));let u=s.filter(p=>!(0,Em.alwaysValidSchema)(i,l[p]));if(u.length===0)return;let a=e.name("valid");for(let p of u)c(p)?f(p):(e.if((0,zN.propertyInData)(e,r,p,i.opts.ownProperties)),f(p),i.allErrors||e.else().var(a,!0),e.endIf()),n.it.definedProperties.add(p),n.ok(a);function c(p){return i.opts.useDefaults&&!i.compositeRule&&l[p].default!==void 0}function f(p){n.subschema({keyword:"properties",schemaProp:p,dataProp:p},a)}}};bm.default=yie});var JN=C(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});var WN=Kt(),V8=Ze(),KN=En(),YN=En(),vie={keyword:"patternProperties",type:"object",schemaType:"object",code(n){let{gen:e,schema:l,data:t,parentSchema:r,it:i}=n,{opts:s}=i,u=(0,WN.allSchemaProperties)(l),a=u.filter(_=>(0,KN.alwaysValidSchema)(i,l[_]));if(u.length===0||a.length===u.length&&(!i.opts.unevaluated||i.props===!0))return;let c=s.strictSchema&&!s.allowMatchingProperties&&r.properties,f=e.name("valid");i.props!==!0&&!(i.props instanc Line truncated
`,r+=`const validator = Validator.restoreFromState(validatorState)
`):r+=`const validator = null
`,`
'use strict'
const { dependencies } = require('fast-json-stringify/lib/standalone')
const { Serializer, Validator } = dependencies
const serializerState = ${JSON.stringify(n.getState())}
const serializerState = ${JSON.stringify(l.getState())}
const serializer = Serializer.restoreFromState(serializerState)
${l}
${r}
module.exports = ${t.toString()}(validator, serializer)`}Um.exports=Xse;Um.exports.dependencies={Serializer:Xd(),Validator:jm()}});var kI=C((pSe,CI)=>{"use strict";var{dependencies:Wse}=Bm(),{Serializer:Kse,Validator:fSe}=Wse,Yse={mode:"standalone"},Jse=Kse.restoreFromState(Yse),Qse=null;CI.exports=function(e,n){function r(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let a=!1,o="{";return s.statusCode!==void 0&&(!a&&(a=!0)||(o+=","),o+='"statusCode":',o+=n.asNumber(s.statusCode)),s.code!==void 0&&(!a&&(a=!0)||(o+=","),o+='"code":',o+=n.asString(s.code)),s.error!==void 0&&(!a&&(a=!0)||(o+=","),o+='"error":',o+=n.asString(s.error)),s.message!==void 0&&(!a&&(a=!0)||(o+=","),o+='"message":',o+=n.asString(s.message)),o+"}"}return r}(Qse,Jse)});var F1=C((dSe,FI)=>{"use strict";var PI=require("node:http").STATUS_CODES,Zse=Vp(),{kReplyHeaders:Aa,kReplyNextErrorHandler:Y6,kReplyIsRunningOnErrorHook:eae,kReplyHasStatusCode:tae,kRouteContext:LI}=Mr(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:nae,FST_ERR_FAILED_ERROR_SERIALIZATION:rae}=al(),{getSchemaSerializer:lae}=i1(),Hm=kI(),iae={func:aae,toJSON(){return this.func.name.toString()+"()"}};function sae(t,e,n){t[eae]=!1;let r=t[LI];if(t[Y6]===!1){DI(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[Aa])}catch(c){a.log.warn({req:a.request,res:a,err:c},c&&c.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(o)});return}let l=t[Y6]||r.errorHandler;t[Y6]=Object.getPrototypeOf(l),delete t[Aa]["content-type"],delete t[Aa]["content-length"];let i=l.func;if(!i){t[Y6]=!1,DI(e,t,n);return}let s=i(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?Zse(s,t):t.send(s))}function aae(t,e,n){if(uae(t,n),!n[tae]||n.statusCode===200){let r=t.statusCode||t.status;n.code(r>=400?r:500)}n.statusCode<500?n.log.info({res:n,err:t},t&&t.message):n.log.error({req:e,res:n,err:t},t&&t.message),n.send(t)}function DI(t,e,n){let r=e.raw,l=e.statusCode;e[Aa]["content-type"]=e[Aa]["content-type"]??"application/json; charset=utf-8";let i;try{let s=lae(e[LI],l,e[Aa]["content-type"]);i=s===!1?Hm({error:PI[l+""],code:t.code,message:t.message,statusCode:l}):s(Object.create(t,{error:{value:PI[l+""]},message:{value:t.message},statusCode:{value:l}}))}catch(s){e.log.error({err:s,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),i=Hm(new rae(s.message,t.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=Hm(new nae(typeof i))),e[Aa]["content-length"]=""+Buffer.byteLength(i),n(e,i)}function oae(t=iae,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function uae(t,e){let n=e.raw,r=n.statusCode;r=r>=400?r:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?r=t.status:t.statusCode>=400&&(r=t.statusCode)),n.statusCode=r}FI.exports={buildErrorHandler:oae,handleError:sae}});var n8=C((hSe,t8)=>{"use strict";var Gm=require("node:stream").finished,cae=require("node:stream").Readable,{kFourOhFourContext:MI,kPublicRouteContext:$I,kReplyErrorHandlerCalled:GI,kReplyHijacked:M1,kReplyStartTime:$1,kReplyEndTime:Wm,kReplySerializer:c3,kReplySerializerDefault:Q6,kReplyIsError:Z6,kReplyHeaders:Nn,kReplyTrailers:$r,kReplyHasStatusCode:Km,kReplyIsRunningOnErrorHook:Ym,kReplyNextErrorHandler:fae,kDisableRequestLogging:XI,kSchemaResponse:e8,kReplyCacheSerializeFns:Q3,kSchemaController:qm,kOptions:pae,kRouteContext:Nt}=Mr(),{onSendHookRunner:WI,onResponseHookRunner:dae,preHandlerHookRunner:hae,preSerializationHookRunner:mae}=$3(),jI=Wp()[Symbol.for("internals")],gae=r1(),Xm=gae.now,{handleError:UI}=F1(),{getSchemaSerializer:yae}=i1(),Vm={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:vae,FST_ERR_REP_RESPONSE_BODY_CONSUMED:_ae,FST_ERR_REP_ALREADY_SENT:KI,FST_ERR_REP_SENT_VALUE:Eae,FST_ERR_SEND_INSIDE_ONERR:bae,FST_ERR_BAD_STATUS_CODE:Tae,FST_ERR_BAD_TRAILER_NAME:Sae,FST_ERR_BAD_TRAILER_VALUE:xae,FST_ERR_MISSING_SERIALIZATION_FN:Aae,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:wae}=al(),{FSTDEP010:Rae,FSTDEP013:Oae,FSTDEP019:Nae,FSTDEP020:Iae}=l3(),YI=Object.prototype.toString;function xn(t,e,n){this.raw=t,this[c3]=null,this[GI]=!1,this[Z6]=!1,this[Ym]=!1,this.request=e,this[Nn]={},this[$r]=null,this[Km]=!1,this[$1]=void 0,this.log=n}xn.props=[];Object.defineProperties(xn.prototype,{[Nt]:{get(){return this.request[Nt]}},context:{get(){return Nae(),this.request[Nt]}},elapsedTime:{get(){return this[$1]===void 0?0:(this[Wm]||Xm())-this[$1]}},server:{get(){return this.request[Nt].server}},sent:{enumerable:!0,get(){return(this[M1]||this.raw.writableEnded)===!0},set(t){if(Rae(),t!==!0)throw new Eae;if(this.sent&&this[M1])throw new KI(this.request.url,this.request.method);this[M1]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[$I]:{get(){return this.request[$I]}}});xn.prototype.hijack=function(){return this[M1]=!0,this};xn.prototype.send=function(t){if(this[Ym]===!0)throw new bae;if(this.sent)return this.log.warn Line truncated
${n.functions.join(`
module.exports = ${n.toString()}(validator, serializer)`}Km.exports=mue;Km.exports.dependencies={Serializer:lh(),Validator:Wm()}});var GI=C((HSe,zI)=>{"use strict";var{dependencies:gue}=Ym(),{Serializer:yue,Validator:BSe}=gue,vue={mode:"standalone"},_ue=yue.restoreFromState(vue),Eue=null;zI.exports=function(e,l){function t(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let u=!1,a="{";return s.statusCode!==void 0&&(!u&&(u=!0)||(a+=","),a+='"statusCode":',a+=l.asNumber(s.statusCode)),s.code!==void 0&&(!u&&(u=!0)||(a+=","),a+='"code":',a+=l.asString(s.code)),s.error!==void 0&&(!u&&(u=!0)||(a+=","),a+='"error":',a+=l.asString(s.error)),s.message!==void 0&&(!u&&(u=!0)||(a+=","),a+='"message":',a+=l.asString(s.message)),a+"}"}return t}(Eue,_ue)});var U0=C((qSe,YI)=>{"use strict";var XI=require("node:http").STATUS_CODES,bue=Qp(),{kReplyHeaders:Ou,kReplyNextErrorHandler:n9,kReplyIsRunningOnErrorHook:Tue,kReplyHasStatusCode:Sue,kRouteContext:KI}=jt(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:xue,FST_ERR_FAILED_ERROR_SERIALIZATION:Aue}=a2(),{getSchemaSerializer:wue}=o0(),Jm=GI(),Oue={func:Nue,toJSON(){return this.func.name.toString()+"()"}};function Rue(n,e,l){n[Tue]=!1;let t=n[KI];if(n[n9]===!1){WI(e,n,function(u,a){try{u.raw.writeHead(u.raw.statusCode,u[Ou])}catch(c){u.log.warn({req:u.request,res:u,err:c},c&&c.message),u.raw.writeHead(u.raw.statusCode)}u.raw.end(a)});return}let r=n[n9]||t.errorHandler;n[n9]=Object.getPrototypeOf(r),delete n[Ou]["content-type"],delete n[Ou]["content-length"];let i=r.func;if(!i){n[n9]=!1,WI(e,n,l);return}let s=i(e,n.request,n);s!==void 0&&(s!==null&&typeof s.then=="function"?bue(s,n):n.send(s))}function Nue(n,e,l){if(Cue(n,l),!l[Sue]||l.statusCode===200){let t=n.statusCode||n.status;l.code(t>=400?t:500)}l.statusCode<500?l.log.info({res:l,err:n},n&&n.message):l.log.error({req:e,res:l,err:n},n&&n.message),l.send(n)}function WI(n,e,l){let t=e.raw,r=e.statusCode;e[Ou]["content-type"]=e[Ou]["content-type"]??"application/json; charset=utf-8";let i;try{let s=wue(e[KI],r,e[Ou]["content-type"]);i=s===!1?Jm({error:XI[r+""],code:n.code,message:n.message,statusCode:r}):s(Object.create(n,{error:{value:XI[r+""]},message:{value:n.message},statusCode:{value:r}}))}catch(s){e.log.error({err:s,statusCode:t.statusCode},"The serializer for the given status code failed"),e.code(500),i=Jm(new Aue(s.message,n.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=Jm(new xue(typeof i))),e[Ou]["content-length"]=""+Buffer.byteLength(i),l(e,i)}function Iue(n=Oue,e){if(!e)return n;let l=Object.create(n);return l.func=e,l}function Cue(n,e){let l=e.raw,t=l.statusCode;t=t>=400?t:500,n!=null&&(n.headers!==void 0&&e.headers(n.headers),n.status>=400?t=n.status:n.statusCode>=400&&(t=n.statusCode)),l.statusCode=t}YI.exports={buildErrorHandler:Iue,handleError:Rue}});var u9=C((VSe,s9)=>{"use strict";var ng=require("node:stream").finished,kue=require("node:stream").Readable,{kFourOhFourContext:JI,kPublicRouteContext:QI,kReplyErrorHandlerCalled:sC,kReplyHijacked:B0,kReplyStartTime:H0,kReplyEndTime:tg,kReplySerializer:fi,kReplySerializerDefault:t9,kReplyIsError:r9,kReplyHeaders:Cl,kReplyTrailers:Ut,kReplyHasStatusCode:rg,kReplyIsRunningOnErrorHook:ig,kReplyNextErrorHandler:Pue,kDisableRequestLogging:uC,kSchemaResponse:i9,kReplyCacheSerializeFns:Zi,kSchemaController:Qm,kOptions:Due,kRouteContext:In}=jt(),{onSendHookRunner:aC,onResponseHookRunner:Lue,preHandlerHookRunner:Fue,preSerializationHookRunner:Mue}=ji(),ZI=ld()[Symbol.for("internals")],$ue=u0(),lg=$ue.now,{handleError:eC}=U0(),{getSchemaSerializer:jue}=o0(),Zm={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:Uue,FST_ERR_REP_RESPONSE_BODY_CONSUMED:Bue,FST_ERR_REP_ALREADY_SENT:oC,FST_ERR_REP_SENT_VALUE:Hue,FST_ERR_SEND_INSIDE_ONERR:que,FST_ERR_BAD_STATUS_CODE:Vue,FST_ERR_BAD_TRAILER_NAME:zue,FST_ERR_BAD_TRAILER_VALUE:Gue,FST_ERR_MISSING_SERIALIZATION_FN:Xue,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:Wue}=a2(),{FSTDEP010:Kue,FSTDEP013:Yue,FSTDEP019:Jue,FSTDEP020:Que}=ii(),cC=Object.prototype.toString;function wl(n,e,l){this.raw=n,this[fi]=null,this[sC]=!1,this[r9]=!1,this[ig]=!1,this.request=e,this[Cl]={},this[Ut]=null,this[rg]=!1,this[H0]=void 0,this.log=l}wl.props=[];Object.defineProperties(wl.prototype,{[In]:{get(){return this.request[In]}},context:{get(){return Jue(),this.request[In]}},elapsedTime:{get(){return this[H0]===void 0?0:(this[tg]||lg())-this[H0]}},server:{get(){return this.request[In].server}},sent:{enumerable:!0,get(){return(this[B0]||this.raw.writableEnded)===!0},set(n){if(Kue(),n!==!0)throw new Hue;if(this.sent&&this[B0])throw new oC(this.request.url,this.request.method);this[B0]=!0}},statusCode:{get(){return this.raw.statusCode},set(n){this.code(n)}},[QI]:{get(){return this.request[QI]}}});wl.prototype.hijack=function(){return this[B0]=!0,this};wl.prototype.send=function(n){if(this[ig]===!0)throw new que;if(this.sent)return this.log.warn Line truncated
${l.functions.join(`
`)}
const main = anonymous0
return main
@@ -130,13 +130,13 @@ ${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
${i}
return json
}
${n.functions.join(`
${l.functions.join(`
`)}
return main
`;let a=new h0e(e),o=new m0e(e.ajv);for(let f of n.validatorSchemasIds){let p=n.refResolver.getSchema(f);o.addSchema(p,f);let m=n.refResolver.getSchemaDependencies(f);for(let[h,g]of Object.entries(m))o.addSchema(g,h)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
`;let u=new F1e(e),a=new M1e(e.ajv);for(let f of l.validatorSchemasIds){let p=l.refResolver.getSchema(f);a.addSchema(p,f);let m=l.refResolver.getSchemaDependencies(f);for(let[h,g]of Object.entries(m))a.addSchema(g,h)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:a,serializer:u,code:`validator
serializer
${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode==="standalone"?Bm()(c,n,a,o):c(o,a)}var v0e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],_0e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],E0e=["maxLength","minLength","pattern"],b0e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function tD(t){for(var e of v0e)if(e in t)return"object";for(var e of _0e)if(e in t)return"array";for(var e of E0e)if(e in t)return"string";for(var e of b0e)if(e in t)return"number";return t.type}function T0e(t,e){let n=e.schema,r=Object.keys(n.properties||{}),l=`
const propertiesKeys = ${JSON.stringify(r)}
${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode==="standalone"?Ym()(c,l,u,a):c(a,u)}var U1e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],B1e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],H1e=["maxLength","minLength","pattern"],q1e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function mD(n){for(var e of U1e)if(e in n)return"object";for(var e of B1e)if(e in n)return"array";for(var e of H1e)if(e in n)return"string";for(var e of q1e)if(e in n)return"number";return n.type}function V1e(n,e){let l=e.schema,t=Object.keys(l.properties||{}),r=`
const propertiesKeys = ${JSON.stringify(t)}
for (const [key, value] of Object.entries(obj)) {
if (
propertiesKeys.includes(key) ||
@@ -144,81 +144,81 @@ ${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode===
typeof value === 'function' ||
typeof value === 'symbol'
) continue
`,i=e.getPropertyLocation("patternProperties"),s=i.schema;if(s!==void 0)for(let c in s){let f=i.getPropertyLocation(c);l+=`
`,i=e.getPropertyLocation("patternProperties"),s=i.schema;if(s!==void 0)for(let c in s){let f=i.getPropertyLocation(c);r+=`
if (/${c.replace(/\\*\//g,"\\/")}/.test(key)) {
${hu}
${yo}
json += serializer.asString(key) + ':'
${Ti(t,f,"value")}
${Sr(n,f,"value")}
continue
}
`}let o=e.getPropertyLocation("additionalProperties").schema;if(o!==void 0)if(o===!0)l+=`
${hu}
`}let a=e.getPropertyLocation("additionalProperties").schema;if(a!==void 0)if(a===!0)r+=`
${yo}
json += serializer.asString(key) + ':' + JSON.stringify(value)
`;else{let c=e.getPropertyLocation("additionalProperties");l+=`
${hu}
`;else{let c=e.getPropertyLocation("additionalProperties");r+=`
${yo}
json += serializer.asString(key) + ':'
${Ti(t,c,"value")}
`}return l+=`
${Sr(n,c,"value")}
`}return r+=`
}
`,l}function S0e(t,e){let n="",r=e.schema,l=r.required||[],i=e.getPropertyLocation("properties"),s=[],a=[];if(r.properties)for(let c of Object.keys(r.properties)){if(l.indexOf(c)===-1)continue;let f=i.getPropertyLocation(c);f.schema.$ref&&(f=mu(t,e,f.schema.$ref));let p=JSON.stringify(c);f.schema.default===void 0&&(n+=`if (obj[${p}] === undefined) throw new Error('${p} is required!')
`,a.push(c)),s.push(c)}for(let c of l)s.indexOf(c)===-1&&(n+=`if (obj['${c}'] === undefined) throw new Error('"${c}" is required!')
`);n+=`
`,r}function z1e(n,e){let l="",t=e.schema,r=t.required||[],i=e.getPropertyLocation("properties"),s=[],u=[];if(t.properties)for(let c of Object.keys(t.properties)){if(r.indexOf(c)===-1)continue;let f=i.getPropertyLocation(c);f.schema.$ref&&(f=vo(n,e,f.schema.$ref));let p=JSON.stringify(c);f.schema.default===void 0&&(l+=`if (obj[${p}] === undefined) throw new Error('${p} is required!')
`,u.push(c)),s.push(c)}for(let c of r)s.indexOf(c)===-1&&(l+=`if (obj['${c}'] === undefined) throw new Error('"${c}" is required!')
`);l+=`
let addComma = false
let json = '${t.wrapObjects?"{":""}'
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let c of Object.keys(r.properties)){let f=i.getPropertyLocation(c);f.schema.$ref&&(f=mu(t,e,f.schema.$ref));let p=JSON.stringify(c);if(a.indexOf(c)!==-1)n+=`
${hu}
let json = '${n.wrapObjects?"{":""}'
`;let a=n.wrapObjects;if(n.wrapObjects=!0,t.properties)for(let c of Object.keys(t.properties)){let f=i.getPropertyLocation(c);f.schema.$ref&&(f=vo(n,e,f.schema.$ref));let p=JSON.stringify(c);if(u.indexOf(c)!==-1)l+=`
${yo}
json += ${JSON.stringify(p+":")}
${Ti(t,f,`obj[${p}]`)}
`;else{n+=`
${Sr(n,f,`obj[${p}]`)}
`;else{l+=`
if (obj[${p}] !== undefined) {
${hu}
${yo}
json += ${JSON.stringify(p+":")}
${Ti(t,f,`obj[${p}]`)}
${Sr(n,f,`obj[${p}]`)}
}
`;let m=f.schema.default;m!==void 0&&(n+=`
`;let m=f.schema.default;m!==void 0&&(l+=`
else {
${hu}
${yo}
json += ${JSON.stringify(p+":"+JSON.stringify(m))}
}
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=T0e(t,e)),t.wrapObjects=o,n+=`
return json${t.wrapObjects?" + '}'":""}
`,n}function nD(t,e,n,r){let l=e.getPropertyLocation("allOf");for(let i=0;i<n.allOf.length;i++){let s=n.allOf[i];if(s.$ref){let o=l.getPropertyLocation(i);s=mu(t,o,s.$ref).schema}let a=s.type;if(a===void 0&&(a=tD(s)),a!==void 0){if(r.type!==void 0&&r.type!==a)throw new Error("allOf schemas have different type values");r.type=a}if(s.format!==void 0){if(r.format!==void 0&&r.format!==s.format)throw new Error("allOf schemas have different format values");r.format=s.format}if(s.nullable!==void 0){if(r.nullable!==void 0&&r.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");r.nullable=s.nullable}s.properties!==void 0&&(r.properties===void 0&&(r.properties={}),Object.assign(r.properties,s.properties)),s.additionalProperties!==void 0&&(r.additionalProperties===void 0&&(r.additionalProperties={}),Object.assign(r.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(r.patternProperties===void 0&&(r.patternProperties={}),Object.assign(r.patternProperties,s.patternProperties)),s.required!==void 0&&(r.required===void 0&&(r.required=[]),r.required.push(...s.required)),s.oneOf!==void 0&&(r.oneOf===void 0&&(r.oneOf=[]),r.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(r.anyOf===void 0&&(r.anyOf=[]),r.anyOf.push(...s.anyOf)),s.allOf!==void 0&&nD(t,e,s,r)}delete r.allOf,r.$id=`__fjs_merged_${eD++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function x0e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=qg({},e.schema),l=r.then,i=r.else||{additionalProperties:!0};delete r.if,delete r.then,delete r.else;let a=e.getPropertyLocation("if").getSchemaRef(),o=e.getPropertyLocation("then");o.schema=qg(r,l);let c=e.getPropertyLocation("else");return c.schema=qg(r,i),`
if (validator.validate("${a}", ${n})) {
${Ti(t,o,n)}
`)}}return(t.patternProperties||t.additionalProperties)&&(l+=V1e(n,e)),n.wrapObjects=a,l+=`
return json${n.wrapObjects?" + '}'":""}
`,l}function gD(n,e,l,t){let r=e.getPropertyLocation("allOf");for(let i=0;i<l.allOf.length;i++){let s=l.allOf[i];if(s.$ref){let a=r.getPropertyLocation(i);s=vo(n,a,s.$ref).schema}let u=s.type;if(u===void 0&&(u=mD(s)),u!==void 0){if(t.type!==void 0&&t.type!==u)throw new Error("allOf schemas have different type values");t.type=u}if(s.format!==void 0){if(t.format!==void 0&&t.format!==s.format)throw new Error("allOf schemas have different format values");t.format=s.format}if(s.nullable!==void 0){if(t.nullable!==void 0&&t.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");t.nullable=s.nullable}s.properties!==void 0&&(t.properties===void 0&&(t.properties={}),Object.assign(t.properties,s.properties)),s.additionalProperties!==void 0&&(t.additionalProperties===void 0&&(t.additionalProperties={}),Object.assign(t.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(t.patternProperties===void 0&&(t.patternProperties={}),Object.assign(t.patternProperties,s.patternProperties)),s.required!==void 0&&(t.required===void 0&&(t.required=[]),t.required.push(...s.required)),s.oneOf!==void 0&&(t.oneOf===void 0&&(t.oneOf=[]),t.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(t.anyOf===void 0&&(t.anyOf=[]),t.anyOf.push(...s.anyOf)),s.allOf!==void 0&&gD(n,e,s,t)}delete t.allOf,t.$id=`__fjs_merged_${hD++}`,n.refResolver.addSchema(t),e.addMergedSchema(t,t.$id)}function G1e(n,e,l){n.validatorSchemasIds.add(e.getSchemaId());let t=Qg({},e.schema),r=t.then,i=t.else||{additionalProperties:!0};delete t.if,delete t.then,delete t.else;let u=e.getPropertyLocation("if").getSchemaRef(),a=e.getPropertyLocation("then");a.schema=Qg(t,r);let c=e.getPropertyLocation("else");return c.schema=Qg(t,i),`
if (validator.validate("${u}", ${l})) {
${Sr(n,a,l)}
} else {
${Ti(t,c,n)}
${Sr(n,c,l)}
}
`}function A0e(t){return`(${t} && typeof ${t}.toJSON === 'function')
? ${t}.toJSON()
: ${t}
`}function rD(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=iD(t);t.functionsNamesBySchema.set(n,r);let l=e.getSchemaRef();l.startsWith(t.rootSchemaId)&&(l=l.replace(t.rootSchemaId,""));let i=`
`,s=n.nullable===!0;return i+=`
// ${l}
function ${r} (input) {
const obj = ${A0e("input")}
`}function X1e(n){return`(${n} && typeof ${n}.toJSON === 'function')
? ${n}.toJSON()
: ${n}
`}function yD(n,e){let l=e.schema;if(n.functionsNamesBySchema.has(l))return n.functionsNamesBySchema.get(l);let t=_D(n);n.functionsNamesBySchema.set(l,t);let r=e.getSchemaRef();r.startsWith(n.rootSchemaId)&&(r=r.replace(n.rootSchemaId,""));let i=`
`,s=l.nullable===!0;return i+=`
// ${r}
function ${t} (input) {
const obj = ${X1e("input")}
${s?"":"if (obj === null) return '{}'"}
${S0e(t,e)}
${z1e(n,e)}
}
`,t.functions.push(i),r}function w0e(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=mu(t,r,r.schema.$ref));let l=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let i=iD(t);t.functionsNamesBySchema.set(n,i);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
`,n.functions.push(i),t}function W1e(n,e){let l=e.schema,t=e.getPropertyLocation("items");t.schema=t.schema||{},t.schema.$ref&&(t=vo(n,t,t.schema.$ref));let r=t.schema;if(n.functionsNamesBySchema.has(l))return n.functionsNamesBySchema.get(l);let i=_D(n);n.functionsNamesBySchema.set(l,i);let s=e.getSchemaRef();s.startsWith(n.rootSchemaId)&&(s=s.replace(n.rootSchemaId,""));let u=`
function ${i} (obj) {
// ${s}
`,o=n.nullable===!0;if(a+=`
${o?"":"if (obj === null) return '[]'"}
`,a=l.nullable===!0;if(u+=`
${a?"":"if (obj === null) return '[]'"}
if (!Array.isArray(obj)) {
throw new TypeError(\`The value of '${s}' does not match schema definition.\`)
}
const arrayLength = obj.length
`,!n.additionalItems&&Array.isArray(l)&&(a+=`
if (arrayLength > ${l.length}) {
throw new Error(\`Item at ${l.length} does not match schema definition.\`)
`,!l.additionalItems&&Array.isArray(r)&&(u+=`
if (arrayLength > ${r.length}) {
throw new Error(\`Item at ${r.length} does not match schema definition.\`)
}
`),QP==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${I8}) return JSON.stringify(obj)
`),a+=`
`),pD==="json-stringify"&&(u+=`if (arrayLength && arrayLength >= ${L9}) return JSON.stringify(obj)
`),u+=`
let jsonOutput = ''
`,Array.isArray(l)){for(let c=0;c<l.length;c++){let f=l[c],p=Ti(t,r.getPropertyLocation(c),`obj[${c}]`);a+=`
`,Array.isArray(r)){for(let c=0;c<r.length;c++){let f=r[c],p=Sr(n,t.getPropertyLocation(c),`obj[${c}]`);u+=`
if (${c} < arrayLength) {
if (${lD(f.type,`[${c}]`)}) {
if (${vD(f.type,`[${c}]`)}) {
let json = ''
${p}
jsonOutput += json
@@ -229,13 +229,13 @@ ${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode===
throw new Error(\`Item at ${c} does not match schema definition.\`)
}
}
`}n.additionalItems&&(a+=`
for (let i = ${l.length}; i < arrayLength; i++) {
`}l.additionalItems&&(u+=`
for (let i = ${r.length}; i < arrayLength; i++) {
jsonOutput += JSON.stringify(obj[i])
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`)}else{let c=Ti(t,r,"obj[i]");a+=`
}`)}else{let c=Sr(n,t,"obj[i]");u+=`
for (let i = 0; i < arrayLength; i++) {
let json = ''
${c}
@@ -243,7 +243,7 @@ ${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode===
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),i}function lD(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
}`}return u+="\n return `[${jsonOutput}]`\n }",n.functions.push(u),i}function vD(n,e){let l;switch(n){case"null":l=`obj${e} === null`;break;case"string":l=`typeof obj${e} === 'string' ||
obj${e} === null ||
obj${e} instanceof Date ||
obj${e} instanceof RegExp ||
@@ -251,162 +251,170 @@ ${s}`,ajv:o.ajv};let c=new Function("validator","serializer",s);return e.mode===
typeof obj${e} === "object" &&
typeof obj${e}.toString === "function" &&
obj${e}.toString !== Object.prototype.toString
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(l=>lD(l,e)).join(" || ")})`)}return n}function iD(t){return"anonymous"+t.functionsCounter++}function R0e(t,e,n){let l=e.schema.type.sort(a=>a==="null"?-1:1),i="";l.forEach((a,o)=>{e.schema={...e.schema,type:a};let c=sD(t,e,n),f=o===0?"if":"else if";switch(a){case"null":i+=`
${f} (${n} === null)
)`;break;case"integer":l=`Number.isInteger(obj${e})`;break;case"number":l=`Number.isFinite(obj${e})`;break;case"boolean":l=`typeof obj${e} === 'boolean'`;break;case"object":l=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":l=`Array.isArray(obj${e})`;break;default:Array.isArray(n)&&(l=`(${n.map(r=>vD(r,e)).join(" || ")})`)}return l}function _D(n){return"anonymous"+n.functionsCounter++}function K1e(n,e,l){let r=e.schema.type.sort(u=>u==="null"?-1:1),i="";r.forEach((u,a)=>{e.schema={...e.schema,type:u};let c=ED(n,e,l),f=a===0?"if":"else if";switch(u){case"null":i+=`
${f} (${l} === null)
${c}
`;break;case"string":{i+=`
${f}(
typeof ${n} === "string" ||
${n} === null ||
${n} instanceof Date ||
${n} instanceof RegExp ||
typeof ${l} === "string" ||
${l} === null ||
${l} instanceof Date ||
${l} instanceof RegExp ||
(
typeof ${n} === "object" &&
typeof ${n}.toString === "function" &&
${n}.toString !== Object.prototype.toString
typeof ${l} === "object" &&
typeof ${l}.toString === "function" &&
${l}.toString !== Object.prototype.toString
)
)
${c}
`;break}case"array":{i+=`
${f}(Array.isArray(${n}))
${f}(Array.isArray(${l}))
${c}
`;break}case"integer":{i+=`
${f}(Number.isInteger(${n}) || ${n} === null)
${f}(Number.isInteger(${l}) || ${l} === null)
${c}
`;break}default:{i+=`
${f}(typeof ${n} === "${a}" || ${n} === null)
${f}(typeof ${l} === "${u}" || ${l} === null)
${c}
`;break}}});let s=e.getSchemaRef();return s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,"")),i+=`
`;break}}});let s=e.getSchemaRef();return s.startsWith(n.rootSchemaId)&&(s=s.replace(n.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${s}' does not match schema definition.\`)
`,i}function sD(t,e,n){let r=e.schema;switch(r.type){case"null":return"json += 'null'";case"string":return r.format==="date-time"?`json += serializer.asDateTime(${n})`:r.format==="date"?`json += serializer.asDate(${n})`:r.format==="time"?`json += serializer.asTime(${n})`:`json += serializer.asString(${n})`;case"integer":return`json += serializer.asInteger(${n})`;case"number":return`json += serializer.asNumber(${n})`;case"boolean":return`json += serializer.asBoolean(${n})`;case"object":return`json += ${rD(t,e)}(${n})`;case"array":return`json += ${w0e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function O0e(t,e){let n=t.schema,r=n.type,l=Array.isArray(r)&&r.includes("null"),i="";return l&&(i+=`
`,i}function ED(n,e,l){let t=e.schema;switch(t.type){case"null":return"json += 'null'";case"string":return t.format==="date-time"?`json += serializer.asDateTime(${l})`:t.format==="date"?`json += serializer.asDate(${l})`:t.format==="time"?`json += serializer.asTime(${l})`:`json += serializer.asString(${l})`;case"integer":return`json += serializer.asInteger(${l})`;case"number":return`json += serializer.asNumber(${l})`;case"boolean":return`json += serializer.asBoolean(${l})`;case"object":return`json += ${yD(n,e)}(${l})`;case"array":return`json += ${W1e(n,e)}(${l})`;case void 0:return`json += JSON.stringify(${l})`;default:throw new Error(`${t.type} unsupported`)}}function Y1e(n,e){let l=n.schema,t=l.type,r=Array.isArray(t)&&t.includes("null"),i="";return r&&(i+=`
if (${e} === null) {
json += 'null'
} else {
`),i+=`json += '${JSON.stringify(n.const).replace(g0e,"\\'")}'`,l&&(i+=`
`),i+=`json += '${JSON.stringify(l.const).replace($1e,"\\'")}'`,r&&(i+=`
}
`),i}function Ti(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=mu(t,e,r.$ref),r=e.schema),r.type===void 0){let a=tD(r);a&&(r.type=a)}if(r.if&&r.then)return x0e(t,e,n);r.allOf&&(nD(t,e,r,p0e(r)),r=e.schema);let l=r.type,i="";if((l===void 0||l==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let f=rD(t,e);i+=`
`),i}function Sr(n,e,l){let t=e.schema;if(typeof t=="boolean")return`json += JSON.stringify(${l})`;if(t.$ref&&(e=vo(n,e,t.$ref),t=e.schema),t.type===void 0){let u=mD(t);u&&(t.type=u)}if(t.if&&t.then)return G1e(n,e,l);t.allOf&&(gD(n,e,t,D1e(t)),t=e.schema);let r=t.type,i="";if((r===void 0||r==="object")&&(t.anyOf||t.oneOf)){if(n.validatorSchemasIds.add(e.getSchemaId()),t.type==="object"){n.wrapObjects=!1;let f=yD(n,e);i+=`
json += '{'
json += ${f}(${n})
json += ${f}(${l})
json += ','
`}let a=r.anyOf?"anyOf":"oneOf",o=e.getPropertyLocation(a);for(let f=0;f<e.schema[a].length;f++){let p=o.getPropertyLocation(f),m=p.getSchemaRef(),h=Ti(t,p,n);i+=`
${f===0?"if":"else if"}(validator.validate("${m}", ${n}))
`}let u=t.anyOf?"anyOf":"oneOf",a=e.getPropertyLocation(u);for(let f=0;f<e.schema[u].length;f++){let p=a.getPropertyLocation(f),m=p.getSchemaRef(),h=Sr(n,p,l);i+=`
${f===0?"if":"else if"}(validator.validate("${m}", ${l}))
${h}
`}let c=e.getSchemaRef();return c.startsWith(t.rootSchemaId)&&(c=c.replace(t.rootSchemaId,"")),i+=`
`}let c=e.getSchemaRef();return c.startsWith(n.rootSchemaId)&&(c=c.replace(n.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${c}' does not match schema definition.\`)
`,r.type==="object"&&(i+=`
`,t.type==="object"&&(i+=`
json += '}'
`,t.wrapObjects=!0),i}let s=r.nullable===!0;return s&&(i+=`
if (${n} === null) {
`,n.wrapObjects=!0),i}let s=t.nullable===!0;return s&&(i+=`
if (${l} === null) {
json += 'null'
} else {
`),r.const!==void 0?i+=O0e(e,n):Array.isArray(l)?i+=R0e(t,e,n):i+=sD(t,e,n),s&&(i+=`
`),t.const!==void 0?i+=Y1e(e,l):Array.isArray(r)?i+=K1e(n,e,l):i+=ED(n,e,l),s&&(i+=`
}
`),i}gu.exports=zg;gu.exports.default=zg;gu.exports.build=zg;gu.exports.validLargeArrayMechanisms=ZP;gu.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var uD=C((Txe,Gg)=>{"use strict";var N0e=Xg();function oD(t={readMode:!0}){if(t.readMode===!0&&typeof t.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(t.readMode!==!0&&typeof t.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(t.readMode===!0)return function(){return function(r){return t.restoreFunction(r)}};let e=N0e();return function(r,l={}){l.mode="standalone";let i=e(r,l);return function(s){let a=i(s);return t.storeFunction(s,a),new Function(a)}}}Gg.exports=oD;Gg.exports.default=oD});var Xg=C((Sxe,e0)=>{"use strict";var I0e=aD();function Wg(){return function(e,n){let r=Object.assign({},n,{schema:e});return C0e.bind(null,r)}}function C0e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),I0e(e,t)}e0.exports=Wg;e0.exports.default=Wg;e0.exports.SerializerSelector=Wg;e0.exports.StandaloneSerializer=uD()});var m3=C(t0=>{"use strict";Object.defineProperty(t0,"__esModule",{value:!0});t0.checkMetadata=void 0;var k0e=_t(),P0e={keyword:"metadata",schemaType:"object",code(t){cD(t);let{gen:e,schema:n,it:r}=t;if((0,k0e.alwaysValidSchema)(r,n))return;let l=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},l),t.ok(l)}};function cD({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}t0.checkMetadata=cD;t0.default=P0e});var C8=C(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});r0.hasRef=void 0;var fD=ba(),n0=Ze(),D0e=K3(),pD=v2(),dD=$h(),L0e=m3(),F0e={keyword:"ref",schemaType:"string",code(t){(0,L0e.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:l,it:i}=t,{schemaEnv:{root:s}}=i,a=e.name("valid");l.nullable?(e.var(a,(0,n0._)`${n} === null`),e.if((0,n0.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var p;let m=(p=s.schema.definitions)===null||p===void 0?void 0:p[r];if(!m)throw new D0e.default(i.opts.uriResolver,"",r,`No definition ${r}`);Kg(m)||!i.opts.inlineRefs?c(m):f(m)}function c(p){let m=fD.compileSchema.call(i.self,new fD.SchemaEnv({schema:p,root:s,schemaPath:`/definitions/${r}`})),h=(0,dD.getValidate)(t,m),g=e.const("_errs",pD.default.errors);(0,dD.callRef)(t,h,m,m.$async),e.assign(a,(0,n0._)`${g} === ${pD.default.errors}`)}function f(p){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:p,code:(0,n0.stringify)(p)}:{ref:p});t.subschema({schema:p,dataTypes:[],schemaPath:n0.nil,topSchemaRef:m,errSchemaPath:`/definitions/${r}`},a)}}};function Kg(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&Kg(n))return!0}return!1}r0.hasRef=Kg;r0.default=F0e});var Jg=C(Yg=>{"use strict";Object.defineProperty(Yg,"__esModule",{value:!0});var M0e=/t|\s/i,$0e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,j0e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,U0e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function mD(t,e){let n=t.split(M0e);return n.length===2&&hD(n[0])&&B0e(n[1])||e&&n.length===1&&hD(n[0])}Yg.default=mD;function hD(t){let e=$0e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3];return r>=1&&r<=12&&l>=1&&(l<=U0e[r]||r===2&&l===29&&(n%100===0?n%400===0:n%4===0))}function B0e(t){let e=j0e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],l=+e[3],i=+(e[4]||0),s=+(e[5]||0);return n<=23&&r<=59&&l<=59||n-i===23&&r-s===59&&l===60}mD.code='require("ajv/dist/runtime/timestamp").default'});var yu=C(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.typeErrorParams=es.typeErrorMessage=es.typeError=void 0;var H0e=Ze();function q0e(t){return{message:e=>gD(e,t),params:e=>yD(e,t)}}es.typeError=q0e;function gD({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}es.typeErrorMessage=gD;function yD({parentSchema:t},e){return(0,H0e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}es.typeErrorParams=yD});var Qg=C(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.intRange=void 0;var Zl=Ze(),V0e=Jg(),z0e=_t(),G0e=m3(),vD=yu();vu.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var X0e={message:t=>(0,vD.typeErrorMessage)(t,t.schema),params:t=>(0,vD.typeErrorParams)(t,t.schema)};function W0e(t){let{gen:e,data:n,it:r}=t,{timestamp:l,allowDate:i}=r.opts;if(l==="date")return(0,Zl._)`${n} instanceof Date `;let s=(0,z0e.useFunc)(e,V0e.default),a=i?(0,Zl._)`, true`:Zl.nil,o=(0,Zl._)`typeof ${n} == "string" && ${s}(${n}${a})`;return l==="string"?o:(0,Zl.or)((0,Zl._)`${n} instanceof Date`,o)}var K0e={keyword:"type",schemaType:"string",error:X0e,code(t){(0,G0e.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:l}=t,i;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},lce=97,ice=48;function rs(t,e){let n="",r;for(rs.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in GD)n+=GD[r],e++;else if(r==="u"){e++;let i=4,s=0;for(;i--;){if(s<<=4,r=t[e],r===void 0){l("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")s+=r.charCodeAt(0)-lce+10;else if(r>="0"&&r<="9")s+=r.charCodeAt(0)-ice;else{l(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(s)}else{l(`unexpected token ${r}`);return}else if(r===void 0){l("unexpected end");return}else if(r.charCodeAt(0)>=32)n+=r;else{l(`unexpected token ${r}`);return}return rs.position=e,n;function l(i){rs.position=e,rs.message=i}}ls.parseJsonString=rs;rs.message=void 0;rs.position=0;rs.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var lL=C(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});var sce=uy(),JD=ba(),ze=Ze(),ace=K3(),Ct=v2(),oce=Xr(),uce=C8(),cce=Qg(),gy=XD(),QD=_t(),fce=Jg(),pce={elements:gce,values:yce,discriminator:_ce,properties:WD,optionalProperties:WD,enum:bce,type:Ece,ref:Tce};function ZD(t,e){let n=JD.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:l}=this.opts.code,{ownProperties:i}=this.opts,s=new ze.CodeGen(this.scope,{es5:r,lines:l,ownProperties:i}),a=s.scopeName("parse"),o={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Ct.default.data,parseName:a,char:s.name("c")},c;try{this._compilations.add(t),t.parseName=a,dce(o),s.optimize(this.opts.code.optimize);let f=s.toString();c=`${s.scopeRefs(Ct.default.scope)}return ${f}`;let m=new Function(`${Ct.default.scope}`,c)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}catch(f){throw c&&this.logger.error("Error compiling parser, function code:",c),delete t.parse,delete t.parseName,f}finally{this._compilations.delete(t)}return t}by.default=ZD;var my=(0,ze._)`undefined`;function dce(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,ze._)`${Ct.default.json}, ${Ct.default.jsonPos}, ${Ct.default.jsonPart}`,!1,()=>{e.let(Ct.default.data),e.let(r),e.assign((0,ze._)`${n}.message`,my),e.assign((0,ze._)`${n}.position`,my),e.assign(Ct.default.jsonPos,(0,ze._)`${Ct.default.jsonPos} || 0`),e.const(Ct.default.jsonLen,(0,ze._)`${Ct.default.json}.length`),F8(t),Ey(t),e.if(Ct.default.jsonPart,()=>{e.assign((0,ze._)`${n}.position`,Ct.default.jsonPos),e.return(Ct.default.data)}),e.if((0,ze._)`${Ct.default.jsonPos} === ${Ct.default.jsonLen}`,()=>e.return(Ct.default.data)),Tu(t)})}function F8(t){let e;for(let n of sce.jtdForms)if(n in t.schema){e=n;break}e?mce(t,pce[e]):vy(t)}var hce=YD(!0,YD(!1,Tu));function mce(t,e){let{gen:n,schema:r,data:l}=t;if(!r.nullable)return e(t);s0(t,"null",e,()=>n.assign(l,null))}function gce(t){let{gen:e,schema:n,data:r}=t;Si(t,"[");let l=e.let("i",0);e.assign(r,(0,ze._)`[]`),yy(t,"]",()=>{let i=e.let("el");F8({...t,schema:n.elements,data:i}),e.assign((0,ze._)`${r}[${l}++]`,i)})}function yce(t){let{gen:e,schema:n,data:r}=t;Si(t,"{"),e.assign(r,(0,ze._)`{}`),yy(t,"}",()=>vce(t,n.values))}function yy(t,e,n){eL(t,e,n),Si(t,e)}function eL(t,e,n){let{gen:r}=t;r.for((0,ze._)`;${Ct.default.jsonPos}<${Ct.default.jsonLen} && ${M8(1)}!==${e};`,()=>{n(),s0(t,",",()=>r.break(),l)});function l(){s0(t,e,()=>{},Tu)}}function vce(t,e){let{gen:n}=t,r=n.let("key");Pa({...t,data:r}),Si(t,":"),nL(t,r,e)}function _ce(t){let{gen:e,data:n,schema:r}=t,{discriminator:l,mapping:i}=r;Si(t,"{"),e.assign(n,(0,ze._)`{}`);let s=e.const("pos",Ct.default.jsonPos),a=e.let("value"),o=e.let("tag");eL(t,"}",()=>{let c=e.let("key");Pa({...t,data:c}),Si(t,":"),e.if((0,ze._)`${c} === ${l}`,()=>{Pa({...t,data:o}),e.assign((0,ze._)`${n}[${c}]`,o),e.break()},()=>vy({...t,data:a}))}),e.assign(Ct.default.jsonPos,s),e.if((0,ze._)`${o} === undefined`),E3(t,(0,ze.str)`discriminator tag not found`);for(let c in i)e.elseIf((0,ze._)`${o} === ${c}`),tL({...t,schema:i[c]},l);e.else(),E3(t,(0,ze.str)`discriminator value not in schema`),e.endIf()}function WD(t){let{gen:e,data:n}=t;Si(t,"{"),e.assign(n,(0,ze._)`{}`),tL(t)}function tL(t,e){let{gen:n,schema:r,data:l}=t,{properties:i,optionalProperties:s,additionalProperties:a}=r;if(yy(t,"}",()=>{let o=n.let("key");if(Pa({...t,data:o}),Si(t,":"),n.if(!1),KD(t,o,i),KD(t,o,s),e){n.elseIf((0,ze._)`${o} === ${e}`);let c=n.let("tag");Pa({...t,data:c})}n.else(),a?vy({...t,data:(0,ze._)`${l}[${o}]`}):E3(t,(0,ze.str)`property ${o} not allowed`),n.endIf()}),i){let o=(0,oce.hasPropFunc)(n),c=(0,ze.and)(...Object.keys(i).map(f=>(0,ze._)`${o}.call(${l}, ${f})`));n.if((0,ze.not)(c),()=>E3(t,(0,ze.str)`missing required properties`))}}function KD(t,e,n={}){let{gen:r}=t;for(let l in n)r.elseIf((0,ze._)`${e} === ${l}`),nL(t,e,n[l])}function nL(t,e,n){F8({...t,schema:n,data:(0,ze._)`${t.data}[${e}]`})}function Ece(t){let{gen:e,schema:n,data:r,self:l}=t;switch(n.type){case"boolean":hce(t);break;case"string":Pa(t);break;case"timestamp":{Pa(t);let i=(0,QD.useFunc)(e,fce.default),{allowDate:s,parseDate:a}=l.opts,o=s?(0,ze._)`!${i}(${r}, true)`:(0,ze._)`!${i}(${r})`,c=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function TL(t){return t[Symbol.for("fastify.display-name")]}function SL(t){return!!t[Symbol.for("skip-override")]}function xL(t){let e=u0(t);if(!e)return;let n=e.dependencies;n&&(ky(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{ky(this[Py].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function AL(t){let e=u0(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&Cy(this,"Fastify",n.fastify,r),n.reply&&Cy(this,"Reply",n.reply,r),n.request&&Cy(this,"Request",n.request,r))}var Zce={Fastify:Gce,Request:Wce,Reply:Xce};function Cy(t,e,n,r){ky(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(l=>{let i=typeof r=="string"?` required by '${r}'`:"";if(!Zce[e].call(t,l))throw new Yce(l,i,e)})}function e6e(t){let e=u0(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&Iy.gt(this.version,Iy.coerce(n))===!0)&&n&&Iy.satisfies(this.version,n,{includePrerelease:r})===!1)throw new Kce(e.name,n,this.version)}function t6e(t){let e=u0(t);if(!e)return;let n=e.name;if(n)return this[Py].push(n),n}function n6e(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&Jce(e||"anonymous")}function r6e(t){let e=t6e.call(this,t)||bL(t);return n6e.call(this,t,e),e6e.call(this,t),AL.call(this,t),xL.call(this,t),SL(t)}Dy.exports={getPluginName:bL,getFuncPreview:Qce,kRegisteredPlugins:Py,getDisplayName:TL,registerPlugin:r6e};Dy.exports[zce]={shouldSkipOverride:SL,getMeta:u0,checkDecorators:AL,checkDependencies:xL}});var j8=C((Jxe,wL)=>{"use strict";function l6e(t,e){let n=e||s6e();return t?a6e(t,n):n}function i6e(t,e){return t.genReqId(e)}function s6e(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function a6e(t,e){return function(n){return n.headers[t]||e(n)}}wL.exports={getGenReqId:i6e,reqIdGenFactory:l6e}});var IL=C((Qxe,NL)=>{"use strict";var RL=12,o6e=0,Fy=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function u6e(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",l=0,i=0,s=e,a=RL;e>-1&&e<n;){var o=OL(t[e+1],4),c=OL(t[e+2],0),f=o|c,p=Fy[f];if(a=Fy[256+a+p],i=i<<6|f&Fy[364+p],a===RL)r+=t.slice(l,s),r+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(i&1023)),i=0,l=e+3,e=s=t.indexOf("%",l);else{if(a===o6e)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(l)}var c6e={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function OL(t,e){var n=c6e[t];return n===void 0?255:n<<e}NL.exports=u6e});var LL=C((Zxe,DL)=>{"use strict";var CL=IL(),kL=/\+/g,PL=function(){};PL.prototype=Object.create(null);function f6e(t){let e=new PL;if(typeof t!="string")return e;let n=t.length,r="",l="",i=-1,s=-1,a=!1,o=!1,c=!1,f=!1,p=!1,m=0;for(let h=0;h<n+1;h++)if(m=h!==n?t.charCodeAt(h):38,m===38){if(p=s>i,p||(s=h),r=t.slice(i+1,s),p||r.length>0){c&&(r=r.replace(kL," ")),a&&(r=CL(r)||r),p&&(l=t.slice(s+1,h),f&&(l=l.replace(kL," ")),o&&(l=CL(l)||l));let g=e[r];g===void 0?e[r]=l:g.pop?g.push(l):e[r]=[g,l]}l="",i=h,s=h,a=!1,o=!1,c=!1,f=!1}else m===61?s<=i?s=h:o=!0:m===43?s>i?f=!0:c=!0:m===37&&(s>i?o=!0:a=!0);return e}DL.exports=f6e});var ML=C((eAe,FL)=>{var xi=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),p6e=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function d6e(t){let e=t.length;if(e===0)return"";let n="",r=0,l=0;e:for(;l<e;l++){let i=t.charCodeAt(l);for(;i<128;){if(p6e[i]!==1&&(r<l&&(n+=t.slice(r,l)),r=l+1,n+=xi[i]),++l===e)break e;i=t.charCodeAt(l)}if(r<l&&(n+=t.slice(r,l)),i<2048){r=l+1,n+=xi[192|i>>6]+xi[128|i&63];continue}if(i<55296||i>=57344){r=l+1,n+=xi[224|i>>12]+xi[128|i>>6&63]+xi[128|i&63];continue}if(++l,l>=e)throw new Error("URI malformed");let s=t.charCodeAt(l)&1023;r=l+1,i=65536+((i&1023)<<10|s),n+=xi[240|i>>18]+xi[128|i>>12&63]+xi[128|i>>6&63]+xi[128|i&63]}return r===0?t:r<e?n+t.slice(r):n}FL.exports={encodeString:d6e}});var UL=C((tAe,jL)=>{"use Line truncated
`),i}_o.exports=ey;_o.exports.default=ey;_o.exports.build=ey;_o.exports.validLargeArrayMechanisms=dD;_o.exports.restore=function({code:n,validator:e,serializer:l}){return Function.apply(null,["validator","serializer",n]).apply(null,[e,l])}});var SD=C((Qxe,ny)=>{"use strict";var J1e=ly();function TD(n={readMode:!0}){if(n.readMode===!0&&typeof n.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(n.readMode!==!0&&typeof n.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(n.readMode===!0)return function(){return function(t){return n.restoreFunction(t)}};let e=J1e();return function(t,r={}){r.mode="standalone";let i=e(t,r);return function(s){let u=i(s);return n.storeFunction(s,u),new Function(u)}}}ny.exports=TD;ny.exports.default=TD});var ly=C((Zxe,r1)=>{"use strict";var Q1e=bD();function ty(){return function(e,l){let t=Object.assign({},l,{schema:e});return Z1e.bind(null,t)}}function Z1e(n,{schema:e}){return n.schema&&e.$id&&n.schema[e.$id]&&(n.schema={...n.schema},delete n.schema[e.$id]),Q1e(e,n)}r1.exports=ty;r1.exports.default=ty;r1.exports.SerializerSelector=ty;r1.exports.StandaloneSerializer=SD()});var gi=C(i1=>{"use strict";Object.defineProperty(i1,"__esModule",{value:!0});i1.checkMetadata=void 0;var e5e=En(),n5e={keyword:"metadata",schemaType:"object",code(n){xD(n);let{gen:e,schema:l,it:t}=n;if((0,e5e.alwaysValidSchema)(t,l))return;let r=e.name("valid");n.subschema({keyword:"metadata",jtdMetadata:!0},r),n.ok(r)}};function xD({it:n,keyword:e},l){if(n.jtdMetadata!==l)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}i1.checkMetadata=xD;i1.default=n5e});var F9=C(u1=>{"use strict";Object.defineProperty(u1,"__esModule",{value:!0});u1.hasRef=void 0;var AD=Su(),s1=Ze(),l5e=Yi(),wD=_3(),OD=Xh(),t5e=gi(),r5e={keyword:"ref",schemaType:"string",code(n){(0,t5e.checkMetadata)(n);let{gen:e,data:l,schema:t,parentSchema:r,it:i}=n,{schemaEnv:{root:s}}=i,u=e.name("valid");r.nullable?(e.var(u,(0,s1._)`${l} === null`),e.if((0,s1.not)(u),a)):(e.var(u,!1),a()),n.ok(u);function a(){var p;let m=(p=s.schema.definitions)===null||p===void 0?void 0:p[t];if(!m)throw new l5e.default(i.opts.uriResolver,"",t,`No definition ${t}`);ry(m)||!i.opts.inlineRefs?c(m):f(m)}function c(p){let m=AD.compileSchema.call(i.self,new AD.SchemaEnv({schema:p,root:s,schemaPath:`/definitions/${t}`})),h=(0,OD.getValidate)(n,m),g=e.const("_errs",wD.default.errors);(0,OD.callRef)(n,h,m,m.$async),e.assign(u,(0,s1._)`${g} === ${wD.default.errors}`)}function f(p){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:p,code:(0,s1.stringify)(p)}:{ref:p});n.subschema({schema:p,dataTypes:[],schemaPath:s1.nil,topSchemaRef:m,errSchemaPath:`/definitions/${t}`},u)}}};function ry(n){for(let e in n){let l;if(e==="ref"||typeof(l=n[e])=="object"&&ry(l))return!0}return!1}u1.hasRef=ry;u1.default=r5e});var sy=C(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});var i5e=/t|\s/i,s5e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,u5e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,a5e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function ND(n,e){let l=n.split(i5e);return l.length===2&&RD(l[0])&&o5e(l[1])||e&&l.length===1&&RD(l[0])}iy.default=ND;function RD(n){let e=s5e.exec(n);if(!e)return!1;let l=+e[1],t=+e[2],r=+e[3];return t>=1&&t<=12&&r>=1&&(r<=a5e[t]||t===2&&r===29&&(l%100===0?l%400===0:l%4===0))}function o5e(n){let e=u5e.exec(n);if(!e)return!1;let l=+e[1],t=+e[2],r=+e[3],i=+(e[4]||0),s=+(e[5]||0);return l<=23&&t<=59&&r<=59||l-i===23&&t-s===59&&r===60}ND.code='require("ajv/dist/runtime/timestamp").default'});var Eo=C(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.typeErrorParams=ns.typeErrorMessage=ns.typeError=void 0;var c5e=Ze();function f5e(n){return{message:e=>ID(e,n),params:e=>CD(e,n)}}ns.typeError=f5e;function ID({parentSchema:n},e){return n?.nullable?`must be ${e} or null`:`must be ${e}`}ns.typeErrorMessage=ID;function CD({parentSchema:n},e){return(0,c5e._)`{type: ${e}, nullable: ${!!n?.nullable}}`}ns.typeErrorParams=CD});var uy=C(bo=>{"use strict";Object.defineProperty(bo,"__esModule",{value:!0});bo.intRange=void 0;var n3=Ze(),p5e=sy(),d5e=En(),h5e=gi(),kD=Eo();bo.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var m5e={message:n=>(0,kD.typeErrorMessage)(n,n.schema),params:n=>(0,kD.typeErrorParams)(n,n.schema)};function g5e(n){let{gen:e,data:l,it:t}=n,{timestamp:r,allowDate:i}=t.opts;if(r==="date")return(0,n3._)`${l} instanceof Date `;let s=(0,d5e.useFunc)(e,p5e.default),u=i?(0,n3._)`, true`:n3.nil,a=(0,n3._)`typeof ${l} == "string" && ${s}(${l}${u})`;return r==="string"?a:(0,n3.or)((0,n3._)`${l} instanceof Date`,a)}var y5e={keyword:"type",schemaType:"string",error:m5e,code(n){(0,h5e.checkMetadata)(n);let{data:e,schema:l,parentSchema:t,it:r}=n,i;switch(l){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},w6e=97,O6e=48;function rs(n,e){let l="",t;for(rs.message=void 0;t=n[e++],t!=='"';)if(t==="\\")if(t=n[e],t in sL)l+=sL[t],e++;else if(t==="u"){e++;let i=4,s=0;for(;i--;){if(s<<=4,t=n[e],t===void 0){r("unexpected end");return}if(t=t.toLowerCase(),t>="a"&&t<="f")s+=t.charCodeAt(0)-w6e+10;else if(t>="0"&&t<="9")s+=t.charCodeAt(0)-O6e;else{r(`unexpected token ${t}`);return}e++}l+=String.fromCharCode(s)}else{r(`unexpected token ${t}`);return}else if(t===void 0){r("unexpected end");return}else if(t.charCodeAt(0)>=32)l+=t;else{r(`unexpected token ${t}`);return}return rs.position=e,l;function r(i){rs.position=e,rs.message=i}}is.parseJsonString=rs;rs.message=void 0;rs.position=0;rs.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var vL=C(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});var R6e=vy(),fL=Su(),ze=Ze(),N6e=Yi(),kn=_3(),I6e=Kt(),C6e=F9(),k6e=uy(),Ay=uL(),pL=En(),P6e=sy(),D6e={elements:$6e,values:j6e,discriminator:B6e,properties:aL,optionalProperties:aL,enum:q6e,type:H6e,ref:V6e};function dL(n,e){let l=fL.getCompilingSchema.call(this,n);if(l)return l;let{es5:t,lines:r}=this.opts.code,{ownProperties:i}=this.opts,s=new ze.CodeGen(this.scope,{es5:t,lines:r,ownProperties:i}),u=s.scopeName("parse"),a={self:this,gen:s,schema:n.schema,schemaEnv:n,definitions:e,data:kn.default.data,parseName:u,char:s.name("c")},c;try{this._compilations.add(n),n.parseName=u,L6e(a),s.optimize(this.opts.code.optimize);let f=s.toString();c=`${s.scopeRefs(kn.default.scope)}return ${f}`;let m=new Function(`${kn.default.scope}`,c)(this.scope.get());this.scope.value(u,{ref:m}),n.parse=m}catch(f){throw c&&this.logger.error("Error compiling parser, function code:",c),delete n.parse,delete n.parseName,f}finally{this._compilations.delete(n)}return n}Iy.default=dL;var xy=(0,ze._)`undefined`;function L6e(n){let{gen:e,parseName:l,char:t}=n;e.func(l,(0,ze._)`${kn.default.json}, ${kn.default.jsonPos}, ${kn.default.jsonPart}`,!1,()=>{e.let(kn.default.data),e.let(t),e.assign((0,ze._)`${l}.message`,xy),e.assign((0,ze._)`${l}.position`,xy),e.assign(kn.default.jsonPos,(0,ze._)`${kn.default.jsonPos} || 0`),e.const(kn.default.jsonLen,(0,ze._)`${kn.default.json}.length`),B9(n),Ny(n),e.if(kn.default.jsonPart,()=>{e.assign((0,ze._)`${l}.position`,kn.default.jsonPos),e.return(kn.default.data)}),e.if((0,ze._)`${kn.default.jsonPos} === ${kn.default.jsonLen}`,()=>e.return(kn.default.data)),Ao(n)})}function B9(n){let e;for(let l of R6e.jtdForms)if(l in n.schema){e=l;break}e?M6e(n,D6e[e]):Oy(n)}var F6e=cL(!0,cL(!1,Ao));function M6e(n,e){let{gen:l,schema:t,data:r}=n;if(!t.nullable)return e(n);c1(n,"null",e,()=>l.assign(r,null))}function $6e(n){let{gen:e,schema:l,data:t}=n;xr(n,"[");let r=e.let("i",0);e.assign(t,(0,ze._)`[]`),wy(n,"]",()=>{let i=e.let("el");B9({...n,schema:l.elements,data:i}),e.assign((0,ze._)`${t}[${r}++]`,i)})}function j6e(n){let{gen:e,schema:l,data:t}=n;xr(n,"{"),e.assign(t,(0,ze._)`{}`),wy(n,"}",()=>U6e(n,l.values))}function wy(n,e,l){hL(n,e,l),xr(n,e)}function hL(n,e,l){let{gen:t}=n;t.for((0,ze._)`;${kn.default.jsonPos}<${kn.default.jsonLen} && ${H9(1)}!==${e};`,()=>{l(),c1(n,",",()=>t.break(),r)});function r(){c1(n,e,()=>{},Ao)}}function U6e(n,e){let{gen:l}=n,t=l.let("key");Lu({...n,data:t}),xr(n,":"),gL(n,t,e)}function B6e(n){let{gen:e,data:l,schema:t}=n,{discriminator:r,mapping:i}=t;xr(n,"{"),e.assign(l,(0,ze._)`{}`);let s=e.const("pos",kn.default.jsonPos),u=e.let("value"),a=e.let("tag");hL(n,"}",()=>{let c=e.let("key");Lu({...n,data:c}),xr(n,":"),e.if((0,ze._)`${c} === ${r}`,()=>{Lu({...n,data:a}),e.assign((0,ze._)`${l}[${c}]`,a),e.break()},()=>Oy({...n,data:u}))}),e.assign(kn.default.jsonPos,s),e.if((0,ze._)`${a} === undefined`),bi(n,(0,ze.str)`discriminator tag not found`);for(let c in i)e.elseIf((0,ze._)`${a} === ${c}`),mL({...n,schema:i[c]},r);e.else(),bi(n,(0,ze.str)`discriminator value not in schema`),e.endIf()}function aL(n){let{gen:e,data:l}=n;xr(n,"{"),e.assign(l,(0,ze._)`{}`),mL(n)}function mL(n,e){let{gen:l,schema:t,data:r}=n,{properties:i,optionalProperties:s,additionalProperties:u}=t;if(wy(n,"}",()=>{let a=l.let("key");if(Lu({...n,data:a}),xr(n,":"),l.if(!1),oL(n,a,i),oL(n,a,s),e){l.elseIf((0,ze._)`${a} === ${e}`);let c=l.let("tag");Lu({...n,data:c})}l.else(),u?Oy({...n,data:(0,ze._)`${r}[${a}]`}):bi(n,(0,ze.str)`property ${a} not allowed`),l.endIf()}),i){let a=(0,I6e.hasPropFunc)(l),c=(0,ze.and)(...Object.keys(i).map(f=>(0,ze._)`${a}.call(${r}, ${f})`));l.if((0,ze.not)(c),()=>bi(n,(0,ze.str)`missing required properties`))}}function oL(n,e,l={}){let{gen:t}=n;for(let r in l)t.elseIf((0,ze._)`${e} === ${r}`),gL(n,e,l[r])}function gL(n,e,l){B9({...n,schema:l,data:(0,ze._)`${n.data}[${e}]`})}function H6e(n){let{gen:e,schema:l,data:t,self:r}=n;switch(l.type){case"boolean":F6e(n);break;case"string":Lu(n);break;case"timestamp":{Lu(n);let i=(0,pL.useFunc)(e,P6e.default),{allowDate:s,parseDate:u}=r.opts,a=s?(0,ze._)`!${i}(${t}, true)`:(0,ze._)`!${i}(${t})`,c=u? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function FL(n){return n[Symbol.for("fastify.display-name")]}function ML(n){return!!n[Symbol.for("skip-override")]}function $L(n){let e=d1(n);if(!e)return;let l=e.dependencies;l&&(By(Array.isArray(l),"The dependencies should be an array of strings"),l.forEach(t=>{By(this[Hy].indexOf(t)>-1,`The dependency '${t}' of plugin '${e.name}' is not registered`)}))}function jL(n){let e=d1(n);if(!e)return;let{decorators:l,name:t}=e;l&&(l.fastify&&Uy(this,"Fastify",l.fastify,t),l.reply&&Uy(this,"Reply",l.reply,t),l.request&&Uy(this,"Request",l.request,t))}var b8e={Fastify:h8e,Request:g8e,Reply:m8e};function Uy(n,e,l,t){By(Array.isArray(l),"The decorators should be an array of strings"),l.forEach(r=>{let i=typeof t=="string"?` required by '${t}'`:"";if(!b8e[e].call(n,r))throw new v8e(r,i,e)})}function T8e(n){let e=d1(n);if(!e)return;let l=e.fastify,t=/-rc.+$/.test(this.version);if(!(t===!0&&jy.gt(this.version,jy.coerce(l))===!0)&&l&&jy.satisfies(this.version,l,{includePrerelease:t})===!1)throw new y8e(e.name,l,this.version)}function S8e(n){let e=d1(n);if(!e)return;let l=e.name;if(l)return this[Hy].push(l),l}function x8e(n,e){n.constructor.name==="AsyncFunction"&&n.length===3&&_8e(e||"anonymous")}function A8e(n){let e=S8e.call(this,n)||LL(n);return x8e.call(this,n,e),T8e.call(this,n),jL.call(this,n),$L.call(this,n),ML(n)}qy.exports={getPluginName:LL,getFuncPreview:E8e,kRegisteredPlugins:Hy,getDisplayName:FL,registerPlugin:A8e};qy.exports[d8e]={shouldSkipOverride:ML,getMeta:d1,checkDecorators:jL,checkDependencies:$L}});var V9=C((OAe,UL)=>{"use strict";function w8e(n,e){let l=e||R8e();return n?N8e(n,l):l}function O8e(n,e){return n.genReqId(e)}function R8e(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function N8e(n,e){return function(l){return l.headers[n]||e(l)}}UL.exports={getGenReqId:O8e,reqIdGenFactory:w8e}});var VL=C((RAe,qL)=>{"use strict";var BL=12,I8e=0,zy=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function C8e(n){var e=n.indexOf("%");if(e===-1)return n;for(var l=n.length,t="",r=0,i=0,s=e,u=BL;e>-1&&e<l;){var a=HL(n[e+1],4),c=HL(n[e+2],0),f=a|c,p=zy[f];if(u=zy[256+u+p],i=i<<6|f&zy[364+p],u===BL)t+=n.slice(r,s),t+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(i&1023)),i=0,r=e+3,e=s=n.indexOf("%",r);else{if(u===I8e)return null;if(e+=3,e<l&&n.charCodeAt(e)===37)continue;return null}}return t+n.slice(r)}var k8e={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function HL(n,e){var l=k8e[n];return l===void 0?255:l<<e}qL.exports=C8e});var KL=C((NAe,WL)=>{"use strict";var zL=VL(),GL=/\+/g,XL=function(){};XL.prototype=Object.create(null);function P8e(n){let e=new XL;if(typeof n!="string")return e;let l=n.length,t="",r="",i=-1,s=-1,u=!1,a=!1,c=!1,f=!1,p=!1,m=0;for(let h=0;h<l+1;h++)if(m=h!==l?n.charCodeAt(h):38,m===38){if(p=s>i,p||(s=h),t=n.slice(i+1,s),p||t.length>0){c&&(t=t.replace(GL," ")),u&&(t=zL(t)||t),p&&(r=n.slice(s+1,h),f&&(r=r.replace(GL," ")),a&&(r=zL(r)||r));let g=e[t];g===void 0?e[t]=r:g.pop?g.push(r):e[t]=[g,r]}r="",i=h,s=h,u=!1,a=!1,c=!1,f=!1}else m===61?s<=i?s=h:a=!0:m===43?s>i?f=!0:c=!0:m===37&&(s>i?a=!0:u=!0);return e}WL.exports=P8e});var JL=C((IAe,YL)=>{var Ar=Array.from({length:256},(n,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),D8e=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function L8e(n){let e=n.length;if(e===0)return"";let l="",t=0,r=0;e:for(;r<e;r++){let i=n.charCodeAt(r);for(;i<128;){if(D8e[i]!==1&&(t<r&&(l+=n.slice(t,r)),t=r+1,l+=Ar[i]),++r===e)break e;i=n.charCodeAt(r)}if(t<r&&(l+=n.slice(t,r)),i<2048){t=r+1,l+=Ar[192|i>>6]+Ar[128|i&63];continue}if(i<55296||i>=57344){t=r+1,l+=Ar[224|i>>12]+Ar[128|i>>6&63]+Ar[128|i&63];continue}if(++r,r>=e)throw new Error("URI malformed");let s=n.charCodeAt(r)&1023;t=r+1,i=65536+((i&1023)<<10|s),l+=Ar[240|i>>18]+Ar[128|i>>12&63]+Ar[128|i>>6&63]+Ar[128|i&63]}return t===0?n:t<e?l+n.slice(t):l}YL.exports={encodeString:L8e}});var eF=C((CAe,ZL)=>{"use Line truncated
`).join(`
`+e+c);n+=e+o+i+p+`
`,n+=iF(s,e+c)}return n}function E6e(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function sF(t){return Array.isArray(t)?t.map(e=>sF(e)):typeof t=="symbol"?t.toString():typeof t=="function"?E6e(t):t}function b6e(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},l=e.includeMeta;Array.isArray(l)||(l=Reflect.ownKeys(n));for(let i of l){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let s=i.toString(),a=n[i];if(a!=null){let o=JSON.stringify(sF(a));r[s]=o}}return r}function T6e(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function S6e(t){let e={...t.opts.constraints},n=e[rF.name];return delete e[rF.name],{...t,method:n,opts:{constraints:e}}}function x6e(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=T6e(t.metaData),e}function A6e(t){return t.reduce((e,n)=>{for(let r of e)if(nF(n.opts.constraints,r.opts.constraints)&&nF(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function w6e(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(S6e)),r=r.map(l=>(l.metaData=b6e(l,n),l)),n.method===void 0&&(r=A6e(r)),r.map(x6e).join(`
${e}`)}function q8(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[lF]=w6e(t,n,r)),n=""),t.staticChildren)for(let l of Object.values(t.staticChildren))q8(l,e,n+l.prefix,r);if(t.parametricChildren)for(let l of Object.values(t.parametricChildren)){let i=Array.from(l.nodePaths).join("|");q8(l,e,n+i,r)}t.wildcardChild&&q8(t.wildcardChild,e,"*",r)}function R6e(t,e){let n={};return q8(t,n,t.prefix,e),iF(n)}aF.exports={prettyPrintTree:R6e}});var cF=C((fAe,uF)=>{"use strict";var O6e=H8(),By=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,n){let r=n.params,l=n.opts.constraints||{},i={params:r,constraints:l,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},s=Object.keys(l);s.length===0&&(this.unconstrainedHandler=i);for(let o of s)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=s.includes(O6e.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(i),this.handlers.sort((o,c)=>Object.keys(o.constraints).length-Object.keys(c.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,l)}_compileCreateParamsObject(e){let n=[];for(let r=0;r<e.length;r++)n.push(`'${e[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let r=0;r<this.handlers.length;r++){let i=this.handlers[r].constraints[n];if(i!==void 0){let s=e.get(i)||0;s|=1<<r,e.set(i,s)}}}_constrainedIndexBitmask(e){let n=0;for(let r=0;r<this.handlers.length;r++)this.handlers[r].constraints[e]!==void 0&&(n|=1<<r);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let r of this.constraints){let l=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=l,this._buildConstraintStore(l,r)}let n=[];n.push(`
`+e+c);l+=e+a+i+p+`
`,l+=_F(s,e+c)}return l}function H8e(n){let e=n.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function EF(n){return Array.isArray(n)?n.map(e=>EF(e)):typeof n=="symbol"?n.toString():typeof n=="function"?H8e(n):n}function q8e(n,e){if(!e.includeMeta)return{};let l=e.buildPrettyMeta(n),t={},r=e.includeMeta;Array.isArray(r)||(r=Reflect.ownKeys(l));for(let i of r){if(!Object.prototype.hasOwnProperty.call(l,i))continue;let s=i.toString(),u=l[i];if(u!=null){let a=JSON.stringify(EF(u));t[s]=a}}return t}function V8e(n){let e="";for(let[l,t]of Object.entries(n))e+=`
\u2022 (${l}) ${t}`;return e}function z8e(n){let e={...n.opts.constraints},l=e[yF.name];return delete e[yF.name],{...n,method:l,opts:{constraints:e}}}function G8e(n){let e=` (${n.method})`,l=n.opts.constraints||{};return Object.keys(l).length!==0&&(e+=" "+JSON.stringify(l)),e+=V8e(n.metaData),e}function X8e(n){return n.reduce((e,l)=>{for(let t of e)if(gF(l.opts.constraints,t.opts.constraints)&&gF(l.metaData,t.metaData))return t.method+=", "+l.method,e;return e.push(l),e},[])}function W8e(n,e,l){let t=n.routes;return l.method===void 0&&(t=t.map(z8e)),t=t.map(r=>(r.metaData=q8e(r,l),r)),l.method===void 0&&(t=X8e(t)),t.map(G8e).join(`
${e}`)}function W9(n,e,l,t){if((n.isLeafNode||t.commonPrefix!==!1)&&(l=l||"(empty root node)",e=e[l]={},n.isLeafNode&&(e[vF]=W8e(n,l,t)),l=""),n.staticChildren)for(let r of Object.values(n.staticChildren))W9(r,e,l+r.prefix,t);if(n.parametricChildren)for(let r of Object.values(n.parametricChildren)){let i=Array.from(r.nodePaths).join("|");W9(r,e,l+i,t)}n.wildcardChild&&W9(n.wildcardChild,e,"*",t)}function K8e(n,e){let l={};return W9(n,l,n.prefix,e),_F(l)}bF.exports={prettyPrintTree:K8e}});var xF=C((BAe,SF)=>{"use strict";var Y8e=X9(),Yy=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,l){let t=l.params,r=l.opts.constraints||{},i={params:t,constraints:r,handler:l.handler,store:l.store||null,_createParamsObject:this._compileCreateParamsObject(t)},s=Object.keys(r);s.length===0&&(this.unconstrainedHandler=i);for(let a of s)this.constraints.includes(a)||(a==="version"?this.constraints.unshift(a):this.constraints.push(a));let u=s.includes(Y8e.name);if(!u&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(i),this.handlers.sort((a,c)=>Object.keys(a.constraints).length-Object.keys(c.constraints).length),u||this._compileGetHandlerMatchingConstraints(e,r)}_compileCreateParamsObject(e){let l=[];for(let t=0;t<e.length;t++)l.push(`'${e[t]}': paramsArray[${t}]`);return new Function("paramsArray",`return {${l.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,l){for(let t=0;t<this.handlers.length;t++){let i=this.handlers[t].constraints[l];if(i!==void 0){let s=e.get(i)||0;s|=1<<t,e.set(i,s)}}}_constrainedIndexBitmask(e){let l=0;for(let t=0;t<this.handlers.length;t++)this.handlers[t].constraints[e]!==void 0&&(l|=1<<t);return~l}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let t of this.constraints){let r=e.newStoreForConstraint(t);this.constrainedHandlerStores[t]=r,this._buildConstraintStore(r,t)}let l=[];l.push(`
let candidates = ${(1<<this.handlers.length)-1}
let mask, matches
`);for(let r of this.constraints){n.push(`
mask = ${this._constrainedIndexBitmask(r)}
value = derivedConstraints.${r}
`);let i=e.strategies[r].mustMatchWhenDerived?"matches":"(matches | mask)";n.push(`
`);for(let t of this.constraints){l.push(`
mask = ${this._constrainedIndexBitmask(t)}
value = derivedConstraints.${t}
`);let i=e.strategies[t].mustMatchWhenDerived?"matches":"(matches | mask)";l.push(`
if (value === undefined) {
candidates &= mask
} else {
matches = this.constrainedHandlerStores.${r}.get(value) || 0
matches = this.constrainedHandlerStores.${t}.get(value) || 0
candidates &= ${i}
}
if (candidates === 0) return null;
`)}for(let r in e.strategies)e.strategies[r].mustMatchWhenDerived&&!this.constraints.includes(r)&&n.push(`if (derivedConstraints.${r} !== undefined) return null`);n.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",n.join(`
`))}};uF.exports=By});var pF=C((pAe,fF)=>{"use strict";var N6e=cF(),K8={STATIC:0,PARAMETRIC:1,WILDCARD:2},V8=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,n){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new N6e),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},z8=class extends V8{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let r=this.staticChildren[e.charAt(n)];return r===void 0||!r.matchPrefix(e,n)?null:r}getStaticChild(e,n=0){if(e.length===n)return this;let r=this.findStaticMatchingChild(e,n);return r?r.getStaticChild(e,n+r.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let l=1;for(;l<n.prefix.length;l++)if(e.charCodeAt(l)!==n.prefix.charCodeAt(l)){n=n.split(this,l);break}return n.createStaticChild(e.slice(l))}let r=e.charAt(0);return this.staticChildren[r]=new G8(e),this.staticChildren[r]}},G8=class t extends z8{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=K8.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,r=this.parametricChildren.find(l=>(l.regex&&l.regex.source)===n);return r||null}createParametricChild(e,n,r){let l=this.getParametricChild(e);return l?(l.nodePaths.add(r),l):(l=new X8(e,n,r),this.parametricChildren.push(l),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),l)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new W8,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),l=this.prefix.slice(n);this.prefix=l,this._compilePrefixMatch();let i=new t(r);return i.staticChildren[l.charAt(0)]=this,e.staticChildren[r.charAt(0)]=i,i}getNextNode(e,n,r,l){let i=this.findStaticMatchingChild(e,n),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)r.push({paramsCount:l,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let r=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},X8=class extends z8{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=K8.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},W8=class extends V8{constructor(){super(),this.kind=K8.WILDCARD}getNextNode(){return null}};fF.exports={StaticNode:G8,ParametricNode:X8,WildcardNode:W8,NODE_TYPES:K8}});var hF=C((dAe,dF)=>{"use strict";var I6e=require("assert");function h0(){if(!(this instanceof h0))return new h0;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}h0.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,r,l]=t.split(".");return n=Number(n)||0,r=Number(r)||0,l=Number(l)||0,n>=this.maxMajor&&(this.maxMajor=n,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),r>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=r,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),l>=(this.store[`${n}.${r}`]||0)&&(this.maxPatches[`${n}.${r}`]=l,this.store[`${n}.${r}.x`]=e),this.store[`${n}.${r}.${l}`]=e,this};h0.prototype.get=function(t){return this.store[t]};dF.exports={name:"version",mustMatchWhenDerived:!0,storage:h0,validate(t){I6e(typeof t=="string","Version should be a string")}}});var gF=C((hAe,mF)=>{"use strict";var C6e=require("assert");function k6e(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for(let l of e)if(l.host.test(n))return l.value},set:(n,r)=>{n instanceof RegExp?e.push({host:n,value:r}):t[n]=r}}}mF.exports={name:"host",mustMatchWhenDerived:!1,storage:k6e,validate(t){C6e(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var vF=C((mAe,yF)=>{"use strict";var P6e=hF(),D6e=gF(),Hy=require("assert"),qy=class{constructor(e){if(this.strategies={version:P6e,host:D6e},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(Hy(typeof e.name=="string"&&e.name!=="","strategy.name is required."),Hy(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};yF.exports=qy});var EF=C((gAe,_F)=>{"use strict";var L6e=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];_F.exports=L6e});var SF=C((yAe,TF)=>{"use strict";function bF(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function F6e(t,e){let n=!1,r=!1,l="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let o=t.charCodeAt(s+1),c=t.charCodeAt(s+2);bF(o,c)===null?n=!0:(r=!0,o===50&&c===53&&(n=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(a===63||a===35||a===59&&e){l=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:l,shouldDecodeParam:r}}function M6e(t){let e=t.indexOf("%");if(e===-1)return t;let n="",r=e;for(let l=e;l<t.length;l++)if(t.charCodeAt(l)===37){let i=t.charCodeAt(l+1),s=t.charCodeAt(l+2),a=bF(i,s);n+=t.slice(r,l)+a,r=l+3}return t.slice(0,e)+n+t.slice(r)}TF.exports={safeDecodeURI:F6e,safeDecodeURIComponent:M6e}});var Ky=C((vAe,IF)=>{"use strict";var ur=require("assert"),$6e=VL(),Y8=eF(),Gy=Yo(),{prettyPrintTree:j6e}=oF(),{StaticNode:xF,NODE_TYPES:Vy}=pF(),U6e=vF(),Ou=EF(),zy=H8(),{safeDecodeURI:B6e,safeDecodeURIComponent:AF}=SF(),wF=/^https?:\/\/.*?\//,La=/(\/:[^/()]*?)\?(\/?)/;if(!Y8(wF))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!Y8(La))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function zn(t){if(!(this instanceof zn))return new zn(t);t=t||{},this._opts=t,t.defaultRoute?(ur(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(ur(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(ur(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=H6e,t.querystringParser?(ur(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:$6e.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new U6e(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}zn.prototype.on=function(e,n,r,l,i){typeof r=="function"&&(l!==void 0&&(i=l),l=r,r={}),ur(typeof n=="string","Path should be a string"),ur(n.length>0,"The path could not be empty"),ur(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),ur(typeof l=="function","Handler should be a function");let s=n.match(La);if(s){ur(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let c=n.replace(La,"$1$2"),f=n.replace(La,"$2");this.on(e,c,r,l,i),this.on(e,f,r,l,i);return}let a=n;this.ignoreDuplicateSlashes&&(n=Xy(n)),this.ignoreTrailingSlash&&(n=Wy(n));let o=Array.isArray(e)?e:[e];for(let c of o)ur(typeof c=="string","Method should be a string"),ur(Ou.includes(c),`Method '${c}' is not an http method.`),this._on(c,n,r,l,i,a)};zn.prototype._on=function(e,n,r,l,i){let s={};r.constraints!==void 0&&(ur(typeof r.constraints=="object"&&r.constraints!==null,"Constraints should be an object"),Object.keys(r.constraints).length!==0&&(s=r.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new xF("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new xF(""),this.trees[e].staticChildren["/"]=m}let o=this.trees[e],c=o.prefix.length,f=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let h=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,g=a.charCodeAt(m)===42;if(h||g||m===a.length&&m!==c){let _=a.slice(c,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),o=o.createStaticChild(_)}if(h){let _=!1,S=[],T=m+1;for(let x=T;;x++){let v=a.charCodeAt(x),b=v===40,w=v===45||v===46,N=v===47||x===a.length;if(b||w||N){let O=a.slice(T,x);if(f.push(O),_=_||b||w,b){let L=NF(a,x),Q=a.slice(x,L+1);this.allowUnsafeRegex||ur(Y8(new RegExp(Q)),`The regex '${Q}' is not safe!`),S.push(OF(Q)),x=L+1}else S.push("(.*?)");let k=x;for(;x<a.length;x++){let L=a.charCodeAt(x);if(L===47)break;if(L===58)if(a.charCodeAt(x+1)===58)x++;else break}let j=a.slice(k,x);if(j&&(j= Line truncated
`)}for(let t in e.strategies)e.strategies[t].mustMatchWhenDerived&&!this.constraints.includes(t)&&l.push(`if (derivedConstraints.${t} !== undefined) return null`);l.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",l.join(`
`))}};SF.exports=Yy});var wF=C((HAe,AF)=>{"use strict";var J8e=xF(),e7={STATIC:0,PARAMETRIC:1,WILDCARD:2},K9=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,l){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new J8e),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(l,e)}},Y9=class extends K9{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,l){let t=this.staticChildren[e.charAt(l)];return t===void 0||!t.matchPrefix(e,l)?null:t}getStaticChild(e,l=0){if(e.length===l)return this;let t=this.findStaticMatchingChild(e,l);return t?t.getStaticChild(e,l+t.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let l=this.staticChildren[e.charAt(0)];if(l){let r=1;for(;r<l.prefix.length;r++)if(e.charCodeAt(r)!==l.prefix.charCodeAt(r)){l=l.split(this,r);break}return l.createStaticChild(e.slice(r))}let t=e.charAt(0);return this.staticChildren[t]=new J9(e),this.staticChildren[t]}},J9=class n extends Y9{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=e7.STATIC,this._compilePrefixMatch()}getParametricChild(e){let l=e&&e.source,t=this.parametricChildren.find(r=>(r.regex&&r.regex.source)===l);return t||null}createParametricChild(e,l,t){let r=this.getParametricChild(e);return r?(r.nodePaths.add(t),r):(r=new Q9(e,l,t),this.parametricChildren.push(r),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),r)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new Z9,this.wildcardChild}split(e,l){let t=this.prefix.slice(0,l),r=this.prefix.slice(l);this.prefix=r,this._compilePrefixMatch();let i=new n(t);return i.staticChildren[r.charAt(0)]=this,e.staticChildren[t.charAt(0)]=i,i}getNextNode(e,l,t,r){let i=this.findStaticMatchingChild(e,l),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&t.push({paramsCount:r,brotherPathIndex:l,brotherNode:this.wildcardChild});for(let u=this.parametricChildren.length-1;u>=s;u--)t.push({paramsCount:r,brotherPathIndex:l,brotherNode:this.parametricChildren[u]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let l=1;l<this.prefix.length;l++){let t=this.prefix.charCodeAt(l);e.push(`path.charCodeAt(i + ${l}) === ${t}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},Q9=class extends Y9{constructor(e,l,t){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=l||null,this.kind=e7.PARAMETRIC,this.nodePaths=new Set([t])}getNextNode(e,l){return this.findStaticMatchingChild(e,l)}},Z9=class extends K9{constructor(){super(),this.kind=e7.WILDCARD}getNextNode(){return null}};AF.exports={StaticNode:J9,ParametricNode:Q9,WildcardNode:Z9,NODE_TYPES:e7}});var RF=C((qAe,OF)=>{"use strict";var Q8e=require("assert");function v1(){if(!(this instanceof v1))return new v1;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}v1.prototype.set=function(n,e){if(typeof n!="string")throw new TypeError("Version should be a string");let[l,t,r]=n.split(".");return l=Number(l)||0,t=Number(t)||0,r=Number(r)||0,l>=this.maxMajor&&(this.maxMajor=l,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),t>=(this.maxMinors[l]||0)&&(this.maxMinors[l]=t,this.store[`${l}.x`]=e,this.store[`${l}.x.x`]=e),r>=(this.store[`${l}.${t}`]||0)&&(this.maxPatches[`${l}.${t}`]=r,this.store[`${l}.${t}.x`]=e),this.store[`${l}.${t}.${r}`]=e,this};v1.prototype.get=function(n){return this.store[n]};OF.exports={name:"version",mustMatchWhenDerived:!0,storage:v1,validate(n){Q8e(typeof n=="string","Version should be a string")}}});var IF=C((VAe,NF)=>{"use strict";var Z8e=require("assert");function e9e(){let n={},e=[];return{get:l=>{let t=n[l];if(t)return t;for(let r of e)if(r.host.test(l))return r.value},set:(l,t)=>{l instanceof RegExp?e.push({host:l,value:t}):n[l]=t}}}NF.exports={name:"host",mustMatchWhenDerived:!1,storage:e9e,validate(n){Z8e(typeof n=="string"||Object.prototype.toString.call(n)==="[object RegExp]","Host should be a string or a RegExp")}}});var kF=C((zAe,CF)=>{"use strict";var n9e=RF(),l9e=IF(),Jy=require("assert"),Qy=class{constructor(e){if(this.strategies={version:n9e,host:l9e},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let l of Object.values(e))this.addConstraintStrategy(l)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let l=this.strategies[e];return l!==void 0?l.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(Jy(typeof e.name=="string"&&e.name!=="","strategy.name is required."),Jy(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};CF.exports=Qy});var DF=C((GAe,PF)=>{"use strict";var t9e=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];PF.exports=t9e});var MF=C((XAe,FF)=>{"use strict";function LF(n,e){return n===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:n===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:n===52&&e===48?"@":null}function r9e(n,e){let l=!1,t=!1,r="";for(let s=1;s<n.length;s++){let u=n.charCodeAt(s);if(u===37){let a=n.charCodeAt(s+1),c=n.charCodeAt(s+2);LF(a,c)===null?l=!0:(t=!0,a===50&&c===53&&(l=!0,n=n.slice(0,s+1)+"25"+n.slice(s+1),s+=2),s+=2)}else if(u===63||u===35||u===59&&e){r=n.slice(s+1),n=n.slice(0,s);break}}return{path:l?decodeURI(n):n,querystring:r,shouldDecodeParam:t}}function i9e(n){let e=n.indexOf("%");if(e===-1)return n;let l="",t=e;for(let r=e;r<n.length;r++)if(n.charCodeAt(r)===37){let i=n.charCodeAt(r+1),s=n.charCodeAt(r+2),u=LF(i,s);l+=n.slice(t,r)+u,t=r+3}return n.slice(0,e)+l+n.slice(t)}FF.exports={safeDecodeURI:r9e,safeDecodeURIComponent:i9e}});var rv=C((WAe,VF)=>{"use strict";var ft=require("assert"),s9e=rF(),n7=hF(),nv=Qa(),{prettyPrintTree:u9e}=TF(),{StaticNode:$F,NODE_TYPES:Zy}=wF(),a9e=kF(),Co=DF(),ev=X9(),{safeDecodeURI:o9e,safeDecodeURIComponent:jF}=MF(),UF=/^https?:\/\/.*?\//,Mu=/(\/:[^/()]*?)\?(\/?)/;if(!n7(UF))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!n7(Mu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Gl(n){if(!(this instanceof Gl))return new Gl(n);n=n||{},this._opts=n,n.defaultRoute?(ft(typeof n.defaultRoute=="function","The default route must be a function"),this.defaultRoute=n.defaultRoute):this.defaultRoute=null,n.onBadUrl?(ft(typeof n.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=n.onBadUrl):this.onBadUrl=null,n.buildPrettyMeta?(ft(typeof n.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=n.buildPrettyMeta):this.buildPrettyMeta=c9e,n.querystringParser?(ft(typeof n.querystringParser=="function","querystringParser must be a function"),this.querystringParser=n.querystringParser):this.querystringParser=e=>e===""?{}:s9e.parse(e),this.caseSensitive=n.caseSensitive===void 0?!0:n.caseSensitive,this.ignoreTrailingSlash=n.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=n.ignoreDuplicateSlashes||!1,this.maxParamLength=n.maxParamLength||100,this.allowUnsafeRegex=n.allowUnsafeRegex||!1,this.constrainer=new a9e(n.constraints),this.useSemicolonDelimiter=n.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Gl.prototype.on=function(e,l,t,r,i){typeof t=="function"&&(r!==void 0&&(i=r),r=t,t={}),ft(typeof l=="string","Path should be a string"),ft(l.length>0,"The path could not be empty"),ft(l[0]==="/"||l[0]==="*","The first character of a path should be `/` or `*`"),ft(typeof r=="function","Handler should be a function");let s=l.match(Mu);if(s){ft(l.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let c=l.replace(Mu,"$1$2"),f=l.replace(Mu,"$2");this.on(e,c,t,r,i),this.on(e,f,t,r,i);return}let u=l;this.ignoreDuplicateSlashes&&(l=lv(l)),this.ignoreTrailingSlash&&(l=tv(l));let a=Array.isArray(e)?e:[e];for(let c of a)ft(typeof c=="string","Method should be a string"),ft(Co.includes(c),`Method '${c}' is not an http method.`),this._on(c,l,t,r,i,u)};Gl.prototype._on=function(e,l,t,r,i){let s={};t.constraints!==void 0&&(ft(typeof t.constraints=="object"&&t.constraints!==null,"Constraints should be an object"),Object.keys(t.constraints).length!==0&&(s=t.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new $F("/"));let u=l;if(u==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new $F(""),this.trees[e].staticChildren["/"]=m}let a=this.trees[e],c=a.prefix.length,f=[];for(let m=0;m<=u.length;m++){if(u.charCodeAt(m)===58&&u.charCodeAt(m+1)===58){m++;continue}let h=u.charCodeAt(m)===58&&u.charCodeAt(m+1)!==58,g=u.charCodeAt(m)===42;if(h||g||m===u.length&&m!==c){let _=u.slice(c,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),a=a.createStaticChild(_)}if(h){let _=!1,S=[],T=m+1;for(let x=T;;x++){let v=u.charCodeAt(x),b=v===40,w=v===45||v===46,N=v===47||x===u.length;if(b||w||N){let R=u.slice(T,x);if(f.push(R),_=_||b||w,b){let L=qF(u,x),Q=u.slice(x,L+1);this.allowUnsafeRegex||ft(n7(new RegExp(Q)),`The regex '${Q}' is not safe!`),S.push(HF(Q)),x=L+1}else S.push("(.*?)");let k=x;for(;x<u.length;x++){let L=u.charCodeAt(x);if(L===47)break;if(L===58)if(u.charCodeAt(x+1)===58)x++;else break}let j=u.slice(k,x);if(j&&(j= Line truncated
Content-Length: ${Te.length}\r
Content-Type: application/json\r
\r
${Te}`),me.destroy(J)}function ye(J,me){J.headers["accept-version"]!==void 0&&(J.headers[O9e]=J.headers["accept-version"],J.headers["accept-version"]=void 0),h.router.lookup(J,me)}function q(J,me,Te){if(a){let lt=HM(L.server,me),Ce=UM(L,o,me,lt),Rt=new a9(lt,null,me,null,Ce,L),Xn=new A0(Te,Rt,Ce);return i===!1&&Ce.info({req:Rt},"incoming request"),a(new W9e(J),Rt,Xn)}let Ue=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${J}' is not a valid url component","statusCode":400}`;Te.writeHead(400,{"Content-Type":"application/json","Content-Length":Ue.length}),Te.end(Ue)}function le(J,me,Te){if(J!==!1)return function(lt){if(lt){if(a){let Rt=HM(L.server,me),Xn=UM(L,o,me,Rt),Ot=new a9(Rt,null,me,null,Xn,L),qt=new A0(Te,Ot,Xn);return i===!1&&Xn.info({req:Ot},"incoming request"),a(new X9e,Ot,qt)}let Ce='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Te.writeHead(500,{"Content-Type":"application/json","Content-Length":Ce.length}),Te.end(Ce)}}}function re(J,me){return Q('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,J,me,j,m.routeHandler),this}function te(J){return Q('Cannot call "setValidatorCompiler"!'),this[as].setValidatorCompiler(J),this}function Un(J){return Q('Cannot call "setSchemaErrorFormatter"!'),XM(J),this[_v]=J.bind(this),this}function wt(J){return Q('Cannot call "setSerializerCompiler"!'),this[as].setSerializerCompiler(J),this}function Ge(J){Q('Cannot call "setSchemaController"!');let me=this[as],Te=$M.buildSchemaController(me,Object.assign({},me.opts,J));return this[as]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function $t(J){return Q('Cannot call "setReplySerializer"!'),this[MM]=J,this}function Ke(J){return Q('Cannot call "setErrorHandler"!'),this[s9]=GM(this[s9],J.bind(this)),this}function Xe(J){return Q('Cannot call "setChildLoggerFactory"!'),this[bv]=J,this}function bn(J={}){return J.includeMeta=J.includeHooks?J.includeMeta?Sv.concat(J.includeMeta):Sv:J.includeMeta,m.printRoutes(J)}function ut(J,{rewriteUrl:me,logger:Te}){let Ue;return function(Ce,Rt){if(Ue===void 0&&(Ue=J.isAsyncConstraint()),me){Ce.originalUrl=Ce.url;let Xn=me.call(O,Ce);if(typeof Xn=="string")Ce.url=Xn;else{let Ot=new l7e(Ce.url,typeof Xn);Ce.destroy(Ot)}}J.routing(Ce,Rt,le(Ue,Ce,Rt))}}function pt(J){return Q('Cannot call "setGenReqId"!'),this[Tv]=qM(this[vv].requestIdHeader,J),this}}o9.errorCodes=Ma;function XM(t){if(typeof t!="function")throw new zM(typeof t);if(t.constructor.name==="AsyncFunction")throw new zM("AsyncFunction")}u9.exports=o9;u9.exports.fastify=o9;u9.exports.default=o9});var bH=C((_Re,EH)=>{"use strict";EH.exports=Error});var SH=C((ERe,TH)=>{"use strict";TH.exports=EvalError});var AH=C((bRe,xH)=>{"use strict";xH.exports=RangeError});var RH=C((TRe,wH)=>{"use strict";wH.exports=ReferenceError});var fE=C((SRe,OH)=>{"use strict";OH.exports=SyntaxError});var c4=C((xRe,NH)=>{"use strict";NH.exports=TypeError});var CH=C((ARe,IH)=>{"use strict";IH.exports=URIError});var PH=C((wRe,kH)=>{"use strict";kH.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var l=42;e[n]=l;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==l||s.enumerable!==!0)return!1}return!0}});var FH=C((RRe,LH)=>{"use strict";var DH=typeof Symbol<"u"&&Symbol,ime=PH();LH.exports=function(){return typeof DH!="function"||typeof Symbol!="function"||typeof DH("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ime()}});var $H=C((ORe,MH)=>{"use strict";var pE={__proto__:null,foo:{}},sme=Object;MH.exports=function(){return{__proto__:pE}.foo===pE.foo&&!(pE instanceof sme)}});var BH=C((NRe,UH)=>{"use strict";var ame="Function.prototype.bind called on incompatible ",ome=Object.prototype.toString,ume=Math.max,cme="[object Function]",jH=function(e,n){for(var r=[],l=0;l<e.length;l+=1)r[l]=e[l];for(var i=0;i<n.length;i+=1)r[i+e.length]=n[i];return r},fme=function(e,n){for(var r=[],l=n||0,i=0;l<e.length;l+=1,i+=1)r[i]=e[l];return r},pme=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};UH.exports=function(e){var n=this;if(typeof n!="function"||ome.apply(n)!==cme)throw new TypeError(ame+n);for(var r=fme(arguments,1),l,i=function(){if(this instanceof l){var f=n.apply(this,jH(r,arguments));return Object(f)===f?f:this}return n.apply(e,jH(r,arguments))},s=ume(0,n.length-r.length),a Line truncated
`)>=0)return!1;return!0}function mge(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=$i.call(Array(t.indent+1)," ");else return null;return{base:n,prev:$i.call(Array(e+1),n)}}function wE(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+$i.call(t,","+n)+`
`+e.prev}function U7(t,e){var n=AE(t),r=[];if(n){r.length=t.length;for(var l=0;l<t.length;l++)r[l]=Ts(t,l)?e(t[l],t):""}var i=typeof EE=="function"?EE(t):[],s;if(g4){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var o in t)Ts(t,o)&&(n&&String(Number(o))===o&&o<t.length||g4&&s["$"+o]instanceof Symbol||(Dq.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof EE=="function")for(var c=0;c<i.length;c++)Lq.call(t,i[c])&&r.push("["+e(i[c])+"]: "+e(t[i[c]],t));return r}});var Vq=C((HRe,qq)=>{"use strict";var Hq=ro(),y4=_q(),gge=Bq(),yge=c4(),q7=Hq("%WeakMap%",!0),V7=Hq("%Map%",!0),vge=y4("WeakMap.prototype.get",!0),_ge=y4("WeakMap.prototype.set",!0),Ege=y4("WeakMap.prototype.has",!0),bge=y4("Map.prototype.get",!0),Tge=y4("Map.prototype.set",!0),Sge=y4("Map.prototype.has",!0),IE=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},xge=function(t,e){var n=IE(t,e);return n&&n.value},Age=function(t,e,n){var r=IE(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},wge=function(t,e){return!!IE(t,e)};qq.exports=function(){var e,n,r,l={assert:function(i){if(!l.has(i))throw new yge("Side channel does not contain "+gge(i))},get:function(i){if(q7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return vge(e,i)}else if(V7){if(n)return bge(n,i)}else if(r)return xge(r,i)},has:function(i){if(q7&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Ege(e,i)}else if(V7){if(n)return Sge(n,i)}else if(r)return wge(r,i);return!1},set:function(i,s){q7&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new q7),_ge(e,i,s)):V7?(n||(n=new V7),Tge(n,i,s)):(r||(r={key:{},next:null}),Age(r,i,s))}};return l}});var z7=C((qRe,zq)=>{"use strict";var Rge=String.prototype.replace,Oge=/%20/g,CE={RFC1738:"RFC1738",RFC3986:"RFC3986"};zq.exports={default:CE.RFC3986,formatters:{RFC1738:function(t){return Rge.call(t,Oge,"+")},RFC3986:function(t){return String(t)}},RFC1738:CE.RFC1738,RFC3986:CE.RFC3986}});var DE=C((VRe,Xq)=>{"use strict";var Nge=z7(),kE=Object.prototype.hasOwnProperty,lo=Array.isArray,ji=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Ige=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(lo(r)){for(var l=[],i=0;i<r.length;++i)typeof r[i]<"u"&&l.push(r[i]);n.obj[n.prop]=l}}},Gq=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},l=0;l<e.length;++l)typeof e[l]<"u"&&(r[l]=e[l]);return r},Cge=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(lo(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!kE.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var l=e;return lo(e)&&!lo(n)&&(l=Gq(e,r)),lo(e)&&lo(n)?(n.forEach(function(i,s){if(kE.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,r):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return kE.call(i,s)?i[s]=t(i[s],a,r):i[s]=a,i},l)},kge=function(e,n){return Object.keys(n).reduce(function(r,l){return r[l]=n[l],r},e)},Pge=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},PE=1024,Dge=function(e,n,r,l,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",o=0;o<s.length;o+=PE){for(var c=s.length>=PE?s.slice(o,o+PE):s,f=[],p=0;p<c.length;++p){var m=c.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===Nge.RFC1738&&(m===40||m===41)){f[f.length]=c.charAt(p);continue}if(m<128){f[f.length]=ji[m];continue}if(m<2048){f[f.length]=ji[192|m>>6]+ji[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=ji[224|m>>12]+ji[128|m>>6&63]+ji[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|c.charCodeAt(p)&1023),f[f.length]=ji[240|m>>18]+ji[128|m>>12&63]+ji[128|m>>6&63]+ji[128|m&63]}a+=f.join("")}return a},Lge=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],l=0;l<n.length;++l)for(var i=n[l],s=i.obj[i.prop],a=Object.keys(s),o=0;o<a.length;++o){var c=a[o],f=s[c];typeof f=="object"&&f!==null&&r.indexOf(f)===-1&&(n.push({obj:s,prop:c}),r.push(f))}return Ige(n),e},Fge=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Mge=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},$ge=function(e,n){return[].concat(e,n)},jge=function(e,n){if(lo(e)){for(var r=[],l=0;l<e.length;l+=1)r.push(n(e[l]));return r}return n(e)};Xq.exports={arrayToObject:Gq,assign:kge,combine:$ge,compact:Lge,decode:Pge,encode:Dge,isBuffer:Mge,isRegExp:Fge,maybeMap:jge,merge:Cge}});var Zq=C((zRe,Qq)=>{"use strict";var Kq=Vq(),G7=DE(),S5=z7(),Uge=Object.prototype.hasOwnProperty,Yq={brack Line truncated
`;Wt.DEFAULT_CONTENT_TYPE="application/octet-stream";Wt.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=KE.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),WV.isArray(e)){this._error(new Error("Arrays are not supported."));return}var l=this._multiPartHeader(t,e,n),i=this._multiPartFooter();r(l),r(e),r(i),this._trackLength(l,e,n)};Wt.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+Wt.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof yve))&&(n.knownLength||this._valuesToMeasure.push(e))};Wt.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):gve.stat(t.path,function(n,r){var l;if(n){e(n);return}l=r.size-(t.start?t.start:0),e(null,l)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};Wt.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),l=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(l||[])};typeof n.header=="object"&&WE(s,n.header);var a;for(var o in s)s.hasOwnProperty(o)&&(a=s[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(i+=o+": "+a.join("; ")+Wt.LINE_BREAK)));return"--"+this.getBoundary()+Wt.LINE_BREAK+i+Wt.LINE_BREAK};Wt.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=GE.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=GE.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=GE.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};Wt.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=XE.lookup(t.name)),!n&&t.path&&(n=XE.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=XE.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=Wt.DEFAULT_CONTENT_TYPE),n};Wt.prototype._multiPartFooter=function(){return function(t){var e=Wt.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};Wt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Wt.LINE_BREAK};Wt.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};Wt.prototype.setBoundary=function(t){this._boundary=t};Wt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Wt.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(Wt.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};Wt.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};Wt.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};Wt.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};Wt.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}vve.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(l){e+=l}),t(null,e)})};Wt.prototype.submit=function(t,e){var n,r,l={method:"post"};return typeof t=="string"?(t=mve(t),r=WE({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},l)):(r=WE(t,l),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=hve.request(r):n=dve.request(r),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,o=function(c,f){return n.removeListener("error",o),n.removeListener("response",a),e.call(this,c,f)};a=o.bind(this,null),n.on("error",o),n.on("response",a)}}.bind(this)),n};Wt.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),r.removeSocket(l)}};I3.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(l){r.request.onSocket(l)})}};function Zz(t,e){var n=this;I3.prototype.createSocket.call(n,t,function(r){var l=t.request.getHeader("host"),i=Ib({},n.options,{socket:r,servername:l?l.replace(/:.*$/,""):t.host}),s=g_e.connect(0,i);n.sockets[n.sockets.indexOf(r)]=s,e(s)})}function eG(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function Ib(t){for(var e=1,n=arguments.length;e<n;++e){var r=arguments[e];if(typeof r=="object")for(var l=Object.keys(r),i=0,s=l.length;i<s;++i){var a=l[i];r[a]!==void 0&&(t[a]=r[a])}}return t}var Ns;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Ns=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:Ns=function(){};R4.debug=Ns});var rG=C((MCe,nG)=>{nG.exports=tG()});var MX=C(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.removeTrailingChar=po.merge=void 0;var _Ee=(...t)=>{let e={};return t.forEach(function(n){var r;for(r in n)r in e&&e[r]===null?e[r]=n[r]:r in e&&Array.isArray(e[r])?e[r]=e[r].concat(n[r]):r in e&&typeof e[r]=="object"?e[r]=(0,po.merge)(e[r],n[r]):e[r]=n[r]}),e};po.merge=_Ee;var EEe=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;po.removeTrailingChar=EEe});var C4=C(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});zs.DataError=zs.DatabaseError=zs.NestedError=void 0;var U5=class extends Error{inner;id;constructor(e,n,r){super(e),this.inner=r,this.id=n,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
`+this.inner:e}};zs.NestedError=U5;var lT=class extends U5{};zs.DatabaseError=lT;var iT=class extends U5{};zs.DataError=iT});var cT=C(Nl=>{"use strict";Object.defineProperty(Nl,"__esModule",{value:!0});Nl.getArrayIndicies=Nl.validateArrayIndex=Nl.validateArrayIndicies=Nl.isInt=Nl.ArrayInfo=Nl.arrayRegex=void 0;var pf=C4(),bEe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;Nl.arrayRegex=bEe;var sT={},aT=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let r=n[0]??0;if(this.append=r===""||n[n.length-1]==="",this.indicies=n,oT(r))this.index=parseInt(r);else if(!this.append)throw new pf.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(sT[e])return sT[e];let r=(0,Nl.arrayRegex)().exec(e.trim());if(r!=null){let l=r[1],i="["+r[2].toString()+"]",s=uT(i);return $X(s),sT[e]=new t(l,s)}return null}getIndex(e,n){if(this.append)return-1;let r=this.index;if(r==-1){let l=n?e:e[this.property];return l.length===0?0:l.length-1}return r}getData(e){if(this.append)throw new pf.DataError("Can't get data when appending",100);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r[n]}setData(e,n){if(this.append){let r=e[this.property];this.indicies.forEach(l=>{l!==""&&(l=+l,l===-1&&(l=r.length-1),r=r[+l])}),r.push(n)}else{let{index:r,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);r===-1?l.push(n):l[r]=n}}delete(e){if(this.append)throw new pf.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);r.splice(n,1)}isValid(e){let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,r=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let l=0;l<this.indicies.length-1;l++){let i=+this.indicies[l];i===-1&&(i=r.length-1),r=r[i]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};Nl.ArrayInfo=aT;function oT(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}Nl.isInt=oT;function $X(t){let e=t.filter(n=>n==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&t[t.length-1]!=="")throw Error("Append index must be at the end of the nested array")}Nl.validateArrayIndicies=$X;function jX(t){if(t.length!==0&&!oT(t))throw new pf.DataError("Only numerical values accepted for array index",200)}Nl.validateArrayIndex=jX;function uT(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));jX(e);let n=e.length+2;return[e,...uT(t.substring(n))]}Nl.getArrayIndicies=uT});var HX=C(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.DBParentData=void 0;var UX=cT(),BX=C4(),fT=class{parent;data;db;dataPath;constructor(e,n,r,l){this.parent=l,this.data=e,this.db=n,this.dataPath=r}checkArray(e=!1){let n=UX.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new BX.DataError("DataPath: /"+this.dataPath+". Can't find index "+n.index+" in array "+n.property,10);return n}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let n=UX.ArrayInfo.processArray(this.parent);if(n){if(!this.data.hasOwnProperty(n.property))this.data[n.property]=[];else if(!Array.isArray(this.data[n.property]))throw new BX.DataError("DataPath: /"+this.dataPath+". "+n.property+" is not an array.",11);n.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};df.DBParentData=fT});var VX=C((GPe,qX)=>{qX.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var c=null;a.hasOwnProperty("scope")&&(c=a.scope);var f=function(){var h=!1;return function(){h||(h=!0,o.readers--,o.queue.length&&o.queue[0]())}}();if(o.readers<0||o.queue.length){var p=!1;if(o.queue.push(function(){!p&&o.readers>=0&&(p=!0,o.queue.shift(),o.readers++,s.call(c,f),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){p||(p=!0,o.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else o.readers++,s.call(a.scope,f)}function n(i,s,a){var o;typeof i!="function"?(l.hasOwnProperty(i)||(l[i]=new t),o=l[i]):(a=s,s=i,o=r),a||(a={});var c=null;a.hasOwnProperty("scope")&&(c=a.scope);var f=function(){var h=!1;return function(){h||(h=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var p=!1;if(o.queue.push(function(){p|| Line truncated
`:t(e.children):O9(e)?t(e.children):Pi(e)?e.data:""},textContent:Yu,innerText:C9,getChildren:H9,getParent:_j,getSiblings:Ej,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:T_,prevElementSibling:S_,removeElement:Ua,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var r=e.next=t.next;if(r&&(r.prev=e),r=e.parent=t.parent){let l=r.children;l[l.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){Ua(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null},append:function(t,e){Ua(e);var n=t.parent,r=t.next;if(e.next=r,((e.prev=t).next=e).parent=n,r){if(r.prev=e,n){let l=n.children;l.splice(l.lastIndexOf(r),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){Ua(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1?((t=t.children[1]).prev=e).next=t:e.next=null},prepend:function(t,e){Ua(e);var n,r=t.parent;r&&(n=r.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,(e.next=t).prev=e},filter:v9,find:x_,findOneChild:function(t,e){return e.find(t)},findOne:Wv,existsOne:function t(e,n){return n.some(r=>ot(r)&&(e(r)||t(e,r.children)))},findAll:function(t,e){for(var n=[],r=[e],l=[0];;)if(l[0]>=r[0].length){if(r.length===1)return n;r.shift(),l.shift()}else{let i=r[0][l[0]++];ot(i)&&(t(i)&&n.push(i),0<i.children.length)&&(l.unshift(0),r.unshift(i.children))}},testElement:function(t,e){return!(t=n$(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=n$(t))?v9(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),Wv(bj("id",t),e,n)},getElementsByTagName:Vu,getElementsByTagType:function(t,e,n=!0,r=1/0){return v9(k9.tag_type(t),e,n,r)},removeSubsets:function(t){let e=t.length;for(;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(let r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t},get DocumentPosition(){return A2},compareDocumentPosition:Tj,uniqueSort:Ju,getFeed:function(t){return(t=c9(C7e,t))?(t.name==="feed"?function(e){var n={type:"atom",items:Vu("entry",e=e.children).map(l=>{var i={media:r$(l=l.children)},s=(Bl(i,"id","id",l),Bl(i,"title","title",l),(s=c9("link",l))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=os("summary",l)||os("content",l))&&(i.description=s),(s=os("updated",l))&&(i.pubDate=new Date(s)),i})},r=(Bl(n,"id","id",e),Bl(n,"title","title",e),(r=c9("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),Bl(n,"description","subtitle",e),(r=os("updated",e))&&(n.updated=new Date(r)),Bl(n,"author","email",e,!0),n}:function(r){var n=(n=(n=c9("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:Vu("item",r.children).map(i=>{var s={media:r$(i=i.children)};return Bl(s,"id","guid",i),Bl(s,"title","title",i),Bl(s,"link","link",i),Bl(s,"description","description",i),(i=os("pubDate",i)||os("dc:date",i))&&(s.pubDate=new Date(i)),s})},l=(Bl(r,"title","title",n),Bl(r,"link","link",n),Bl(r,"description","description",n),os("lastBuildDate",n));return l&&(r.updated=new Date(l)),Bl(r,"author","managingEditor",n,!0),r})(t):null}}),zu=function(){return(zu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)};function Sj(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function k7e(t,e){return Sj(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,zu(zu(zu({},b_),this==null?void 0:this._options),zv(e??{})))}function P7e(t){return Sj(this,t,zu(zu({},this._options),{xmlMode:!0}))}function Q0(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=Yu(e[r]);return n}function D7e(t,e,n){return n===void 0&&(n=typeof e=="boolean"&&e),t&&typeof t=="string"?(typeof e=="boolean"&&(n=e),e=this.load(t,b_,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function L7e(){return this(this._root)}function xj(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function F7e(t,e){if(l$(t)&&l$(e)){for(var n=t.length,r=+e.length,l=0;l<r;l++)t[n++]=e[l];return t.length=n,t}}function l$(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var Ba,M7e=Object.freeze({__proto__:null,html:k7e,xml:P7e,text:Q0,parseHTML:D7e,root:L7e,contains:xj,merge:F7e});function ki(t){return t.cheerio!=null}function Zn(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function Av(e){var e="length"in e?Array.prototype.map.call(e,function(r){return N9(r,!0)}):[N9(e,!0)],n=new w3(e);return e.forEach(function(r){r.parent=n}),e}function Kv(t){var e, Line truncated
${Te}`),me.destroy(J)}function ye(J,me){J.headers["accept-version"]!==void 0&&(J.headers[Y7e]=J.headers["accept-version"],J.headers["accept-version"]=void 0),h.router.lookup(J,me)}function q(J,me,Te){if(u){let sn=l$(L.server,me),Ce=e$(L,a,me,sn),Rn=new p7(sn,null,me,null,Ce,L),Kl=new N1(Te,Rn,Ce);return i===!1&&Ce.info({req:Rn},"incoming request"),u(new gce(J),Rn,Kl)}let Ue=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${J}' is not a valid url component","statusCode":400}`;Te.writeHead(400,{"Content-Type":"application/json","Content-Length":Ue.length}),Te.end(Ue)}function re(J,me,Te){if(J!==!1)return function(sn){if(sn){if(u){let Rn=l$(L.server,me),Kl=e$(L,a,me,Rn),Nn=new p7(Rn,null,me,null,Kl,L),zn=new N1(Te,Nn,Kl);return i===!1&&Kl.info({req:Nn},"incoming request"),u(new mce,Nn,zn)}let Ce='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Te.writeHead(500,{"Content-Type":"application/json","Content-Length":Ce.length}),Te.end(Ce)}}}function te(J,me){return Q('Cannot call "setNotFoundHandler"!'),h.setNotFoundHandler.call(this,J,me,j,m.routeHandler),this}function ne(J){return Q('Cannot call "setValidatorCompiler"!'),this[as].setValidatorCompiler(J),this}function Bl(J){return Q('Cannot call "setSchemaErrorFormatter"!'),u$(J),this[Rv]=J.bind(this),this}function On(J){return Q('Cannot call "setSerializerCompiler"!'),this[as].setSerializerCompiler(J),this}function Ge(J){Q('Cannot call "setSchemaController"!');let me=this[as],Te=QM.buildSchemaController(me,Object.assign({},me.opts,J));return this[as]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function Bn(J){return Q('Cannot call "setReplySerializer"!'),this[JM]=J,this}function Ke(J){return Q('Cannot call "setErrorHandler"!'),this[f7]=s$(this[f7],J.bind(this)),this}function Xe(J){return Q('Cannot call "setChildLoggerFactory"!'),this[Iv]=J,this}function Sl(J={}){return J.includeMeta=J.includeHooks?J.includeMeta?kv.concat(J.includeMeta):kv:J.includeMeta,m.printRoutes(J)}function fn(J,{rewriteUrl:me,logger:Te}){let Ue;return function(Ce,Rn){if(Ue===void 0&&(Ue=J.isAsyncConstraint()),me){Ce.originalUrl=Ce.url;let Kl=me.call(R,Ce);if(typeof Kl=="string")Ce.url=Kl;else{let Nn=new wce(Ce.url,typeof Kl);Ce.destroy(Nn)}}J.routing(Ce,Rn,re(Ue,Ce,Rn))}}function dn(J){return Q('Cannot call "setGenReqId"!'),this[Cv]=t$(this[Ov].requestIdHeader,J),this}}d7.errorCodes=ju;function u$(n){if(typeof n!="function")throw new i$(typeof n);if(n.constructor.name==="AsyncFunction")throw new i$("AsyncFunction")}h7.exports=d7;h7.exports.fastify=d7;h7.exports.default=d7});var LH=C((JOe,DH)=>{"use strict";DH.exports=Error});var MH=C((QOe,FH)=>{"use strict";FH.exports=EvalError});var jH=C((ZOe,$H)=>{"use strict";$H.exports=RangeError});var BH=C((eRe,UH)=>{"use strict";UH.exports=ReferenceError});var SE=C((nRe,HH)=>{"use strict";HH.exports=SyntaxError});var h4=C((lRe,qH)=>{"use strict";qH.exports=TypeError});var zH=C((tRe,VH)=>{"use strict";VH.exports=URIError});var XH=C((rRe,GH)=>{"use strict";GH.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},l=Symbol("test"),t=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(t)!=="[object Symbol]")return!1;var r=42;e[l]=r;for(l in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==l||!Object.prototype.propertyIsEnumerable.call(e,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,l);if(s.value!==r||s.enumerable!==!0)return!1}return!0}});var YH=C((iRe,KH)=>{"use strict";var WH=typeof Symbol<"u"&&Symbol,wme=XH();KH.exports=function(){return typeof WH!="function"||typeof Symbol!="function"||typeof WH("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:wme()}});var QH=C((sRe,JH)=>{"use strict";var xE={__proto__:null,foo:{}},Ome=Object;JH.exports=function(){return{__proto__:xE}.foo===xE.foo&&!(xE instanceof Ome)}});var nq=C((uRe,eq)=>{"use strict";var Rme="Function.prototype.bind called on incompatible ",Nme=Object.prototype.toString,Ime=Math.max,Cme="[object Function]",ZH=function(e,l){for(var t=[],r=0;r<e.length;r+=1)t[r]=e[r];for(var i=0;i<l.length;i+=1)t[i+e.length]=l[i];return t},kme=function(e,l){for(var t=[],r=l||0,i=0;r<e.length;r+=1,i+=1)t[i]=e[r];return t},Pme=function(n,e){for(var l="",t=0;t<n.length;t+=1)l+=n[t],t+1<n.length&&(l+=e);return l};eq.exports=function(e){var l=this;if(typeof l!="function"||Nme.apply(l)!==Cme)throw new TypeError(Rme+l);for(var t=kme(arguments,1),r,i=function(){if(this instanceof r){var f=l.apply(this,ZH(t,arguments));return Object(f)===f?f:this}return l.apply(e,ZH(t,arguments))},s=Ime(0,l.length-t.length),u Line truncated
`)>=0)return!1;return!0}function Fge(n,e){var l;if(n.indent===" ")l=" ";else if(typeof n.indent=="number"&&n.indent>0)l=jr.call(Array(n.indent+1)," ");else return null;return{base:l,prev:jr.call(Array(e+1),l)}}function $E(n,e){if(n.length===0)return"";var l=`
`+e.prev+e.base;return l+jr.call(n,","+l)+`
`+e.prev}function Wc(n,e){var l=ME(n),t=[];if(l){t.length=n.length;for(var r=0;r<n.length;r++)t[r]=Ss(n,r)?e(n[r],n):""}var i=typeof kE=="function"?kE(n):[],s;if(E4){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var a in n)Ss(n,a)&&(l&&String(Number(a))===a&&a<n.length||E4&&s["$"+a]instanceof Symbol||(Wq.call(/[^\w$]/,a)?t.push(e(a,n)+": "+e(n[a],n)):t.push(a+": "+e(n[a],n))));if(typeof kE=="function")for(var c=0;c<i.length;c++)Kq.call(n,i[c])&&t.push("["+e(i[c])+"]: "+e(n[i[c]],n));return t}});var rV=C((ERe,tV)=>{"use strict";var lV=ia(),b4=Pq(),Mge=nV(),$ge=h4(),Jc=lV("%WeakMap%",!0),Qc=lV("%Map%",!0),jge=b4("WeakMap.prototype.get",!0),Uge=b4("WeakMap.prototype.set",!0),Bge=b4("WeakMap.prototype.has",!0),Hge=b4("Map.prototype.get",!0),qge=b4("Map.prototype.set",!0),Vge=b4("Map.prototype.has",!0),HE=function(n,e){for(var l=n,t;(t=l.next)!==null;l=t)if(t.key===e)return l.next=t.next,t.next=n.next,n.next=t,t},zge=function(n,e){var l=HE(n,e);return l&&l.value},Gge=function(n,e,l){var t=HE(n,e);t?t.value=l:n.next={key:e,next:n.next,value:l}},Xge=function(n,e){return!!HE(n,e)};tV.exports=function(){var e,l,t,r={assert:function(i){if(!r.has(i))throw new $ge("Side channel does not contain "+Mge(i))},get:function(i){if(Jc&&i&&(typeof i=="object"||typeof i=="function")){if(e)return jge(e,i)}else if(Qc){if(l)return Hge(l,i)}else if(t)return zge(t,i)},has:function(i){if(Jc&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Bge(e,i)}else if(Qc){if(l)return Vge(l,i)}else if(t)return Xge(t,i);return!1},set:function(i,s){Jc&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Jc),Uge(e,i,s)):Qc?(l||(l=new Qc),qge(l,i,s)):(t||(t={key:{},next:null}),Gge(t,i,s))}};return r}});var Zc=C((bRe,iV)=>{"use strict";var Wge=String.prototype.replace,Kge=/%20/g,qE={RFC1738:"RFC1738",RFC3986:"RFC3986"};iV.exports={default:qE.RFC3986,formatters:{RFC1738:function(n){return Wge.call(n,Kge,"+")},RFC3986:function(n){return String(n)}},RFC1738:qE.RFC1738,RFC3986:qE.RFC3986}});var GE=C((TRe,uV)=>{"use strict";var Yge=Zc(),VE=Object.prototype.hasOwnProperty,sa=Array.isArray,Ur=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),Jge=function(e){for(;e.length>1;){var l=e.pop(),t=l.obj[l.prop];if(sa(t)){for(var r=[],i=0;i<t.length;++i)typeof t[i]<"u"&&r.push(t[i]);l.obj[l.prop]=r}}},sV=function(e,l){for(var t=l&&l.plainObjects?Object.create(null):{},r=0;r<e.length;++r)typeof e[r]<"u"&&(t[r]=e[r]);return t},Qge=function n(e,l,t){if(!l)return e;if(typeof l!="object"){if(sa(e))e.push(l);else if(e&&typeof e=="object")(t&&(t.plainObjects||t.allowPrototypes)||!VE.call(Object.prototype,l))&&(e[l]=!0);else return[e,l];return e}if(!e||typeof e!="object")return[e].concat(l);var r=e;return sa(e)&&!sa(l)&&(r=sV(e,t)),sa(e)&&sa(l)?(l.forEach(function(i,s){if(VE.call(e,s)){var u=e[s];u&&typeof u=="object"&&i&&typeof i=="object"?e[s]=n(u,i,t):e.push(i)}else e[s]=i}),e):Object.keys(l).reduce(function(i,s){var u=l[s];return VE.call(i,s)?i[s]=n(i[s],u,t):i[s]=u,i},r)},Zge=function(e,l){return Object.keys(l).reduce(function(t,r){return t[r]=l[r],t},e)},eye=function(n,e,l){var t=n.replace(/\+/g," ");if(l==="iso-8859-1")return t.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(t)}catch{return t}},zE=1024,nye=function(e,l,t,r,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),t==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var u="",a=0;a<s.length;a+=zE){for(var c=s.length>=zE?s.slice(a,a+zE):s,f=[],p=0;p<c.length;++p){var m=c.charCodeAt(p);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===Yge.RFC1738&&(m===40||m===41)){f[f.length]=c.charAt(p);continue}if(m<128){f[f.length]=Ur[m];continue}if(m<2048){f[f.length]=Ur[192|m>>6]+Ur[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=Ur[224|m>>12]+Ur[128|m>>6&63]+Ur[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|c.charCodeAt(p)&1023),f[f.length]=Ur[240|m>>18]+Ur[128|m>>12&63]+Ur[128|m>>6&63]+Ur[128|m&63]}u+=f.join("")}return u},lye=function(e){for(var l=[{obj:{o:e},prop:"o"}],t=[],r=0;r<l.length;++r)for(var i=l[r],s=i.obj[i.prop],u=Object.keys(s),a=0;a<u.length;++a){var c=u[a],f=s[c];typeof f=="object"&&f!==null&&t.indexOf(f)===-1&&(l.push({obj:s,prop:c}),t.push(f))}return Jge(l),e},tye=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},rye=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},iye=function(e,l){return[].concat(e,l)},sye=function(e,l){if(sa(e)){for(var t=[],r=0;r<e.length;r+=1)t.push(l(e[r]));return t}return l(e)};uV.exports={arrayToObject:sV,assign:Zge,combine:iye,compact:lye,decode:eye,encode:nye,isBuffer:rye,isRegExp:tye,maybeMap:sye,merge:Qge}});var dV=C((SRe,pV)=>{"use strict";var oV=rV(),ef=GE(),O5=Zc(),uye=Object.prototype.hasOwnProperty,cV={brack Line truncated
`;Yn.DEFAULT_CONTENT_TYPE="application/octet-stream";Yn.prototype.append=function(n,e,l){l=l||{},typeof l=="string"&&(l={filename:l});var t=ub.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),az.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(n,e,l),i=this._multiPartFooter();t(r),t(e),t(i),this._trackLength(r,e,l)};Yn.prototype._trackLength=function(n,e,l){var t=0;l.knownLength!=null?t+=+l.knownLength:Buffer.isBuffer(e)?t=e.length:typeof e=="string"&&(t=Buffer.byteLength(e)),this._valueLength+=t,this._overheadLength+=Buffer.byteLength(n)+Yn.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof $ve))&&(l.knownLength||this._valuesToMeasure.push(e))};Yn.prototype._lengthRetriever=function(n,e){n.hasOwnProperty("fd")?n.end!=null&&n.end!=1/0&&n.start!=null?e(null,n.end+1-(n.start?n.start:0)):Mve.stat(n.path,function(l,t){var r;if(l){e(l);return}r=t.size-(n.start?n.start:0),e(null,r)}):n.hasOwnProperty("httpVersion")?e(null,+n.headers["content-length"]):n.hasOwnProperty("httpModule")?(n.on("response",function(l){n.pause(),e(null,+l.headers["content-length"])}),n.resume()):e("Unknown stream")};Yn.prototype._multiPartHeader=function(n,e,l){if(typeof l.header=="string")return l.header;var t=this._getContentDisposition(e,l),r=this._getContentType(e,l),i="",s={"Content-Disposition":["form-data",'name="'+n+'"'].concat(t||[]),"Content-Type":[].concat(r||[])};typeof l.header=="object"&&sb(s,l.header);var u;for(var a in s)s.hasOwnProperty(a)&&(u=s[a],u!=null&&(Array.isArray(u)||(u=[u]),u.length&&(i+=a+": "+u.join("; ")+Yn.LINE_BREAK)));return"--"+this.getBoundary()+Yn.LINE_BREAK+i+Yn.LINE_BREAK};Yn.prototype._getContentDisposition=function(n,e){var l,t;return typeof e.filepath=="string"?l=rb.normalize(e.filepath).replace(/\\/g,"/"):e.filename||n.name||n.path?l=rb.basename(e.filename||n.name||n.path):n.readable&&n.hasOwnProperty("httpVersion")&&(l=rb.basename(n.client._httpMessage.path||"")),l&&(t='filename="'+l+'"'),t};Yn.prototype._getContentType=function(n,e){var l=e.contentType;return!l&&n.name&&(l=ib.lookup(n.name)),!l&&n.path&&(l=ib.lookup(n.path)),!l&&n.readable&&n.hasOwnProperty("httpVersion")&&(l=n.headers["content-type"]),!l&&(e.filepath||e.filename)&&(l=ib.lookup(e.filepath||e.filename)),!l&&typeof n=="object"&&(l=Yn.DEFAULT_CONTENT_TYPE),l};Yn.prototype._multiPartFooter=function(){return function(n){var e=Yn.LINE_BREAK,l=this._streams.length===0;l&&(e+=this._lastBoundary()),n(e)}.bind(this)};Yn.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Yn.LINE_BREAK};Yn.prototype.getHeaders=function(n){var e,l={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in n)n.hasOwnProperty(e)&&(l[e.toLowerCase()]=n[e]);return l};Yn.prototype.setBoundary=function(n){this._boundary=n};Yn.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Yn.prototype.getBuffer=function(){for(var n=new Buffer.alloc(0),e=this.getBoundary(),l=0,t=this._streams.length;l<t;l++)typeof this._streams[l]!="function"&&(Buffer.isBuffer(this._streams[l])?n=Buffer.concat([n,this._streams[l]]):n=Buffer.concat([n,Buffer.from(this._streams[l])]),(typeof this._streams[l]!="string"||this._streams[l].substring(2,e.length+2)!==e)&&(n=Buffer.concat([n,Buffer.from(Yn.LINE_BREAK)])));return Buffer.concat([n,Buffer.from(this._lastBoundary())])};Yn.prototype._generateBoundary=function(){for(var n="--------------------------",e=0;e<24;e++)n+=Math.floor(Math.random()*10).toString(16);this._boundary=n};Yn.prototype.getLengthSync=function(){var n=this._overheadLength+this._valueLength;return this._streams.length&&(n+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),n};Yn.prototype.hasKnownLength=function(){var n=!0;return this._valuesToMeasure.length&&(n=!1),n};Yn.prototype.getLength=function(n){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(n.bind(this,null,e));return}jve.parallel(this._valuesToMeasure,this._lengthRetriever,function(l,t){if(l){n(l);return}t.forEach(function(r){e+=r}),n(null,e)})};Yn.prototype.submit=function(n,e){var l,t,r={method:"post"};return typeof n=="string"?(n=Fve(n),t=sb({port:n.port,path:n.pathname,host:n.hostname,protocol:n.protocol},r)):(t=sb(n,r),t.port||(t.port=t.protocol=="https:"?443:80)),t.headers=this.getHeaders(n.headers),t.protocol=="https:"?l=Lve.request(t):l=Dve.request(t),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&l.setHeader("Content-Length",s),this.pipe(l),e){var u,a=function(c,f){return l.removeListener("error",a),l.removeListener("response",u),e.call(this,c,f)};u=a.bind(this,null),l.on("error",a),l.on("response",u)}}.bind(this)),l};Yn.prototype._error=function(n){this.error||(this.error=n,this.pause(),this.emit("error" Line truncated
`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),t.removeSocket(r)}};Ci.prototype.removeSocket=function(e){var l=this.sockets.indexOf(e);if(l!==-1){this.sockets.splice(l,1);var t=this.requests.shift();t&&this.createSocket(t,function(r){t.request.onSocket(r)})}};function dG(n,e){var l=this;Ci.prototype.createSocket.call(l,n,function(t){var r=n.request.getHeader("host"),i=Hb({},l.options,{socket:t,servername:r?r.replace(/:.*$/,""):n.host}),s=M_e.connect(0,i);l.sockets[l.sockets.indexOf(t)]=s,e(s)})}function hG(n,e,l){return typeof n=="string"?{host:n,port:e,localAddress:l}:n}function Hb(n){for(var e=1,l=arguments.length;e<l;++e){var t=arguments[e];if(typeof t=="object")for(var r=Object.keys(t),i=0,s=r.length;i<s;++i){var u=r[i];t[u]!==void 0&&(n[u]=t[u])}}return n}var Is;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Is=function(){var n=Array.prototype.slice.call(arguments);typeof n[0]=="string"?n[0]="TUNNEL: "+n[0]:n.unshift("TUNNEL:"),console.error.apply(console,n)}:Is=function(){};C4.debug=Is});var yG=C((mke,gG)=>{gG.exports=mG()});var iW=C(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.removeTrailingChar=ma.merge=void 0;var KEe=(...n)=>{let e={};return n.forEach(function(l){var t;for(t in l)t in e&&e[t]===null?e[t]=l[t]:t in e&&Array.isArray(e[t])?e[t]=e[t].concat(l[t]):t in e&&typeof e[t]=="object"?e[t]=(0,ma.merge)(e[t],l[t]):e[t]=l[t]}),e};ma.merge=KEe;var YEe=(n,e)=>n.length>1&&n.endsWith(e)?n.substring(0,n.length-1):n;ma.removeTrailingChar=YEe});var L4=C(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.DataError=Xs.DatabaseError=Xs.NestedError=void 0;var z5=class extends Error{inner;id;constructor(e,l,t){super(e),this.inner=t,this.id=l,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
`+this.inner:e}};Xs.NestedError=z5;var vT=class extends z5{};Xs.DatabaseError=vT;var _T=class extends z5{};Xs.DataError=_T});var xT=C(I2=>{"use strict";Object.defineProperty(I2,"__esModule",{value:!0});I2.getArrayIndicies=I2.validateArrayIndex=I2.validateArrayIndicies=I2.isInt=I2.ArrayInfo=I2.arrayRegex=void 0;var Ef=L4(),JEe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;I2.arrayRegex=JEe;var ET={},bT=class n{property;index=0;append=!1;indicies=[];constructor(e,l){this.property=e;let t=l[0]??0;if(this.append=t===""||l[l.length-1]==="",this.indicies=l,TT(t))this.index=parseInt(t);else if(!this.append)throw new Ef.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(ET[e])return ET[e];let t=(0,I2.arrayRegex)().exec(e.trim());if(t!=null){let r=t[1],i="["+t[2].toString()+"]",s=ST(i);return sW(s),ET[e]=new n(r,s)}return null}getIndex(e,l){if(this.append)return-1;let t=this.index;if(t==-1){let r=l?e:e[this.property];return r.length===0?0:r.length-1}return t}getData(e){if(this.append)throw new Ef.DataError("Can't get data when appending",100);let{index:l,dataForProperty:t}=this.getArrayDataAndIndexFromProperty(e);return t[l]}setData(e,l){if(this.append){let t=e[this.property];this.indicies.forEach(r=>{r!==""&&(r=+r,r===-1&&(r=t.length-1),t=t[+r])}),t.push(l)}else{let{index:t,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);t===-1?r.push(l):r[t]=l}}delete(e){if(this.append)throw new Ef.DataError("Can't delete an appended data",10);let{index:l,dataForProperty:t}=this.getArrayDataAndIndexFromProperty(e);t.splice(l,1)}isValid(e){let{index:l,dataForProperty:t}=this.getArrayDataAndIndexFromProperty(e);return t.hasOwnProperty(l)}getArrayDataAndIndexFromProperty(e){let l=0,t=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){l=+this.indicies[this.indicies.length-1];for(let r=0;r<this.indicies.length-1;r++){let i=+this.indicies[r];i===-1&&(i=t.length-1),t=t[i]}l===-1&&(l=t.length-1)}return{index:l,dataForProperty:t}}isMultiDimensional(){return this.indicies.length>1}};I2.ArrayInfo=bT;function TT(n){return!isNaN(n)&&Number(n)==n&&!isNaN(parseInt(n,10))}I2.isInt=TT;function sW(n){let e=n.filter(l=>l==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&n[n.length-1]!=="")throw Error("Append index must be at the end of the nested array")}I2.validateArrayIndicies=sW;function uW(n){if(n.length!==0&&!TT(n))throw new Ef.DataError("Only numerical values accepted for array index",200)}I2.validateArrayIndex=uW;function ST(n){if(n.length===0)return[];if(n.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=n.substring(1,n.indexOf("]"));uW(e);let l=e.length+2;return[e,...ST(n.substring(l))]}I2.getArrayIndicies=ST});var cW=C(bf=>{"use strict";Object.defineProperty(bf,"__esModule",{value:!0});bf.DBParentData=void 0;var aW=xT(),oW=L4(),AT=class{parent;data;db;dataPath;constructor(e,l,t,r){this.parent=r,this.data=e,this.db=l,this.dataPath=t}checkArray(e=!1){let l=aW.ArrayInfo.processArray(this.parent);if(l&&(!l.append||e)&&!l.isValid(this.data))throw new oW.DataError("DataPath: /"+this.dataPath+". Can't find index "+l.index+" in array "+l.property,10);return l}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let l=aW.ArrayInfo.processArray(this.parent);if(l){if(!this.data.hasOwnProperty(l.property))this.data[l.property]=[];else if(!Array.isArray(this.data[l.property]))throw new oW.DataError("DataPath: /"+this.dataPath+". "+l.property+" is not an array.",11);l.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};bf.DBParentData=AT});var pW=C(($De,fW)=>{fW.exports=function(){"use strict";function n(){this.readers=0,this.queue=[]}function e(i,s,u){var a;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new n),a=r[i]):(u=s,s=i,a=t),u||(u={});var c=null;u.hasOwnProperty("scope")&&(c=u.scope);var f=function(){var h=!1;return function(){h||(h=!0,a.readers--,a.queue.length&&a.queue[0]())}}();if(a.readers<0||a.queue.length){var p=!1;if(a.queue.push(function(){!p&&a.readers>=0&&(p=!0,a.queue.shift(),a.readers++,s.call(c,f),a.queue.length&&a.queue[0]())}),u.hasOwnProperty("timeout")){var m=null;u.hasOwnProperty("timeoutCallback")&&(m=u.timeoutCallback),setTimeout(function(){p||(p=!0,a.queue.shift(),m&&m.call(u.scope))},u.timeout)}}else a.readers++,s.call(u.scope,f)}function l(i,s,u){var a;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new n),a=r[i]):(u=s,s=i,a=t),u||(u={});var c=null;u.hasOwnProperty("scope")&&(c=u.scope);var f=function(){var h=!1;return function(){h||(h=!0,a.readers=0,a.queue.length&&a.queue[0]())}}();if(a.readers||a.queue.length){var p=!1;if(a.queue.push(function(){p|| Line truncated
`:n(e.children):P7(e)?n(e.children):Dr(e)?e.data:""},textContent:Zo,innerText:F7,getChildren:X7,getParent:Pj,getSiblings:Dj,getAttributeValue:function(n,e){return(n=n.attribs)==null?void 0:n[e]},hasAttrib:function(n,e){return n.attribs!=null&&Object.prototype.hasOwnProperty.call(n.attribs,e)&&n.attribs[e]!=null},getName:function(n){return n.name},nextElementSibling:C_,prevElementSibling:k_,removeElement:Hu,replaceElement:function(n,e){let l=e.prev=n.prev;l&&(l.next=e);var t=e.next=n.next;if(t&&(t.prev=e),t=e.parent=n.parent){let r=t.children;r[r.lastIndexOf(n)]=e,n.parent=null}},appendChild:function(n,e){Hu(e),e.next=null,1<(e.parent=n).children.push(e)?((n=n.children[n.children.length-2]).next=e).prev=n:e.prev=null},append:function(n,e){Hu(e);var l=n.parent,t=n.next;if(e.next=t,((e.prev=n).next=e).parent=l,t){if(t.prev=e,l){let r=l.children;r.splice(r.lastIndexOf(t),0,e)}}else l&&l.children.push(e)},prependChild:function(n,e){Hu(e),e.parent=n,e.prev=null,n.children.unshift(e)!==1?((n=n.children[1]).prev=e).next=n:e.next=null},prepend:function(n,e){Hu(e);var l,t=n.parent;t&&(l=t.children).splice(l.indexOf(n),0,e),n.prev&&(n.prev.next=e),e.parent=t,e.prev=n.prev,(e.next=n).prev=e},filter:S7,find:P_,findOneChild:function(n,e){return e.find(n)},findOne:t_,existsOne:function n(e,l){return l.some(t=>cn(t)&&(e(t)||n(e,t.children)))},findAll:function(n,e){for(var l=[],t=[e],r=[0];;)if(r[0]>=t[0].length){if(t.length===1)return l;t.shift(),r.shift()}else{let i=t[0][r[0]++];cn(i)&&(n(i)&&l.push(i),0<i.children.length)&&(r.unshift(0),t.unshift(i.children))}},testElement:function(n,e){return!(n=g$(n))||n(e)},getElements:function(n,e,l,t=1/0){return(n=g$(n))?S7(n,e,l,t):[]},getElementById:function(n,e,l=!0){return Array.isArray(e)||(e=[e]),t_(Lj("id",n),e,l)},getElementsByTagName:Xo,getElementsByTagType:function(n,e,l=!0,t=1/0){return S7(M7.tag_type(n),e,l,t)},removeSubsets:function(n){let e=n.length;for(;0<=--e;){var l=n[e];if(0<e&&0<=n.lastIndexOf(l,e-1))n.splice(e,1);else for(let t=l.parent;t;t=t.parent)if(n.includes(t)){n.splice(e,1);break}}return n},get DocumentPosition(){return w3},compareDocumentPosition:Fj,uniqueSort:e4,getFeed:function(n){return(n=m7(Zce,n))?(n.name==="feed"?function(e){var l={type:"atom",items:Xo("entry",e=e.children).map(r=>{var i={media:y$(r=r.children)},s=(H2(i,"id","id",r),H2(i,"title","title",r),(s=m7("link",r))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=os("summary",r)||os("content",r))&&(i.description=s),(s=os("updated",r))&&(i.pubDate=new Date(s)),i})},t=(H2(l,"id","id",e),H2(l,"title","title",e),(t=m7("link",e))==null?void 0:t.attribs.href);return t&&(l.link=t),H2(l,"description","subtitle",e),(t=os("updated",e))&&(l.updated=new Date(t)),H2(l,"author","email",e,!0),l}:function(t){var l=(l=(l=m7("channel",t.children))==null?void 0:l.children)!=null?l:[],t={type:t.name.substr(0,3),id:"",items:Xo("item",t.children).map(i=>{var s={media:y$(i=i.children)};return H2(s,"id","guid",i),H2(s,"title","title",i),H2(s,"link","link",i),H2(s,"description","description",i),(i=os("pubDate",i)||os("dc:date",i))&&(s.pubDate=new Date(i)),s})},r=(H2(t,"title","title",l),H2(t,"link","link",l),H2(t,"description","description",l),os("lastBuildDate",l));return r&&(t.updated=new Date(r)),H2(t,"author","managingEditor",l,!0),t})(n):null}}),Wo=function(){return(Wo=Object.assign||function(n){for(var e,l=1,t=arguments.length;l<t;l++)for(var r in e=arguments[l])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}).apply(this,arguments)};function Mj(n,e,l){return n?n(e??n._root.children,null,void 0,l).toString():""}function efe(n,e){return Mj(this,function(l){return!(typeof l!="object"||l==null||"length"in l||"type"in l)}(n)?void(e=n):n,Wo(Wo(Wo({},I_),this==null?void 0:this._options),e_(e??{})))}function nfe(n){return Mj(this,n,Wo(Wo({},this._options),{xmlMode:!0}))}function l5(n){for(var e=n||(this?this.root():[]),l="",t=0;t<e.length;t++)l+=Zo(e[t]);return l}function lfe(n,e,l){return l===void 0&&(l=typeof e=="boolean"&&e),n&&typeof n=="string"?(typeof e=="boolean"&&(l=e),e=this.load(n,I_,!1),l||e("script").remove(),e.root()[0].children.slice()):null}function tfe(){return this(this._root)}function $j(n,e){if(e!==n){for(var l=e;l&&l!==l.parent;)if((l=l.parent)===n)return!0}return!1}function rfe(n,e){if(v$(n)&&v$(e)){for(var l=n.length,t=+e.length,r=0;r<t;r++)n[l++]=e[r];return n.length=l,n}}function v$(n){if(!Array.isArray(n)){if(typeof n!="object"||!Object.prototype.hasOwnProperty.call(n,"length")||typeof n.length!="number"||n.length<0)return!1;for(var e=0;e<n.length;e++)if(!(e in n))return!1}return!0}var qu,ife=Object.freeze({__proto__:null,html:efe,xml:nfe,text:l5,parseHTML:lfe,root:tfe,contains:$j,merge:rfe});function Pr(n){return n.cheerio!=null}function nt(n,e){for(var l=n.length,t=0;t<l;t++)e(n[t],t);return n}function Dv(e){var e="length"in e?Array.prototype.map.call(e,function(t){return D7(t,!0)}):[D7(e,!0)],l=new Oi(e);return e.forEach(function(t){t.parent=l}),e}function r_(n){var e, Line truncated
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Nj={};function Ij(t,e){var n=e.getSiblings(t);return n.length<=1||(t=n.indexOf(t))<0||t===n.length-1?[]:n.slice(t+1).filter(e.isTag)}function Zv(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var Iv=(t,e,n,r,l)=>{let i=l(e,Zv(n),r);return i===At.trueFunc?t:i===At.falseFunc?At.falseFunc:s=>i(s)&&t(s)},Cv={is:Iv,matches:Iv,where:Iv,not(t,e,n,r,l){let i=l(e,Zv(n),r);return i===At.falseFunc?t:i===At.trueFunc?At.falseFunc:s=>!i(s)&&t(s)},has(t,e,n,r,l){let i=n.adapter,s=Zv(n),a=(s.relativeSelector=!0,e.some(f=>f.some(Jv))?[Nj]:void 0),o=l(e,s,a);if(o===At.falseFunc)return At.falseFunc;let c=function(f,p){return f===At.falseFunc?At.falseFunc:m=>p.isTag(m)&&f(m)}(o,i);if(a&&o!==At.trueFunc){let{shouldTestNextSiblings:f=!1}=o;return h=>{if(!t(h))return!1;a[0]=h;var m=i.getChildren(h),h=f?[...m,...Ij(h,i)]:m;return i.existsOne(c,h)}}return f=>t(f)&&i.existsOne(c,i.getChildren(f))}};function kv(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function Z7e(t,e,n,r,l){let{adapter:i,equals:s}=n;switch(e.type){case et.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case et.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case et.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),K7e[e.action](t,e,n);case et.Pseudo:return function(a,o,c,f,p){let{name:m,data:h}=o;if(Array.isArray(h)){if(m in Cv)return Cv[m](a,h,c,f,p);throw new Error(`Unknown pseudo-class :${m}(${h})`)}let g=(o=c.pseudos)==null?void 0:o[m],_=typeof g=="string"?g:Q7e[m];if(typeof _=="string"){if(h!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=V9(_);return Cv.is(a,S,c,f,p)}if(typeof g=="function")return m$(g,m,h,1),S=>g(S,h)&&a(S);if(m in Qv)return Qv[m](a,h,c,f);if(m in h$){let S=h$[m];return m$(S,m,h,2),T=>S(T,c,h)&&a(T)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,r,l);case et.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let a=e.name;return n.xmlMode&&!n.lowerCaseTags||(a=a.toLowerCase()),function(o){return i.getName(o)===a&&t(o)}}case et.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let c=o;for(;c=kv(c,i);)if(t(c))return!0;return!1};let a=new WeakSet;return function(o){let c=o;for(;c=kv(c,i);)if(!a.has(c)){if(i.isTag(c)&&t(c))return!0;a.add(c)}return!1}}case"_flexibleDescendant":return function(a){let o=a;do if(t(o))return!0;while(o=kv(o,i));return!1};case et.Parent:return function(a){return i.getChildren(a).some(o=>i.isTag(o)&&t(o))};case et.Child:return function(a){return(a=i.getParent(a))!=null&&i.isTag(a)&&t(a)};case et.Sibling:return function(a){var o=i.getSiblings(a);for(let f=0;f<o.length;f++){var c=o[f];if(s(a,c))break;if(i.isTag(c)&&t(c))return!0}return!1};case et.Adjacent:return i.prevElementSibling?function(a){return(a=i.prevElementSibling(a))!=null&&t(a)}:function(a){var o=i.getSiblings(a);let c;for(let p=0;p<o.length;p++){var f=o[p];if(s(a,f))break;i.isTag(f)&&(c=f)}return!!c&&t(c)};case et.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function Cj(t){return t.type===et.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(Cj)))}var efe={type:et.Descendant},tfe={type:"_flexibleDescendant"},nfe={type:et.Pseudo,name:"scope",data:null};function kj(t,e,n){t.forEach(G7e),n=(s=e.context)!=null?s:n;let r=Array.isArray(n),l=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:o},c){var f=!(c==null||!c.every(p=>{var m=o.isTag(p)&&o.getParent(p);return p===Nj||m&&o.isTag(m)}));for(let p of a){if(!(0<p.length&&Jv(p[0])&&p[0].type!==et.Descendant)){if(!f||p.some(Cj))continue;p.unshift(efe)}p.unshift(nfe)}})(t,e,l);else if(t.some(a=>0<a.length&&Jv(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;var s=t.map(a=>{if(2<=a.length){let[o,c]=a;o.type===et.Pseudo&&o.name==="scope"&&(r&&c.type===et.D Line truncated
`)}}):{name:r,value:l.replace(y$,`\r
`)}}).toArray()}}),F0=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var r=0;r<t.length;r++)this[r]=t[r];this.length=t.length}},C_=(F0.prototype.cheerio="[cheerio object]",F0.prototype.splice=Array.prototype.splice,F0.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(F0.prototype,j7e,Efe,wfe,Rfe,Nfe),function(t,e){return(C_=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,r){n.__proto__=r}:function(n,r){for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(n[l]=r[l])}))(t,e)}),Ife=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}C_(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},M0=function(){return(M0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var l in e=arguments[n])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)},Cfe=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),$n="\uFFFD",v$=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(P=P||{}),"--"),_$="[CDATA[",E$="doctype",ku="script",kfe="public",Pfe="system";function zj(t){return 55296<=t&&t<=57343}function Gj(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function Xj(t){return 64976<=t&&t<=65007||Cfe.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&(j+=" "),this.message=j+(this.message||""),this.firstUpdate=!1,this},b}function c(T){return n.toString.call(T)==="[object Function]"}function f(T){return n.toString.call(T)==="[object Array]"}function p(T){return n.toString.call(T)==="[object String]"}function m(T){return n.toString.call(T)==="[object Object]"}function h(T){var x=function(v){return v?typeof v=="string"?v.split("."):[v]:[]}(T);return function(v){for(var b=v,w=0;w<x.length;w++){var N=x[w];if(!s(b,N))return;b=b[N]}return b}}function g(T){return Array.prototype.slice.call(T)}function _(T,x,v){return Array.prototype.indexOf.call(T||[],x,v)}function S(T){var x,v=[];for(x in T)s(T,x)&&v.push(x);return v}i.hasOwnProp=s,i._prettifyError=function(T,x,v){return(v=v.Update?v:new i.TemplateError(v)).Update(T),x||(T=v,(v=new Error(T.message)).name=T.name),v},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),i.TemplateError=o,i.escape=function(T){return T.replace(l,a)},i.isFunction=c,i.isArray=f,i.isString=p,i.isObject=m,i.getAttrGetter=h,i.groupBy=function(T,x,v){for(var b={},w=c(x)?x:h(x),N=0;N<T.length;N++){var O=T[N],k=w(O,N);if(k===void 0&&v===!0)throw new TypeError('groupby: attribute "'+x+'" resolved to undefined');(b[k]||(b[k]=[])).push(O)}return b},i.toArray=g,i.without=function(T){var x=[];if(T)for(var v=T.length,b=g(arguments).slice(1),w=-1;++w<v;)_(b,T[w])===-1&&x.push(T[w]);return x},i.repeat=function(T,x){for(var v="",b=0;b<x;b++)v+=T;return v},i.each=function(T,x,v){if(T!=null){if(e.forEach&&T.forEach===e.forEach)T.forEach(x,v);else if(T.length===+T.length)for(var b=0,w=T.length;b<w;b++)x.call(v,T[b],b,T)}},i.map=function(T,x){var v=[];if(T!=null){if(e.map&&T.map===e.map)return T.map(x);for(var b=0;b<T.length;b++)v[v.length]=x(T[b],b);T.length===+T.length&&(v.length=T.length)}return v},i.asyncIter=function(T,x,v){var b=-1;(function w(){++b<T.length?x(T[b],b,w,v):v()})()},i.asyncFor=function(T,x,v){var b=S(T||{}),w=b.length,N=-1;(function O(){var k=b[++N];N<w?x(k,T[k],N,w,O):v()})()},i.indexOf=_,i.keys=S,i._entries=function(T){return S(T).map(function(x){return[x,T[x]]})},i._values=function(T){return S(T).map(function(x){return T[x]})},i._assign=i.extend=function(T,x){return T=T||{},S(x).forEach(function(v){T[v]=x[v]}),T},i.inOperator=function(T,x){if(f(x)||p(x))return x.indexOf(T)!==-1;if(m(x))return T in x;throw new Error('Cannot use "in" operator to search for "'+T+'" in unexpected types.')}});function vU(){throw new Error("setTimeout has not been defined")}function _U(){throw new Error("clearTimeout has not been defined")}var fs=vU,ps=_U;function EU(t){if(fs===setTimeout)return setTimeout(t,0);if((fs===vU||!fs)&&setTimeout)return(fs=setTimeout)(t,0);try{return fs(t,0)}catch{try{return fs.call(null,t,0)}catch{return fs.call(this,t,0)}}}typeof S3.setTimeout=="function"&&(fs=setTimeout),typeof S3.clearTimeout=="function"&&(ps=clearTimeout);var Va,A3=[],Wu=!1,x9=-1;function Ipe(){Wu&&Va&&(Wu=!1,Va.length?A3=Va.concat(A3):x9=-1,A3.length)&&bU()}function bU(){if(!Wu){var t=EU(Ipe);Wu=!0;for(var e=A3.length;e;){for(Va=A3,A3=[];++x9<e;)Va&&Va[x9].run();x9=-1,e=A3.length}Va=null,Wu=!1,function(n){if(ps===clearTimeout)return clearTimeout(n);if((ps===_U||!ps)&&clearTimeout)return(ps=clearTimeout)(n);try{ps(n)}catch{try{return ps.call(null,n)}catch{return ps.call(this,n)}}}(t)}}function TU(t,e){this.fun=t,this.array=e}function Ya(){}TU.prototype.run=function(){this.fun.apply(null,this.array)};var Cpe=Ya,kpe=Ya,Ppe=Ya,Dpe=Ya,Lpe=Ya,Fpe=Ya,Mpe=Ya,$u=S3.performance||{},$pe=$u.now||$u.mozNow||$u.msNow||$u.oNow||$u.webkitNow||function(){return new Date().getTime()},jpe=new Date,vs={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];A3.push(new TU(t,e)),A3.length!==1||Wu||EU(bU)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Cpe,addListener:kpe,once:Ppe,off:Dpe,removeListener:Lpe,removeAllListeners:Fpe,emit:Mpe,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*$pe.call($u),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-jpe)/1e3}};function ds(){}function En(){En.init.call(this)}function SU(t){return t._maxListeners===void 0?En.defaultMaxListeners:t._maxListeners}function Y$(t,e,n,r){var l,i;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(l=t._events)?(l.newListener&&(t.emit("newListener",e,n.listener||n),l=t._events),i=l[e]):(l=t._events=new ds,t._eventsCount=0),i?(typeof i=="function"?i=l[e]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),!i.warned&&(r=SU(t))&&0<r&&i.length>r&&(i.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,nj="()[]{}%*-+~/#,:|.<>=!",OU="string",NU="whitespace",IU="data",CU="block-start",kU="block-end",PU="variable-start",DU="variable-end",LU="comment",FU="left-paren",MU="right-paren",$U="left-bracket",jU="right-bracket",UU="left-curly",BU="right-curly",HU="operator",qU="comma",VU="colon",zU="tilde",GU="pipe",XU="float",WU="boolean",y_="none",KU="symbol",YU="regex";function Rl(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var zpe=function(){function t(n,r){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(r=r||{}).tags||{},this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!r.trimBlocks,this.lstripBlocks=!!r.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,r=this.colno;if(this.in_code){var l=this.current();if(this.isFinished())return null;if(l==='"'||l==="'")return Rl(OU,this._parseString(l),n,r);if(h=this._extract(tj))return Rl(NU,h,n,r);if(h=(h=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((l=this.current())===`
`?this.forward():l==="\r"&&(this.forward(),(l=this.current())===`
`?this.forward():this.back())),Rl(kU,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,Rl(DU,h,n,r);if(l==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var i="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}i+=this.current(),this.forward()}for(var s=["g","i","m","y"],a="";!this.isFinished()&&s.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return Rl(YU,{body:i,flags:a},n,r)}if(nj.indexOf(l)!==-1){this.forward();var o,c=["==","===","!=","!==","<=",">=","//","**"],f=l+this.current();switch(ke.indexOf(c,f)!==-1&&(this.forward(),ke.indexOf(c,(l=f)+this.current())!==-1)&&(l=f+this.current(),this.forward()),l){case"(":o=FU;break;case")":o=MU;break;case"[":o=$U;break;case"]":o=jU;break;case"{":o=UU;break;case"}":o=BU;break;case",":o=qU;break;case":":o=VU;break;case"~":o=zU;break;case"|":o=GU;break;default:o=HU}return Rl(o,l,n,r)}if((h=this._extractUntil(tj+nj)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),c=this._extract("0123456789"),Rl(XU,h+"."+c,n,r)):Rl("int",h,n,r);if(h.match(/^(true|false)$/))return Rl(WU,h,n,r);if(h==="none"||h==="null")return Rl(y_,h,n,r);if(h)return Rl(KU,h,n,r);throw new Error("Unexpected value while parsing: "+h)}var p,m=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(h=(h=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,Rl(CU,h,n,r);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,Rl(PU,h,n,r);var h="",g=!1;for(this._matches(this.tags.COMMENT_START)&&(g=!0,h=this._extractString(this.tags.COMMENT_START));(p=this._extractUntil(m))!==null;){if(h+=p,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!g){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var _=h.slice(-this.colno);if(/^\s+$/.test(_)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!g)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(p===null&&g)throw new Error("expected end of comment, got end of file");return Rl(g?LU:IU,h,n,r)},e._parseString=function(n){this.forward();for(var r="";!this.isFinished()&&this.current()!==n;){var l=this.current();if(l==="\\")switch(this.forward(),this.current()){case"n":r+=`
`;break;case"t":r+=" ";break;case"r":r+="\r";break;default:r+=this.current()}else r+=l;this.forward()}return this.forward(),r},e._matches=function(n){return this.index+n.length>this.len?null:this.str.slice(this.index,this.index+n.length)===n},e._extractString=function(n){return this._matches(n)?(this.forwardN(n.length),n):null},e._extractUntil=function(n){return this._extractMatching(!0,n||"")},e._extract=function(n){return this._extractMatching(!1,n)},e._extractMatching=function(n,r){if(this.isFinished())return null;var l=r.indexOf(this.current());if(n&&l===-1||!n&&l!==-1){var i=this.current();this.forward();for(var s=r.indexOf(this.current());(n&&s===-1||!n&&s!==-1)&&!this.isFinished();)i+=this.current(),this.forward(),s=r.indexOf(this.current());return i}return""},e._extractRegex=function(n){return(n=this.currentStr().match(n))?(this.forwardN(n[0].length),n):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(n){for(var r=0;r<n;r++)this.forward()},e.forward=function(){this.index++,this.previous()===`
`?(this.lineno++,this.colno=0):this.colno++},e.backN=function(n){for(var r=0;r<n;r++)this.back()},e.back=function(){var n;this.index--,this.current()===`
`?(this.lineno--,n=this.src.lastIndexOf(`
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Me={lex:function(t,e){return new zpe(t,e)},TOKEN_STRING:OU,TOKEN_WHITESPACE:NU,TOKEN_DATA:IU,TOKEN_BLOCK_START:CU,TOKEN_BLOCK_END:kU,TOKEN_VARIABLE_START:PU,TOKEN_VARIABLE_END:DU,TOKEN_COMMENT:LU,TOKEN_LEFT_PAREN:FU,TOKEN_RIGHT_PAREN:MU,TOKEN_LEFT_BRACKET:$U,TOKEN_RIGHT_BRACKET:jU,TOKEN_LEFT_CURLY:UU,TOKEN_RIGHT_CURLY:BU,TOKEN_OPERATOR:HU,TOKEN_COMMA:qU,TOKEN_COLON:VU,TOKEN_TILDE:zU,TOKEN_PIPE:GU,TOKEN_INT:"int",TOKEN_FLOAT:XU,TOKEN_BOOLEAN:WU,TOKEN_NONE:y_,TOKEN_SYMBOL:KU,TOKEN_SPECIAL:"special",TOKEN_REGEX:YU};function rj(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function D_(t,e,n){return e&&rj(t.prototype,e),n&&rj(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function JU(t,e){t.prototype=Object.create(e.prototype),QU(t.prototype.constructor=t,e)}function QU(t,e){return(QU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function ZU(t,e,n){n=n||{},ke.keys(n).forEach(function(l){n[l]=function(i,s){return typeof i!="function"||typeof s!="function"?s:function(){var a=this.parent,o=(this.parent=i,s.apply(this,arguments));return this.parent=a,o}}(t.prototype[l],n[l])});var r=function(l){function i(){return l.apply(this,arguments)||this}return JU(i,l),D_(i,[{key:"typename",get:function(){return e}}]),i}(t);return ke._assign(r.prototype,n),r}var Gpe=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(e,n){return typeof e=="object"&&(n=e,e="anonymous"),ZU(this,e,n)},D_(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),Xpe=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return JU(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),ZU(this,n,r)},D_(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(En),e4={Obj:Gpe,EmitterObj:Xpe};function lj(t,e){for(var n,r=0;r<e.length;r++){var l=e[r];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(l.key))=="symbol"?n:String(n),l)}}function L_(t,e,n){return e&&lj(t.prototype,e),n&&lj(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function G9(t,e){t.prototype=Object.create(e.prototype),eB(t.prototype.constructor=t,e)}function eB(t,e){return(eB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function ij(t,e,n){t instanceof e&&n.push(t),t instanceof Rn&&t.findAll(e,n)}var Rn=function(t){function e(){return t.apply(this,arguments)||this}G9(e,t);var n=e.prototype;return n.init=function(r,l){for(var i=arguments,s=this,a=arguments.length,o=new Array(2<a?a-2:0),c=2;c<a;c++)o[c-2]=arguments[c];this.lineno=r,this.colno=l,this.fields.forEach(function(f,p){s[f]=p=(p=i[p+2])===void 0?null:p})},n.findAll=function(r,l){var i=this;return l=l||[],this instanceof Di?this.children.forEach(function(s){return ij(s,r,l)}):this.fields.forEach(function(s){return ij(i[s],r,l)}),l},n.iterFields=function(r){var l=this;this.fields.forEach(function(i){r(l[i],i)})},e}(e4.Obj),F_=function(t){function e(){return t.apply(this,arguments)||this}return G9(e,t),L_(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(Rn),Di=function(t){function e(){return t.apply(this,arguments)||this}G9(e,t);var n=e.prototype;return n.init=function(r,l,i){t.prototype.init.call(this,r,l,i||[])},n.addChild=function(r){this.children.push(r)},L_(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(Rn),Wpe=Di.extend("Root"),tB=F_.extend("Literal"),Kpe=F_.extend("Symbol"),Ype=Di.extend("Group"),Jpe=Di.extend("Array"),Qpe=Rn.extend("Pair",{fields:["key","value"]}),nB=Di.extend("Dict"),Zpe=Rn.extend("LookupVal",{fields:["target","val"]}),rB=Rn.extend("If",{fields:["cond","body","else_"]}),ede=rB.extend("IfAsync"),tde=Rn.extend("InlineIf",{fields:["cond","body","else_"]}),M_=Rn.extend("For",{fields:["arr","name","body","else_"]}),nde=M_.extend("AsyncEach"),rde=M_.extend("AsyncAll"),lB= Line truncated
`);r.forEach(function(l,i){l&&(n&&0<i||!n)&&process.stdout.write(" ".repeat(e)),i=i===r.length-1?"":`
`,process.stdout.write(l+i)})}var z={Node:Rn,Root:Wpe,NodeList:Di,Value:F_,Literal:tB,Symbol:Kpe,Group:Ype,Array:Jpe,Pair:Qpe,Dict:nB,Output:gde,Capture:yde,TemplateData:vde,If:rB,IfAsync:ede,InlineIf:tde,For:M_,AsyncEach:nde,AsyncAll:rde,Macro:lB,Caller:lde,Import:ide,FromImport:sde,FunCall:iB,Filter:sB,FilterAsync:ade,KeywordArgs:ode,Block:ude,Super:cde,Extends:fde,Include:pde,Set:dde,Switch:hde,Case:mde,LookupVal:Zpe,BinOp:t2,In:_de,Is:Ede,Or:bde,And:Tde,Not:Sde,Add:xde,Concat:Ade,Sub:wde,Mul:Rde,Div:Ode,FloorDiv:Nde,Mod:Ide,Pow:Cde,Neg:kde,Pos:Pde,Compare:Dde,CompareOperand:Lde,CallExtension:v_,CallExtensionAsync:Fde,printNodes:function t(e,n){var r,l;n=n||0,Du(e.typename+": ",n),e instanceof Di?(Du(`
`),e.children.forEach(function(i){t(i,n+2)})):e instanceof v_?(Du(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(i){t(i,n+2)})):(r=[],l=null,e.iterFields(function(i,s){i instanceof Rn?r.push([s,i]):(l=l||{})[s]=i}),l?Du(JSON.stringify(l,null,2)+`
`,null,!0):Du(`
`),r.forEach(function(a){var s=a[0],a=a[1];Du("["+s+"] =>",n+2),t(a,n+4)}))}};function aB(t,e){return(aB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}z.Node,z.Root,z.NodeList,z.Value,z.Literal,z.Group,z.Pair,z.Dict,z.Output,z.Capture,z.TemplateData,z.If,z.IfAsync,z.InlineIf,z.For,z.AsyncEach,z.AsyncAll,z.Macro,z.Caller,z.Import,z.FromImport,z.FunCall,z.Filter,z.FilterAsync,z.KeywordArgs,z.Block,z.Super,z.Extends,z.Include,z.Switch,z.Case,z.LookupVal,z.BinOp,z.In,z.Is,z.Or,z.And,z.Not,z.Add,z.Concat,z.Sub,z.Mul,z.Div,z.FloorDiv,z.Mod,z.Pow,z.Neg,z.Pos,z.Compare,z.CompareOperand,z.CallExtension,z.CallExtensionAsync,z.printNodes;var sj=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),aB(r.prototype.constructor=r,e);var r=n.prototype;return r.init=function(l){this.tokens=l,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(l){var i;if(this.peeked){if(l||this.peeked.type!==Me.TOKEN_WHITESPACE)return i=this.peeked,this.peeked=null,i;this.peeked=null}if(i=this.tokens.nextToken(),!l)for(;i&&i.type===Me.TOKEN_WHITESPACE;)i=this.tokens.nextToken();return i},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(l){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=l},r.error=function(l,i,s){var a;return i!==void 0&&s!==void 0||(i=(a=this.peekToken()||{}).lineno,s=a.colno),i!==void 0&&(i+=1),s!==void 0&&(s+=1),new ke.TemplateError(l,i,s)},r.fail=function(l,i,s){throw this.error(l,i,s)},r.skip=function(l){var i=this.nextToken();return!(!i||i.type!==l)||(this.pushToken(i),!1)},r.expect=function(l){var i=this.nextToken();return i.type!==l&&this.fail("expected "+l+", got "+i.type,i.lineno,i.colno),i},r.skipValue=function(l,i){var s=this.nextToken();return!(!s||s.type!==l||s.value!==i)||(this.pushToken(s),!1)},r.skipSymbol=function(l){return this.skipValue(Me.TOKEN_SYMBOL,l)},r.advanceAfterBlockEnd=function(l){var i;return l||((i=this.peekToken())||this.fail("unexpected end of file"),i.type!==Me.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),l=this.nextToken().value),(i=this.nextToken())&&i.type===Me.TOKEN_BLOCK_END?i.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+l+" statement"),i},r.advanceAfterVariableEnd=function(){var l=this.nextToken();l&&l.type===Me.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=l.value.charAt(l.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(l),this.fail("expected variable end"))},r.parseFor=function(){var l,i,s=this.peekToken();if(this.skipSymbol("for")?(l=new z.For(s.lineno,s.colno),i="endfor"):this.skipSymbol("asyncEach")?(l=new z.AsyncEach(s.lineno,s.colno),i="endeach"):this.skipSymbol("asyncAll")?(l=new z.AsyncAll(s.lineno,s.colno),i="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),l.name=this.parsePrimary(),l.name instanceof z.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Me.TOKEN_COMMA){var a=l.name;for(l.name=new z.Array(a.lineno,a.colno),l.name.addChild(a);this.skip(Me.TOKEN_COMMA);){var o=this.parsePrimary();l.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),l.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),l.body=this.parseUntilBlocks(i,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),l.else_=this.parseUntilBlocks(i)),this.advanceAfterBlockEnd(),l},r.parseMacro=function(){var l=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),i=this.parseSignature(),s=new z.Macro(l.lineno,l.colno,s,i);return this.advanceAfterBlockEnd(l.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},r.parseCall=function(){var l=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new z.NodeList),i=this.parsePrimary(),s=(this.advanceAfterBlockEnd(l.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new z.Symbol(l.lineno,l.colno,"caller")),o=new z.Caller(l.lineno,l.colno,a,o,s);return(s=i.args.children)[s.length-1]instanceof z.KeywordArgs||s.push(new z.KeywordArgs),s[s.length-1].addChild(new z.Pair(l.lineno,l.colno,a,o)),new z.Output(l.lineno,l.colno,[i])},r.parseWithContext=function(){var l=this.peekToken(),i=null;return this.skipSymbol("with")?i=!0:this.skipSymbol("without")&&(i=!1),i===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",l.lineno,l.colno),i},r.parseImport=function(){var l=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",l.lineno,l.colno),this.parseExpression()),i=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`)},r._emitLines=function(){for(var l=this,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];s.forEach(function(o){return l._emitLine(o)})},r._emitFuncBegin=function(l,i){this.buffer="output",this._scopeClosers="",this._emitLine("function "+i+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+l.lineno+";"),this._emitLine("var colno = "+l.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},r._emitFuncEnd=function(l){l||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},r._addScopeLevel=function(){this._scopeClosers+="})"},r._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},r._withScopedSyntax=function(l){var i=this._scopeClosers;this._scopeClosers="",l.call(this),this._closeScopeLevels(),this._scopeClosers=i},r._makeCallback=function(l){var i=this._tmpid();return"function("+i+(l?","+l:"")+`) {
if(`+i+") { cb("+i+"); return; }"},r._tmpid=function(){return this.lastId++,"t_"+this.lastId},r._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},r._compileChildren=function(l,i){var s=this;l.children.forEach(function(a){s.compile(a,i)})},r._compileAggregate=function(l,i,s,a){var o=this;s&&this._emit(s),l.children.forEach(function(c,f){0<f&&o._emit(","),o.compile(c,i)}),a&&this._emit(a)},r._compileExpression=function(l,i){this.assertType(l,z.Literal,z.Symbol,z.Group,z.Array,z.Dict,z.FunCall,z.Caller,z.Filter,z.LookupVal,z.Compare,z.InlineIf,z.In,z.Is,z.And,z.Or,z.Not,z.Add,z.Concat,z.Sub,z.Mul,z.Div,z.FloorDiv,z.Mod,z.Pow,z.Neg,z.Pos,z.Compare,z.NodeList),this.compile(l,i)},r.assertType=function(l){for(var i=arguments.length,s=new Array(1<i?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];s.some(function(o){return l instanceof o})||this.fail("assertType: invalid type: "+l.typename,l.lineno,l.colno)},r.compileCallExtension=function(l,i,s){var a=this,o=l.args,c=l.contentArgs,f=typeof l.autoescape!="boolean"||l.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+l.extName+'")["'+l.prop+'"]('),this._emit("context"),(o||c)&&this._emit(","),o&&(o instanceof z.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(p,m){a._compileExpression(p,i),m===o.children.length-1&&!c.length||a._emit(",")})),c.length&&c.forEach(function(p,m){var h;0<m&&a._emit(","),p?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),h=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(p,i),a._emitLine("cb(null, "+h+");")}),a._popBuffer(),a._emitLine("return "+h+";"),a._emitLine("}")):a._emit("null")}),s?(l=this._tmpid(),this._emitLine(", "+this._makeCallback(l)),this._emitLine(this.buffer+" += runtime.suppressValue("+l+", "+f+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+f+` && env.opts.autoescape);
`))},r.compileCallExtensionAsync=function(l,i){this.compileCallExtension(l,i,!0)},r.compileNodeList=function(l,i){this._compileChildren(l,i)},r.compileLiteral=function(l){var i;typeof l.value=="string"?(i=(i=(i=(i=(i=(i=l.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')):l.value===null?this._emit("null"):this._emit(l.value.toString())},r.compileSymbol=function(l,i){l=l.value,(i=i.lookup(l))?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+l+'")')},r.compileGroup=function(l,i){this._compileAggregate(l,i,"(",")")},r.compileArray=function(l,i){this._compileAggregate(l,i,"[","]")},r.compileDict=function(l,i){this._compileAggregate(l,i,"{","}")},r.compilePair=function(a,i){var s=a.key,a=a.value;s instanceof z.Symbol?s=new z.Literal(s.lineno,s.colno,s.value):s instanceof z.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(a,i)},r.compileInlineIf=function(l,i){this._emit("("),this.compile(l.cond,i),this._emit("?"),this.compile(l.body,i),this._emit(":"),l.else_!==null?this.compile(l.else_,i):this._emit('""'),this._emit(")")},r.compileIn=function(l,i){this._emit("runtime.inOperator("),this.compile(l.left,i),this._emit(","),this.compile(l.right,i),this._emit(")")},r.compileIs=function(l,i){var s=(l.right.name||l.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(l.left,i),l.right.args&&(this._emit(","),this.compile(l.right.args,i)),this._emit(") === true")},r._binOpEmitter=function(l,i,s){this.compile(l.left,i),this._emit(s),this.compile(l.right,i)},r.compileOr=function(l,i){return this._binOpEmitter(l,i," || ")},r.compileAnd=function(l,i){return this._binOpEmitter(l,i," && ")},r.compileAdd=function(l,i){return this._binOpEmitter(l,i," + ")},r.compileConcat=function(l,i){return this._binOpEmitter(l,i,' + "" + ')},r.compileSub=function(l,i){return this._binOpEmitter(l,i," - ")},r.compileMul=function(l,i){return this._binOpEmitter(l,i," * ")},r.compileDiv=function(l,i){return this._binOpEmitter(l,i," / ")},r.compileMod=function(l,i){return this._binOpEmitter(l,i," % ")},r.compileNot=function(l,i){this._emit("!"),this.compile(l.target,i)},r.compileFloorDiv=function(l,i){this._emit("Math.floor("),this.compile(l.left,i),this._emit(" / "),this.compile(l.right,i),this._emit(")")},r.compilePow=function(l,i){this._emit("Math.pow("),this.compile(l.left,i),this._emit(", "),this.compile(l.right,i),this._emit(")")},r.compileNeg=function(l,i){this._emit("-"),this.compile(l.target,i)},r.compilePos=function(l,i){this._emit("+"),this.compile(l.target,i)},r.compileCompare=function(l,i){var s=this;this.compile(l.expr,i),l.ops.forEach(function(a){s._emit(" "+Vde[a.type]+" "),s.compile(a.expr,i)})},r.compileLookupVal=function(l,i){this._emit("runtime.memberLookup(("),this._compileExpression(l.target,i),this._emit("),"),this._compileExpression(l.val,i),this._emit(")")},r._getNodeName=function(l){switch(l.typename){case"Symbol":return l.value;case"FunCall":return"the return value of ("+this._getNodeName(l.name)+")";case"LookupVal":return this._getNodeName(l.target)+'["'+this._getNodeName(l.val)+'"]';case"Literal":return l.value.toString();default:return"--expression--"}},r.compileFunCall=function(l,i){this._emit("(lineno = "+l.lineno+", colno = "+l.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(l.name,i),this._emit(', "'+this._getNodeName(l.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(l.args,i,"[","])"),this._emit(")")},r.compileFilter=function(l,i){var s=l.name;this.assertType(s,z.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emit(")")},r.compileFilterAsync=function(l,i){var s=l.name,a=l.symbol.value;this.assertType(s,z.Symbol),i.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(l.args,i),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(l,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(l,i),this._emit(")")},r.compileSet=function(l,i){var s=this,a=[];l.targets.forEach(function(o){o=o.value,(o=i.lookup(o))==null&&(o=s._tmpid(),s._emitLine("var "+o+";")),a.push(o)}),l.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(l.value,i)):(this._emit(a.join(" = ")+" = "),this.compile(l.body,i)),this._emitLine(";"),l.targets.forEach(function(o,c){o=o.value,s._emitLine('frame.set("'+o+'", '+(c=a[c])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+o+'", '+c+");"),s._emitLine("}"),o.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+o+'", '+c+");"),s._emitLine("}"))})},r.compileSwitch=function(l,i){var s=this;this._emit("switch ("),this.compile(l.expr,i),this._emit(") {"),l.cases.forEach(fun Line truncated
else {`),this._withScopedSyntax(function(){a.compile(l.else_,i),s&&a._emit("cb()")})):s&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(l,i){this._emit("(function(cb) {"),this.compileIf(l,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(l,i,s,a){var o=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:a+" - "+s},{name:"revindex0",val:a+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(c){o._emitLine('frame.set("loop.'+c.name+'", '+c.val+");")})},r.compileFor=function(l,i){var s,a,o,c,f=this,p=this._tmpid(),m=this._tmpid(),h=this._tmpid();i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+h+" = "),this._compileExpression(l.arr,i),this._emitLine(";"),this._emit("if("+h+") {"),this._emitLine(h+" = runtime.fromIterator("+h+");"),l.name instanceof z.Array?(this._emitLine("var "+p+";"),this._emitLine("if(runtime.isArray("+h+")) {"),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for("+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),l.name.children.forEach(function(g,_){var S=f._tmpid();f._emitLine("var "+S+" = "+h+"["+p+"]["+_+"];"),f._emitLine('frame.set("'+g+'", '+h+"["+p+"]["+_+"]);"),i.set(l.name.children[_].value,S)}),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){f.compile(l.body,i)}),this._emitLine("}"),this._emitLine("} else {"),c=(s=l.name.children)[0],s=s[1],a=this._tmpid(),o=this._tmpid(),i.set(c.value,a),i.set(s.value,o),this._emitLine(p+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+h+").length;"),this._emitLine("for(var "+a+" in "+h+") {"),this._emitLine(p+"++;"),this._emitLine("var "+o+" = "+h+"["+a+"];"),this._emitLine('frame.set("'+c.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+o+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){f.compile(l.body,i)}),this._emitLine("}")):(c=this._tmpid(),i.set(l.name.value,c),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for(var "+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),this._emitLine("var "+c+" = "+h+"["+p+"];"),this._emitLine('frame.set("'+l.name.value+'", '+c+");"),this._emitLoopBindings(l,h,p,m),this._withScopedSyntax(function(){f.compile(l.body,i)})),this._emitLine("}"),this._emitLine("}"),l.else_&&(this._emitLine("if (!"+m+") {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(l,i,s){var a,o=this,c=this._tmpid(),f=this._tmpid(),p=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+p+" = runtime.fromIterator("),this._compileExpression(l.arr,i),this._emitLine(");"),l.name instanceof z.Array?(a=l.name.children.length,this._emit("runtime."+m+"("+p+", "+a+", function("),l.name.children.forEach(function(h){o._emit(h.value+",")}),this._emit(c+","+f+",next) {"),l.name.children.forEach(function(h){h=h.value,i.set(h,h),o._emitLine('frame.set("'+h+'", '+h+");")})):(a=l.name.value,this._emitLine("runtime."+m+"("+p+", 1, function("+a+", "+c+", "+f+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),i.set(a,a)),this._emitLoopBindings(l,p,c,f),this._withScopedSyntax(function(){var h;s&&(h=o._pushBuffer()),o.compile(l.body,i),o._emitLine("next("+c+(h?","+h:"")+");"),s&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),l.else_&&(this._emitLine("if (!"+p+".length) {"),this.compile(l.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(l,i){this._compileAsyncLoop(l,i)},r.compileAsyncAll=function(l,i){this._compileAsyncLoop(l,i,!0)},r._compileMacro=function(l,_){var s=this,a=[],o=null,c="macro_"+this._tmpid(),f=_!==void 0,p=(l.args.children.forEach(function(S,T){T===l.args.children.length-1&&S instanceof z.Dict?o=S:(s.assertType(S,z.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),h=(o&&o.children||[]).map(function(S){return'"'+S.key.value+'"'}),g=f?_.push(!0):new jv,_=(this._emitLines("var "+c+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+h.join(", ")+"], ","function ("+p.join(", ")+") {","var callerFrame = frame;","frame = "+(f?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),g.set(S.value,"l_"+S.value)}),o&&o.children.forEach(function(S){var T=S.key.value;s._emit('frame.set("'+T+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+T+'")'),s._emit(' ? kwargs["'+T+'"] : '),s._compileExpression(S.value,g),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(l.body,g)}),this._emitLine("frame = "+(f?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine( Line truncated
`))})},r.compileRoot=function(l,i){var s=this,a=(i&&this.fail("compileRoot: root node can't have frame"),i=new jv,this._emitFuncBegin(l,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(l,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(i=l.findAll(z.Block)).forEach(function(o,c){var f=o.name.value;if(a.indexOf(f)!==-1)throw new Error('Block "'+f+'" defined more than once.');a.push(f),s._emitFuncBegin(o,"b_"+f),f=new jv,s._emitLine("var frame = frame.push(true);"),s.compile(o.body,f),s._emitFuncEnd()}),this._emitLine("return {"),i.forEach(function(o,c){o="b_"+o.name.value,s._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(l,i){var s=this["compile"+l.typename];s?s.call(this,l,i):this.fail("compile: Cannot compile node: "+l.typename,l.lineno,l.colno)},r.getCode=function(){return this.codebuf.join("")},n}(e4.Obj),zde={compile:function(s,e,n,r,l){var i=new oj(r,(l=l===void 0?{}:l).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},s);return i.compile(Ude.transform(Mde.parse(s,n,l),e,r)),i.getCode()},Compiler:oj},Gde=st(function(t){function e(h,g){return h==null||h===!1?g:h}function n(h){return h!=h}function r(h){var g=(h=e(h,"")).toLowerCase();return at.copySafeness(h,g.charAt(0).toUpperCase()+g.slice(1))}function l(h){if(ke.isString(h))return h.split("");if(ke.isObject(h))return ke._entries(h||{}).map(function(g){return{key:g[0],value:g[1]}});if(ke.isArray(h))return h;throw new ke.TemplateError("list filter: type not iterable")}function i(h){return function(g,_,S){var T=this,x=T.env.getTest(_=_===void 0?"truthy":_);return ke.toArray(g).filter(function(v){return x.call(T,v,S)===h})}}function s(h){return at.copySafeness(h,h.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(h,g,_){for(var S=[],T=[],x=0;x<h.length;x++)x%g==0&&T.length&&(S.push(T),T=[]),T.push(h[x]);if(T.length){if(_)for(x=T.length;x<g;x++)T.push(_);S.push(T)}return S},t.capitalize=r,t.center=function(h,g){var _;return(h=e(h,"")).length>=(g=g||80)?h:(g-=h.length,_=ke.repeat(" ",g/2-g%2),g=ke.repeat(" ",g/2),at.copySafeness(h,_+h+g))},t.default=function(h,g,_){return _?h||g:h!==void 0?h:g},t.dictsort=function(h,g,_){if(!ke.isObject(h))throw new ke.TemplateError("dictsort filter: val must be an object");var S,T,x=[];for(T in h)x.push([T,h[T]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new ke.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return x.sort(function(v,b){return v=v[S],b=b[S],g||(ke.isString(v)&&(v=v.toUpperCase()),ke.isString(b)&&(b=b.toUpperCase())),b<v?1:v===b?0:-1}),x},t.dump=function(h,g){return JSON.stringify(h,null,g)},t.escape=function(h){return h instanceof at.SafeString?h:at.markSafe(ke.escape((h=h??"").toString()))},t.safe=function(h){return h instanceof at.SafeString?h:at.markSafe((h=h??"").toString())},t.first=function(h){return h[0]},t.forceescape=function(h){return at.markSafe(ke.escape((h=h??"").toString()))},t.groupby=function(h,g){return ke.groupBy(h,g,this.env.opts.throwOnUndefined)},t.indent=function(h,x,_){if((h=e(h,""))==="")return"";x=x||4;var S=h.split(`
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},qj={};function Vj(n,e){var l=e.getSiblings(n);return l.length<=1||(n=l.indexOf(n))<0||n===l.length-1?[]:l.slice(n+1).filter(e.isTag)}function a_(n){return{xmlMode:!!n.xmlMode,lowerCaseAttributeNames:!!n.lowerCaseAttributeNames,lowerCaseTags:!!n.lowerCaseTags,quirksMode:!!n.quirksMode,cacheResults:!!n.cacheResults,pseudos:n.pseudos,adapter:n.adapter,equals:n.equals}}var jv=(n,e,l,t,r)=>{let i=r(e,a_(l),t);return i===wn.trueFunc?n:i===wn.falseFunc?wn.falseFunc:s=>i(s)&&n(s)},Uv={is:jv,matches:jv,where:jv,not(n,e,l,t,r){let i=r(e,a_(l),t);return i===wn.falseFunc?n:i===wn.trueFunc?wn.falseFunc:s=>!i(s)&&n(s)},has(n,e,l,t,r){let i=l.adapter,s=a_(l),u=(s.relativeSelector=!0,e.some(f=>f.some(s_))?[qj]:void 0),a=r(e,s,u);if(a===wn.falseFunc)return wn.falseFunc;let c=function(f,p){return f===wn.falseFunc?wn.falseFunc:m=>p.isTag(m)&&f(m)}(a,i);if(u&&a!==wn.trueFunc){let{shouldTestNextSiblings:f=!1}=a;return h=>{if(!n(h))return!1;u[0]=h;var m=i.getChildren(h),h=f?[...m,...Vj(h,i)]:m;return i.existsOne(c,h)}}return f=>n(f)&&i.existsOne(c,i.getChildren(f))}};function Bv(n,e){return(n=e.getParent(n))&&e.isTag(n)?n:null}function bfe(n,e,l,t,r){let{adapter:i,equals:s}=l;switch(e.type){case en.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case en.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case en.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return l.xmlMode&&!l.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),yfe[e.action](n,e,l);case en.Pseudo:return function(u,a,c,f,p){let{name:m,data:h}=a;if(Array.isArray(h)){if(m in Uv)return Uv[m](u,h,c,f,p);throw new Error(`Unknown pseudo-class :${m}(${h})`)}let g=(a=c.pseudos)==null?void 0:a[m],_=typeof g=="string"?g:Efe[m];if(typeof _=="string"){if(h!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=K7(_);return Uv.is(u,S,c,f,p)}if(typeof g=="function")return N$(g,m,h,1),S=>g(S,h)&&u(S);if(m in u_)return u_[m](u,h,c,f);if(m in R$){let S=R$[m];return N$(S,m,h,2),T=>S(T,c,h)&&u(T)}throw new Error("Unknown pseudo-class :"+m)}(n,e,l,t,r);case en.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let u=e.name;return l.xmlMode&&!l.lowerCaseTags||(u=u.toLowerCase()),function(a){return i.getName(a)===u&&n(a)}}case en.Descendant:{if(l.cacheResults===!1||typeof WeakSet>"u")return function(a){let c=a;for(;c=Bv(c,i);)if(n(c))return!0;return!1};let u=new WeakSet;return function(a){let c=a;for(;c=Bv(c,i);)if(!u.has(c)){if(i.isTag(c)&&n(c))return!0;u.add(c)}return!1}}case"_flexibleDescendant":return function(u){let a=u;do if(n(a))return!0;while(a=Bv(a,i));return!1};case en.Parent:return function(u){return i.getChildren(u).some(a=>i.isTag(a)&&n(a))};case en.Child:return function(u){return(u=i.getParent(u))!=null&&i.isTag(u)&&n(u)};case en.Sibling:return function(u){var a=i.getSiblings(u);for(let f=0;f<a.length;f++){var c=a[f];if(s(u,c))break;if(i.isTag(c)&&n(c))return!0}return!1};case en.Adjacent:return i.prevElementSibling?function(u){return(u=i.prevElementSibling(u))!=null&&n(u)}:function(u){var a=i.getSiblings(u);let c;for(let p=0;p<a.length;p++){var f=a[p];if(s(u,f))break;i.isTag(f)&&(c=f)}return!!c&&n(c)};case en.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return n}}function zj(n){return n.type===en.Pseudo&&(n.name==="scope"||Array.isArray(n.data)&&n.data.some(e=>e.some(zj)))}var Tfe={type:en.Descendant},Sfe={type:"_flexibleDescendant"},xfe={type:en.Pseudo,name:"scope",data:null};function Gj(n,e,l){n.forEach(hfe),l=(s=e.context)!=null?s:l;let t=Array.isArray(l),r=l&&(Array.isArray(l)?l:[l]);if(e.relativeSelector!==!1)(function(u,{adapter:a},c){var f=!(c==null||!c.every(p=>{var m=a.isTag(p)&&a.getParent(p);return p===qj||m&&a.isTag(m)}));for(let p of u){if(!(0<p.length&&s_(p[0])&&p[0].type!==en.Descendant)){if(!f||p.some(zj))continue;p.unshift(Tfe)}p.unshift(xfe)}})(n,e,r);else if(n.some(u=>0<u.length&&s_(u[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;var s=n.map(u=>{if(2<=u.length){let[a,c]=u;a.type===en.Pseudo&&a.name==="scope"&&(t&&c.type===en.D Line truncated
`)}}):{name:t,value:r.replace(C$,`\r
`)}}).toArray()}}),U1=function(n,e,l){if(this.length=0,this.options=l,this._root=e,n){for(var t=0;t<n.length;t++)this[t]=n[t];this.length=n.length}},U_=(U1.prototype.cheerio="[cheerio object]",U1.prototype.splice=Array.prototype.splice,U1.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(U1.prototype,ufe,Hfe,Wfe,Kfe,Jfe),function(n,e){return(U_=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,t){l.__proto__=t}:function(l,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(l[r]=t[r])}))(n,e)}),Qfe=function(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function l(){this.constructor=n}U_(n,e),n.prototype=e===null?Object.create(e):(l.prototype=e.prototype,new l)},B1=function(){return(B1=Object.assign||function(n){for(var e,l=1,t=arguments.length;l<t;l++)for(var r in e=arguments[l])Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}).apply(this,arguments)},Zfe=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ul="\uFFFD",k$=(function(n){n[n.EOF=-1]="EOF",n[n.NULL=0]="NULL",n[n.TABULATION=9]="TABULATION",n[n.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",n[n.LINE_FEED=10]="LINE_FEED",n[n.FORM_FEED=12]="FORM_FEED",n[n.SPACE=32]="SPACE",n[n.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",n[n.QUOTATION_MARK=34]="QUOTATION_MARK",n[n.NUMBER_SIGN=35]="NUMBER_SIGN",n[n.AMPERSAND=38]="AMPERSAND",n[n.APOSTROPHE=39]="APOSTROPHE",n[n.HYPHEN_MINUS=45]="HYPHEN_MINUS",n[n.SOLIDUS=47]="SOLIDUS",n[n.DIGIT_0=48]="DIGIT_0",n[n.DIGIT_9=57]="DIGIT_9",n[n.SEMICOLON=59]="SEMICOLON",n[n.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",n[n.EQUALS_SIGN=61]="EQUALS_SIGN",n[n.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",n[n.QUESTION_MARK=63]="QUESTION_MARK",n[n.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",n[n.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",n[n.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",n[n.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",n[n.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",n[n.GRAVE_ACCENT=96]="GRAVE_ACCENT",n[n.LATIN_SMALL_A=97]="LATIN_SMALL_A",n[n.LATIN_SMALL_F=102]="LATIN_SMALL_F",n[n.LATIN_SMALL_X=120]="LATIN_SMALL_X",n[n.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",n[n.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(P=P||{}),"--"),P$="[CDATA[",D$="doctype",Lo="script",epe="public",npe="system";function iU(n){return 55296<=n&&n<=57343}function sU(n){return n!==32&&n!==10&&n!==13&&n!==9&&n!==12&&1<=n&&n<=31||127<=n&&n<=159}function uU(n){return 64976<=n&&n<=65007||Zfe.has(n)}(function(n){n.controlCharacterInInputStream="control-character-in-input-stream",n.noncharacterInInputStream="noncharacter-in-input-stream",n.surrogateInInputStream="surrogate-in-input-stream",n.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",n.endTagWithAttributes="end-tag-with-attributes",n.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",n.unexpectedSolidusInTag="unexpected-solidus-in-tag",n.unexpectedNullCharacter="unexpected-null-character",n.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",n.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",n.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",n.missingEndTagName="missing-end-tag-name",n.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",n.unknownNamedCharacterReference="unknown-named-character-reference",n.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",n.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",n.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",n.eofBeforeTagName="eof-before-tag-name",n.eofInTag="eof-in-tag",n.missingAttributeValue="missing-attribute-value",n.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",n.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",n.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",n.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",n.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",n.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",n.missingDoctypePublicIdentifier="missing-doctype-public-identifier",n.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",n.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",n.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",n.cdataInHtmlContent="cdata-in-html-content",n.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&(j+=" "),this.message=j+(this.message||""),this.firstUpdate=!1,this},b}function c(T){return l.toString.call(T)==="[object Function]"}function f(T){return l.toString.call(T)==="[object Array]"}function p(T){return l.toString.call(T)==="[object String]"}function m(T){return l.toString.call(T)==="[object Object]"}function h(T){var x=function(v){return v?typeof v=="string"?v.split("."):[v]:[]}(T);return function(v){for(var b=v,w=0;w<x.length;w++){var N=x[w];if(!s(b,N))return;b=b[N]}return b}}function g(T){return Array.prototype.slice.call(T)}function _(T,x,v){return Array.prototype.indexOf.call(T||[],x,v)}function S(T){var x,v=[];for(x in T)s(T,x)&&v.push(x);return v}i.hasOwnProp=s,i._prettifyError=function(T,x,v){return(v=v.Update?v:new i.TemplateError(v)).Update(T),x||(T=v,(v=new Error(T.message)).name=T.name),v},Object.setPrototypeOf?Object.setPrototypeOf(a.prototype,Error.prototype):a.prototype=Object.create(Error.prototype,{constructor:{value:a}}),i.TemplateError=a,i.escape=function(T){return T.replace(r,u)},i.isFunction=c,i.isArray=f,i.isString=p,i.isObject=m,i.getAttrGetter=h,i.groupBy=function(T,x,v){for(var b={},w=c(x)?x:h(x),N=0;N<T.length;N++){var R=T[N],k=w(R,N);if(k===void 0&&v===!0)throw new TypeError('groupby: attribute "'+x+'" resolved to undefined');(b[k]||(b[k]=[])).push(R)}return b},i.toArray=g,i.without=function(T){var x=[];if(T)for(var v=T.length,b=g(arguments).slice(1),w=-1;++w<v;)_(b,T[w])===-1&&x.push(T[w]);return x},i.repeat=function(T,x){for(var v="",b=0;b<x;b++)v+=T;return v},i.each=function(T,x,v){if(T!=null){if(e.forEach&&T.forEach===e.forEach)T.forEach(x,v);else if(T.length===+T.length)for(var b=0,w=T.length;b<w;b++)x.call(v,T[b],b,T)}},i.map=function(T,x){var v=[];if(T!=null){if(e.map&&T.map===e.map)return T.map(x);for(var b=0;b<T.length;b++)v[v.length]=x(T[b],b);T.length===+T.length&&(v.length=T.length)}return v},i.asyncIter=function(T,x,v){var b=-1;(function w(){++b<T.length?x(T[b],b,w,v):v()})()},i.asyncFor=function(T,x,v){var b=S(T||{}),w=b.length,N=-1;(function R(){var k=b[++N];N<w?x(k,T[k],N,w,R):v()})()},i.indexOf=_,i.keys=S,i._entries=function(T){return S(T).map(function(x){return[x,T[x]]})},i._values=function(T){return S(T).map(function(x){return T[x]})},i._assign=i.extend=function(T,x){return T=T||{},S(x).forEach(function(v){T[v]=x[v]}),T},i.inOperator=function(T,x){if(f(x)||p(x))return x.indexOf(T)!==-1;if(m(x))return T in x;throw new Error('Cannot use "in" operator to search for "'+T+'" in unexpected types.')}});function kU(){throw new Error("setTimeout has not been defined")}function PU(){throw new Error("clearTimeout has not been defined")}var ps=kU,ds=PU;function DU(n){if(ps===setTimeout)return setTimeout(n,0);if((ps===kU||!ps)&&setTimeout)return(ps=setTimeout)(n,0);try{return ps(n,0)}catch{try{return ps.call(null,n,0)}catch{return ps.call(this,n,0)}}}typeof xi.setTimeout=="function"&&(ps=setTimeout),typeof xi.clearTimeout=="function"&&(ds=clearTimeout);var Gu,wi=[],Jo=!1,N7=-1;function Qpe(){Jo&&Gu&&(Jo=!1,Gu.length?wi=Gu.concat(wi):N7=-1,wi.length)&&LU()}function LU(){if(!Jo){var n=DU(Qpe);Jo=!0;for(var e=wi.length;e;){for(Gu=wi,wi=[];++N7<e;)Gu&&Gu[N7].run();N7=-1,e=wi.length}Gu=null,Jo=!1,function(l){if(ds===clearTimeout)return clearTimeout(l);if((ds===PU||!ds)&&clearTimeout)return(ds=clearTimeout)(l);try{ds(l)}catch{try{return ds.call(null,l)}catch{return ds.call(this,l)}}}(n)}}function FU(n,e){this.fun=n,this.array=e}function Qu(){}FU.prototype.run=function(){this.fun.apply(null,this.array)};var Zpe=Qu,ede=Qu,nde=Qu,lde=Qu,tde=Qu,rde=Qu,ide=Qu,Bo=xi.performance||{},sde=Bo.now||Bo.mozNow||Bo.msNow||Bo.oNow||Bo.webkitNow||function(){return new Date().getTime()},ude=new Date,_s={nextTick:function(n){var e=new Array(arguments.length-1);if(1<arguments.length)for(var l=1;l<arguments.length;l++)e[l-1]=arguments[l];wi.push(new FU(n,e)),wi.length!==1||Jo||DU(LU)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Zpe,addListener:ede,once:nde,off:lde,removeListener:tde,removeAllListeners:rde,emit:ide,binding:function(n){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(n){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(n){var l=.001*sde.call(Bo),e=Math.floor(l),l=Math.floor(l%1*1e9);return n&&(e-=n[0],(l-=n[1])<0)&&(e--,l+=1e9),[e,l]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-ude)/1e3}};function hs(){}function bl(){bl.init.call(this)}function MU(n){return n._maxListeners===void 0?bl.defaultMaxListeners:n._maxListeners}function cj(n,e,l,t){var r,i;if(typeof l!="function")throw new TypeError('"listener" argument must be a function');return(r=n._events)?(r.newListener&&(n.emit("newListener",e,l.listener||l),r=n._events),i=r[e]):(r=n._events=new hs,n._eventsCount=0),i?(typeof i=="function"?i=r[e]=t?[l,i]:[i,l]:t?i.unshift(l):i.push(l),!i.warned&&(t=MU(n))&&0<t&&i.length>t&&(i.warned=!0,(t=new Error("Possible EventEm Line truncated
\r\xA0`,gj="()[]{}%*-+~/#,:|.<>=!",HU="string",qU="whitespace",VU="data",zU="block-start",GU="block-end",XU="variable-start",WU="variable-end",KU="comment",YU="left-paren",JU="right-paren",QU="left-bracket",ZU="right-bracket",eB="left-curly",nB="right-curly",lB="operator",tB="comma",rB="colon",iB="tilde",sB="pipe",uB="float",aB="boolean",w_="none",oB="symbol",cB="regex";function R2(n,e,l,t){return{type:n,value:e,lineno:l,colno:t}}var dde=function(){function n(l,t){this.str=l,this.index=0,this.len=l.length,this.lineno=0,this.colno=0,this.in_code=!1,l=(t=t||{}).tags||{},this.tags={BLOCK_START:l.blockStart||"{%",BLOCK_END:l.blockEnd||"%}",VARIABLE_START:l.variableStart||"{{",VARIABLE_END:l.variableEnd||"}}",COMMENT_START:l.commentStart||"{#",COMMENT_END:l.commentEnd||"#}"},this.trimBlocks=!!t.trimBlocks,this.lstripBlocks=!!t.lstripBlocks}var e=n.prototype;return e.nextToken=function(){var l=this.lineno,t=this.colno;if(this.in_code){var r=this.current();if(this.isFinished())return null;if(r==='"'||r==="'")return R2(HU,this._parseString(r),l,t);if(h=this._extract(mj))return R2(qU,h,l,t);if(h=(h=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((r=this.current())===`
`?this.forward():r==="\r"&&(this.forward(),(r=this.current())===`
`?this.forward():this.back())),R2(GU,h,l,t);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,R2(WU,h,l,t);if(r==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var i="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}i+=this.current(),this.forward()}for(var s=["g","i","m","y"],u="";!this.isFinished()&&s.indexOf(this.current())!==-1;)u+=this.current(),this.forward();return R2(cB,{body:i,flags:u},l,t)}if(gj.indexOf(r)!==-1){this.forward();var a,c=["==","===","!=","!==","<=",">=","//","**"],f=r+this.current();switch(ke.indexOf(c,f)!==-1&&(this.forward(),ke.indexOf(c,(r=f)+this.current())!==-1)&&(r=f+this.current(),this.forward()),r){case"(":a=YU;break;case")":a=JU;break;case"[":a=QU;break;case"]":a=ZU;break;case"{":a=eB;break;case"}":a=nB;break;case",":a=tB;break;case":":a=rB;break;case"~":a=iB;break;case"|":a=sB;break;default:a=lB}return R2(a,r,l,t)}if((h=this._extractUntil(mj+gj)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),c=this._extract("0123456789"),R2(uB,h+"."+c,l,t)):R2("int",h,l,t);if(h.match(/^(true|false)$/))return R2(aB,h,l,t);if(h==="none"||h==="null")return R2(w_,h,l,t);if(h)return R2(oB,h,l,t);throw new Error("Unexpected value while parsing: "+h)}var p,m=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(h=(h=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,R2(zU,h,l,t);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,R2(XU,h,l,t);var h="",g=!1;for(this._matches(this.tags.COMMENT_START)&&(g=!0,h=this._extractString(this.tags.COMMENT_START));(p=this._extractUntil(m))!==null;){if(h+=p,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!g){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=h.length){var _=h.slice(-this.colno);if(/^\s+$/.test(_)&&!(h=h.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!g)throw new Error("unexpected end of comment");h+=this._extractString(this.tags.COMMENT_END);break}h+=this.current(),this.forward()}if(p===null&&g)throw new Error("expected end of comment, got end of file");return R2(g?KU:VU,h,l,t)},e._parseString=function(l){this.forward();for(var t="";!this.isFinished()&&this.current()!==l;){var r=this.current();if(r==="\\")switch(this.forward(),this.current()){case"n":t+=`
`;break;case"t":t+=" ";break;case"r":t+="\r";break;default:t+=this.current()}else t+=r;this.forward()}return this.forward(),t},e._matches=function(l){return this.index+l.length>this.len?null:this.str.slice(this.index,this.index+l.length)===l},e._extractString=function(l){return this._matches(l)?(this.forwardN(l.length),l):null},e._extractUntil=function(l){return this._extractMatching(!0,l||"")},e._extract=function(l){return this._extractMatching(!1,l)},e._extractMatching=function(l,t){if(this.isFinished())return null;var r=t.indexOf(this.current());if(l&&r===-1||!l&&r!==-1){var i=this.current();this.forward();for(var s=t.indexOf(this.current());(l&&s===-1||!l&&s!==-1)&&!this.isFinished();)i+=this.current(),this.forward(),s=t.indexOf(this.current());return i}return""},e._extractRegex=function(l){return(l=this.currentStr().match(l))?(this.forwardN(l[0].length),l):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(l){for(var t=0;t<l;t++)this.forward()},e.forward=function(){this.index++,this.previous()===`
`?(this.lineno++,this.colno=0):this.colno++},e.backN=function(l){for(var t=0;t<l;t++)this.back()},e.back=function(){var l;this.index--,this.current()===`
`?(this.lineno--,l=this.src.lastIndexOf(`
`,this.index-1),this.colno=l===-1?this.index:this.index-l):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},n}(),Me={lex:function(n,e){return new dde(n,e)},TOKEN_STRING:HU,TOKEN_WHITESPACE:qU,TOKEN_DATA:VU,TOKEN_BLOCK_START:zU,TOKEN_BLOCK_END:GU,TOKEN_VARIABLE_START:XU,TOKEN_VARIABLE_END:WU,TOKEN_COMMENT:KU,TOKEN_LEFT_PAREN:YU,TOKEN_RIGHT_PAREN:JU,TOKEN_LEFT_BRACKET:QU,TOKEN_RIGHT_BRACKET:ZU,TOKEN_LEFT_CURLY:eB,TOKEN_RIGHT_CURLY:nB,TOKEN_OPERATOR:lB,TOKEN_COMMA:tB,TOKEN_COLON:rB,TOKEN_TILDE:iB,TOKEN_PIPE:sB,TOKEN_INT:"int",TOKEN_FLOAT:uB,TOKEN_BOOLEAN:aB,TOKEN_NONE:w_,TOKEN_SYMBOL:oB,TOKEN_SPECIAL:"special",TOKEN_REGEX:cB};function yj(n,e){for(var l,t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,typeof(l=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(r.key))=="symbol"?l:String(l),r)}}function q_(n,e,l){return e&&yj(n.prototype,e),l&&yj(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n}function fB(n,e){n.prototype=Object.create(e.prototype),pB(n.prototype.constructor=n,e)}function pB(n,e){return(pB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}function dB(n,e,l){l=l||{},ke.keys(l).forEach(function(r){l[r]=function(i,s){return typeof i!="function"||typeof s!="function"?s:function(){var u=this.parent,a=(this.parent=i,s.apply(this,arguments));return this.parent=u,a}}(n.prototype[r],l[r])});var t=function(r){function i(){return r.apply(this,arguments)||this}return fB(i,r),q_(i,[{key:"typename",get:function(){return e}}]),i}(n);return ke._assign(t.prototype,l),t}var hde=function(){function n(){this.init.apply(this,arguments)}return n.prototype.init=function(){},n.extend=function(e,l){return typeof e=="object"&&(l=e,e="anonymous"),dB(this,e,l)},q_(n,[{key:"typename",get:function(){return this.constructor.name}}]),n}(),mde=function(n){function e(){var l;return(l=n.call(this)||this).init.apply(l,arguments),l}return fB(e,n),e.prototype.init=function(){},e.extend=function(l,t){return typeof l=="object"&&(t=l,l="anonymous"),dB(this,l,t)},q_(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(bl),t4={Obj:hde,EmitterObj:mde};function vj(n,e){for(var l,t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,typeof(l=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(r.key))=="symbol"?l:String(l),r)}}function V_(n,e,l){return e&&vj(n.prototype,e),l&&vj(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n}function J7(n,e){n.prototype=Object.create(e.prototype),hB(n.prototype.constructor=n,e)}function hB(n,e){return(hB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}function _j(n,e,l){n instanceof e&&l.push(n),n instanceof Nl&&n.findAll(e,l)}var Nl=function(n){function e(){return n.apply(this,arguments)||this}J7(e,n);var l=e.prototype;return l.init=function(t,r){for(var i=arguments,s=this,u=arguments.length,a=new Array(2<u?u-2:0),c=2;c<u;c++)a[c-2]=arguments[c];this.lineno=t,this.colno=r,this.fields.forEach(function(f,p){s[f]=p=(p=i[p+2])===void 0?null:p})},l.findAll=function(t,r){var i=this;return r=r||[],this instanceof Lr?this.children.forEach(function(s){return _j(s,t,r)}):this.fields.forEach(function(s){return _j(i[s],t,r)}),r},l.iterFields=function(t){var r=this;this.fields.forEach(function(i){t(r[i],i)})},e}(t4.Obj),z_=function(n){function e(){return n.apply(this,arguments)||this}return J7(e,n),V_(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(Nl),Lr=function(n){function e(){return n.apply(this,arguments)||this}J7(e,n);var l=e.prototype;return l.init=function(t,r,i){n.prototype.init.call(this,t,r,i||[])},l.addChild=function(t){this.children.push(t)},V_(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(Nl),gde=Lr.extend("Root"),mB=z_.extend("Literal"),yde=z_.extend("Symbol"),vde=Lr.extend("Group"),_de=Lr.extend("Array"),Ede=Nl.extend("Pair",{fields:["key","value"]}),gB=Lr.extend("Dict"),bde=Nl.extend("LookupVal",{fields:["target","val"]}),yB=Nl.extend("If",{fields:["cond","body","else_"]}),Tde=yB.extend("IfAsync"),Sde=Nl.extend("InlineIf",{fields:["cond","body","else_"]}),G_=Nl.extend("For",{fields:["arr","name","body","else_"]}),xde=G_.extend("AsyncEach"),Ade=G_.extend("AsyncAll"),vB= Line truncated
`);t.forEach(function(r,i){r&&(l&&0<i||!l)&&process.stdout.write(" ".repeat(e)),i=i===t.length-1?"":`
`,process.stdout.write(r+i)})}var z={Node:Nl,Root:gde,NodeList:Lr,Value:z_,Literal:mB,Symbol:yde,Group:vde,Array:_de,Pair:Ede,Dict:gB,Output:$de,Capture:jde,TemplateData:Ude,If:yB,IfAsync:Tde,InlineIf:Sde,For:G_,AsyncEach:xde,AsyncAll:Ade,Macro:vB,Caller:wde,Import:Ode,FromImport:Rde,FunCall:_B,Filter:EB,FilterAsync:Nde,KeywordArgs:Ide,Block:Cde,Super:kde,Extends:Pde,Include:Dde,Set:Lde,Switch:Fde,Case:Mde,LookupVal:bde,BinOp:t3,In:Bde,Is:Hde,Or:qde,And:Vde,Not:zde,Add:Gde,Concat:Xde,Sub:Wde,Mul:Kde,Div:Yde,FloorDiv:Jde,Mod:Qde,Pow:Zde,Neg:ehe,Pos:nhe,Compare:lhe,CompareOperand:the,CallExtension:O_,CallExtensionAsync:rhe,printNodes:function n(e,l){var t,r;l=l||0,Mo(e.typename+": ",l),e instanceof Lr?(Mo(`
`),e.children.forEach(function(i){n(i,l+2)})):e instanceof O_?(Mo(e.extName+"."+e.prop+`
`),e.args&&n(e.args,l+2),e.contentArgs&&e.contentArgs.forEach(function(i){n(i,l+2)})):(t=[],r=null,e.iterFields(function(i,s){i instanceof Nl?t.push([s,i]):(r=r||{})[s]=i}),r?Mo(JSON.stringify(r,null,2)+`
`,null,!0):Mo(`
`),t.forEach(function(u){var s=u[0],u=u[1];Mo("["+s+"] =>",l+2),n(u,l+4)}))}};function bB(n,e){return(bB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}z.Node,z.Root,z.NodeList,z.Value,z.Literal,z.Group,z.Pair,z.Dict,z.Output,z.Capture,z.TemplateData,z.If,z.IfAsync,z.InlineIf,z.For,z.AsyncEach,z.AsyncAll,z.Macro,z.Caller,z.Import,z.FromImport,z.FunCall,z.Filter,z.FilterAsync,z.KeywordArgs,z.Block,z.Super,z.Extends,z.Include,z.Switch,z.Case,z.LookupVal,z.BinOp,z.In,z.Is,z.Or,z.And,z.Not,z.Add,z.Concat,z.Sub,z.Mul,z.Div,z.FloorDiv,z.Mod,z.Pow,z.Neg,z.Pos,z.Compare,z.CompareOperand,z.CallExtension,z.CallExtensionAsync,z.printNodes;var Ej=function(n){var e;function l(){return n.apply(this,arguments)||this}e=n,(t=l).prototype=Object.create(e.prototype),bB(t.prototype.constructor=t,e);var t=l.prototype;return t.init=function(r){this.tokens=r,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},t.nextToken=function(r){var i;if(this.peeked){if(r||this.peeked.type!==Me.TOKEN_WHITESPACE)return i=this.peeked,this.peeked=null,i;this.peeked=null}if(i=this.tokens.nextToken(),!r)for(;i&&i.type===Me.TOKEN_WHITESPACE;)i=this.tokens.nextToken();return i},t.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},t.pushToken=function(r){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=r},t.error=function(r,i,s){var u;return i!==void 0&&s!==void 0||(i=(u=this.peekToken()||{}).lineno,s=u.colno),i!==void 0&&(i+=1),s!==void 0&&(s+=1),new ke.TemplateError(r,i,s)},t.fail=function(r,i,s){throw this.error(r,i,s)},t.skip=function(r){var i=this.nextToken();return!(!i||i.type!==r)||(this.pushToken(i),!1)},t.expect=function(r){var i=this.nextToken();return i.type!==r&&this.fail("expected "+r+", got "+i.type,i.lineno,i.colno),i},t.skipValue=function(r,i){var s=this.nextToken();return!(!s||s.type!==r||s.value!==i)||(this.pushToken(s),!1)},t.skipSymbol=function(r){return this.skipValue(Me.TOKEN_SYMBOL,r)},t.advanceAfterBlockEnd=function(r){var i;return r||((i=this.peekToken())||this.fail("unexpected end of file"),i.type!==Me.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),r=this.nextToken().value),(i=this.nextToken())&&i.type===Me.TOKEN_BLOCK_END?i.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+r+" statement"),i},t.advanceAfterVariableEnd=function(){var r=this.nextToken();r&&r.type===Me.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=r.value.charAt(r.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(r),this.fail("expected variable end"))},t.parseFor=function(){var r,i,s=this.peekToken();if(this.skipSymbol("for")?(r=new z.For(s.lineno,s.colno),i="endfor"):this.skipSymbol("asyncEach")?(r=new z.AsyncEach(s.lineno,s.colno),i="endeach"):this.skipSymbol("asyncAll")?(r=new z.AsyncAll(s.lineno,s.colno),i="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),r.name=this.parsePrimary(),r.name instanceof z.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Me.TOKEN_COMMA){var u=r.name;for(r.name=new z.Array(u.lineno,u.colno),r.name.addChild(u);this.skip(Me.TOKEN_COMMA);){var a=this.parsePrimary();r.name.addChild(a)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),r.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),r.body=this.parseUntilBlocks(i,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),r.else_=this.parseUntilBlocks(i)),this.advanceAfterBlockEnd(),r},t.parseMacro=function(){var r=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),i=this.parseSignature(),s=new z.Macro(r.lineno,r.colno,s,i);return this.advanceAfterBlockEnd(r.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},t.parseCall=function(){var r=this.peekToken(),a=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new z.NodeList),i=this.parsePrimary(),s=(this.advanceAfterBlockEnd(r.value),this.parseUntilBlocks("endcall")),u=(this.advanceAfterBlockEnd(),new z.Symbol(r.lineno,r.colno,"caller")),a=new z.Caller(r.lineno,r.colno,u,a,s);return(s=i.args.children)[s.length-1]instanceof z.KeywordArgs||s.push(new z.KeywordArgs),s[s.length-1].addChild(new z.Pair(r.lineno,r.colno,u,a)),new z.Output(r.lineno,r.colno,[i])},t.parseWithContext=function(){var r=this.peekToken(),i=null;return this.skipSymbol("with")?i=!0:this.skipSymbol("without")&&(i=!1),i===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",r.lineno,r.colno),i},t.parseImport=function(){var r=this.peekToken(),u=(this.skipSymbol("import")||this.fail("parseImport: expected import",r.lineno,r.colno),this.parseExpression()),i=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`)},t._emitLines=function(){for(var r=this,i=arguments.length,s=new Array(i),u=0;u<i;u++)s[u]=arguments[u];s.forEach(function(a){return r._emitLine(a)})},t._emitFuncBegin=function(r,i){this.buffer="output",this._scopeClosers="",this._emitLine("function "+i+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+r.lineno+";"),this._emitLine("var colno = "+r.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},t._emitFuncEnd=function(r){r||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},t._addScopeLevel=function(){this._scopeClosers+="})"},t._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},t._withScopedSyntax=function(r){var i=this._scopeClosers;this._scopeClosers="",r.call(this),this._closeScopeLevels(),this._scopeClosers=i},t._makeCallback=function(r){var i=this._tmpid();return"function("+i+(r?","+r:"")+`) {
if(`+i+") { cb("+i+"); return; }"},t._tmpid=function(){return this.lastId++,"t_"+this.lastId},t._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},t._compileChildren=function(r,i){var s=this;r.children.forEach(function(u){s.compile(u,i)})},t._compileAggregate=function(r,i,s,u){var a=this;s&&this._emit(s),r.children.forEach(function(c,f){0<f&&a._emit(","),a.compile(c,i)}),u&&this._emit(u)},t._compileExpression=function(r,i){this.assertType(r,z.Literal,z.Symbol,z.Group,z.Array,z.Dict,z.FunCall,z.Caller,z.Filter,z.LookupVal,z.Compare,z.InlineIf,z.In,z.Is,z.And,z.Or,z.Not,z.Add,z.Concat,z.Sub,z.Mul,z.Div,z.FloorDiv,z.Mod,z.Pow,z.Neg,z.Pos,z.Compare,z.NodeList),this.compile(r,i)},t.assertType=function(r){for(var i=arguments.length,s=new Array(1<i?i-1:0),u=1;u<i;u++)s[u-1]=arguments[u];s.some(function(a){return r instanceof a})||this.fail("assertType: invalid type: "+r.typename,r.lineno,r.colno)},t.compileCallExtension=function(r,i,s){var u=this,a=r.args,c=r.contentArgs,f=typeof r.autoescape!="boolean"||r.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+r.extName+'")["'+r.prop+'"]('),this._emit("context"),(a||c)&&this._emit(","),a&&(a instanceof z.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),a.children.forEach(function(p,m){u._compileExpression(p,i),m===a.children.length-1&&!c.length||u._emit(",")})),c.length&&c.forEach(function(p,m){var h;0<m&&u._emit(","),p?(u._emitLine("function(cb) {"),u._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),h=u._pushBuffer(),u._withScopedSyntax(function(){u.compile(p,i),u._emitLine("cb(null, "+h+");")}),u._popBuffer(),u._emitLine("return "+h+";"),u._emitLine("}")):u._emit("null")}),s?(r=this._tmpid(),this._emitLine(", "+this._makeCallback(r)),this._emitLine(this.buffer+" += runtime.suppressValue("+r+", "+f+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+f+` && env.opts.autoescape);
`))},t.compileCallExtensionAsync=function(r,i){this.compileCallExtension(r,i,!0)},t.compileNodeList=function(r,i){this._compileChildren(r,i)},t.compileLiteral=function(r){var i;typeof r.value=="string"?(i=(i=(i=(i=(i=(i=r.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')):r.value===null?this._emit("null"):this._emit(r.value.toString())},t.compileSymbol=function(r,i){r=r.value,(i=i.lookup(r))?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+r+'")')},t.compileGroup=function(r,i){this._compileAggregate(r,i,"(",")")},t.compileArray=function(r,i){this._compileAggregate(r,i,"[","]")},t.compileDict=function(r,i){this._compileAggregate(r,i,"{","}")},t.compilePair=function(u,i){var s=u.key,u=u.value;s instanceof z.Symbol?s=new z.Literal(s.lineno,s.colno,s.value):s instanceof z.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(u,i)},t.compileInlineIf=function(r,i){this._emit("("),this.compile(r.cond,i),this._emit("?"),this.compile(r.body,i),this._emit(":"),r.else_!==null?this.compile(r.else_,i):this._emit('""'),this._emit(")")},t.compileIn=function(r,i){this._emit("runtime.inOperator("),this.compile(r.left,i),this._emit(","),this.compile(r.right,i),this._emit(")")},t.compileIs=function(r,i){var s=(r.right.name||r.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(r.left,i),r.right.args&&(this._emit(","),this.compile(r.right.args,i)),this._emit(") === true")},t._binOpEmitter=function(r,i,s){this.compile(r.left,i),this._emit(s),this.compile(r.right,i)},t.compileOr=function(r,i){return this._binOpEmitter(r,i," || ")},t.compileAnd=function(r,i){return this._binOpEmitter(r,i," && ")},t.compileAdd=function(r,i){return this._binOpEmitter(r,i," + ")},t.compileConcat=function(r,i){return this._binOpEmitter(r,i,' + "" + ')},t.compileSub=function(r,i){return this._binOpEmitter(r,i," - ")},t.compileMul=function(r,i){return this._binOpEmitter(r,i," * ")},t.compileDiv=function(r,i){return this._binOpEmitter(r,i," / ")},t.compileMod=function(r,i){return this._binOpEmitter(r,i," % ")},t.compileNot=function(r,i){this._emit("!"),this.compile(r.target,i)},t.compileFloorDiv=function(r,i){this._emit("Math.floor("),this.compile(r.left,i),this._emit(" / "),this.compile(r.right,i),this._emit(")")},t.compilePow=function(r,i){this._emit("Math.pow("),this.compile(r.left,i),this._emit(", "),this.compile(r.right,i),this._emit(")")},t.compileNeg=function(r,i){this._emit("-"),this.compile(r.target,i)},t.compilePos=function(r,i){this._emit("+"),this.compile(r.target,i)},t.compileCompare=function(r,i){var s=this;this.compile(r.expr,i),r.ops.forEach(function(u){s._emit(" "+phe[u.type]+" "),s.compile(u.expr,i)})},t.compileLookupVal=function(r,i){this._emit("runtime.memberLookup(("),this._compileExpression(r.target,i),this._emit("),"),this._compileExpression(r.val,i),this._emit(")")},t._getNodeName=function(r){switch(r.typename){case"Symbol":return r.value;case"FunCall":return"the return value of ("+this._getNodeName(r.name)+")";case"LookupVal":return this._getNodeName(r.target)+'["'+this._getNodeName(r.val)+'"]';case"Literal":return r.value.toString();default:return"--expression--"}},t.compileFunCall=function(r,i){this._emit("(lineno = "+r.lineno+", colno = "+r.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(r.name,i),this._emit(', "'+this._getNodeName(r.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(r.args,i,"[","])"),this._emit(")")},t.compileFilter=function(r,i){var s=r.name;this.assertType(s,z.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emit(")")},t.compileFilterAsync=function(r,i){var s=r.name,u=r.symbol.value;this.assertType(s,z.Symbol),i.set(u,u),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emitLine(", "+this._makeCallback(u)),this._addScopeLevel()},t.compileKeywordArgs=function(r,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(r,i),this._emit(")")},t.compileSet=function(r,i){var s=this,u=[];r.targets.forEach(function(a){a=a.value,(a=i.lookup(a))==null&&(a=s._tmpid(),s._emitLine("var "+a+";")),u.push(a)}),r.value?(this._emit(u.join(" = ")+" = "),this._compileExpression(r.value,i)):(this._emit(u.join(" = ")+" = "),this.compile(r.body,i)),this._emitLine(";"),r.targets.forEach(function(a,c){a=a.value,s._emitLine('frame.set("'+a+'", '+(c=u[c])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+a+'", '+c+");"),s._emitLine("}"),a.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+a+'", '+c+");"),s._emitLine("}"))})},t.compileSwitch=function(r,i){var s=this;this._emit("switch ("),this.compile(r.expr,i),this._emit(") {"),r.cases.forEach(fun Line truncated
else {`),this._withScopedSyntax(function(){u.compile(r.else_,i),s&&u._emit("cb()")})):s&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},t.compileIfAsync=function(r,i){this._emit("(function(cb) {"),this.compileIf(r,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},t._emitLoopBindings=function(r,i,s,u){var a=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:u+" - "+s},{name:"revindex0",val:u+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+u+" - 1"},{name:"length",val:u}].forEach(function(c){a._emitLine('frame.set("loop.'+c.name+'", '+c.val+");")})},t.compileFor=function(r,i){var s,u,a,c,f=this,p=this._tmpid(),m=this._tmpid(),h=this._tmpid();i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+h+" = "),this._compileExpression(r.arr,i),this._emitLine(";"),this._emit("if("+h+") {"),this._emitLine(h+" = runtime.fromIterator("+h+");"),r.name instanceof z.Array?(this._emitLine("var "+p+";"),this._emitLine("if(runtime.isArray("+h+")) {"),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for("+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),r.name.children.forEach(function(g,_){var S=f._tmpid();f._emitLine("var "+S+" = "+h+"["+p+"]["+_+"];"),f._emitLine('frame.set("'+g+'", '+h+"["+p+"]["+_+"]);"),i.set(r.name.children[_].value,S)}),this._emitLoopBindings(r,h,p,m),this._withScopedSyntax(function(){f.compile(r.body,i)}),this._emitLine("}"),this._emitLine("} else {"),c=(s=r.name.children)[0],s=s[1],u=this._tmpid(),a=this._tmpid(),i.set(c.value,u),i.set(s.value,a),this._emitLine(p+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+h+").length;"),this._emitLine("for(var "+u+" in "+h+") {"),this._emitLine(p+"++;"),this._emitLine("var "+a+" = "+h+"["+u+"];"),this._emitLine('frame.set("'+c.value+'", '+u+");"),this._emitLine('frame.set("'+s.value+'", '+a+");"),this._emitLoopBindings(r,h,p,m),this._withScopedSyntax(function(){f.compile(r.body,i)}),this._emitLine("}")):(c=this._tmpid(),i.set(r.name.value,c),this._emitLine("var "+m+" = "+h+".length;"),this._emitLine("for(var "+p+"=0; "+p+" < "+h+".length; "+p+"++) {"),this._emitLine("var "+c+" = "+h+"["+p+"];"),this._emitLine('frame.set("'+r.name.value+'", '+c+");"),this._emitLoopBindings(r,h,p,m),this._withScopedSyntax(function(){f.compile(r.body,i)})),this._emitLine("}"),this._emitLine("}"),r.else_&&(this._emitLine("if (!"+m+") {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},t._compileAsyncLoop=function(r,i,s){var u,a=this,c=this._tmpid(),f=this._tmpid(),p=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+p+" = runtime.fromIterator("),this._compileExpression(r.arr,i),this._emitLine(");"),r.name instanceof z.Array?(u=r.name.children.length,this._emit("runtime."+m+"("+p+", "+u+", function("),r.name.children.forEach(function(h){a._emit(h.value+",")}),this._emit(c+","+f+",next) {"),r.name.children.forEach(function(h){h=h.value,i.set(h,h),a._emitLine('frame.set("'+h+'", '+h+");")})):(u=r.name.value,this._emitLine("runtime."+m+"("+p+", 1, function("+u+", "+c+", "+f+",next) {"),this._emitLine('frame.set("'+u+'", '+u+");"),i.set(u,u)),this._emitLoopBindings(r,p,c,f),this._withScopedSyntax(function(){var h;s&&(h=a._pushBuffer()),a.compile(r.body,i),a._emitLine("next("+c+(h?","+h:"")+");"),s&&a._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),r.else_&&(this._emitLine("if (!"+p+".length) {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},t.compileAsyncEach=function(r,i){this._compileAsyncLoop(r,i)},t.compileAsyncAll=function(r,i){this._compileAsyncLoop(r,i,!0)},t._compileMacro=function(r,_){var s=this,u=[],a=null,c="macro_"+this._tmpid(),f=_!==void 0,p=(r.args.children.forEach(function(S,T){T===r.args.children.length-1&&S instanceof z.Dict?a=S:(s.assertType(S,z.Symbol),u.push(S))}),[].concat(u.map(function(S){return"l_"+S.value}),["kwargs"])),m=u.map(function(S){return'"'+S.value+'"'}),h=(a&&a.children||[]).map(function(S){return'"'+S.key.value+'"'}),g=f?_.push(!0):new Wv,_=(this._emitLines("var "+c+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+h.join(", ")+"], ","function ("+p.join(", ")+") {","var callerFrame = frame;","frame = "+(f?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),u.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),g.set(S.value,"l_"+S.value)}),a&&a.children.forEach(function(S){var T=S.key.value;s._emit('frame.set("'+T+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+T+'")'),s._emit(' ? kwargs["'+T+'"] : '),s._compileExpression(S.value,g),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(r.body,g)}),this._emitLine("frame = "+(f?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine( Line truncated
`))})},t.compileRoot=function(r,i){var s=this,u=(i&&this.fail("compileRoot: root node can't have frame"),i=new Wv,this._emitFuncBegin(r,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(r,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(i=r.findAll(z.Block)).forEach(function(a,c){var f=a.name.value;if(u.indexOf(f)!==-1)throw new Error('Block "'+f+'" defined more than once.');u.push(f),s._emitFuncBegin(a,"b_"+f),f=new Wv,s._emitLine("var frame = frame.push(true);"),s.compile(a.body,f),s._emitFuncEnd()}),this._emitLine("return {"),i.forEach(function(a,c){a="b_"+a.name.value,s._emitLine(a+": "+a+",")}),this._emitLine(`root: root
};`)},t.compile=function(r,i){var s=this["compile"+r.typename];s?s.call(this,r,i):this.fail("compile: Cannot compile node: "+r.typename,r.lineno,r.colno)},t.getCode=function(){return this.codebuf.join("")},l}(t4.Obj),dhe={compile:function(s,e,l,t,r){var i=new Tj(t,(r=r===void 0?{}:r).throwOnUndefined),s=(l||[]).map(function(u){return u.preprocess}).filter(function(u){return!!u}).reduce(function(u,a){return a(u)},s);return i.compile(ahe.transform(ihe.parse(s,l,r),e,t)),i.getCode()},Compiler:Tj},hhe=an(function(n){function e(h,g){return h==null||h===!1?g:h}function l(h){return h!=h}function t(h){var g=(h=e(h,"")).toLowerCase();return on.copySafeness(h,g.charAt(0).toUpperCase()+g.slice(1))}function r(h){if(ke.isString(h))return h.split("");if(ke.isObject(h))return ke._entries(h||{}).map(function(g){return{key:g[0],value:g[1]}});if(ke.isArray(h))return h;throw new ke.TemplateError("list filter: type not iterable")}function i(h){return function(g,_,S){var T=this,x=T.env.getTest(_=_===void 0?"truthy":_);return ke.toArray(g).filter(function(v){return x.call(T,v,S)===h})}}function s(h){return on.copySafeness(h,h.replace(/^\s*|\s*$/g,""))}(n=n.exports={}).abs=Math.abs,n.batch=function(h,g,_){for(var S=[],T=[],x=0;x<h.length;x++)x%g==0&&T.length&&(S.push(T),T=[]),T.push(h[x]);if(T.length){if(_)for(x=T.length;x<g;x++)T.push(_);S.push(T)}return S},n.capitalize=t,n.center=function(h,g){var _;return(h=e(h,"")).length>=(g=g||80)?h:(g-=h.length,_=ke.repeat(" ",g/2-g%2),g=ke.repeat(" ",g/2),on.copySafeness(h,_+h+g))},n.default=function(h,g,_){return _?h||g:h!==void 0?h:g},n.dictsort=function(h,g,_){if(!ke.isObject(h))throw new ke.TemplateError("dictsort filter: val must be an object");var S,T,x=[];for(T in h)x.push([T,h[T]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new ke.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return x.sort(function(v,b){return v=v[S],b=b[S],g||(ke.isString(v)&&(v=v.toUpperCase()),ke.isString(b)&&(b=b.toUpperCase())),b<v?1:v===b?0:-1}),x},n.dump=function(h,g){return JSON.stringify(h,null,g)},n.escape=function(h){return h instanceof on.SafeString?h:on.markSafe(ke.escape((h=h??"").toString()))},n.safe=function(h){return h instanceof on.SafeString?h:on.markSafe((h=h??"").toString())},n.first=function(h){return h[0]},n.forceescape=function(h){return on.markSafe(ke.escape((h=h??"").toString()))},n.groupby=function(h,g){return ke.groupBy(h,g,this.env.opts.throwOnUndefined)},n.indent=function(h,x,_){if((h=e(h,""))==="")return"";x=x||4;var S=h.split(`
`),T=ke.repeat(" ",x),x=S.map(function(v,b){return b!==0||_?""+T+v:v}).join(`
`);return at.copySafeness(h,x)},t.join=function(h,g,_){return g=g||"",(h=_?ke.map(h,function(S){return S[_]}):h).join(g)},t.last=function(h){return h[h.length-1]},t.length=function(h){return(h=e(h,""))!==void 0?typeof Map=="function"&&h instanceof Map||typeof Set=="function"&&h instanceof Set?h.size:(!ke.isObject(h)||h instanceof at.SafeString?h:ke.keys(h)).length:0},t.list=l,t.lower=function(h){return(h=e(h,"")).toLowerCase()},t.nl2br=function(h){return h==null?"":at.copySafeness(h,h.replace(/\r\n|\n/g,`<br />
`))},t.random=function(h){return h[Math.floor(Math.random()*h.length)]},t.reject=i(!1),t.rejectattr=function(h,g){return h.filter(function(_){return!_[g]})},t.select=i(!0),t.selectattr=function(h,g){return h.filter(function(_){return!!_[g]})},t.replace=function(h,g,_,S){var T=h;if(g instanceof RegExp)return h.replace(g,_);S===void 0&&(S=-1);var x="";if(typeof g=="number")g=""+g;else if(typeof g!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof at.SafeString))return h;if(g==="")return x=_+h.split("").join(_)+_,at.copySafeness(h,x);var v=h.indexOf(g);if(S===0||v===-1)return h;for(var b=0,w=0;-1<v&&(S===-1||w<S);)x+=h.substring(b,v)+_,b=v+g.length,w++,v=h.indexOf(g,b);return b<h.length&&(x+=h.substring(b)),at.copySafeness(T,x)},t.reverse=function(h){var g;return(g=ke.isString(h)?l(h):ke.map(h,function(_){return _})).reverse(),ke.isString(h)?at.copySafeness(h,g.join("")):g},t.round=function(h,g,_){return g=g||0,g=Math.pow(10,g),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(h*g)/g},t.slice=function(h,g,_){for(var S=Math.floor(h.length/g),T=h.length%g,x=[],v=0,b=0;b<g;b++){var w=v+b*S;b<T&&v++,w=h.slice(w,v+(b+1)*S),_&&T<=b&&w.push(_),x.push(w)}return x},t.sum=function(h,g,_){return(_=_===void 0?0:_)+(h=g?ke.map(h,function(S){return S[g]}):h).reduce(function(S,T){return S+T},0)},t.sort=at.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(x,g,_,S){var T=this,x=ke.map(x,function(b){return b}),v=ke.getAttrGetter(S);return x.sort(function(b,w){if(b=S?v(b):b,w=S?v(w):w,T.env.opts.throwOnUndefined&&S&&(b===void 0||w===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&ke.isString(b)&&ke.isString(w)&&(b=b.toLowerCase(),w=w.toLowerCase()),b<w?g?1:-1:w<b?g?-1:1:0}),x}),t.string=function(h){return at.copySafeness(h,h)},t.striptags=function(h,S){var _=s((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?_.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
`);return on.copySafeness(h,x)},n.join=function(h,g,_){return g=g||"",(h=_?ke.map(h,function(S){return S[_]}):h).join(g)},n.last=function(h){return h[h.length-1]},n.length=function(h){return(h=e(h,""))!==void 0?typeof Map=="function"&&h instanceof Map||typeof Set=="function"&&h instanceof Set?h.size:(!ke.isObject(h)||h instanceof on.SafeString?h:ke.keys(h)).length:0},n.list=r,n.lower=function(h){return(h=e(h,"")).toLowerCase()},n.nl2br=function(h){return h==null?"":on.copySafeness(h,h.replace(/\r\n|\n/g,`<br />
`))},n.random=function(h){return h[Math.floor(Math.random()*h.length)]},n.reject=i(!1),n.rejectattr=function(h,g){return h.filter(function(_){return!_[g]})},n.select=i(!0),n.selectattr=function(h,g){return h.filter(function(_){return!!_[g]})},n.replace=function(h,g,_,S){var T=h;if(g instanceof RegExp)return h.replace(g,_);S===void 0&&(S=-1);var x="";if(typeof g=="number")g=""+g;else if(typeof g!="string")return h;if(typeof(h=typeof h=="number"?""+h:h)!="string"&&!(h instanceof on.SafeString))return h;if(g==="")return x=_+h.split("").join(_)+_,on.copySafeness(h,x);var v=h.indexOf(g);if(S===0||v===-1)return h;for(var b=0,w=0;-1<v&&(S===-1||w<S);)x+=h.substring(b,v)+_,b=v+g.length,w++,v=h.indexOf(g,b);return b<h.length&&(x+=h.substring(b)),on.copySafeness(T,x)},n.reverse=function(h){var g;return(g=ke.isString(h)?r(h):ke.map(h,function(_){return _})).reverse(),ke.isString(h)?on.copySafeness(h,g.join("")):g},n.round=function(h,g,_){return g=g||0,g=Math.pow(10,g),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(h*g)/g},n.slice=function(h,g,_){for(var S=Math.floor(h.length/g),T=h.length%g,x=[],v=0,b=0;b<g;b++){var w=v+b*S;b<T&&v++,w=h.slice(w,v+(b+1)*S),_&&T<=b&&w.push(_),x.push(w)}return x},n.sum=function(h,g,_){return(_=_===void 0?0:_)+(h=g?ke.map(h,function(S){return S[g]}):h).reduce(function(S,T){return S+T},0)},n.sort=on.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(x,g,_,S){var T=this,x=ke.map(x,function(b){return b}),v=ke.getAttrGetter(S);return x.sort(function(b,w){if(b=S?v(b):b,w=S?v(w):w,T.env.opts.throwOnUndefined&&S&&(b===void 0||w===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&ke.isString(b)&&ke.isString(w)&&(b=b.toLowerCase(),w=w.toLowerCase()),b<w?g?1:-1:w<b?g?-1:1:0}),x}),n.string=function(h){return on.copySafeness(h,h)},n.striptags=function(h,S){var _=s((h=e(h,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?_.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
`).replace(/\n\n\n+/g,`
`):_.replace(/\s+/gi," ");return at.copySafeness(h,S)},t.title=function(h){var g=(h=e(h,"")).split(" ").map(r);return at.copySafeness(h,g.join(" "))},t.trim=s,t.truncate=function(h,g,_,S){var T=h;return(h=e(h,"")).length<=(g=g||255)?h:(h=_?h.substring(0,g):((_=h.lastIndexOf(" ",g))===-1&&(_=g),h.substring(0,_)),at.copySafeness(T,h+=S??"..."))},t.upper=function(h){return(h=e(h,"")).toUpperCase()},t.urlencode=function(h){var g=encodeURIComponent;return ke.isString(h)?g(h):(ke.isArray(h)?h:ke._entries(h)).map(function(T){var S=T[0],T=T[1];return g(S)+"="+g(T)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,c=/^https?:\/\/.*$/,f=/^www\./,p=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(h,g,_){n(g)&&(g=1/0);var S=_===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(T){return T&&T.length}).map(function(T){var x=T.match(a),v=(x=x?x[1]:T).substr(0,g);return c.test(x)?'<a href="'+x+'"'+S+">"+v+"</a>":f.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":o.test(x)?'<a href="mailto:'+x+'">'+x+"</a>":p.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":T}).join("")},t.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},t.float=function(h,g){return n(h=parseFloat(h))?g:h},at.makeMacro(["value","default","base"],[],function(h,g,_){return _===void 0&&(_=10),n(h=parseInt(h,_))?g:h}));t.int=m,t.d=t.default,t.e=t.escape}),U9={};function pB(t,e){for(var n=0,r=t.length-1;0<=r;r--){var l=t[r];l==="."?t.splice(r,1):l===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var Xde=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Uv=function(t){return Xde.exec(t).slice(1)};function Bv(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return(e?"/":"")+pB(j_(t.split("/"),function(l){return!!l}),!e).join("/")||"."}function uj(t){var e=dB(t),n=Wde(t,-1)==="/";return(t=(t=pB(j_(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function dB(t){return t.charAt(0)==="/"}var Ku={extname:function(t){return Uv(t)[3]},basename:function(t,e){return t=Uv(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=Uv(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(c){for(var f=0;f<c.length&&c[f]==="";f++);for(var p=c.length-1;0<=p&&c[p]==="";p--);return p<f?[]:c.slice(f,p-f+1)}t=Bv(t).substr(1),e=Bv(e).substr(1);for(var r=n(t.split("/")),l=n(e.split("/")),i=Math.min(r.length,l.length),s=i,a=0;a<i;a++)if(r[a]!==l[a]){s=a;break}for(var o=[],a=s;a<r.length;a++)o.push("..");return(o=o.concat(l.slice(s))).join("/")},join:function(){return uj(j_(Array.prototype.slice.call(arguments,0),function(t,e){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},isAbsolute:dB,normalize:uj,resolve:Bv};function j_(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var Wde="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)};function hB(t,e){return(hB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var U_=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),hB(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(l,i){return Ku.resolve(Ku.dirname(l),i)},r.isRelative=function(l){return l.indexOf("./")===0||l.indexOf("../")===0},n}(e4.EmitterObj);function mB(t,e){return(mB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Kde=function(t){var e,n;function r(l){var i;return(i=t.call(this)||this).precompiled=l||{},i}return n=t,(e=r).prototype=Object.create(n.prototype),mB(e.prototype.constructor=e,n),r.prototype.getSource=function(l){return this.precompiled[l]?{src:{type:"code",obj:this.precompiled[l]},path:l}:null},r}(U_);function gB(t,e){t.prototype=Object.create(e.prototype),yB(t.prototype.constructor=t,e)}function yB(t,e){return(yB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var Yde=Kde,Jde=function(t){function e(n,r){var l=t.call(this)||this;return typeof r=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),r=r||{},l.pathsToNames={},l.noCache=!!r.noCache,n?(n=Array.isArray(n)?n:[n],l.searchPaths=n.map(Ku.normalize)):l.searchPaths=["."],r.watch,l}return gB(e,t),e.prototype.getSource=function(n){for(var r=null,l=this.searchPaths,i=0;i<l.length;i++){var s=Ku.resoLine truncated
`):_.replace(/\s+/gi," ");return on.copySafeness(h,S)},n.title=function(h){var g=(h=e(h,"")).split(" ").map(t);return on.copySafeness(h,g.join(" "))},n.trim=s,n.truncate=function(h,g,_,S){var T=h;return(h=e(h,"")).length<=(g=g||255)?h:(h=_?h.substring(0,g):((_=h.lastIndexOf(" ",g))===-1&&(_=g),h.substring(0,_)),on.copySafeness(T,h+=S??"..."))},n.upper=function(h){return(h=e(h,"")).toUpperCase()},n.urlencode=function(h){var g=encodeURIComponent;return ke.isString(h)?g(h):(ke.isArray(h)?h:ke._entries(h)).map(function(T){var S=T[0],T=T[1];return g(S)+"="+g(T)}).join("&")};var u=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,a=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,c=/^https?:\/\/.*$/,f=/^www\./,p=/\.(?:org|net|com)(?:\:|\/|$)/,m=(n.urlize=function(h,g,_){l(g)&&(g=1/0);var S=_===!0?' rel="nofollow"':"";return h.split(/(\s+)/).filter(function(T){return T&&T.length}).map(function(T){var x=T.match(u),v=(x=x?x[1]:T).substr(0,g);return c.test(x)?'<a href="'+x+'"'+S+">"+v+"</a>":f.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":a.test(x)?'<a href="mailto:'+x+'">'+x+"</a>":p.test(x)?'<a href="http://'+x+'"'+S+">"+v+"</a>":T}).join("")},n.wordcount=function(h){return(h=(h=e(h,""))?h.match(/\w+/g):null)?h.length:null},n.float=function(h,g){return l(h=parseFloat(h))?g:h},on.makeMacro(["value","default","base"],[],function(h,g,_){return _===void 0&&(_=10),l(h=parseInt(h,_))?g:h}));n.int=m,n.d=n.default,n.e=n.escape}),z7={};function wB(n,e){for(var l=0,t=n.length-1;0<=t;t--){var r=n[t];r==="."?n.splice(t,1):r===".."?(n.splice(t,1),l++):l&&(n.splice(t,1),l--)}if(e)for(;l--;)n.unshift("..");return n}var mhe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Kv=function(n){return mhe.exec(n).slice(1)};function Yv(){for(var n="",e=!1,l=arguments.length-1;-1<=l&&!e;l--){var t=0<=l?arguments[l]:"/";if(typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");t&&(n=t+"/"+n,e=t.charAt(0)==="/")}return(e?"/":"")+wB(W_(n.split("/"),function(r){return!!r}),!e).join("/")||"."}function Sj(n){var e=OB(n),l=ghe(n,-1)==="/";return(n=(n=wB(W_(n.split("/"),function(t){return!!t}),!e).join("/"))||e?n:".")&&l&&(n+="/"),(e?"/":"")+n}function OB(n){return n.charAt(0)==="/"}var Qo={extname:function(n){return Kv(n)[3]},basename:function(n,e){return n=Kv(n)[2],e&&n.substr(-1*e.length)===e?n.substr(0,n.length-e.length):n},dirname:function(l){var e=(l=Kv(l))[0],l=l[1];return e||l?e+(l&&l.substr(0,l.length-1)):"."},sep:"/",delimiter:":",relative:function(n,e){function l(c){for(var f=0;f<c.length&&c[f]==="";f++);for(var p=c.length-1;0<=p&&c[p]==="";p--);return p<f?[]:c.slice(f,p-f+1)}n=Yv(n).substr(1),e=Yv(e).substr(1);for(var t=l(n.split("/")),r=l(e.split("/")),i=Math.min(t.length,r.length),s=i,u=0;u<i;u++)if(t[u]!==r[u]){s=u;break}for(var a=[],u=s;u<t.length;u++)a.push("..");return(a=a.concat(r.slice(s))).join("/")},join:function(){return Sj(W_(Array.prototype.slice.call(arguments,0),function(n,e){if(typeof n!="string")throw new TypeError("Arguments to path.join must be strings");return n}).join("/"))},isAbsolute:OB,normalize:Sj,resolve:Yv};function W_(n,e){if(n.filter)return n.filter(e);for(var l=[],t=0;t<n.length;t++)e(n[t],t,n)&&l.push(n[t]);return l}var ghe="ab".substr(-1)==="b"?function(n,e,l){return n.substr(e,l)}:function(n,e,l){return e<0&&(e=n.length+e),n.substr(e,l)};function RB(n,e){return(RB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var K_=function(n){var e;function l(){return n.apply(this,arguments)||this}e=n,(t=l).prototype=Object.create(e.prototype),RB(t.prototype.constructor=t,e);var t=l.prototype;return t.resolve=function(r,i){return Qo.resolve(Qo.dirname(r),i)},t.isRelative=function(r){return r.indexOf("./")===0||r.indexOf("../")===0},l}(t4.EmitterObj);function NB(n,e){return(NB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var yhe=function(n){var e,l;function t(r){var i;return(i=n.call(this)||this).precompiled=r||{},i}return l=n,(e=t).prototype=Object.create(l.prototype),NB(e.prototype.constructor=e,l),t.prototype.getSource=function(r){return this.precompiled[r]?{src:{type:"code",obj:this.precompiled[r]},path:r}:null},t}(K_);function IB(n,e){n.prototype=Object.create(e.prototype),CB(n.prototype.constructor=n,e)}function CB(n,e){return(CB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var vhe=yhe,_he=function(n){function e(l,t){var r=n.call(this)||this;return typeof t=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),t=t||{},r.pathsToNames={},r.noCache=!!t.noCache,l?(l=Array.isArray(l)?l:[l],r.searchPaths=l.map(Qo.normalize)):r.searchPaths=["."],t.watch,r}return IB(e,n),e.prototype.getSource=function(l){for(var t=null,r=this.searchPaths,i=0;i<r.length;i++){var s=Qo.resoLine truncated
/* [wrapped with `+D+`] */
`)):R}(A,function(R,D){return vr(m,function(B){var V="_."+B[0];D&B[1]&&!k2(R,V)&&R.push(V)}),R.sort()}(function(){var R=A.match(Il);return R?R[1].split(Fn):[]}(),y)))}function PS(u){var d=0,y=0;return function(){var A=uW(),R=16-(A-y);if(y=A,0<R){if(800<=++d)return arguments[0]}else d=0;return u.apply(n,arguments)}}function Ec(u,d){var y=-1,A=u.length,R=A-1;for(d=d===n?A:d;++y<d;){var D=Pf(y,R),B=u[D];u[D]=u[y],u[y]=B}return u.length=d,u}var DS=function(){var u=xc(function(y){var A=[];return y.charCodeAt(0)===46&&A.push(""),y.replace(lt,function(R,D,B,V){A.push(B?V.replace(Hr,"$1"):D||R)}),A},function(y){return d.size===500&&d.clear(),y}),d=u.cache;return u}();function pi(u){var d;return typeof u=="string"||Jl(u)?u:(d=u+"")=="0"&&1/u==-1/0?"-0":d}function sa(u){if(u!=null){try{return J5.call(u)}catch{}try{return u+""}catch{}}return""}function LS(u){var d;return u instanceof Ft?u.clone():((d=new D2(u.__wrapped__,u.__chain__)).__actions__=Cl(u.__actions__),d.__index__=u.__index__,d.__values__=u.__values__,d)}function FS(u,d,y){var A=u==null?0:u.length;return A?((y=y==null?0:yt(y))<0&&(y=Er(A+y,0)),si(u,tt(d,3),y)):-1}function MS(u,d,y){var A,R=u==null?0:u.length;return R?(A=R-1,y!==n&&(A=yt(y),A=y<0?Er(R+A,0):nl(A,R-1)),si(u,tt(d,3),A,!0)):-1}function $S(u){return u!=null&&u.length?Vr(u,1):[]}function jS(u){return u&&u.length?u[0]:n}function p2(u){var d=u==null?0:u.length;return d?u[d-1]:n}function US(u,d){return u&&u.length&&d&&d.length?kf(u,d):u}bf=bt(function(u,d){return lr(u)?H4(u,Vr(d,1,lr,!0)):[]}),ui=bt(function(u,d){var y=p2(d);return lr(y)&&(y=n),lr(u)?H4(u,Vr(d,1,lr,!0),tt(y,2)):[]}),$4=bt(function(u,d){var y=p2(d);return lr(y)&&(y=n),lr(u)?H4(u,Vr(d,1,lr,!0),n,y):[]}),Ut=bt(function(u){var d=Yt(u,$f);return d.length&&d[0]===u[0]?Of(d):[]}),bo=bt(function(u){var d=p2(u),y=Yt(u,$f);return d===p2(y)?d=n:y.pop(),y.length&&y[0]===u[0]?Of(y,tt(d,2)):[]}),Tf=bt(function(u){var d=p2(u),y=Yt(u,$f);return(d=typeof d=="function"?d:n)&&y.pop(),y.length&&y[0]===u[0]?Of(y,n,d):[]}),rl=bt(US);var xW=Qi(function(u,d){var y=u==null?0:u.length,A=xf(u,d);return ZT(u,Yt(d,function(R){return Zi(R,y)?+R:R}).sort(uS)),A});function Qf(u){return u==null?u:fW.call(u)}var AW=bt(function(u){return D3(Vr(u,1,lr,!0))}),wW=bt(function(u){var d=p2(u);return lr(d)&&(d=n),D3(Vr(u,1,lr,!0),tt(d,2))}),RW=bt(function(u){var d=typeof(d=p2(u))=="function"?d:n;return D3(Vr(u,1,lr,!0),n,d)});function Zf(u){var d;return u&&u.length?(d=0,u=Pr(u,function(y){if(lr(y))return d=Er(y.length,d),!0}),z5(d,function(y){return Yt(u,ai(y))})):[]}function BS(u,d){return u&&u.length?(u=Zf(u),d==null?u:Yt(u,function(y){return kr(d,n,y)})):[]}var OW=bt(function(u,d){return lr(u)?H4(u,d):[]}),NW=bt(function(u){return Mf(Pr(u,lr))}),IW=bt(function(u){var d=p2(u);return lr(d)&&(d=n),Mf(Pr(u,lr),tt(d,2))}),CW=bt(function(u){var d=typeof(d=p2(u))=="function"?d:n;return Mf(Pr(u,lr),n,d)}),kW=bt(Zf),PW=bt(function(u){var d=typeof(d=1<(d=u.length)?u[d-1]:n)=="function"?(u.pop(),d):n;return BS(u,d)});function HS(u){return(u=I(u)).__chain__=!0,u}function bc(u,d){return d(u)}var DW=Qi(function(u){function d(D){return xf(D,u)}var y=u.length,A=y?u[0]:0,R=this.__wrapped__;return!(1<y||this.__actions__.length)&&R instanceof Ft&&Zi(A)?((R=R.slice(A,+A+(y?1:0))).__actions__.push({func:bc,args:[d],thisArg:n}),new D2(R,this.__chain__).thru(function(D){return y&&!D.length&&D.push(n),D})):this.thru(d)}),LW=dc(function(u,d,y){gn.call(u,y)?++u[y]:Yi(u,y,1)}),FW=mS(FS),MW=mS(MS);function qS(u,d){return(mt(u)?vr:P3)(u,tt(d,3))}function VS(u,d){return(mt(u)?function(y,A){for(var R=y==null?0:y.length;R--&&A(y[R],R,y)!==!1;);return y}:UT)(u,tt(d,3))}var $W=dc(function(u,d,y){gn.call(u,y)?u[y].push(d):Yi(u,y,[d])}),jW=bt(function(u,d,y){var A=-1,R=typeof d=="function",D=kl(u)?fe(u.length):[];return P3(u,function(B){D[++A]=R?kr(d,B,y):q4(B,d,y)}),D}),UW=dc(function(u,d,y){Yi(u,y,d)});function Tc(u,d){return(mt(u)?Yt:XT)(u,tt(d,3))}var BW=dc(function(u,d,y){u[y?0:1].push(d)},function(){return[[],[]]}),HW=bt(function(u,d){var y;return u==null?[]:(1<(y=d.length)&&El(u,d[0],d[1])?d=[]:2<y&&El(d[0],d[1],d[2])&&(d=[d[0]]),JT(u,Vr(d,1),[]))}),Sc=tp||function(){return Pn.Date.now()};function zS(u,d,y){return d=y?n:d,d=u&&d==null?u.length:d,Ji(u,a,n,n,n,n,d)}function GS(u,d){var y;if(typeof d!="function")throw new u2(r);return u=yt(u),function(){return 0<--u&&(y=d.apply(this,arguments)),u<=1&&(d=n),y}}var ep=bt(function(u,d,y){var A,R=1;return y.length&&(A=Xi(y,Ro(ep)),R|=s),Ji(u,R,d,y,A)}),XS=bt(function(u,d,y){var A,R=3;return y.length&&(A=Xi(y,Ro(XS)),R|=s),Ji(d,R,u,y,A)});function WS(u,d,y){var A,R,D,B,V,K,oe=0,ue=!1,xe=!1,_e=!0;if(typeof u!="function")throw new u2(r);function ge(Be){var Je=A,rt=R;return A=R=n,oe=Be,B=u.apply(rt,Je)}function Se(Be){var Je=Be-K;return K===n||d<=Je||Je<0||xe&&D<=Be-oe}function We(){var Be=Sc();if(Se(Be))return Oe(Be);V=W4(We,function(Je){var rt=d-(Je-K);return xe?nl(rt,D-(Je-oe)):rt}(Be))}function Oe(Be){return V=n,_e&&A?ge(Be):(A=R=n,B)}function Ie(){var Be Line truncated
`;if(u.replace(ue,function(_e,ge,Se,We,Oe,Ie){return Se=Se||We,oe+=u.slice(V,Ie).replace(dr,xT),ge&&(A=!0,oe+=`' +
`)):O}(A,function(O,D){return bt(m,function(B){var V="_."+B[0];D&B[1]&&!P3(O,V)&&O.push(V)}),O.sort()}(function(){var O=A.match(C2);return O?O[1].split($l):[]}(),y)))}function XS(o){var d=0,y=0;return function(){var A=CW(),O=16-(A-y);if(y=A,0<O){if(800<=++d)return arguments[0]}else d=0;return o.apply(l,arguments)}}function A6(o,d){var y=-1,A=o.length,O=A-1;for(d=d===l?A:d;++y<d;){var D=Bf(y,O),B=o[D];o[D]=o[y],o[y]=B}return o.length=d,o}var WS=function(){var o=N6(function(y){var A=[];return y.charCodeAt(0)===46&&A.push(""),y.replace(sn,function(O,D,B,V){A.push(B?V.replace(Vt,"$1"):D||O)}),A},function(y){return d.size===500&&d.clear(),y}),d=o.cache;return o}();function dr(o){var d;return typeof o=="string"||Z2(o)?o:(d=o+"")=="0"&&1/o==-1/0?"-0":d}function au(o){if(o!=null){try{return l6.call(o)}catch{}try{return o+""}catch{}}return""}function KS(o){var d;return o instanceof $n?o.clone():((d=new L3(o.__wrapped__,o.__chain__)).__actions__=k2(o.__actions__),d.__index__=o.__index__,d.__values__=o.__values__,d)}function YS(o,d,y){var A=o==null?0:o.length;return A?((y=y==null?0:vn(y))<0&&(y=St(A+y,0)),ur(o,nn(d,3),y)):-1}function JS(o,d,y){var A,O=o==null?0:o.length;return O?(A=O-1,y!==l&&(A=vn(y),A=y<0?St(O+A,0):t2(A,O-1)),ur(o,nn(d,3),A,!0)):-1}function QS(o){return o!=null&&o.length?Gt(o,1):[]}function ZS(o){return o&&o.length?o[0]:l}function d3(o){var d=o==null?0:o.length;return d?o[d-1]:l}function ex(o,d){return o&&o.length&&d&&d.length?Uf(o,d):o}Nf=Tn(function(o,d){return st(o)?G4(o,Gt(d,1,st,!0)):[]}),cr=Tn(function(o,d){var y=d3(d);return st(y)&&(y=l),st(o)?G4(o,Gt(d,1,st,!0),nn(y,2)):[]}),H4=Tn(function(o,d){var y=d3(d);return st(y)&&(y=l),st(o)?G4(o,Gt(d,1,st,!0),l,y):[]}),qn=Tn(function(o){var d=Qn(o,Gf);return d.length&&d[0]===o[0]?Ff(d):[]}),Sa=Tn(function(o){var d=d3(o),y=Qn(o,Gf);return d===d3(y)?d=l:y.pop(),y.length&&y[0]===o[0]?Ff(y,nn(d,2)):[]}),If=Tn(function(o){var d=d3(o),y=Qn(o,Gf);return(d=typeof d=="function"?d:l)&&y.pop(),y.length&&y[0]===o[0]?Ff(y,l,d):[]}),r2=Tn(ex);var GW=Zr(function(o,d){var y=o==null?0:o.length,A=kf(o,d);return dS(o,Qn(d,function(O){return ei(O,y)?+O:O}).sort(SS)),A});function sp(o){return o==null?o:PW.call(o)}var XW=Tn(function(o){return Li(Gt(o,1,st,!0))}),WW=Tn(function(o){var d=d3(o);return st(d)&&(d=l),Li(Gt(o,1,st,!0),nn(d,2))}),KW=Tn(function(o){var d=typeof(d=d3(o))=="function"?d:l;return Li(Gt(o,1,st,!0),l,d)});function up(o){var d;return o&&o.length?(d=0,o=Lt(o,function(y){if(st(y))return d=St(y.length,d),!0}),Y5(d,function(y){return Qn(o,ar(y))})):[]}function nx(o,d){return o&&o.length?(o=up(o),d==null?o:Qn(o,function(y){return Dt(d,l,y)})):[]}var YW=Tn(function(o,d){return st(o)?G4(o,d):[]}),JW=Tn(function(o){return zf(Lt(o,st))}),QW=Tn(function(o){var d=d3(o);return st(d)&&(d=l),zf(Lt(o,st),nn(d,2))}),ZW=Tn(function(o){var d=typeof(d=d3(o))=="function"?d:l;return zf(Lt(o,st),l,d)}),eK=Tn(up),nK=Tn(function(o){var d=typeof(d=1<(d=o.length)?o[d-1]:l)=="function"?(o.pop(),d):l;return nx(o,d)});function lx(o){return(o=I(o)).__chain__=!0,o}function w6(o,d){return d(o)}var lK=Zr(function(o){function d(D){return kf(D,o)}var y=o.length,A=y?o[0]:0,O=this.__wrapped__;return!(1<y||this.__actions__.length)&&O instanceof $n&&ei(A)?((O=O.slice(A,+A+(y?1:0))).__actions__.push({func:w6,args:[d],thisArg:l}),new L3(O,this.__chain__).thru(function(D){return y&&!D.length&&D.push(l),D})):this.thru(d)}),tK=v6(function(o,d,y){vl.call(o,y)?++o[y]:Jr(o,y,1)}),rK=NS(YS),iK=NS(JS);function tx(o,d){return(gn(o)?bt:Di)(o,nn(d,3))}function rx(o,d){return(gn(o)?function(y,A){for(var O=y==null?0:y.length;O--&&A(y[O],O,y)!==!1;);return y}:eS)(o,nn(d,3))}var sK=v6(function(o,d,y){vl.call(o,y)?o[y].push(d):Jr(o,y,[d])}),uK=Tn(function(o,d,y){var A=-1,O=typeof d=="function",D=P2(o)?fe(o.length):[];return Di(o,function(B){D[++A]=O?Dt(d,B,y):X4(B,d,y)}),D}),aK=v6(function(o,d,y){Jr(o,y,d)});function O6(o,d){return(gn(o)?Qn:uS)(o,nn(d,3))}var oK=v6(function(o,d,y){o[y?0:1].push(d)},function(){return[[],[]]}),cK=Tn(function(o,d){var y;return o==null?[]:(1<(y=d.length)&&b2(o,d[0],d[1])?d=[]:2<y&&b2(d[0],d[1],d[2])&&(d=[d[0]]),fS(o,Gt(d,1),[]))}),R6=op||function(){return Ll.Date.now()};function ix(o,d,y){return d=y?l:d,d=o&&d==null?o.length:d,Qr(o,u,l,l,l,l,d)}function sx(o,d){var y;if(typeof d!="function")throw new c3(t);return o=vn(o),function(){return 0<--o&&(y=d.apply(this,arguments)),o<=1&&(d=l),y}}var ap=Tn(function(o,d,y){var A,O=1;return y.length&&(A=Wr(y,Na(ap)),O|=s),Qr(o,O,d,y,A)}),ux=Tn(function(o,d,y){var A,O=3;return y.length&&(A=Wr(y,Na(ux)),O|=s),Qr(d,O,o,y,A)});function ax(o,d,y){var A,O,D,B,V,K,ae=0,oe=!1,xe=!1,_e=!0;if(typeof o!="function")throw new c3(t);function ge(Be){var Je=A,tn=O;return A=O=l,ae=Be,B=o.apply(tn,Je)}function Se(Be){var Je=Be-K;return K===l||d<=Je||Je<0||xe&&D<=Be-ae}function We(){var Be=R6();if(Se(Be))return Re(Be);V=Q4(We,function(Je){var tn=d-(Je-K);return xe?t2(tn,D-(Je-ae)):tn}(Be))}function Re(Be){return V=l,_e&&A?ge(Be):(A=O=l,B)}function Ie(){var Be Line truncated
`;if(o.replace(oe,function(_e,ge,Se,We,Re,Ie){return Se=Se||We,ae+=o.slice(V,Ie).replace(gt,$T),ge&&(A=!0,ae+=`' +
__e(`+ge+`) +
'`),Oe&&(R=!0,oe+=`';
`+Oe+`;
__p += '`),Se&&(oe+=`' +
'`),Re&&(O=!0,ae+=`';
`+Re+`;
__p += '`),Se&&(ae+=`' +
((__t = (`+Se+`)) == null ? '' : __t) +
'`),V=Ie+_e.length,_e}),oe+=`';
`,K=gn.call(d,"variable")&&d.variable){if(Wn.test(K))throw new Ye("Invalid `variable` option passed into `_.template`")}else oe=`with (obj) {
`+oe+`
'`),V=Ie+_e.length,_e}),ae+=`';
`,K=vl.call(d,"variable")&&d.variable){if(Yl.test(K))throw new Ye("Invalid `variable` option passed into `_.template`")}else ae=`with (obj) {
`+ae+`
}
`;if(oe=(R?oe.replace(wt,""):oe).replace(Ge,"$1").replace($t,"$1;"),oe="function("+(K||"obj")+`) {
`;if(ae=(O?ae.replace(On,""):ae).replace(Ge,"$1").replace(Bn,"$1;"),ae="function("+(K||"obj")+`) {
`+(K?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(A?", __e = _.escape":"")+(R?`, __j = Array.prototype.join;
`)+"var __t, __p = ''"+(A?", __e = _.escape":"")+(O?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+oe+`return __p
}`,(ue=fx(function(){return ht(D,xe+"return "+oe).apply(n,B)})).source=oe,lp(ue))throw ue;return ue},I.times=function(u,d){if((u=yt(u))<1||c<u)return[];var y=p,A=nl(u,p);for(d=tt(d),u-=p,A=z5(A,d);++y<u;)d(y);return A},I.toFinite=t3,I.toInteger=yt,I.toLength=tx,I.toLower=function(u){return nn(u).toLowerCase()},I.toNumber=h2,I.toSafeInteger=function(u){return u?ra(yt(u),-9007199254740991,c):u===0?u:0},I.toString=nn,I.toUpper=function(u){return nn(u).toUpperCase()},I.trim=function(u,d,y){return(u=nn(u))&&(y||d===n)?Gi(u):u&&(d=Yl(d))?F3(y=P2(u),G5(y,d=P2(d)),X5(y,d)+1).join(""):u},I.trimEnd=function(u,d,y){return(u=nn(u))&&(y||d===n)?u.slice(0,AT(u)+1):u&&(d=Yl(d))?F3(y=P2(u),0,X5(y,P2(d))+1).join(""):u},I.trimStart=function(u,d,y){return(u=nn(u))&&(y||d===n)?u.replace(Xn,""):u&&(d=Yl(d))?F3(y=P2(u),G5(y,P2(d))).join(""):u},I.truncate=function(u,R){var y,B=30,A="...",R=(Hn(R)&&(y="separator"in R?R.separator:y,B="length"in R?yt(R.length):B,A="omission"in R?Yl(R.omission):A),(u=nn(u)).length);if((R=Qs(u)?(D=P2(u)).length:R)<=B)return u;if((R=B-vo(A))<1)return A;var D,B=D?F3(D,0,R).join(""):u.slice(0,R);if(y!==n)if(D&&(R+=B.length-R),ip(y)){if(u.slice(R).search(y)){var V,K=B;for((y=y.global?y:Zs(y.source,nn(i2.exec(y))+"g")).lastIndex=0;V=y.exec(K);)var oe=V.index;B=B.slice(0,oe===n?R:oe)}}else u.indexOf(Yl(y),R)!=R&&-1<(D=B.lastIndexOf(y))&&(B=B.slice(0,D));return B+A},I.unescape=function(u){return(u=nn(u))&&bn.test(u)?u.replace(Ke,tW):u},I.uniqueId=function(u){var d=++rW;return nn(u)+d},I.upperCase=dK,I.upperFirst=op,I.each=qS,I.eachRight=VS,I.first=jS,fp(I,(mp={},ci(I,function(u,d){gn.call(I.prototype,d)||(mp[d]=u)}),mp),{chain:!1}),I.VERSION="4.17.21",vr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){I[u].placeholder=I}),vr(["drop","take"],function(u,d){Ft.prototype[u]=function(y){y=y===n?1:Er(yt(y),0);var A=this.__filtered__&&!d?new Ft(this):this.clone();return A.__filtered__?A.__takeCount__=nl(y,A.__takeCount__):A.__views__.push({size:nl(y,p),type:u+(A.__dir__<0?"Right":"")}),A},Ft.prototype[u+"Right"]=function(y){return this.reverse()[u](y).reverse()}}),vr(["filter","map","takeWhile"],function(u,d){var y=d+1,A=y==1||y==3;Ft.prototype[u]=function(R){var D=this.clone();return D.__iteratees__.push({iteratee:tt(R,3),type:y}),D.__filtered__=D.__filtered__||A,D}}),vr(["head","last"],function(u,d){var y="take"+(d?"Right":"");Ft.prototype[u]=function(){return this[y](1).value()[0]}}),vr(["initial","tail"],function(u,d){var y="drop"+(d?"":"Right");Ft.prototype[u]=function(){return this.__filtered__?new Ft(this):this[y](1)}}),Ft.prototype.compact=function(){return this.filter(Dl)},Ft.prototype.find=function(u){return this.filter(u).head()},Ft.prototype.findLast=function(u){return this.reverse().find(u)},Ft.prototype.invokeMap=bt(function(u,d){return typeof u=="function"?new Ft(this):this.map(function(y){return q4(y,u,d)})}),Ft.prototype.reject=function(u){return this.filter(Ac(tt(u)))},Ft.prototype.slice=function(u,d){u=yt(u);var y=this;return y.__filtered__&&(0<u||d<0)?new Ft(y):(u<0?y=y.takeRight(-u):u&&(y=y.drop(u)),d!==n?(d=yt(d))<0?y.dropRight(-d):y.take(d-u):y)},Ft.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Ft.prototype.toArray=function(){return this.take(p)},ci(Ft.prototype,function(u,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),A=/^(?:head|last)$/.test(d),R=I[A?"take"+(d=="last"?"Right":""):d],D=A||/^find/.test(d);R&&(I.prototype[d]=function(){function B(We){return We=R.apply(I,ii([We],oe)),A&&xe?We[0]:We}var V,K=this.__wrapped__,oe=A?[1]:arguments,Se=K instanceof Ft,_e=oe[0],ue=Se||mt(K),xe=(ue&&y&&typeof _e=="function"&&_e.length!=1&&(Se=ue=!1),this.__chain__),_e=!!this.__actions__.length,ge=D&&!xe,Se=Se&&!_e;return!D&&ue?(K=Se?K:new Ft(this),(V=u.apply(K,oe)).__actions__.push({func:bc,args:[B],thisArg:n}),new D2(V,xe)):ge&&Se?u.apply(this,oe):(V=this.thru(B),ge?A?V.value()[0]:V.value():V)})}),vr(["pop","push","shift","sort","splice","unshift"],function(u){var d=Y5[u],y=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",A=/^(?:pop|shift)$/.test(u);I.prototype[u]=function(){var R,D=arguments;return A&&!this.__chain__?(R=this.value(),d.apply(mt(R)?R:[],D)):this[y](function(B){return d.apply(mt(B)?B:[],D)})}}),ci(Ft.prototype,function(u,d){var y,A=I[d];A&&(y=A.name+"",gn.call(So,y)||(So[y]=[]),So[y].push({name:d,func:A}))}),So[hc(n,2).name]=[{name:"wrapper",func:n}],Ft.prototype.clone=function(){var u=new Ft(this.__wrapped__);return u.__actions__=Cl(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Cl(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Cl(this.__views__),u},Ft.prototype.reverse=function(){var u;return this.__filtered__?((u=new Ft(this)).__dir__=-1,u.__filtered__=!0):(u=this.clone()).__dir__*=-1,u},Ft.prototype.value=function(){var u=this.__wrapped__.value(),d=this.__dir__,y=mt(u),A=d<0,R=y?u.length:0,D=function(Be,Je,rt){for(var Mn=-1,Qn=rt.length;++Mn<Qn;){var h Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let c=Rhe(o,i);c&&s.push(c)}}else s.push(o)}return s.length!==0&&s[0].name==="EXTM3U"||Le("The EXTM3U tag MUST be the first line."),s}(t,e),r=Ohe(n,e);return r.source=t,r}var Nhe=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],Ihe=["#EXT-X-MEDIA"],eE=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(Nhe.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(Ihe.some(r=>n.startsWith(r)))continue;Le(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function lE(t,e){let n=1e3;e&&(n=Math.pow(10,e));let r=Math.round(t*n)/n;return e?r.toFixed(e):r}function Che(t){let e=[`DATA-ID="${t.id}"`];return t.language&&e.push(`LANGUAGE="${t.language}"`),t.value?e.push(`VALUE="${t.value}"`):t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function zB(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",r=[`METHOD=${t.method}`];return t.uri&&r.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&Le("IV must be a 128-bit unsigned integer"),r.push(`IV=${HB(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function khe(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",r=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&r.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&r.push(`URI="${e.uri}"`),e.codecs&&r.push(`CODECS="${e.codecs}"`),e.resolution&&r.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&r.push(`FRAME-RATE=${lE(e.frameRate,3)}`),e.hdcpLevel&&r.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){r.push(`AUDIO="${e.audio[0].groupId}"`);for(let l of e.audio)t.push(f7(l))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let l of e.video)t.push(f7(l))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let l of e.subtitles)t.push(f7(l))}if(vhe().allowClosedCaptionsNone&&e.closedCaptions.length===0)r.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){r.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let l of e.closedCaptions)t.push(f7(l))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let l=[];for(let{format:i,cpcList:s}of e.allowedCpc)l.push(`${i}:${s.join("/")}`);r.push(`ALLOWED-CPC="${l.join(",")}"`)}e.videoRange&&r.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&r.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&r.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${r.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function f7(t){let e=[`TYPE=${t.type}`,`GROUP-ID="${t.groupId}"`,`NAME="${t.name}"`];return t.isDefault!==void 0&&e.push("DEFAULT="+(t.isDefault?"YES":"NO")),t.autoselect!==void 0&&e.push("AUTOSELECT="+(t.autoselect?"YES":"NO")),t.forced!==void 0&&e.push("FORCED="+(t.forced?"YES":"NO")),t.language&&e.push(`LANGUAGE="${t.language}"`),t.assocLanguage&&e.push(`ASSOC-LANGUAGE="${t.assocLanguage}"`),t.instreamId&&e.push(`INSTREAM-ID="${t.instreamId}"`),t.characteristics&&e.push(`CHARACTERISTICS="${t.characteristics}"`),t.channels&&e.push(`CHANNELS="${t.channels}"`),t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function Phe(t,e,n,r,l=1,i=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let c=zB(e.key);c!==n&&(t.push(c),n=c)}if(e.map){let c=function(f){let p=[`URI="${f.uri}"`];return f.byterange&&p.push(`BYTERANGE="${Y_(f.byterange)}"`),`#EXT-X-MAP:${p.join(",")}`}(e.map);c!==r&&(t.push(c),r=c)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${K_(e.programDateTime)}`),e.dateRange&&t.push(function(c){let f=[`ID="${c.id}"`];c.start&&f.push(`START-DATE="${K_(c.start)}"`),c.end&&f.push(`END-DATE="${K_(c.end)}"`),c.duration&&f.push(`DURATION=${c.duration}`),c.plannedDuration&&f.push(`PLANNED-DURATION=${c.plannedDuration}`),c.classId&&f.push(`CLASS="${c.classId}"`),c.endOnNext&&f.push("END-ON-NEXT=YES");for(let p of Object.keys(c.attributes))p.startsWith("X-")?typeof c.attributes[p]=="number"?f.push(`${p}=${c.attributes[p]}`):f.push(`${p}="${c.attributes[p]}"`):p.startsWith("SCTE35-")&&f.push(`${p}=${HB(c.attributes[p])}`);return`#EXT-X-DATERANGE:${f.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(c,f){let p="";for(let m of f)if(m.type==="OUT")p="OUT",c.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")p="IN",c.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let h=m.value?`:${m.value}`:"";c.push(`#${m.tagName}${h}`)}return p}(t,e.markers)),e.parts.length>0&&(s=function(c,f){let p=!1;for(let m of f)if(m.hint){let h=[];if(h.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:g,length:_}=m.byterange;h.push(`BYTERANGE-START=${g}`),_&&h.push(`BYTERANGE-LENGTH=${_}`)}c.push(`#EXT-X-PRELOAD-HINT:${h.join(",")}`),p=!0}else{let h=[];h.push( Line truncated
`)}var XB="hls_cache",A7=[],Qa={},d5={},Ja={},x7="";function Dhe(t,e){if(A7.push(t),Qa[t]=e,A7.length>5){let n=A7.shift();Lhe(n)}}function Lhe(t){delete Qa[t],delete A7[t],new JSFile(XB+"/"+t).delete()}function Fhe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=iE(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=iE(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=iE(t,n.key.uri));return e}async function WB(t,e){let n=md5X(t);if(Qa[n])return Qa[n];let r={},l=t;for(;r=await req(l,{headers:e,redirect:0}),r.headers.location;)l=r.headers.location;if(r.code==200){var i=r.content;let s=Fhe(l,VB(i));return Dhe(n,{code:r.code,plist:s,key:n,headers:r.headers}),Qa[n]}return{}}async function KB(t,e,n){if(!Qa[t])return{};let l=Qa[t].plist.segments,i=!Ja[t];if(i){Ja[t]={};for(let f of l){let p=md5X(f.uri+f.mediaSequenceNumber.toString());Ja[t][p]={file:XB+"/"+t+"/"+p,uri:f.uri,key:p,index:f.mediaSequenceNumber,order:f.mediaSequenceNumber,state:-1,read:!1}}}for(let f in Ja[t]){let p=Ja[t][f];p.index>=e?p.order=p.index-e:p.order=l.length-e+p.index}i&&Mhe(t,5,n);let s=l[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=Ja[t][a];if(o.state==1||o.state==-1){let f=new JSFile(o.file);if(await f.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:f};o.state=-1}if(o.state==-1&&YB(t,o,n),o.state==0){var c=new JSProxyStream;c.head(200,{connection:"close","content-type":"video/mp2t"});let f=0;return o.read=!0,new Promise(async function(p,m){let h=new JSFile(o.file+".dl");await h.open("r"),async function g(){let _=await h.size();if(_>f){var S=await h.read(_-f,f);await c.write(S),f=_}if(o.state==1||o.state<0){c.done(),await h.close(),await h.delete(),o.read=!1,p();return}setTimeout(g,5)}()}),{buffer:3,content:c}}}async function YB(t,e,n){if(e.state>=0||!d5[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let r=new JSFile(e.file+".dl");await r.open("w");let l=await req(e.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(l.error||l.code>=300){await r.close(),e.read||await r.delete(),e.state=-1;return}await r.close(),e.read?await r.copy(e.file):await r.move(e.file),e.state=1}async function Mhe(t,e,n){x7&&x7!=t&&delete d5[x7],x7=t,d5[t]=!0;for(let r=0;r<e&&d5[t];r++)new Promise(function(l,i){(async function s(){if(!d5[t]){l();return}let a=be.pickBy(Ja[t],function(c){return c.state==-1}),o=be.minBy(Object.values(a),function(c){return c.order});if(!o){l();return}await YB(t,o,n),setTimeout(s,5)})()})}function iE(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var l=0;l<r.length;l++)r[l]!="."&&(r[l]==".."?n.pop():n.push(r[l]));return n.join("/")}function JB(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let r=Number(n[0]),l=n[4];e.push(`<d p="${r},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${l}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var w7=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new Ri(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Li,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,l,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),Es(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,l,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,l,i,s,a){return a.headers.location!==void 0?l?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,r,l,i,s):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):s===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,r,l,i,s))}async fetch(e,n,r,l=!1,i=!1,s=0){let a=c7(n),o=e;be.isEmpty(a)||(o=e+"?"+a);let c=new l5(o),f;return f=await req(c.toString(),{method:"get",headers:r,buffer:s,data:null}),f.code===200||f.code===302||f.code===301||i?await this.getResponse(e,n,r,l,i,s,f):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${c},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(f)}`),await this.reconnnect(e,n,r,l,i,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(be.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return Sr(r)}async parseVodShorLine truncated
`).forEach(function(s){l=s.indexOf(":"),n=s.substring(0,l).trim().toLowerCase(),r=s.substring(l+1).trim(),!(!n||e[n]&&Nve[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var uz=Symbol("internals");function R5(t){return t&&String(t).trim().toLowerCase()}function tf(t){return t===!1||t==null?t:X.isArray(t)?t.map(tf):String(t)}function Ive(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var Cve=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function nb(t,e,n,r,l){if(X.isFunction(r))return r.call(this,e,n);if(l&&(e=n),!!X.isString(e)){if(X.isString(r))return e.indexOf(r)!==-1;if(X.isRegExp(r))return r.test(e)}}function kve(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Pve(t,e){let n=X.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(l,i,s){return this[r].call(this,e,l,i,s)},configurable:!0})})}var S4=class{constructor(e){e&&this.set(e)}set(e,n,r){let l=this;function i(a,o,c){let f=R5(o);if(!f)throw new Error("header name must be a non-empty string");let p=X.findKey(l,f);(!p||l[p]===void 0||c===!0||c===void 0&&l[p]!==!1)&&(l[p||o]=tf(a))}let s=(a,o)=>X.forEach(a,(c,f)=>i(c,f,o));return X.isPlainObject(e)||e instanceof this.constructor?s(e,n):X.isString(e)&&(e=e.trim())&&!Cve(e)?s(oz(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=R5(e),e){let r=X.findKey(this,e);if(r){let l=this[r];if(!n)return l;if(n===!0)return Ive(l);if(X.isFunction(n))return n.call(this,l,r);if(X.isRegExp(n))return n.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=R5(e),e){let r=X.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||nb(this,this[r],r,n)))}return!1}delete(e,n){let r=this,l=!1;function i(s){if(s=R5(s),s){let a=X.findKey(r,s);a&&(!n||nb(r,r[a],a,n))&&(delete r[a],l=!0)}}return X.isArray(e)?e.forEach(i):i(e),l}clear(e){let n=Object.keys(this),r=n.length,l=!1;for(;r--;){let i=n[r];(!e||nb(this,this[i],i,e,!0))&&(delete this[i],l=!0)}return l}normalize(e){let n=this,r={};return X.forEach(this,(l,i)=>{let s=X.findKey(r,i);if(s){n[s]=tf(l),delete n[i];return}let a=e?kve(i):String(i).trim();a!==i&&delete n[i],n[a]=tf(l),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return X.forEach(this,(r,l)=>{r!=null&&r!==!1&&(n[l]=e&&X.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(l=>r.set(l)),r}static accessor(e){let r=(this[uz]=this[uz]={accessors:{}}).accessors,l=this.prototype;function i(s){let a=R5(s);r[a]||(Pve(l,s),r[a]=!0)}return X.isArray(e)?e.forEach(i):i(e),this}};S4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(S4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});X.freezeMethods(S4);var Nr=S4;function O5(t,e){let n=this||T4,r=e||n,l=Nr.from(r.headers),i=r.data;return X.forEach(t,function(a){i=a.call(n,i,l.normalize(),e?e.status:void 0)}),l.normalize(),i}function N5(t){return!!(t&&t.__CANCEL__)}function cz(t,e,n){Fe.call(this,t??"canceled",Fe.ERR_CANCELED,e,n),this.name="CanceledError"}X.inherits(cz,Fe,{__CANCEL__:!0});var ei=cz;function ws(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Fe("Request failed with status code "+n.status,[Fe.ERR_BAD_REQUEST,Fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function rb(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function lb(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function so(t,e){return t&&!rb(e)?lb(t,e):e}var Pz=br(pz(),1),Dz=br(require("http"),1),Lz=br(require("https"),1),Fz=br(require("util"),1),Mz=br(_z(),1),O3=br(require("zlib"),1);var oo="1.6.7";function L5(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var Yve=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function yb(t,e,n){let r=n&&n.Blob||Or.classes.Blob,l=L5(t);if(e===void 0&&r&&(e=!0),l==="data"){t=l.length?t.slice(l.length+1):t;let i=Yve.exec(t);if(!i)throw new Fe("Invalid URL",Fe.ERR_INVALID_URL);let s=i[1],a=i[2],o=i[3],c=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new Fe("Blob is not supported",Fe.ERR_NOT_SUPPORT);return new r([c],{type:s})}return c}throw new Fe("Unsupported protocol "+l,Fe.ERR_NOT_SUPPORT)}var uo=br(require("stream"),1);var bz=br(require("stream"),1);function Jve(t,e){let n=0,r=1e3/e,l=null;return function(s,a){let o=Date.now();if(s||o-n>r)return l&&(clearTimeout(l),l=null),n=o,t.apply(null,a);l||(l=setTimeout(()=>(l=null,n=Date.now(),t.apply(null,a)),r-(o-n)))}}var Ez=Jve;function Qve(t,e){t=t||10;let n=new Array(t),r=new Array(t),l=0,i=0,s;return e=e!==void 0?e:1e3,function(o){let c=Date.now(),f=r[i];s||(s=c),n[l]=o,r[l]=c;let p=i,m=0;for(;p!==l;)m+=n[p++],p=p%t;if(l=(l+1)%t,l===i&&(i=(i+1)%t),c-s<e)return;let h=f&&c-f;return h?Math.round(m*1e3/h):void 0}}var nf=Qve;var rf=Symbol("internals"),vb=class extends bz.default.Transform{constructor(e){e=X.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!X.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[rf]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},l=nf(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let i=0;r.updateProgress=Ez(function(){let o=r.length,c=r.bytesSeen,f=c-i;if(!f||n.destroyed)return;let p=l(f);i=c,process.nextTick(()=>{n.emit("progress",{loaded:c,total:o,progress:o?c/o:void 0,bytes:f,rate:p||void 0,estimated:p&&o&&c<=o?(o-c)/p:void 0})})},r.ticksRate);let s=()=>{r.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[rf];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let l=this,i=this[rf],s=i.maxRate,a=this.readableHighWaterMark,o=i.timeWindow,c=1e3/o,f=s/c,p=i.minChunkSize!==!1?Math.max(i.minChunkSize,f*.01):0;function m(g,_){let S=Buffer.byteLength(g);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),l.push(g)?process.nextTick(_):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(_)}}let h=(g,_)=>{let S=Buffer.byteLength(g),T=null,x=a,v,b=0;if(s){let w=Date.now();(!i.ts||(b=w-i.ts)>=o)&&(i.ts=w,v=f-i.bytes,i.bytes=v<0?-v:0,b=0),v=f-i.bytes}if(s){if(v<=0)return setTimeout(()=>{_(null,g)},o-b);v<x&&(x=v)}x&&S>x&&S-x>p&&(T=g.subarray(x),g=g.subarray(0,x)),m(g,T?()=>{process.nextTick(_,null,T)}:_)};h(e,function g(_,S){if(_)return r(_);S?h(S,g):r(null)})}setLength(e){return this[rf].length=+e,this}},_b=vb;var $z=br(require("events"),1);var Sz=require("util"),xz=require("stream");var{asyncIterator:Tz}=Symbol,Zve=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[Tz]?yield*t[Tz]():yield t},lf=Zve;var e_e=X.ALPHABET.ALPHA_DIGIT+"-_",F5=new Sz.TextEncoder,Rs=`\r
`,t_e=F5.encode(Rs),n_e=2,Eb=class{constructor(e,n){let{escapeName:r}=this.constructor,l=X.isString(n),i=`Content-Disposition: form-data; name="${r(e)}"${!l&&n.name?`; filename="${r(n.name)}"`:""}${Rs}`;l?n=F5.encode(String(n).replace(/\r?\n|\r\n?/g,Rs)):i+=`Content-Type: ${n.type||"application/octet-stream"}${Rs}`,this.headers=F5.encode(i+Rs),this.contentLength=l?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+n_e,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;X.isTypedArray(e)?yield e:yield*lf(e),yield t_e}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},r_e=(t,e,n)=>{let{tag:r="form-data-boundary",size:l=25,boundary:i=r+"-"+X.generateString(l,e_e)}=n||{};if(!X.isFormData(t))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=F5.encode("--"+i+Rs),a=F5.encode("--"+i+"--"+Rs+Rs),o=a.byteLength,c=Array.from(t.entries()).map(([p,m])=>{let h=new Eb(p,m);return o+=h.size,h});o+=s.byteLength*c.length,o=X.toFiniteNumber(o);let f={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(o)&&(f["Content-Length"]=o),e&&e(f),xz.Readable.from(async function*(){for(let p of c)yield s,yield*p.encode();yield a}())},Az=r_e;var wz=br(require("stream"),1),bb=class extends wz.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let l=Buffer.alloc(2);l[0]=120,l[1]=156,this.push(l,n)}this.__transform(e,n,r)}},Rz=bb;var l_e=(t,e)=>X.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(l=>{try{e?r(null,...e(l)):r(null,l)}catch(i){r(i)}},r)}:t,Oz=l_e;var Nz={flush:O3.default.constants.Z_SYNC_FLUSH,finishFlush:O3.default.constants.Z_SYNC_FLUSH},i_e={flush:O3.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:O3.default.constants.BROTLI_OPERATION_FLUSH},Iz=X.isFunction(O3.default.createBrotliDecompress),{http:s_e,https:a_e}=Mz.default,o_e=/https:?/,Cz=Or.protocols.map(t=>t+":");function u_e(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function jz(t,e,n){let r=e;if(!r&&r!==!1){let l=(0,Pz.getProxyForUrl)(n);l&&(r=new URL(l))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let i=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.headers.host=t.hostname+(t.port?":"+t.port:"");let l=r.hostname||r.host;t.hostname=l,t.host=l,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(i){jz(i,e,i.href)}}var c_e=typeof process<"u"&&X.kindOf(process)==="process",f_e=t=>new Promise((e,n)=>{let r,l,i=(o,c)=>{l||(l=!0,r&&r(o,c))},s=o=>{i(o),e(o)},a=o=>{i(o,!0),n(o)};t(s,a,o=>r=o).catch(a)}),p_e=({address:t,family:e})=>{if(!X.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},kz=(t,e)=>p_e(X.isObject(t)?t:{address:t,family:e}),Uz=c_e&&function(e){return f_e(async function(r,l,i){let{data:s,lookup:a,family:o}=e,{responseType:c,responseEncoding:f}=e,p=e.method.toUpperCase(),m,h=!1,g;if(a){let ae=Oz(a,ye=>X.isArray(ye)?ye:[ye]);a=(ye,q,le)=>{ae(ye,q,(re,te,Un)=>{if(re)return le(re);let wt=X.isArray(te)?te.map(Ge=>kz(Ge)):[kz(te,Un)];q.all?le(re,wt):le(re,wt[0].address,wt[0].family)})}}let _=new $z.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),_.removeAllListeners()};i((ae,ye)=>{m=!0,ye&&(h=!0,S())});function T(ae){_.emit("abort",!ae||ae.type?new ei(null,e,g):ae)}_.once("abort",l),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(T),e.signal&&(e.signal.aborted?T():e.signal.addEventListener("abort",T)));let x=so(e.baseURL,e.url),v=new URL(x,"http://localhost"),b=v.protocol||Cz[0];if(b==="data:"){let ae;if(p!=="GET")return ws(r,l,{status:405,statusText:"method not allowed",headers:{},config:e});try{ae=yb(e.url,c==="blob",{Blob:e.env&&e.env.Blob})}catch(ye){throw Fe.from(ye,Fe.ERR_BAD_REQUEST,e)}return c==="text"?(ae=ae.toString(f),(!f||f==="utf8")&&(ae=X.stripBOM(ae))):c==="stream"&&(ae=uo.default.Readable.from(ae)),ws(r,l,{data:ae,status:200,statusText:"OK",headers:new Nr,config:e})}if(Cz.indexOf(b)===-1)return l(new Fe("Unsupported protocol "+b,Fe.ERR_BAD_REQUEST,e));let w=Nr.from(e.headers).normalize();w.set("User-Agent","axios/"+oo,!1);let N=e.onDownloadProgress,O=e.onUploadProgress,k=e.maxRate,j,L;if(X.isSpecCompliantForm(s)){let ae=w.getContentType(/boundary=([-_\w\d]{10,70})/i);s=Az(s,ye=>{w.set(ye)},{tag:`axios-${oo}-boundary`,boundary:ae&&ae[1]||void 0})}else if(X.isFormData(s)&&X.isFunction(s.getHeaders)){if(w.set(s.getHeaders()),!w.hasContentLength())try{let ae=await Fz.default.promisify(s.getLength).call(s); Line truncated
`+i.map(zz).join(`
`):" "+zz(i[0]):"as no adapter specified";throw new Fe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Tb};function Sb(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ei(null,t)}function af(t){return Sb(t),t.headers=Nr.from(t.headers),t.data=O5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),sf.getAdapter(t.adapter||T4.adapter)(t).then(function(r){return Sb(t),r.data=O5.call(t,t.transformResponse,r),r.headers=Nr.from(r.headers),r},function(r){return N5(r)||(Sb(t),r&&r.response&&(r.response.data=O5.call(t,t.transformResponse,r.response),r.response.headers=Nr.from(r.response.headers))),Promise.reject(r)})}var Gz=t=>t instanceof Nr?t.toJSON():t;function N3(t,e){e=e||{};let n={};function r(c,f,p){return X.isPlainObject(c)&&X.isPlainObject(f)?X.merge.call({caseless:p},c,f):X.isPlainObject(f)?X.merge({},f):X.isArray(f)?f.slice():f}function l(c,f,p){if(X.isUndefined(f)){if(!X.isUndefined(c))return r(void 0,c,p)}else return r(c,f,p)}function i(c,f){if(!X.isUndefined(f))return r(void 0,f)}function s(c,f){if(X.isUndefined(f)){if(!X.isUndefined(c))return r(void 0,c)}else return r(void 0,f)}function a(c,f,p){if(p in e)return r(c,f);if(p in t)return r(void 0,c)}let o={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,f)=>l(Gz(c),Gz(f),!0)};return X.forEach(Object.keys(Object.assign({},t,e)),function(f){let p=o[f]||l,m=p(t[f],e[f],f);X.isUndefined(m)&&p!==a||(n[f]=m)}),n}var xb={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{xb[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var Xz={};xb.transitional=function(e,n,r){function l(i,s){return"[Axios v"+oo+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new Fe(l(s," has been removed"+(n?" in "+n:"")),Fe.ERR_DEPRECATED);return n&&!Xz[s]&&(Xz[s]=!0,console.warn(l(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function m_e(t,e,n){if(typeof t!="object")throw new Fe("options must be an object",Fe.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),l=r.length;for(;l-- >0;){let i=r[l],s=e[i];if(s){let a=t[i],o=a===void 0||s(a,i,t);if(o!==!0)throw new Fe("option "+i+" must be "+o,Fe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Fe("Unknown option "+i,Fe.ERR_BAD_OPTION)}}var of={assertOptions:m_e,validators:xb};var Os=of.validators,A4=class{constructor(e){this.defaults=e,this.interceptors={request:new QE,response:new QE}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let l;Error.captureStackTrace?Error.captureStackTrace(l={}):l=new Error;let i=l.stack?l.stack.replace(/^.+\n/,""):"";r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+i):r.stack=i}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=N3(this.defaults,n);let{transitional:r,paramsSerializer:l,headers:i}=n;r!==void 0&&of.assertOptions(r,{silentJSONParsing:Os.transitional(Os.boolean),forcedJSONParsing:Os.transitional(Os.boolean),clarifyTimeoutError:Os.transitional(Os.boolean)},!1),l!=null&&(X.isFunction(l)?n.paramsSerializer={serialize:l}:of.assertOptions(l,{encode:Os.function,serialize:Os.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&X.merge(i.common,i[n.method]);i&&X.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=Nr.concat(s,i);let a=[],o=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(o=o&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let f,p=0,m;if(!o){let g=[af.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),m=g.length,f=Promise.resolve(n);p<m;)f=f.then(g[p++],g[p++]);return f}m=a.length;let h=n;for(p=0;p<m;){let g=a[p++],_=a[p++];try{h=g(h)}catch(S){_.call(this,S);break}}try{f=af.call(this,h)}catch(g){return Promise.reject(g)}for(p=0,m=c.length;p<m;)f=f.then(c[p++],c[p++]);return f}getUri(e){e=N3(this.defaults,e);let n=so(e.baseURL,e.url);return io(n,e.params,e.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(e){A4.prototype[e]=function(n,r){return this.request(N3(r||{},{method:e,url:n,data:(r||{}).data}))}});X.forEach(["post","put","patch"],function(e){function n(r){return function(i,s,a){return this.request(N3(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}A4.prototype[e]=n(),A4.prototype[e+"Form"]=n(!0)});var M5=A4;var Ab=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let r=this;this.promise.then(l=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](l);r._listeners=null}),this.promise.then=l=>{let i,s=new Promise(a=>{r.subscribe(a),i=a}).then(l);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new ei(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(l){e=l}),cancel:e}}},Wz=Ab;function wb(t){return function(n){return t.apply(null,n)}}function Rb(t){return X.isObject(t)&&t.isAxiosError===!0}var Ob={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ob).forEach(([t,e])=>{Ob[e]=t});var Kz=Ob;function Yz(t){let e=new M5(t),n=x5(M5.prototype.request,e);return X.extend(n,M5.prototype,e,{allOwnKeys:!0}),X.extend(n,e,null,{allOwnKeys:!0}),n.create=function(l){return Yz(N3(t,l))},n}var gr=Yz(T4);gr.Axios=M5;gr.CanceledError=ei;gr.CancelToken=Wz;gr.isCancel=N5;gr.VERSION=oo;gr.toFormData=As;gr.AxiosError=Fe;gr.Cancel=gr.CanceledError;gr.all=function(e){return Promise.all(e)};gr.spread=wb;gr.isAxiosError=Rb;gr.mergeConfig=N3;gr.AxiosHeaders=Nr;gr.formToJSON=t=>ef(X.isHTMLForm(t)?new FormData(t):t);gr.getAdapter=sf.getAdapter;gr.HttpStatusCode=Kz;gr.default=gr;var w4=gr;var{Axios:vCe,AxiosError:_Ce,CanceledError:ECe,isCancel:bCe,CancelToken:TCe,VERSION:SCe,all:xCe,Cancel:ACe,isAxiosError:wCe,spread:RCe,toFormData:Jz,AxiosHeaders:OCe,HttpStatusCode:NCe,formToJSON:ICe,getAdapter:CCe,mergeConfig:kCe}=w4;var iG=br(require("https"),1),sG=br(require("crypto"),1),aG=br(rG(),1),Cb={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await S_e(t,e)},set:asy Line truncated
`},timeout:.1}),await dataBase.push(r,Cb)}globalThis.localLog={set:async function(t,e,n){w_e(t,e,n)}};function A_e(){co.default.existsSync("log")||co.default.mkdirSync("log");let t="log/info.log";return co.default.existsSync(t)?co.default.readFileSync(t).toString():(co.default.writeFileSync(t,""),"")}function w_e(t){co.default.writeFileSync("log/info.log",A_e()+`
`+t)}globalThis.req=R_e;async function R_e(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,l=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,o=e?e.headers||{}:{};r==="form"?(o["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=lG.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=Jz(n));let c=l===1||l===2?"arraybuffer":void 0,f;a?f=aG.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):f=iG.default.Agent({rejectUnauthorized:!1});let p=await w4(t,{responseType:c,method:e&&e.method||"get",headers:o,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:f});n=p.data;let m={};for(let h of p.headers){let g=h[1];m[h[0]]=Array.isArray(g)&&g.length===1?g[0]:g}if(!l)typeof n=="object"&&(n=JSON.stringify(n));else{if(l===1)return{code:p.status,headers:m,content:n};if(l===2)return{code:p.status,headers:m,content:n.toString("base64")};if(l===3){let h=e.stream;return h.onResp&&await h.onResp({code:p.status,headers:m}),h.onData?(n.on("data",async g=>{await h.onData(g)}),n.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:p.status,headers:m,content:n}}catch(n){let r=n.response;try{return{code:r.status,headers:r.headers,content:JSON.stringify(r.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=O_e;function O_e(t){return sG.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let r=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+r+"/"};var N_e=["DEBUG","INFO","WARNING","ERROR"];var O4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=N_e.indexOf(n)}format(e,n){let r=80;switch(e){case"INFO":r=r+1;break;case"WARNING":r=r-2;break;default:break}return n.length<r&&((r-n.length)%2===0?n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)):n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,r){return r&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://127.0.0.1:8099/upload",{data:{log:e+`
`},timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var kn=class extends jn{constructor(){super(),this.jadeLog=new O4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(r){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+r,!1)}}catch(r){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${r}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return be.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return be.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let r=e.body.id,l=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(l),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${r},pg = ${l},extend = ${JSON.stringify(s)}`),r==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(r,l,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let l=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new yn,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${l}`);try{return await this.setDetail(l),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=l,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,n){let r=e.body.flag,l=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${r},id:${l},flags:${i}`,!0);try{let s;if(await this.setPlay(r,l,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.messageT Line truncated
`),o=e(s).find("a"),c=[{n:"\u5168\u90E8",v:l}],f=r.toString();for(let p of o){let m=e(p).text().replaceAll(`
`,""),h=p.attribs.href;h!==void 0&&c.push({n:m,v:h})}a=a.filter(p=>p!==""),this.filterObj[l].push({key:f,name:a[0],value:c})}let i=e('[id="side-menu"]').find("li");for(let s of i){let a=e(s).find("a")[0].attribs.href;if(a!==void 0&&a.indexOf(this.siteUrl)>-1){let o={type_name:e(s).text(),type_id:a};this.classes.push(o)}}}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]!=="1"&&(e=l[1]),await this.jadeLog.info(`tid = ${e}`);let i="";e.indexOf(this.siteUrl)>-1?i=e+n.toString()+".html":i=this.siteUrl,this.limit=36;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setDetail(e){let n=await this.getHtml(e),r=Qr(/video\/(\w+).html/,e);this.vodDetail=await this.parseVodDetailFromDoc(n,r)}async setPlay(e,n,r){this.playUrl=n,this.playHeader={}}async setSearch(e,n){let r=this.siteUrl+"search/"+encodeURIComponent(e),l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDoc(l)}async proxy(e,n){return super.proxy(e,n)}},on=new Fb;var Mb=class extends kn{constructor(){super()}getName(){return on.getName()}getAppName(){return on.getAppName()}getJSName(){return on.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await on.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await on.initCookie(e.server.config.bilicookie),await on.spiderInit(e),on.cfgObj.code=0,on.catOpenStatus=!0,on.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await on.setClasses(),this.classes=on.classes}async setFilterObj(){await on.setFilterObj(),this.filterObj=on.filterObj}async setHomeVod(){await on.setHomeVod(),this.homeVodList=on.homeVodList}async setCategory(e,n,r,l){await on.setCategory(e,n,r,l),this.vodList=on.vodList}async setDetail(e){await on.setDetail(e),this.vodDetail=on.vodDetail}async setPlay(e,n,r){await on.setPlay(e,n,r),this.playUrl=on.playUrl,this.result=on.result}async setSearch(e,n,r){await on.setSearch(e,n,r),this.vodList=on.vodList,this.result=on.result}async setProxy(e,n){return await on.proxy(e,n)}},ks=new Mb;async function SG(t,e){return await ks.init(t,e)}async function xG(t,e){return await ks.home(t,e)}async function F_e(t,e){return await ks.homeVod(t,e)}async function AG(t,e){return await ks.category(t,e)}async function wG(t,e){return await ks.detail(t,e)}async function RG(t,e){return await ks.play(t,e)}async function OG(t,e){return await ks.search(t,e)}async function M_e(t,e){return await ks.proxy(t,e)}var NG={meta:{key:on.getJSName(),name:on.getName(),type:on.getType()},api:async t=>{t.post("/init",SG),t.post("/home",xG),t.post("/category",AG),t.post("/detail",wG),t.post("/play",RG),t.post("/search",OG),t.get("/proxy/:what/:ids/:end",M_e)},spider:{init:SG,home:xG,homeVod:F_e,category:AG,detail:wG,play:RG,search:OG}};var $b=class extends jn{constructor(){super(),this.siteUrl="https://jable.tv",this.cookie=""}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getImgHeaders()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getImgHeaders())}getImgHeaders(){return{"User-Agent":"PostmanRuntime/7.37.3","Postman-Token":"c2602692-1a05-4bb0-93cd-270afad97e87",Host:"assets-cdn.jable.tv",Proxy:!0}}async init(e){await super.init(e),await this.spiderInit(null)}getAppName(){return"Jable"}getName(){return"\u{1F51E}\u2503Jable\u2503\u{1F51E}"}getJSName(){return"jable"}getType(){return 3}getHeader(){let e={};return e["User-Agent"]="PostmanRuntime/7.36.3",e.Host="jable.tv",e["Postman-Token"]="33290483-3c8d-413f-a160-0d3aea9e6f95",e}async getHtml(e=this.siteUrl,n=!1,r=this.getHeader()){return super.getHtml(e,!0,r)}async setClasses(){let e=await this.getHtml(this.siteUrl),n=e('[class="title-box"]'),r=e("div.row");for(let l of e(r[0]).find("a")){let i=e(l).text(),s=l.attribs.href;s.indexOf(this.siteUrl)>-1&&this.classes.push(this.getTypeDic(i,s))}n=n.slice(1,9),r=r.slice(1,9);for(let l=0;l<n.length;l++){let i=e(r[l]).find("a")[0].attribs.href;this.classes.push(this.getTypeDic("\u6807\u7B7E",i));break}}async getSortFilter(e){let n=e('[class="sorting-nav"]').find("a"),r={name:"\u6392\u5E8F",key:"sort",value:[]};for(let l of n){let i=l.attribs["data-parameters"].split("sort_by:")[1],s=e(l).text();r.value.push({n:s,v:i})}return r}async getFilter(e,n,r,l){let i=[];if(n<4){let s={name:l,key:"type",value:[]},a=["div.img-box > a",'[class="horizontal-img-box ml-3 mb-3"] > a',"","sort"],o=["div.absolute-center > h4","div.detail"],c=await this.getHtml(r);for(let f of c(a[n])){let p=f.attribs.href,m=e(e(f).find(o[n])).text().replaceAll(" ","").replaceAll(`
`,"").replaceAll(" ","");s.value.push({n:m,v:p})}if(s.value.length>0){i.push(s);let f=await this.getHtml(s.value[0].v),p=await this.getSortFilter(f);p.value.length>0&&i.push(p)}else{let f=await this.getSortFilter(c);f.value.length>0&&i.push(f)}}else{let s=e("div.row").slice(1,9),a=e('[class="title-box"]').slice(1,9);for(let f=0;f<a.length;f++){let p={name:e(e(a[f]).find("h2")).text(),key:"type",value:[]};for(let m of e(s[f]).find("a")){let h=m.attribs.href;h.indexOf(this.siteUrl)>-1&&p.value.push({n:e(m).text(),v:h})}i.push(p)}let o=await this.getHtml(r),c=await this.getSortFilter(o);c.value.length>0&&i.push(c)}return i}async setFilterObj(){let e=await this.getHtml(this.siteUrl),n=this.classes.slice(1);for(let r=0;r<n.length;r++){let l=n[r].type_name,i=n[r].type_id,s=await this.getFilter(e,r,i,l);s.length>1&&r<4&&(i=s[0].value[0].v,this.classes[r+1]=this.getTypeDic(l,i)),this.filterObj[i]=s}}async parseVodShortListFromDoc(e){let n=[],r=e("div.video-img-box");for(let l of r){let i=new ln,s=e(l).find("img").attr("data-src");if(s!==void 0){i.vod_pic=s;let a=e(l).find("a").attr("href");i.vod_id=a.split("/")[4],i.vod_name=a.split("/")[4];let o=e(e(l).find('[class="sub-title"]')).text().split(`
`);o.length>1?i.vod_remarks=o[1].replaceAll(" ","").replaceAll(" ",""):i.vod_remarks="\u7CBE\u9009",!be.isEmpty(i.vod_pic)&&i.vod_remarks!=="[\u9650\u6642\u512A\u60E0]\u53EA\u97001\u5143\u5373\u53EF\u7121\u9650\u4E0B\u8F09"&&n.push(i)}}return n}async parseVodDetailFromDoc(e){let n=new yn,r=e('[class="header-left"]');n.vod_name=e(e(r).find("h4")).text();let l=Qr(/<video poster="(.*?)" id=/,e.html());n.vod_pic=l,n.vod_year=e(e('[class="inactive-color"]')).text();let i=e(e('[class="header-right d-none d-md-block"] > h6')).text().replaceAll(`
`,"").replaceAll("\u25CF",""),s=[],a=Qr(/var hlsUrl = '(.*?)';/,e.html());s.push(i+"$"+a);let o=[];o.push(s.join("#"));let c=["Jable"];return n.vod_play_from=c.join("$$$"),n.vod_play_url=o.join("$$$"),n}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/videos/"+e+"/");this.vodDetail=await this.parseVodDetailFromDoc(n)}async setCategory(e,n,r,l){let i=l.type??e,s=l.sort??"video_viewed";this.limit=24;let a;this.total=0,this.count=0,e.indexOf("latest-updates")>1?a=`https://jable.tv/latest-updates/?mode=async&function=get_block&block_id=list_videos_latest_videos_list&sort_by=post_date&from=${n}&_=1709730132217`:a=i+`/${n}/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=${s}&_=${new Date().getTime()}`;let o=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(o);let c=o(o('[class="page-item"]').slice(-1)[0]).text();c.indexOf("\u6700\u5F8C")>-1||(parseInt(c)===this.page||be.isEmpty(c))&&(await this.jadeLog.debug("\u5206\u7C7B\u9875\u9762\u5230\u5E95\u4E86"),this.total=this.page,this.count=this.page)}async setSearch(e,n){let r=this.siteUrl+`/search/${e}/`,l=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDocByCategory(l)}},un=new $b;var jb=class extends kn{constructor(){super()}getName(){return un.getName()}getAppName(){return un.getAppName()}getJSName(){return un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await un.initCookie(e.server.config.bilicookie),await un.spiderInit(e),un.cfgObj.code=0,un.catOpenStatus=!0,un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await un.setClasses(),this.classes=un.classes}async setFilterObj(){await un.setFilterObj(),this.filterObj=un.filterObj}async setHomeVod(){await un.setHomeVod(),this.homeVodList=un.homeVodList}async setCategory(e,n,r,l){await un.setCategory(e,n,r,l),this.vodList=un.vodList}async setDetail(e){await un.setDetail(e),this.vodDetail=un.vodDetail}async setPlay(e,n,r){await un.setPlay(e,n,r),this.playUrl=un.playUrl,this.result=un.result}async setSearch(e,n,r){await un.setSearch(e,n,r),this.vodList=un.vodList,this.result=un.result}async setProxy(e,n){return await un.proxy(e,n)}},Ps=new jb;async function IG(t,e){return await Ps.init(t,e)}async function CG(t,e){return await Ps.home(t,e)}async function $_e(t,e){return await Ps.homeVod(t,e)}async function kG(t,e){return await Ps.category(t,e)}async function PG(t,e){return await Ps.detail(t,e)}async function DG(t,e){return await Ps.play(t,e)}async function LG(t,e){return await Ps.search(t,e)}async function j_e(t,e){return await Ps.proxy(t,e)}var FG={meta:{key:un.getJSName(),name:un.getName(),type:un.getType()},api:async t=>{t.post("/init",IG),t.post("/home",CG),t.post("/category",kG),t.post("/detail",PG),t.post("/play",DG),t.post("/search",LG),t.get("/proxy/:what/:ids/:end",j_e)},spider:{init:IG,home:CG,homeVod:$_e,category:kG,detail:PG,play:DG,search:LG}};var Ub=class extends jn{constructor(){super(),this.siteUrl="https://www.sehuatang.net"}getAppName(){return"\u8272\u82B1\u5802BT"}getName(){return"\u{1F51E}\u2503\u8272\u82B1\u5802BT\u2503\u{1F51E}"}getJSName(){return"sehuatang"}getType(){return 3}async init(e){await super.init(e),this.jsBaseDetail=await js2Proxy(!0,this.siteType,this.siteKey,"detail/",{})}getHeader(){return{"User-Agent":"PostmanRuntime/7.36.1",Host:"www.sehuatang.net",Cookie:"cPNj_2132_saltkey=Q4BKEOEC; cf_clearance=6Gz2tvOXPkkJP2UhLnSsN4s0RrnDUy0jBN0kUvC5FNQ-1706109144-1-AebvwBnAURwWWQhj0QRBrRPku2n8xI73PIeuZVj2ckqY9zjQ7zFzDviX7Gkex1P1bUw9SXHGEYnkBB9nmWe6Nhk=; _safe=vqd37pjm4p5uodq339yzk6b7jdt6oich"}}async parseVodShortListFromDoc(e){let n=[],r=e('[id="portal_block_43_content"]').find("li");for(let l of r){let i=new ln;i.vod_remarks=e(e(l).find("a")[1]).text(),i.vod_id=e(l).find("a")[2].attribs.href,i.vod_name=e(l).find("a")[2].attribs.title,i.vod_pic=this.jsBaseDetail+R3(i.vod_id),n.push(i)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[class="bm_c"]')[0]).find("tbody");for(let l of r){let i=e(e(e(l).find("cite")).find("a")[0]).text();if(i!=="admin"&&i!==void 0&&!be.isEmpty(i)){let s=new ln;s.vod_id=e(l).find("a")[0].attribs.href,s.vod_remarks=e(e(l).find("a")[2]).text(),s.vod_name=e(e(l).find("a")[3]).text(),s.vod_pic=this.jsBaseDetail+R3(s.vod_id),n.push(s)}}return n}async parseVodDetailFromDoc(e){let n=new yn,r=e('[class="t_f"]')[0],l=e(r).text().replaceAll("\uFF1A",":").replaceAll("\u3010","").replaceAll("\u3011","");return n.vod_pic=e(r).find("img")[0].attribs.file,n.vod_name=Qr(/影片名称(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_actor=Qr(/出演女优(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_remarks=Qr(/是否有码(.*?)\n/,l).replaceAll(":","").replaceAll(`
`,""),n.vod_play_from="BT",n.vod_play_url=n.vod_name+"$"+Qr(/磁力链接: (.*)复制代码/,l),n}async setClasses(){let e=await this.getHtml(),n=e('[id="category_1"]').find("tr").slice(0,-1);for(let r of n){let l=e(e(r).find('[class="fl_icn_g"]')).find("a");for(let i of l){let s=i.attribs.href,a=e(i).find("img")[0].attribs.alt;this.classes.push(this.getTypeDic(a,s))}}}async getFilter(e){let n=[],r={key:1,name:"\u7C7B\u578B",value:[]},l=e('[id="thread_types"]').find("a");for(let a of l){let o="";a.children.length>1?o=a.children[0].data+":"+e(a.children[1]).text():o=a.children[0].data,r.value.push({n:o,v:a.attribs.href})}n.push(r);let i={key:1,name:"\u4E3B\u9898",value:[]},s=e('[class="tf"]').find("a");for(let a of s){let o=e(a).text();o!=="\u66F4\u591A"&&o!=="\u663E\u793A\u7F6E\u9876"&&i.value.push({n:e(a).text(),v:a.attribs.href})}return n.push(i),n}async setFilterObj(){for(let e of this.classes){let n=e.type_name,r=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let l=await this.getHtml(this.siteUrl+"/"+r);this.filterObj[r]=await this.getFilter(l)}}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,l){l[1]!==void 0&&l[1]==="javascript:;"||(e=l[1]??e);let i,s=e.split(".")[0].split("-");s.length>2?(s[2]=n,i=this.siteUrl+"/"+s.join("-")+".html"):i=this.siteUrl+"/"+e+"&page="+n;let a=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(a)}async setDetail(e){let n=await this.getHtml(this.siteUrl+"/"+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let r=e[0],l=R2(e[1]);if(r==="detail"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${l}`);let i=await this.getHtml(this.siteUrl+"/"+l),s=await this.parseVodDetailFromDoc(i);await this.jadeLog.debug(`\u56FE\u7247\u5730\u5740\u4E3A:${s.vod_pic}`);let a;return be.isEmpty(n)?a=await req(s.vod_pic,{buffer:2,headers:{Referer:l,"User-Agent":Li}}):a=await req(s.vod_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},cn=new Ub;var Bb=class extends kn{constructor(){super()}getName(){return cn.getName()}getAppName(){return cn.getAppName()}getJSName(){return cn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await cn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await cn.initCookie(e.server.config.bilicookie),await cn.spiderInit(e),cn.cfgObj.code=0,cn.catOpenStatus=!0,cn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await cn.setClasses(),this.classes=cn.classes}async setFilterObj(){await cn.setFilterObj(),this.filterObj=cn.filterObj}async setHomeVod(){await cn.setHomeVod(),this.homeVodList=cn.homeVodList}async setCategory(e,n,r,l){await cn.setCategory(e,n,r,l),this.vodList=cn.vodList}async setDetail(e){await cn.setDetail(e),this.vodDetail=cn.vodDetail}async setPlay(e,n,r){await cn.setPlay(e,n,r),this.playUrl=cn.playUrl,this.result=cn.result}async setSearch(e,n,r){await cn.setSearch(e,n,r),this.vodList=cn.vodList,this.result=cn.result}async setProxy(e,n){return await cn.proxy(e,n)}},Ds=new Bb;async function MG(t,e){return await Ds.init(t,e)}async function $G(t,e){return await Ds.home(t,e)}async function U_e(t,e){return await Ds.homeVod(t,e)}async function jG(t,e){return await Ds.category(t,e)}async function UG(t,e){return await Ds.detail(t,e)}async function BG(t,e){return await Ds.play(t,e)}async function HG(t,e){return await Ds.search(t,e)}async function B_e(t,e){return await Ds.proxy(t,e)}var qG={meta:{key:cn.getJSName(),name:cn.getName(),type:cn.getType()},api:async t=>{t.post("/init",MG),t.post("/home",$G),t.post("/category",jG),t.post("/detail",UG),t.post("/play",BG),t.post("/search",HG),t.get("/proxy/:what/:ids/:end",B_e)},spider:{init:MG,home:$G,homeVod:U_e,category:jG,detail:UG,play:BG,search:HG}};var Hb=class extends jn{constructor(){super(),this.siteUrl="https://hsck12.shop/"}getName(){return"\u{1F51E}\u2503\u9EC4\u8272\u4ED3\u5E93\u2503\u{1F51E}"}getAppName(){return"\u9EC4\u8272\u4ED3\u5E93"}getJSName(){return"hscangku"}getType(){return 3}async parseVodShortListFromDoc(e){let n=[],r=e('[class="stui-vodlist clearfix"]').find("li");for(let l of r){let i=new ln,s=e(l).find("a")[0];i.vod_id=s.attribs.href,i.vod_name=s.attribs.title,i.vod_pic=s.attribs["data-original"],n.push(i)}return n}async parseVodDetailFromDoc(e){let n=new yn,r=e(e('[class="stui-pannel__head clearfix"]')[1]).find("h3"),i=e("div.stui-pannel-bd > div").find("video")[0];return n.vod_name=r.text(),n.vod_pic=i.attribs.poster,n.vod_play_from="\u9EC4\u8272\u4ED3\u5E93",n.vod_play_url=e(i).find("source")[0].attribs.src,n}async setClasses(){this.classes= Line truncated
`)+ae+`return __p
}`,(oe=Ax(function(){return mn(D,xe+"return "+ae).apply(l,B)})).source=ae,pp(oe))throw oe;return oe},I.times=function(o,d){if((o=vn(o))<1||c<o)return[];var y=p,A=t2(o,p);for(d=nn(d),o-=p,A=Y5(A,d);++y<o;)d(y);return A},I.toFinite=li,I.toInteger=vn,I.toLength=mx,I.toLower=function(o){return il(o).toLowerCase()},I.toNumber=m3,I.toSafeInteger=function(o){return o?iu(vn(o),-9007199254740991,c):o===0?o:0},I.toString=il,I.toUpper=function(o){return il(o).toUpperCase()},I.trim=function(o,d,y){return(o=il(o))&&(y||d===l)?Xr(o):o&&(d=Q2(d))?Mi(y=D3(o),J5(y,d=D3(d)),Q5(y,d)+1).join(""):o},I.trimEnd=function(o,d,y){return(o=il(o))&&(y||d===l)?o.slice(0,jT(o)+1):o&&(d=Q2(d))?Mi(y=D3(o),0,Q5(y,D3(d))+1).join(""):o},I.trimStart=function(o,d,y){return(o=il(o))&&(y||d===l)?o.replace(Kl,""):o&&(d=Q2(d))?Mi(y=D3(o),J5(y,D3(d))).join(""):o},I.truncate=function(o,O){var y,B=30,A="...",O=(ql(O)&&(y="separator"in O?O.separator:y,B="length"in O?vn(O.length):B,A="omission"in O?Q2(O.omission):A),(o=il(o)).length);if((O=eu(o)?(D=D3(o)).length:O)<=B)return o;if((O=B-Ea(A))<1)return A;var D,B=D?Mi(D,0,O).join(""):o.slice(0,O);if(y!==l)if(D&&(O+=B.length-O),dp(y)){if(o.slice(O).search(y)){var V,K=B;for((y=y.global?y:nu(y.source,il(s3.exec(y))+"g")).lastIndex=0;V=y.exec(K);)var ae=V.index;B=B.slice(0,ae===l?O:ae)}}else o.indexOf(Q2(y),O)!=O&&-1<(D=B.lastIndexOf(y))&&(B=B.slice(0,D));return B+A},I.unescape=function(o){return(o=il(o))&&Sl.test(o)?o.replace(Ke,SW):o},I.uniqueId=function(o){var d=++AW;return il(o)+d},I.upperCase=LK,I.upperFirst=gp,I.each=tx,I.eachRight=rx,I.first=ZS,_p(I,(Sp={},fr(I,function(o,d){vl.call(I.prototype,d)||(Sp[d]=o)}),Sp),{chain:!1}),I.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){I[o].placeholder=I}),bt(["drop","take"],function(o,d){$n.prototype[o]=function(y){y=y===l?1:St(vn(y),0);var A=this.__filtered__&&!d?new $n(this):this.clone();return A.__filtered__?A.__takeCount__=t2(y,A.__takeCount__):A.__views__.push({size:t2(y,p),type:o+(A.__dir__<0?"Right":"")}),A},$n.prototype[o+"Right"]=function(y){return this.reverse()[o](y).reverse()}}),bt(["filter","map","takeWhile"],function(o,d){var y=d+1,A=y==1||y==3;$n.prototype[o]=function(O){var D=this.clone();return D.__iteratees__.push({iteratee:nn(O,3),type:y}),D.__filtered__=D.__filtered__||A,D}}),bt(["head","last"],function(o,d){var y="take"+(d?"Right":"");$n.prototype[o]=function(){return this[y](1).value()[0]}}),bt(["initial","tail"],function(o,d){var y="drop"+(d?"":"Right");$n.prototype[o]=function(){return this.__filtered__?new $n(this):this[y](1)}}),$n.prototype.compact=function(){return this.filter(L2)},$n.prototype.find=function(o){return this.filter(o).head()},$n.prototype.findLast=function(o){return this.reverse().find(o)},$n.prototype.invokeMap=Tn(function(o,d){return typeof o=="function"?new $n(this):this.map(function(y){return X4(y,o,d)})}),$n.prototype.reject=function(o){return this.filter(I6(nn(o)))},$n.prototype.slice=function(o,d){o=vn(o);var y=this;return y.__filtered__&&(0<o||d<0)?new $n(y):(o<0?y=y.takeRight(-o):o&&(y=y.drop(o)),d!==l?(d=vn(d))<0?y.dropRight(-d):y.take(d-o):y)},$n.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},$n.prototype.toArray=function(){return this.take(p)},fr($n.prototype,function(o,d){var y=/^(?:filter|find|map|reject)|While$/.test(d),A=/^(?:head|last)$/.test(d),O=I[A?"take"+(d=="last"?"Right":""):d],D=A||/^find/.test(d);O&&(I.prototype[d]=function(){function B(We){return We=O.apply(I,sr([We],ae)),A&&xe?We[0]:We}var V,K=this.__wrapped__,ae=A?[1]:arguments,Se=K instanceof $n,_e=ae[0],oe=Se||gn(K),xe=(oe&&y&&typeof _e=="function"&&_e.length!=1&&(Se=oe=!1),this.__chain__),_e=!!this.__actions__.length,ge=D&&!xe,Se=Se&&!_e;return!D&&oe?(K=Se?K:new $n(this),(V=o.apply(K,ae)).__actions__.push({func:w6,args:[B],thisArg:l}),new L3(V,xe)):ge&&Se?o.apply(this,ae):(V=this.thru(B),ge?A?V.value()[0]:V.value():V)})}),bt(["pop","push","shift","sort","splice","unshift"],function(o){var d=n6[o],y=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",A=/^(?:pop|shift)$/.test(o);I.prototype[o]=function(){var O,D=arguments;return A&&!this.__chain__?(O=this.value(),d.apply(gn(O)?O:[],D)):this[y](function(B){return d.apply(gn(B)?B:[],D)})}}),fr($n.prototype,function(o,d){var y,A=I[d];A&&(y=A.name+"",vl.call(Aa,y)||(Aa[y]=[]),Aa[y].push({name:d,func:A}))}),Aa[_6(l,2).name]=[{name:"wrapper",func:l}],$n.prototype.clone=function(){var o=new $n(this.__wrapped__);return o.__actions__=k2(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=k2(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=k2(this.__views__),o},$n.prototype.reverse=function(){var o;return this.__filtered__?((o=new $n(this)).__dir__=-1,o.__filtered__=!0):(o=this.clone()).__dir__*=-1,o},$n.prototype.value=function(){var o=this.__wrapped__.value(),d=this.__dir__,y=gn(o),A=d<0,O=y?o.length:0,D=function(Be,Je,tn){for(var jl=-1,et=tn.length;++jl<et;){var y Line truncated
`)){let a=u.trim();if(a)if(a.startsWith("#")){if(a.startsWith("#EXT")){let c=Whe(a,i);c&&s.push(c)}}else s.push(a)}return s.length!==0&&s[0].name==="EXTM3U"||Le("The EXTM3U tag MUST be the first line."),s}(n,e),t=Khe(l,e);return t.source=n,t}var Yhe=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],Jhe=["#EXT-X-MEDIA"],pE=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let l of e)if(l.startsWith("#"))if(Yhe.some(t=>l.startsWith(t)))super.push(l);else{if(this.includes(l)){if(Jhe.some(t=>l.startsWith(t)))continue;Le(`Redundant item (${l})`)}super.push(l)}else super.push(l);return this.length}};function gE(n,e){let l=1e3;e&&(l=Math.pow(10,e));let t=Math.round(n*l)/l;return e?t.toFixed(e):t}function Qhe(n){let e=[`DATA-ID="${n.id}"`];return n.language&&e.push(`LANGUAGE="${n.language}"`),n.value?e.push(`VALUE="${n.value}"`):n.uri&&e.push(`URI="${n.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function iH(n,e){let l=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",t=[`METHOD=${n.method}`];return n.uri&&t.push(`URI="${n.uri}"`),n.iv&&(n.iv.length!==16&&Le("IV must be a 128-bit unsigned integer"),t.push(`IV=${lH(n.iv)}`)),n.format&&t.push(`KEYFORMAT="${n.format}"`),n.formatVersion&&t.push(`KEYFORMATVERSIONS="${n.formatVersion}"`),`${l}:${t.join(",")}`}function Zhe(n,e){let l=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",t=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&t.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&t.push(`URI="${e.uri}"`),e.codecs&&t.push(`CODECS="${e.codecs}"`),e.resolution&&t.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&t.push(`FRAME-RATE=${gE(e.frameRate,3)}`),e.hdcpLevel&&t.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){t.push(`AUDIO="${e.audio[0].groupId}"`);for(let r of e.audio)n.push(_c(r))}if(e.video.length>0){t.push(`VIDEO="${e.video[0].groupId}"`);for(let r of e.video)n.push(_c(r))}if(e.subtitles.length>0){t.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let r of e.subtitles)n.push(_c(r))}if(jhe().allowClosedCaptionsNone&&e.closedCaptions.length===0)t.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){t.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let r of e.closedCaptions)n.push(_c(r))}if(e.score&&t.push(`SCORE=${e.score}`),e.allowedCpc){let r=[];for(let{format:i,cpcList:s}of e.allowedCpc)r.push(`${i}:${s.join("/")}`);t.push(`ALLOWED-CPC="${r.join(",")}"`)}e.videoRange&&t.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&t.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&t.push(`PROGRAM-ID=${e.programId}`),n.push(`${l}:${t.join(",")}`),e.isIFrameOnly||n.push(`${e.uri}`)}function _c(n){let e=[`TYPE=${n.type}`,`GROUP-ID="${n.groupId}"`,`NAME="${n.name}"`];return n.isDefault!==void 0&&e.push("DEFAULT="+(n.isDefault?"YES":"NO")),n.autoselect!==void 0&&e.push("AUTOSELECT="+(n.autoselect?"YES":"NO")),n.forced!==void 0&&e.push("FORCED="+(n.forced?"YES":"NO")),n.language&&e.push(`LANGUAGE="${n.language}"`),n.assocLanguage&&e.push(`ASSOC-LANGUAGE="${n.assocLanguage}"`),n.instreamId&&e.push(`INSTREAM-ID="${n.instreamId}"`),n.characteristics&&e.push(`CHARACTERISTICS="${n.characteristics}"`),n.channels&&e.push(`CHANNELS="${n.channels}"`),n.uri&&e.push(`URI="${n.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function eme(n,e,l,t,r=1,i=null){let s=!1,u="";if(e.discontinuity&&n.push("#EXT-X-DISCONTINUITY"),e.key){let c=iH(e.key);c!==l&&(n.push(c),l=c)}if(e.map){let c=function(f){let p=[`URI="${f.uri}"`];return f.byterange&&p.push(`BYTERANGE="${aE(f.byterange)}"`),`#EXT-X-MAP:${p.join(",")}`}(e.map);c!==t&&(n.push(c),t=c)}if(e.programDateTime&&n.push(`#EXT-X-PROGRAM-DATE-TIME:${uE(e.programDateTime)}`),e.dateRange&&n.push(function(c){let f=[`ID="${c.id}"`];c.start&&f.push(`START-DATE="${uE(c.start)}"`),c.end&&f.push(`END-DATE="${uE(c.end)}"`),c.duration&&f.push(`DURATION=${c.duration}`),c.plannedDuration&&f.push(`PLANNED-DURATION=${c.plannedDuration}`),c.classId&&f.push(`CLASS="${c.classId}"`),c.endOnNext&&f.push("END-ON-NEXT=YES");for(let p of Object.keys(c.attributes))p.startsWith("X-")?typeof c.attributes[p]=="number"?f.push(`${p}=${c.attributes[p]}`):f.push(`${p}="${c.attributes[p]}"`):p.startsWith("SCTE35-")&&f.push(`${p}=${lH(c.attributes[p])}`);return`#EXT-X-DATERANGE:${f.join(",")}`}(e.dateRange)),e.markers.length>0&&(u=function(c,f){let p="";for(let m of f)if(m.type==="OUT")p="OUT",c.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")p="IN",c.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let h=m.value?`:${m.value}`:"";c.push(`#${m.tagName}${h}`)}return p}(n,e.markers)),e.parts.length>0&&(s=function(c,f){let p=!1;for(let m of f)if(m.hint){let h=[];if(h.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:g,length:_}=m.byterange;h.push(`BYTERANGE-START=${g}`),_&&h.push(`BYTERANGE-LENGTH=${_}`)}c.push(`#EXT-X-PRELOAD-HINT:${h.join(",")}`),p=!0}else{let h=[];h.push( Line truncated
`)}var uH="hls_cache",Pc=[],ea={},y5={},Zu={},kc="";function nme(n,e){if(Pc.push(n),ea[n]=e,Pc.length>5){let l=Pc.shift();lme(l)}}function lme(n){delete ea[n],delete Pc[n],new JSFile(uH+"/"+n).delete()}function tme(n,e){if(e.variants)for(let l of e.variants)l.uri.startsWith("http")||(l.uri=yE(n,l.uri));if(e.segments)for(let l of e.segments)l.uri.startsWith("http")||(l.uri=yE(n,l.uri)),l.key&&l.key.uri&&!l.key.uri.startsWith("http")&&(l.key.uri=yE(n,l.key.uri));return e}async function aH(n,e){let l=md5X(n);if(ea[l])return ea[l];let t={},r=n;for(;t=await req(r,{headers:e,redirect:0}),t.headers.location;)r=t.headers.location;if(t.code==200){var i=t.content;let s=tme(r,rH(i));return nme(l,{code:t.code,plist:s,key:l,headers:t.headers}),ea[l]}return{}}async function oH(n,e,l){if(!ea[n])return{};let r=ea[n].plist.segments,i=!Zu[n];if(i){Zu[n]={};for(let f of r){let p=md5X(f.uri+f.mediaSequenceNumber.toString());Zu[n][p]={file:uH+"/"+n+"/"+p,uri:f.uri,key:p,index:f.mediaSequenceNumber,order:f.mediaSequenceNumber,state:-1,read:!1}}}for(let f in Zu[n]){let p=Zu[n][f];p.index>=e?p.order=p.index-e:p.order=r.length-e+p.index}i&&rme(n,5,l);let s=r[e],u=md5X(s.uri+s.mediaSequenceNumber.toString()),a=Zu[n][u];if(a.state==1||a.state==-1){let f=new JSFile(a.file);if(await f.exist())return a.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:f};a.state=-1}if(a.state==-1&&cH(n,a,l),a.state==0){var c=new JSProxyStream;c.head(200,{connection:"close","content-type":"video/mp2t"});let f=0;return a.read=!0,new Promise(async function(p,m){let h=new JSFile(a.file+".dl");await h.open("r"),async function g(){let _=await h.size();if(_>f){var S=await h.read(_-f,f);await c.write(S),f=_}if(a.state==1||a.state<0){c.done(),await h.close(),await h.delete(),a.read=!1,p();return}setTimeout(g,5)}()}),{buffer:3,content:c}}}async function cH(n,e,l){if(e.state>=0||!y5[n])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let t=new JSFile(e.file+".dl");await t.open("w");let r=await req(e.uri,{buffer:3,headers:l,stream:t,timeout:[5e3,1e4]});if(r.error||r.code>=300){await t.close(),e.read||await t.delete(),e.state=-1;return}await t.close(),e.read?await t.copy(e.file):await t.move(e.file),e.state=1}async function rme(n,e,l){kc&&kc!=n&&delete y5[kc],kc=n,y5[n]=!0;for(let t=0;t<e&&y5[n];t++)new Promise(function(r,i){(async function s(){if(!y5[n]){r();return}let u=Ee.pickBy(Zu[n],function(c){return c.state==-1}),a=Ee.minBy(Object.values(u),function(c){return c.order});if(!a){r();return}await cH(n,a,l),setTimeout(s,5)})()})}function yE(n,e){var l=n.split("/"),t=e.split("/");l.pop();for(var r=0;r<t.length;r++)t[r]!="."&&(t[r]==".."?l.pop():l.push(t[r]));return l.join("/")}function fH(n){let e=[];return Array.from(n.danmuku).forEach(l=>{let t=Number(l[0]),r=l[4];e.push(`<d p="${t},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${r}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var Dc=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new Rr(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Fr,Referer:this.siteUrl+"/"}}async reconnnect(e,l,t,r,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),bs(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,l,t,r,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,l,t,r,i,s,u){return u.headers.location!==void 0?r?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${u.headers.location}`),u.headers.location):this.fetch(u.headers.location,l,t,r,i,s):u.content.length>0?(this.reconnectTimes=0,i?{cookie:u.headers["set-cookie"],content:u.content}:u.content):s===1?(this.reconnectTimes=0,u.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(u)}`),await this.reconnnect(e,l,t,r,i,s))}async fetch(e,l,t,r=!1,i=!1,s=0){let u=vc(l),a=e;Ee.isEmpty(u)||(a=e+"?"+u);let c=new a5(a),f;return f=await req(c.toString(),{method:"get",headers:t,buffer:s,data:null}),f.code===201||f.code===200||f.code===302||f.code===301||i?await this.getResponse(e,l,t,r,i,s,f):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${c},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(f)}`),await this.reconnnect(e,l,t,r,i,s))}async getHtml(e=this.siteUrl,l=this.getHeader()){let t=await this.fetch(e,null,l);if(Ee.isEmpty(t))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return Xl(t)}asynLine truncated
`).forEach(function(s){r=s.indexOf(":"),l=s.substring(0,r).trim().toLowerCase(),t=s.substring(r+1).trim(),!(!l||e[l]&&Yve[l])&&(l==="set-cookie"?e[l]?e[l].push(t):e[l]=[t]:e[l]=e[l]?e[l]+", "+t:t)}),e};var Sz=Symbol("internals");function C5(n){return n&&String(n).trim().toLowerCase()}function cf(n){return n===!1||n==null?n:X.isArray(n)?n.map(cf):String(n)}function Jve(n){let e=Object.create(null),l=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,t;for(;t=l.exec(n);)e[t[1]]=t[2];return e}var Qve=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function hb(n,e,l,t,r){if(X.isFunction(t))return t.call(this,e,l);if(r&&(e=l),!!X.isString(e)){if(X.isString(t))return e.indexOf(t)!==-1;if(X.isRegExp(t))return t.test(e)}}function Zve(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,l,t)=>l.toUpperCase()+t)}function e_e(n,e){let l=X.toCamelCase(" "+e);["get","set","has"].forEach(t=>{Object.defineProperty(n,t+l,{value:function(r,i,s){return this[t].call(this,e,r,i,s)},configurable:!0})})}var O4=class{constructor(e){e&&this.set(e)}set(e,l,t){let r=this;function i(u,a,c){let f=C5(a);if(!f)throw new Error("header name must be a non-empty string");let p=X.findKey(r,f);(!p||r[p]===void 0||c===!0||c===void 0&&r[p]!==!1)&&(r[p||a]=cf(u))}let s=(u,a)=>X.forEach(u,(c,f)=>i(c,f,a));return X.isPlainObject(e)||e instanceof this.constructor?s(e,l):X.isString(e)&&(e=e.trim())&&!Qve(e)?s(Tz(e),l):e!=null&&i(l,e,t),this}get(e,l){if(e=C5(e),e){let t=X.findKey(this,e);if(t){let r=this[t];if(!l)return r;if(l===!0)return Jve(r);if(X.isFunction(l))return l.call(this,r,t);if(X.isRegExp(l))return l.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,l){if(e=C5(e),e){let t=X.findKey(this,e);return!!(t&&this[t]!==void 0&&(!l||hb(this,this[t],t,l)))}return!1}delete(e,l){let t=this,r=!1;function i(s){if(s=C5(s),s){let u=X.findKey(t,s);u&&(!l||hb(t,t[u],u,l))&&(delete t[u],r=!0)}}return X.isArray(e)?e.forEach(i):i(e),r}clear(e){let l=Object.keys(this),t=l.length,r=!1;for(;t--;){let i=l[t];(!e||hb(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let l=this,t={};return X.forEach(this,(r,i)=>{let s=X.findKey(t,i);if(s){l[s]=cf(r),delete l[i];return}let u=e?Zve(i):String(i).trim();u!==i&&delete l[i],l[u]=cf(r),t[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let l=Object.create(null);return X.forEach(this,(t,r)=>{t!=null&&t!==!1&&(l[r]=e&&X.isArray(t)?t.join(", "):t)}),l}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,l])=>e+": "+l).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...l){let t=new this(e);return l.forEach(r=>t.set(r)),t}static accessor(e){let t=(this[Sz]=this[Sz]={accessors:{}}).accessors,r=this.prototype;function i(s){let u=C5(s);t[u]||(e_e(r,s),t[u]=!0)}return X.isArray(e)?e.forEach(i):i(e),this}};O4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(O4.prototype,({value:n},e)=>{let l=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(t){this[l]=t}}});X.freezeMethods(O4);var Ct=O4;function k5(n,e){let l=this||w4,t=e||l,r=Ct.from(t.headers),i=t.data;return X.forEach(n,function(u){i=u.call(l,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function P5(n){return!!(n&&n.__CANCEL__)}function xz(n,e,l){Fe.call(this,n??"canceled",Fe.ERR_CANCELED,e,l),this.name="CanceledError"}X.inherits(xz,Fe,{__CANCEL__:!0});var nr=xz;function Os(n,e,l){let t=l.config.validateStatus;!l.status||!t||t(l.status)?n(l):e(new Fe("Request failed with status code "+l.status,[Fe.ERR_BAD_REQUEST,Fe.ERR_BAD_RESPONSE][Math.floor(l.status/100)-4],l.config,l.request,l))}function mb(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function gb(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function aa(n,e){return n&&!mb(e)?gb(n,e):e}var Xz=xt(wz(),1),Wz=xt(require("http"),1),Kz=xt(require("https"),1),Yz=xt(require("util"),1),Jz=xt(Pz(),1),Ni=xt(require("zlib"),1);var ca="1.6.7";function j5(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}var y_e=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Nb(n,e,l){let t=l&&l.Blob||It.classes.Blob,r=j5(n);if(e===void 0&&t&&(e=!0),r==="data"){n=r.length?n.slice(r.length+1):n;let i=y_e.exec(n);if(!i)throw new Fe("Invalid URL",Fe.ERR_INVALID_URL);let s=i[1],u=i[2],a=i[3],c=Buffer.from(decodeURIComponent(a),u?"base64":"utf8");if(e){if(!t)throw new Fe("Blob is not supported",Fe.ERR_NOT_SUPPORT);return new t([c],{type:s})}return c}throw new Fe("Unsupported protocol "+r,Fe.ERR_NOT_SUPPORT)}var fa=xt(require("stream"),1);var Lz=xt(require("stream"),1);function v_e(n,e){let l=0,t=1e3/e,r=null;return function(s,u){let a=Date.now();if(s||a-l>t)return r&&(clearTimeout(r),r=null),l=a,n.apply(null,u);r||(r=setTimeout(()=>(r=null,l=Date.now(),n.apply(null,u)),t-(a-l)))}}var Dz=v_e;function __e(n,e){n=n||10;let l=new Array(n),t=new Array(n),r=0,i=0,s;return e=e!==void 0?e:1e3,function(a){let c=Date.now(),f=t[i];s||(s=c),l[r]=a,t[r]=c;let p=i,m=0;for(;p!==r;)m+=l[p++],p=p%n;if(r=(r+1)%n,r===i&&(i=(i+1)%n),c-s<e)return;let h=f&&c-f;return h?Math.round(m*1e3/h):void 0}}var ff=__e;var pf=Symbol("internals"),Ib=class extends Lz.default.Transform{constructor(e){e=X.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(u,a)=>!X.isUndefined(a[u])),super({readableHighWaterMark:e.chunkSize});let l=this,t=this[pf]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},r=ff(t.ticksRate*e.samplesCount,t.timeWindow);this.on("newListener",u=>{u==="progress"&&(t.isCaptured||(t.isCaptured=!0))});let i=0;t.updateProgress=Dz(function(){let a=t.length,c=t.bytesSeen,f=c-i;if(!f||l.destroyed)return;let p=r(f);i=c,process.nextTick(()=>{l.emit("progress",{loaded:c,total:a,progress:a?c/a:void 0,bytes:f,rate:p||void 0,estimated:p&&a&&c<=a?(a-c)/p:void 0})})},t.ticksRate);let s=()=>{t.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let l=this[pf];return l.onReadCallback&&l.onReadCallback(),super._read(e)}_transform(e,l,t){let r=this,i=this[pf],s=i.maxRate,u=this.readableHighWaterMark,a=i.timeWindow,c=1e3/a,f=s/c,p=i.minChunkSize!==!1?Math.max(i.minChunkSize,f*.01):0;function m(g,_){let S=Buffer.byteLength(g);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),r.push(g)?process.nextTick(_):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(_)}}let h=(g,_)=>{let S=Buffer.byteLength(g),T=null,x=u,v,b=0;if(s){let w=Date.now();(!i.ts||(b=w-i.ts)>=a)&&(i.ts=w,v=f-i.bytes,i.bytes=v<0?-v:0,b=0),v=f-i.bytes}if(s){if(v<=0)return setTimeout(()=>{_(null,g)},a-b);v<x&&(x=v)}x&&S>x&&S-x>p&&(T=g.subarray(x),g=g.subarray(0,x)),m(g,T?()=>{process.nextTick(_,null,T)}:_)};h(e,function g(_,S){if(_)return t(_);S?h(S,g):t(null)})}setLength(e){return this[pf].length=+e,this}},Cb=Ib;var Qz=xt(require("events"),1);var Mz=require("util"),$z=require("stream");var{asyncIterator:Fz}=Symbol,E_e=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[Fz]?yield*n[Fz]():yield n},df=E_e;var b_e=X.ALPHABET.ALPHA_DIGIT+"-_",U5=new Mz.TextEncoder,Rs=`\r
`,T_e=U5.encode(Rs),S_e=2,kb=class{constructor(e,l){let{escapeName:t}=this.constructor,r=X.isString(l),i=`Content-Disposition: form-data; name="${t(e)}"${!r&&l.name?`; filename="${t(l.name)}"`:""}${Rs}`;r?l=U5.encode(String(l).replace(/\r?\n|\r\n?/g,Rs)):i+=`Content-Type: ${l.type||"application/octet-stream"}${Rs}`,this.headers=U5.encode(i+Rs),this.contentLength=r?l.byteLength:l.size,this.size=this.headers.byteLength+this.contentLength+S_e,this.name=e,this.value=l}async*encode(){yield this.headers;let{value:e}=this;X.isTypedArray(e)?yield e:yield*df(e),yield T_e}static escapeName(e){return String(e).replace(/[\r\n"]/g,l=>({"\r":"%0D","\n":"%0A",'"':"%22"})[l])}},x_e=(n,e,l)=>{let{tag:t="form-data-boundary",size:r=25,boundary:i=t+"-"+X.generateString(r,b_e)}=l||{};if(!X.isFormData(n))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=U5.encode("--"+i+Rs),u=U5.encode("--"+i+"--"+Rs+Rs),a=u.byteLength,c=Array.from(n.entries()).map(([p,m])=>{let h=new kb(p,m);return a+=h.size,h});a+=s.byteLength*c.length,a=X.toFiniteNumber(a);let f={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(a)&&(f["Content-Length"]=a),e&&e(f),$z.Readable.from(async function*(){for(let p of c)yield s,yield*p.encode();yield u}())},jz=x_e;var Uz=xt(require("stream"),1),Pb=class extends Uz.default.Transform{__transform(e,l,t){this.push(e),t()}_transform(e,l,t){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,l)}this.__transform(e,l,t)}},Bz=Pb;var A_e=(n,e)=>X.isAsyncFn(n)?function(...l){let t=l.pop();n.apply(this,l).then(r=>{try{e?t(null,...e(r)):t(null,r)}catch(i){t(i)}},t)}:n,Hz=A_e;var qz={flush:Ni.default.constants.Z_SYNC_FLUSH,finishFlush:Ni.default.constants.Z_SYNC_FLUSH},w_e={flush:Ni.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ni.default.constants.BROTLI_OPERATION_FLUSH},Vz=X.isFunction(Ni.default.createBrotliDecompress),{http:O_e,https:R_e}=Jz.default,N_e=/https:?/,zz=It.protocols.map(n=>n+":");function I_e(n,e){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.config&&n.beforeRedirects.config(n,e)}function Zz(n,e,l){let t=e;if(!t&&t!==!1){let r=(0,Xz.getProxyForUrl)(l);r&&(t=new URL(r))}if(t){if(t.username&&(t.auth=(t.username||"")+":"+(t.password||"")),t.auth){(t.auth.username||t.auth.password)&&(t.auth=(t.auth.username||"")+":"+(t.auth.password||""));let i=Buffer.from(t.auth,"utf8").toString("base64");n.headers["Proxy-Authorization"]="Basic "+i}n.headers.host=n.hostname+(n.port?":"+n.port:"");let r=t.hostname||t.host;n.hostname=r,n.host=r,n.port=t.port,n.path=l,t.protocol&&(n.protocol=t.protocol.includes(":")?t.protocol:`${t.protocol}:`)}n.beforeRedirects.proxy=function(i){Zz(i,e,i.href)}}var C_e=typeof process<"u"&&X.kindOf(process)==="process",k_e=n=>new Promise((e,l)=>{let t,r,i=(a,c)=>{r||(r=!0,t&&t(a,c))},s=a=>{i(a),e(a)},u=a=>{i(a,!0),l(a)};n(s,u,a=>t=a).catch(u)}),P_e=({address:n,family:e})=>{if(!X.isString(n))throw TypeError("address must be a string");return{address:n,family:e||(n.indexOf(".")<0?6:4)}},Gz=(n,e)=>P_e(X.isObject(n)?n:{address:n,family:e}),eG=C_e&&function(e){return k_e(async function(t,r,i){let{data:s,lookup:u,family:a}=e,{responseType:c,responseEncoding:f}=e,p=e.method.toUpperCase(),m,h=!1,g;if(u){let ue=Hz(u,ye=>X.isArray(ye)?ye:[ye]);u=(ye,q,re)=>{ue(ye,q,(te,ne,Bl)=>{if(te)return re(te);let On=X.isArray(ne)?ne.map(Ge=>Gz(Ge)):[Gz(ne,Bl)];q.all?re(te,On):re(te,On[0].address,On[0].family)})}}let _=new Qz.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),_.removeAllListeners()};i((ue,ye)=>{m=!0,ye&&(h=!0,S())});function T(ue){_.emit("abort",!ue||ue.type?new nr(null,e,g):ue)}_.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(T),e.signal&&(e.signal.aborted?T():e.signal.addEventListener("abort",T)));let x=aa(e.baseURL,e.url),v=new URL(x,"http://localhost"),b=v.protocol||zz[0];if(b==="data:"){let ue;if(p!=="GET")return Os(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{ue=Nb(e.url,c==="blob",{Blob:e.env&&e.env.Blob})}catch(ye){throw Fe.from(ye,Fe.ERR_BAD_REQUEST,e)}return c==="text"?(ue=ue.toString(f),(!f||f==="utf8")&&(ue=X.stripBOM(ue))):c==="stream"&&(ue=fa.default.Readable.from(ue)),Os(t,r,{data:ue,status:200,statusText:"OK",headers:new Ct,config:e})}if(zz.indexOf(b)===-1)return r(new Fe("Unsupported protocol "+b,Fe.ERR_BAD_REQUEST,e));let w=Ct.from(e.headers).normalize();w.set("User-Agent","axios/"+ca,!1);let N=e.onDownloadProgress,R=e.onUploadProgress,k=e.maxRate,j,L;if(X.isSpecCompliantForm(s)){let ue=w.getContentType(/boundary=([-_\w\d]{10,70})/i);s=jz(s,ye=>{w.set(ye)},{tag:`axios-${ca}-boundary`,boundary:ue&&ue[1]||void 0})}else if(X.isFormData(s)&&X.isFunction(s.getHeaders)){if(w.set(s.getHeaders()),!w.hasContentLength())try{let ue=await Yz.default.promisify(s.getLength).call(s); Line truncated
`+i.map(iG).join(`
`):" "+iG(i[0]):"as no adapter specified";throw new Fe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return t},adapters:Db};function Lb(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new nr(null,n)}function mf(n){return Lb(n),n.headers=Ct.from(n.headers),n.data=k5.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),hf.getAdapter(n.adapter||w4.adapter)(n).then(function(t){return Lb(n),t.data=k5.call(n,n.transformResponse,t),t.headers=Ct.from(t.headers),t},function(t){return P5(t)||(Lb(n),t&&t.response&&(t.response.data=k5.call(n,n.transformResponse,t.response),t.response.headers=Ct.from(t.response.headers))),Promise.reject(t)})}var sG=n=>n instanceof Ct?n.toJSON():n;function Ii(n,e){e=e||{};let l={};function t(c,f,p){return X.isPlainObject(c)&&X.isPlainObject(f)?X.merge.call({caseless:p},c,f):X.isPlainObject(f)?X.merge({},f):X.isArray(f)?f.slice():f}function r(c,f,p){if(X.isUndefined(f)){if(!X.isUndefined(c))return t(void 0,c,p)}else return t(c,f,p)}function i(c,f){if(!X.isUndefined(f))return t(void 0,f)}function s(c,f){if(X.isUndefined(f)){if(!X.isUndefined(c))return t(void 0,c)}else return t(void 0,f)}function u(c,f,p){if(p in e)return t(c,f);if(p in n)return t(void 0,c)}let a={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(c,f)=>r(sG(c),sG(f),!0)};return X.forEach(Object.keys(Object.assign({},n,e)),function(f){let p=a[f]||r,m=p(n[f],e[f],f);X.isUndefined(m)&&p!==u||(l[f]=m)}),l}var Fb={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Fb[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});var uG={};Fb.transitional=function(e,l,t){function r(i,s){return"[Axios v"+ca+"] Transitional option '"+i+"'"+s+(t?". "+t:"")}return(i,s,u)=>{if(e===!1)throw new Fe(r(s," has been removed"+(l?" in "+l:"")),Fe.ERR_DEPRECATED);return l&&!uG[s]&&(uG[s]=!0,console.warn(r(s," has been deprecated since v"+l+" and will be removed in the near future"))),e?e(i,s,u):!0}};function F_e(n,e,l){if(typeof n!="object")throw new Fe("options must be an object",Fe.ERR_BAD_OPTION_VALUE);let t=Object.keys(n),r=t.length;for(;r-- >0;){let i=t[r],s=e[i];if(s){let u=n[i],a=u===void 0||s(u,i,n);if(a!==!0)throw new Fe("option "+i+" must be "+a,Fe.ERR_BAD_OPTION_VALUE);continue}if(l!==!0)throw new Fe("Unknown option "+i,Fe.ERR_BAD_OPTION)}}var gf={assertOptions:F_e,validators:Fb};var Ns=gf.validators,N4=class{constructor(e){this.defaults=e,this.interceptors={request:new cb,response:new cb}}async request(e,l){try{return await this._request(e,l)}catch(t){if(t instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;let i=r.stack?r.stack.replace(/^.+\n/,""):"";t.stack?i&&!String(t.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(t.stack+=`
`+i):t.stack=i}throw t}}_request(e,l){typeof e=="string"?(l=l||{},l.url=e):l=e||{},l=Ii(this.defaults,l);let{transitional:t,paramsSerializer:r,headers:i}=l;t!==void 0&&gf.assertOptions(t,{silentJSONParsing:Ns.transitional(Ns.boolean),forcedJSONParsing:Ns.transitional(Ns.boolean),clarifyTimeoutError:Ns.transitional(Ns.boolean)},!1),r!=null&&(X.isFunction(r)?l.paramsSerializer={serialize:r}:gf.assertOptions(r,{encode:Ns.function,serialize:Ns.function},!0)),l.method=(l.method||this.defaults.method||"get").toLowerCase();let s=i&&X.merge(i.common,i[l.method]);i&&X.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),l.headers=Ct.concat(s,i);let u=[],a=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(l)===!1||(a=a&&_.synchronous,u.unshift(_.fulfilled,_.rejected))});let c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let f,p=0,m;if(!a){let g=[mf.bind(this),void 0];for(g.unshift.apply(g,u),g.push.apply(g,c),m=g.length,f=Promise.resolve(l);p<m;)f=f.then(g[p++],g[p++]);return f}m=u.length;let h=l;for(p=0;p<m;){let g=u[p++],_=u[p++];try{h=g(h)}catch(S){_.call(this,S);break}}try{f=mf.call(this,h)}catch(g){return Promise.reject(g)}for(p=0,m=c.length;p<m;)f=f.then(c[p++],c[p++]);return f}getUri(e){e=Ii(this.defaults,e);let l=aa(e.baseURL,e.url);return ua(l,e.params,e.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(e){N4.prototype[e]=function(l,t){return this.request(Ii(t||{},{method:e,url:l,data:(t||{}).data}))}});X.forEach(["post","put","patch"],function(e){function l(t){return function(i,s,u){return this.request(Ii(u||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}N4.prototype[e]=l(),N4.prototype[e+"Form"]=l(!0)});var B5=N4;var Mb=class n{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let l;this.promise=new Promise(function(i){l=i});let t=this;this.promise.then(r=>{if(!t._listeners)return;let i=t._listeners.length;for(;i-- >0;)t._listeners[i](r);t._listeners=null}),this.promise.then=r=>{let i,s=new Promise(u=>{t.subscribe(u),i=u}).then(r);return s.cancel=function(){t.unsubscribe(i)},s},e(function(i,s,u){t.reason||(t.reason=new nr(i,s,u),l(t.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let l=this._listeners.indexOf(e);l!==-1&&this._listeners.splice(l,1)}static source(){let e;return{token:new n(function(r){e=r}),cancel:e}}},aG=Mb;function $b(n){return function(l){return n.apply(null,l)}}function jb(n){return X.isObject(n)&&n.isAxiosError===!0}var Ub={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ub).forEach(([n,e])=>{Ub[e]=n});var oG=Ub;function cG(n){let e=new B5(n),l=R5(B5.prototype.request,e);return X.extend(l,B5.prototype,e,{allOwnKeys:!0}),X.extend(l,e,null,{allOwnKeys:!0}),l.create=function(r){return cG(Ii(n,r))},l}var _t=cG(w4);_t.Axios=B5;_t.CanceledError=nr;_t.CancelToken=aG;_t.isCancel=P5;_t.VERSION=ca;_t.toFormData=ws;_t.AxiosError=Fe;_t.Cancel=_t.CanceledError;_t.all=function(e){return Promise.all(e)};_t.spread=$b;_t.isAxiosError=jb;_t.mergeConfig=Ii;_t.AxiosHeaders=Ct;_t.formToJSON=n=>of(X.isHTMLForm(n)?new FormData(n):n);_t.getAdapter=hf.getAdapter;_t.HttpStatusCode=oG;_t.default=_t;var I4=_t;var{Axios:YCe,AxiosError:JCe,CanceledError:QCe,isCancel:ZCe,CancelToken:eke,VERSION:nke,all:lke,Cancel:tke,isAxiosError:rke,spread:ike,toFormData:fG,AxiosHeaders:ske,HttpStatusCode:uke,formToJSON:ake,getAdapter:oke,mergeConfig:cke}=I4;var _G=xt(require("https"),1),EG=xt(require("crypto"),1),bG=xt(yG(),1),qb={};globalThis.dataBase=null;globalThis.local={get:async function(n,e){return await V_e(n,e)},set:asy Line truncated
`},timeout:.1}),await dataBase.push(t,qb)}globalThis.localLog={set:async function(n,e,l){X_e(n,e,l)}};function G_e(){pa.default.existsSync("log")||pa.default.mkdirSync("log");let n="log/info.log";return pa.default.existsSync(n)?pa.default.readFileSync(n).toString():(pa.default.writeFileSync(n,""),"")}function X_e(n){pa.default.writeFileSync("log/info.log",G_e()+`
`+n)}globalThis.req=W_e;async function W_e(n,e){try{let l=e&&e.data||null,t=e&&e.postType||null,r=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,u=e.proxy??!1,a=e?e.headers||{}:{};t==="form"?(a["Content-Type"]="application/x-www-form-urlencoded",l!=null&&(l=vG.default.stringify(l,{encode:!1}))):t==="form-data"&&(a["Content-Type"]="multipart/form-data",l=fG(l));let c=r===1||r===2?"arraybuffer":void 0,f;u?f=bG.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):f=_G.default.Agent({rejectUnauthorized:!1});let p=await I4(n,{responseType:c,method:e&&e.method||"get",headers:a,data:l,timeout:i,maxRedirects:s?null:0,httpsAgent:f});l=p.data;let m={};for(let h of p.headers){let g=h[1];m[h[0]]=Array.isArray(g)&&g.length===1?g[0]:g}if(!r)typeof l=="object"&&(l=JSON.stringify(l));else{if(r===1)return{code:p.status,headers:m,content:l};if(r===2)return{code:p.status,headers:m,content:l.toString("base64")};if(r===3){let h=e.stream;return h.onResp&&await h.onResp({code:p.status,headers:m}),h.onData?(l.on("data",async g=>{await h.onData(g)}),l.on("end",async()=>{h.onDone&&await h.onDone()})):h.onDone&&await h.onDone(),"stream..."}}return{code:p.status,headers:m,content:l}}catch(l){let t=l.response;try{return{code:t.status,headers:t.headers,content:JSON.stringify(t.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=K_e;function K_e(n){return EG.default.createHash("md5").update(Buffer.from(n,"utf8")).digest("hex")}globalThis.js2Proxy=function(n,e,l){let t=Object.keys(l).length===0?" ":encodeURIComponent(JSON.stringify(l));return n.server.address().dynamic+n.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+t+"/"};var Y_e=["DEBUG","INFO","WARNING","ERROR"];var k4=class{constructor(e,l="DEBUG"){this.app_name=e,this.level=l,this.level_index=Y_e.indexOf(l)}format(e,l){let t=80;switch(e){case"INFO":t=t+1;break;case"WARNING":t=t-2;break;default:break}return l.length<t&&((t-l.length)%2===0?l="#".repeat(Math.floor((t-l.length)/2))+l+"#".repeat(Math.floor((t-l.length)/2)):l="#".repeat(Math.floor((t-l.length)/2))+l+"#".repeat(Math.floor((t-l.length)/2)+1)),l}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,l,t){return t&&(l=this.format(e,l)),`${this.getTime()} - ${this.app_name} - ${e}: ${l}`}async log(e){console.debug(e),await req("http://127.0.0.1:8099/upload",{data:{log:e+`
`},timeout:.1})}async info(e,l){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,l))}async warning(e,l){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,l))}async error(e,l){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,l))}async debug(e,l){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,l))}};var Tl=class extends Dl{constructor(){super(),this.jadeLog=new k4(this.getAppName(),"DEBUG")}async init(e,l){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(t){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+t,!1)}}catch(t){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${t}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return Ee.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return Ee.isEmpty(e)?this.filterObj:e}async home(e,l){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,l){let t=e.body.id,r=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(r),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${t},pg = ${r},extend = ${JSON.stringify(s)}`),t==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(t,r,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(u){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${u}`)}}async detail(e,l){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let r=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new tl,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${r}`);try{return await this.setDetail(r),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=r,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,l){let t=e.body.flag,r=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${t},id:${r},flags:${i}`,!0);try{let s;if(await this.setPlay(t,r,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let u=await e.server.messageT Line truncated
`),a=e(s).find("a"),c=[{n:"\u5168\u90E8",v:r}],f=t.toString();for(let p of a){let m=e(p).text().replaceAll(`
`,""),h=p.attribs.href;h!==void 0&&c.push({n:m,v:h})}u=u.filter(p=>p!==""),this.filterObj[r].push({key:f,name:u[0],value:c})}let i=e('[id="side-menu"]').find("li");for(let s of i){let u=e(s).find("a")[0].attribs.href;if(u!==void 0&&u.indexOf(this.siteUrl)>-1){let a={type_name:e(s).text(),type_id:u};this.classes.push(a)}}}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,l,t,r){r[1]!==void 0&&r[1]!=="1"&&(e=r[1]),await this.jadeLog.info(`tid = ${e}`);let i="";e.indexOf(this.siteUrl)>-1?i=e+l.toString()+".html":i=this.siteUrl,this.limit=36;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setDetail(e){let l=await this.getHtml(e),t=ht(/video\/(\w+).html/,e);this.vodDetail=await this.parseVodDetailFromDoc(l,t)}async setPlay(e,l,t){this.playUrl=l,this.playHeader={}}async setSearch(e,l){let t=this.siteUrl+"search/"+encodeURIComponent(e),r=await this.getHtml(t);this.vodList=await this.parseVodShortListFromDoc(r)}async proxy(e,l){return super.proxy(e,l)}},ol=new Wb;var Kb=class extends Tl{constructor(){super()}getName(){return ol.getName()}getAppName(){return ol.getAppName()}getJSName(){return ol.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await ol.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await ol.initCookie(e.server.config.bilicookie),await ol.spiderInit(e),ol.cfgObj.code=0,ol.catOpenStatus=!0,ol.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await ol.setClasses(),this.classes=ol.classes}async setFilterObj(){await ol.setFilterObj(),this.filterObj=ol.filterObj}async setHomeVod(){await ol.setHomeVod(),this.homeVodList=ol.homeVodList}async setCategory(e,l,t,r){await ol.setCategory(e,l,t,r),this.vodList=ol.vodList}async setDetail(e){await ol.setDetail(e),this.vodDetail=ol.vodDetail}async setPlay(e,l,t){await ol.setPlay(e,l,t),this.playUrl=ol.playUrl,this.result=ol.result}async setSearch(e,l,t){await ol.setSearch(e,l,t),this.vodList=ol.vodList,this.result=ol.result}async setProxy(e,l){return await ol.proxy(e,l)}},Ps=new Kb;async function MG(n,e){return await Ps.init(n,e)}async function $G(n,e){return await Ps.home(n,e)}async function tEe(n,e){return await Ps.homeVod(n,e)}async function jG(n,e){return await Ps.category(n,e)}async function UG(n,e){return await Ps.detail(n,e)}async function BG(n,e){return await Ps.play(n,e)}async function HG(n,e){return await Ps.search(n,e)}async function rEe(n,e){return await Ps.proxy(n,e)}var qG={meta:{key:ol.getJSName(),name:ol.getName(),type:ol.getType()},api:async n=>{n.post("/init",MG),n.post("/home",$G),n.post("/category",jG),n.post("/detail",UG),n.post("/play",BG),n.post("/search",HG),n.get("/proxy/:what/:ids/:end",rEe)},spider:{init:MG,home:$G,homeVod:tEe,category:jG,detail:UG,play:BG,search:HG}};var Yb=class extends Dl{constructor(){super(),this.siteUrl="https://jable.tv",this.cookie=""}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getImgHeaders()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getImgHeaders())}getImgHeaders(){return{"User-Agent":"PostmanRuntime/7.37.3","Postman-Token":"c2602692-1a05-4bb0-93cd-270afad97e87",Host:"assets-cdn.jable.tv",Proxy:!0}}async init(e){await super.init(e),await this.spiderInit(null)}getAppName(){return"Jable"}getName(){return"\u{1F51E}\u2503Jable\u2503\u{1F51E}"}getJSName(){return"jable"}getType(){return 3}getHeader(){let e={};return e["User-Agent"]="PostmanRuntime/7.36.3",e.Host="jable.tv",e["Postman-Token"]="33290483-3c8d-413f-a160-0d3aea9e6f95",e}async getHtml(e=this.siteUrl,l=!1,t=this.getHeader()){return super.getHtml(e,!0,t)}async setClasses(){let e=await this.getHtml(this.siteUrl),l=e('[class="title-box"]'),t=e("div.row");for(let r of e(t[0]).find("a")){let i=e(r).text(),s=r.attribs.href;s.indexOf(this.siteUrl)>-1&&this.classes.push(this.getTypeDic(i,s))}l=l.slice(1,9),t=t.slice(1,9);for(let r=0;r<l.length;r++){let i=e(t[r]).find("a")[0].attribs.href;this.classes.push(this.getTypeDic("\u6807\u7B7E",i));break}}async getSortFilter(e){let l=e('[class="sorting-nav"]').find("a"),t={name:"\u6392\u5E8F",key:"sort",value:[]};for(let r of l){let i=r.attribs["data-parameters"].split("sort_by:")[1],s=e(r).text();t.value.push({n:s,v:i})}return t}async getFilter(e,l,t,r){let i=[];if(l<4){let s={name:r,key:"type",value:[]},u=["div.img-box > a",'[class="horizontal-img-box ml-3 mb-3"] > a',"","sort"],a=["div.absolute-center > h4","div.detail"],c=await this.getHtml(t);for(let f of c(u[l])){let p=f.attribs.href,m=e(e(f).find(a[l])).text().replaceAll(" ","").replaceAll(`
`,"").replaceAll(" ","");s.value.push({n:m,v:p})}if(s.value.length>0){i.push(s);let f=await this.getHtml(s.value[0].v),p=await this.getSortFilter(f);p.value.length>0&&i.push(p)}else{let f=await this.getSortFilter(c);f.value.length>0&&i.push(f)}}else{let s=e("div.row").slice(1,9),u=e('[class="title-box"]').slice(1,9);for(let f=0;f<u.length;f++){let p={name:e(e(u[f]).find("h2")).text(),key:"type",value:[]};for(let m of e(s[f]).find("a")){let h=m.attribs.href;h.indexOf(this.siteUrl)>-1&&p.value.push({n:e(m).text(),v:h})}i.push(p)}let a=await this.getHtml(t),c=await this.getSortFilter(a);c.value.length>0&&i.push(c)}return i}async setFilterObj(){let e=await this.getHtml(this.siteUrl),l=this.classes.slice(1);for(let t=0;t<l.length;t++){let r=l[t].type_name,i=l[t].type_id,s=await this.getFilter(e,t,i,r);s.length>1&&t<4&&(i=s[0].value[0].v,this.classes[t+1]=this.getTypeDic(r,i)),this.filterObj[i]=s}}async parseVodShortListFromDoc(e){let l=[],t=e("div.video-img-box");for(let r of t){let i=new Un,s=e(r).find("img").attr("data-src");if(s!==void 0){i.vod_pic=s;let u=e(r).find("a").attr("href");i.vod_id=u.split("/")[4],i.vod_name=u.split("/")[4];let a=e(e(r).find('[class="sub-title"]')).text().split(`
`);a.length>1?i.vod_remarks=a[1].replaceAll(" ","").replaceAll(" ",""):i.vod_remarks="\u7CBE\u9009",!Ee.isEmpty(i.vod_pic)&&i.vod_remarks!=="[\u9650\u6642\u512A\u60E0]\u53EA\u97001\u5143\u5373\u53EF\u7121\u9650\u4E0B\u8F09"&&l.push(i)}}return l}async parseVodDetailFromDoc(e){let l=new tl,t=e('[class="header-left"]');l.vod_name=e(e(t).find("h4")).text();let r=ht(/<video poster="(.*?)" id=/,e.html());l.vod_pic=r,l.vod_year=e(e('[class="inactive-color"]')).text();let i=e(e('[class="header-right d-none d-md-block"] > h6')).text().replaceAll(`
`,"").replaceAll("\u25CF",""),s=[],u=ht(/var hlsUrl = '(.*?)';/,e.html());s.push(i+"$"+u);let a=[];a.push(s.join("#"));let c=["Jable"];return l.vod_play_from=c.join("$$$"),l.vod_play_url=a.join("$$$"),l}async setHomeVod(){let e=await this.getHtml(this.siteUrl);this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let l=await this.getHtml(this.siteUrl+"/videos/"+e+"/");this.vodDetail=await this.parseVodDetailFromDoc(l)}async setCategory(e,l,t,r){let i=r.type??e,s=r.sort??"video_viewed";this.limit=24;let u;this.total=0,this.count=0,e.indexOf("latest-updates")>1?u=`https://jable.tv/latest-updates/?mode=async&function=get_block&block_id=list_videos_latest_videos_list&sort_by=post_date&from=${l}&_=1709730132217`:u=i+`/${l}/?mode=async&function=get_block&block_id=list_videos_common_videos_list&sort_by=${s}&_=${new Date().getTime()}`;let a=await this.getHtml(u);this.vodList=await this.parseVodShortListFromDoc(a);let c=a(a('[class="page-item"]').slice(-1)[0]).text();c.indexOf("\u6700\u5F8C")>-1||(parseInt(c)===this.page||Ee.isEmpty(c))&&(await this.jadeLog.debug("\u5206\u7C7B\u9875\u9762\u5230\u5E95\u4E86"),this.total=this.page,this.count=this.page)}async setSearch(e,l){let t=this.siteUrl+`/search/${e}/`,r=await this.getHtml(t);this.vodList=await this.parseVodShortListFromDocByCategory(r)}},cl=new Yb;var Jb=class extends Tl{constructor(){super()}getName(){return cl.getName()}getAppName(){return cl.getAppName()}getJSName(){return cl.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await cl.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await cl.initCookie(e.server.config.bilicookie),await cl.spiderInit(e),cl.cfgObj.code=0,cl.catOpenStatus=!0,cl.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await cl.setClasses(),this.classes=cl.classes}async setFilterObj(){await cl.setFilterObj(),this.filterObj=cl.filterObj}async setHomeVod(){await cl.setHomeVod(),this.homeVodList=cl.homeVodList}async setCategory(e,l,t,r){await cl.setCategory(e,l,t,r),this.vodList=cl.vodList}async setDetail(e){await cl.setDetail(e),this.vodDetail=cl.vodDetail}async setPlay(e,l,t){await cl.setPlay(e,l,t),this.playUrl=cl.playUrl,this.result=cl.result}async setSearch(e,l,t){await cl.setSearch(e,l,t),this.vodList=cl.vodList,this.result=cl.result}async setProxy(e,l){return await cl.proxy(e,l)}},Ds=new Jb;async function VG(n,e){return await Ds.init(n,e)}async function zG(n,e){return await Ds.home(n,e)}async function iEe(n,e){return await Ds.homeVod(n,e)}async function GG(n,e){return await Ds.category(n,e)}async function XG(n,e){return await Ds.detail(n,e)}async function WG(n,e){return await Ds.play(n,e)}async function KG(n,e){return await Ds.search(n,e)}async function sEe(n,e){return await Ds.proxy(n,e)}var YG={meta:{key:cl.getJSName(),name:cl.getName(),type:cl.getType()},api:async n=>{n.post("/init",VG),n.post("/home",zG),n.post("/category",GG),n.post("/detail",XG),n.post("/play",WG),n.post("/search",KG),n.get("/proxy/:what/:ids/:end",sEe)},spider:{init:VG,home:zG,homeVod:iEe,category:GG,detail:XG,play:WG,search:KG}};var Qb=class extends Dl{constructor(){super(),this.siteUrl="https://www.sehuatang.net"}getAppName(){return"\u8272\u82B1\u5802BT"}getName(){return"\u{1F51E}\u2503\u8272\u82B1\u5802BT\u2503\u{1F51E}"}getJSName(){return"sehuatang"}getType(){return 3}async init(e){await super.init(e),this.jsBaseDetail=await js2Proxy(!0,this.siteType,this.siteKey,"detail/",{})}getHeader(){return{"User-Agent":"PostmanRuntime/7.36.1",Host:"www.sehuatang.net",Cookie:"cPNj_2132_saltkey=Q4BKEOEC; cf_clearance=6Gz2tvOXPkkJP2UhLnSsN4s0RrnDUy0jBN0kUvC5FNQ-1706109144-1-AebvwBnAURwWWQhj0QRBrRPku2n8xI73PIeuZVj2ckqY9zjQ7zFzDviX7Gkex1P1bUw9SXHGEYnkBB9nmWe6Nhk=; _safe=vqd37pjm4p5uodq339yzk6b7jdt6oich"}}async parseVodShortListFromDoc(e){let l=[],t=e('[id="portal_block_43_content"]').find("li");for(let r of t){let i=new Un;i.vod_remarks=e(e(r).find("a")[1]).text(),i.vod_id=e(r).find("a")[2].attribs.href,i.vod_name=e(r).find("a")[2].attribs.title,i.vod_pic=this.jsBaseDetail+Ri(i.vod_id),l.push(i)}return l}async parseVodShortListFromDocByCategory(e){let l=[],t=e(e('[class="bm_c"]')[0]).find("tbody");for(let r of t){let i=e(e(e(r).find("cite")).find("a")[0]).text();if(i!=="admin"&&i!==void 0&&!Ee.isEmpty(i)){let s=new Un;s.vod_id=e(r).find("a")[0].attribs.href,s.vod_remarks=e(e(r).find("a")[2]).text(),s.vod_name=e(e(r).find("a")[3]).text(),s.vod_pic=this.jsBaseDetail+Ri(s.vod_id),l.push(s)}}return l}async parseVodDetailFromDoc(e){let l=new tl,t=e('[class="t_f"]')[0],r=e(t).text().replaceAll("\uFF1A",":").replaceAll("\u3010","").replaceAll("\u3011","");return l.vod_pic=e(t).find("img")[0].attribs.file,l.vod_name=ht(/影片名称(.*?)\n/,r).replaceAll(":","").replaceAll(`
`,""),l.vod_actor=ht(/出演女优(.*?)\n/,r).replaceAll(":","").replaceAll(`
`,""),l.vod_remarks=ht(/是否有码(.*?)\n/,r).replaceAll(":","").replaceAll(`
`,""),l.vod_play_from="BT",l.vod_play_url=l.vod_name+"$"+ht(/磁力链接: (.*)复制代码/,r),l}async setClasses(){let e=await this.getHtml(),l=e('[id="category_1"]').find("tr").slice(0,-1);for(let t of l){let r=e(e(t).find('[class="fl_icn_g"]')).find("a");for(let i of r){let s=i.attribs.href,u=e(i).find("img")[0].attribs.alt;this.classes.push(this.getTypeDic(u,s))}}}async getFilter(e){let l=[],t={key:1,name:"\u7C7B\u578B",value:[]},r=e('[id="thread_types"]').find("a");for(let u of r){let a="";u.children.length>1?a=u.children[0].data+":"+e(u.children[1]).text():a=u.children[0].data,t.value.push({n:a,v:u.attribs.href})}l.push(t);let i={key:1,name:"\u4E3B\u9898",value:[]},s=e('[class="tf"]').find("a");for(let u of s){let a=e(u).text();a!=="\u66F4\u591A"&&a!=="\u663E\u793A\u7F6E\u9876"&&i.value.push({n:e(u).text(),v:u.attribs.href})}return l.push(i),l}async setFilterObj(){for(let e of this.classes){let l=e.type_name,t=e.type_id;if(l!=="\u6700\u8FD1\u66F4\u65B0"){let r=await this.getHtml(this.siteUrl+"/"+t);this.filterObj[t]=await this.getFilter(r)}}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,l,t,r){r[1]!==void 0&&r[1]==="javascript:;"||(e=r[1]??e);let i,s=e.split(".")[0].split("-");s.length>2?(s[2]=l,i=this.siteUrl+"/"+s.join("-")+".html"):i=this.siteUrl+"/"+e+"&page="+l;let u=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(u)}async setDetail(e){let l=await this.getHtml(this.siteUrl+"/"+e);this.vodDetail=await this.parseVodDetailFromDoc(l)}async proxy(e,l){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(l)}`);let t=e[0],r=R3(e[1]);if(t==="detail"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${r}`);let i=await this.getHtml(this.siteUrl+"/"+r),s=await this.parseVodDetailFromDoc(i);await this.jadeLog.debug(`\u56FE\u7247\u5730\u5740\u4E3A:${s.vod_pic}`);let u;return Ee.isEmpty(l)?u=await req(s.vod_pic,{buffer:2,headers:{Referer:r,"User-Agent":Fr}}):u=await req(s.vod_pic,{buffer:2,headers:l}),JSON.stringify({code:u.code,buffer:2,content:u.content,headers:u.headers})}return JSON.stringify({code:500,content:""})}},fl=new Qb;var Zb=class extends Tl{constructor(){super()}getName(){return fl.getName()}getAppName(){return fl.getAppName()}getJSName(){return fl.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await fl.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await fl.initCookie(e.server.config.bilicookie),await fl.spiderInit(e),fl.cfgObj.code=0,fl.catOpenStatus=!0,fl.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await fl.setClasses(),this.classes=fl.classes}async setFilterObj(){await fl.setFilterObj(),this.filterObj=fl.filterObj}async setHomeVod(){await fl.setHomeVod(),this.homeVodList=fl.homeVodList}async setCategory(e,l,t,r){await fl.setCategory(e,l,t,r),this.vodList=fl.vodList}async setDetail(e){await fl.setDetail(e),this.vodDetail=fl.vodDetail}async setPlay(e,l,t){await fl.setPlay(e,l,t),this.playUrl=fl.playUrl,this.result=fl.result}async setSearch(e,l,t){await fl.setSearch(e,l,t),this.vodList=fl.vodList,this.result=fl.result}async setProxy(e,l){return await fl.proxy(e,l)}},Ls=new Zb;async function JG(n,e){return await Ls.init(n,e)}async function QG(n,e){return await Ls.home(n,e)}async function uEe(n,e){return await Ls.homeVod(n,e)}async function ZG(n,e){return await Ls.category(n,e)}async function eX(n,e){return await Ls.detail(n,e)}async function nX(n,e){return await Ls.play(n,e)}async function lX(n,e){return await Ls.search(n,e)}async function aEe(n,e){return await Ls.proxy(n,e)}var tX={meta:{key:fl.getJSName(),name:fl.getName(),type:fl.getType()},api:async n=>{n.post("/init",JG),n.post("/home",QG),n.post("/category",ZG),n.post("/detail",eX),n.post("/play",nX),n.post("/search",lX),n.get("/proxy/:what/:ids/:end",aEe)},spider:{init:JG,home:QG,homeVod:uEe,category:ZG,detail:eX,play:nX,search:lX}};var eT=class extends Dl{constructor(){super(),this.siteUrl="https://hsck12.shop/"}getName(){return"\u{1F51E}\u2503\u9EC4\u8272\u4ED3\u5E93\u2503\u{1F51E}"}getAppName(){return"\u9EC4\u8272\u4ED3\u5E93"}getJSName(){return"hscangku"}getType(){return 3}async parseVodShortListFromDoc(e){let l=[],t=e('[class="stui-vodlist clearfix"]').find("li");for(let r of t){let i=new Un,s=e(r).find("a")[0];i.vod_id=s.attribs.href,i.vod_name=s.attribs.title,i.vod_pic=s.attribs["data-original"],l.push(i)}return l}async parseVodDetailFromDoc(e){let l=new tl,t=e(e('[class="stui-pannel__head clearfix"]')[1]).find("h3"),i=e("div.stui-pannel-bd > div").find("video")[0];return l.vod_name=t.text(),l.vod_pic=i.attribs.poster,l.vod_play_from="\u9EC4\u8272\u4ED3\u5E93",l.vod_play_url=e(i).find("source")[0].attribs.src,l}async setClasses(){this.classes= Line truncated
`)),e.push(r)}return e}async parseVodShortListFromDocBySearch(n){let e=n('[class="show-list"]').find("li"),l=[];for(let t of e){let r=new Un;r.vod_id=n(t).find("a")[0].attribs.href;let i=n(t).find("img")[0];r.vod_pic=i.attribs.src,r.vod_name=i.attribs.alt,r.vod_remarks=n(n(t).find('[class="type fn-left"]')).text().replace("\u7C7B\u578B\uFF1A",""),r.vod_remarks!=="\u793E\u5904\u7247"&&r.vod_remarks!=="\u793E\u4FDD\u7247"&&r.vod_remarks!=="\u64B8\u4E1D\u7247"&&r.vod_remarks!=="\u64B8\u4E1D\u52A8\u6F2B"&&l.push(r)}return l}async parseVodDetailFromDoc(n){let e=new tl,l=n('[class="detail-pic fn-left"]').find("img")[0];e.vod_pic=l.attribs.src,e.vod_name=l.attribs.alt;let t=n('[class="info fn-clear"]');for(let c of n(t).find("dl")){let f=n(c).text();f.indexOf("\u4E3B\u6F14")>-1&&(e.vod_actor=f.replaceAll("\u4E3B\u6F14\uFF1A","").replaceAll(`
`,"")),f.indexOf("\u72B6\u6001")>-1&&(e.vod_remarks=f.replaceAll("\u72B6\u6001\uFF1A","").replaceAll(`
`,"")),f.indexOf("\u7C7B\u578B")>-1&&(e.type_name=f.replaceAll("\u7C7B\u578B\uFF1A","").replaceAll(`
`,"")),f.indexOf("\u5730\u533A")>-1&&(e.vod_area=f.replaceAll("\u5730\u533A\uFF1A","").replaceAll(`
`,"")),f.indexOf("\u5BFC\u6F14")>-1&&(e.vod_director=f.replaceAll("\u5BFC\u6F14\uFF1A","").replaceAll(`
`,"")),f.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=f.replaceAll("\u5E74\u4EFD\uFF1A","").replaceAll(`
`,"")),f.indexOf("\u5267\u60C5")>-1&&(e.vod_content=f.replaceAll("\u5267\u60C5\uFF1A","").replaceAll(`
`,""))}let r={},i=n.html(),s=n('[class="play-list"]'),u=1;for(let c of s){let f=`\u64AD\u653E\u8FDE\u63A5-${u}`,p=[];for(let m of n(c).find("a")){let h=m.attribs.title,g=m.attribs.href;p.push(h+"$"+g)}r[f]=p.join("#"),u=u+1}u=1;let a=n('[class="con4"]');for(let c of a){let f=`\u78C1\u529B\u94FE\u63A5-${u}`,p=[],m=f,h=n(n(c).find("div")).find("a")[0].attribs.href;h!=="javascript:void(0);"&&(p.push(m+"$"+h),r[f]=p.join("#"),u=u+1)}return e.vod_play_url=Ee.values(r).join("$$$"),e.vod_play_from=Ee.keys(r).join("$$$"),e}async setHomeVod(){let n=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(n)}async setDetail(n){let e=await this.getHtml(this.siteUrl+n);this.vodDetail=await this.parseVodDetailFromDoc(e)}getExtend(n){if(n.class!==void 0&&n.class!=="\u5168\u90E8")return n.class}async setCategory(n,e,l,t){let r=this.getExtend(t)??n,i;r===n?i=this.siteUrl+r:parseInt(e)===1?i=this.siteUrl+r:i=this.siteUrl+r+`index${e}.html`;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setPlay(flag,id,flags){if(flag.indexOf("\u78C1\u529B")>-1)this.playUrl=id;else{let idSplitList=id.split("-"),flag_id=parseInt(idSplitList[1]),episode=parseInt(idSplitList[2].split(".")[0]),$=await this.getHtml(this.siteUrl+id),playJsUrl=ht(/<script type="text\/javascript" src="(.*?)">/,$.html()),playJsContent=await this.fetch(this.siteUrl+playJsUrl,null,this.getHeader()),playUrlListStr=ht(/var VideoListJson=(.*?),urlinfo=/,playJsContent),playDic=eval(playUrlListStr);if(this.playUrl=playDic[flag_id][1][episode].split("$")[1],this.playUrl.indexOf("m3u8")===-1){let n=await this.fetch(this.playUrl,null,this.getHeader());this.playUrl=ht(/url: '(.*?)'/,n)}}}GBKEncode(n){var e=33088;n+="";for(var l=[],t=63,r=0;r<n.length;r++){var i=n.charCodeAt(r);if(i<128)l.push(i);else{var s=vX.indexOf(i);~s?(s+=e,l.push(255&s>>8,255&s)):l.push(t)}}return l}encode(n){let e="";for(let l of n){let t=this.GBKEncode(l);for(let r=0;r<t.length;r++)t[r]="%"+("0"+t[r].toString(16)).substr(-2).toUpperCase();e=e+t.join("")}return e}async setSearch(n,e){let l={searchword:this.encode(n)},t=await this.post(this.siteUrl+"/search.asp",l,this.getHeader(),"form",1),r=Xl(sE(t,"gb2312"));this.vodList=await this.parseVodShortListFromDocBySearch(r)}},da=new H5;async function dEe(n){await da.init(n)}async function hEe(n){return await da.home(n)}async function mEe(){return await da.homeVod()}async function gEe(n,e,l,t){return await da.category(n,e,l,t)}async function yEe(n){return await da.detail(n)}async function vEe(n,e,l){return await da.play(n,e,l)}async function _Ee(n,e){return await da.search(n,e)}function IPe(){return{init:dEe,home:hEe,homeVod:mEe,category:gEe,detail:yEe,play:vEe,search:_Ee}}var rT=class extends H5{constructor(){super(),this.siteUrl="https://b.aqdyje.com",this.removeKey="\u9A91\u5175\u8425"}getName(){return"\u{1F51E}\u2503\u7231\u60C5\u7535\u5F71\u7F5118+\u2503\u{1F51E}"}getAppName(){return"\u7231\u60C5\u7535\u5F71\u7F5118+"}getJSName(){return"lovemovie18"}getType(){return 3}async parseVodShortListFromDocBySearch(e){let l=e('[class="show-list"]').find("li"),t=[];for(let r of l){let i=new Un;i.vod_id=e(r).find("a")[0].attribs.href;let s=e(r).find("img")[0];i.vod_pic=s.attribs.src,i.vod_name=s.attribs.alt,i.vod_remarks=e(e(r).find('[class="type fn-left"]')).text().replace("\u7C7B\u578B\uFF1A",""),(i.vod_remarks==="\u793E\u5904\u7247"||i.vod_remarks==="\u793E\u4FDD\u7247"||i.vod_remarks==="\u64B8\u4E1D\u7247"||i.vod_remarks==="\u64B8\u4E1D\u52A8\u6F2B")&&t.push(i)}return t}async getFilter(e){let l=await this.getHtml(this.siteUrl+e),t=[],r={key:"class",name:"\u7C7B\u578B",value:[]};for(let i of l('[class="subnav-tv fn-left"]').find("a")){let s=l(i).text(),u=i.attribs.href;r.value.push(this.getFliterDic(s,u))}return r.value.length>1&&t.push(r),t}async setClasses(){let e=await this.getHtml(),l=e('[class="nav-item drop-down "]');this.classes=[];for(let t of l){let r=e(t).find("a")[0],i=e(r).text(),s=r.attribs.href;i===this.removeKey&&(this.classes.push(this.getTypeDic(i,s)),this.filterObj[s]=await this.getFilter(s))}}async setCategory(e,l,t,r){let i=this.getExtend(r)??e,s;parseInt(l)===1?s=this.siteUrl+i:s=this.siteUrl+i+`index${l}.html`;let u=await this.getHtml(s);this.vodList=await this.parseVodShortListFromDoc(u)}},hl=new rT;var iT=class extends Tl{constructor(){super()}getName(){return hl.getName()}getAppName(){return hl.getAppName()}getJSName(){return hl.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await hl.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await hl.initCookie(e.server.config.bilicookie),await hl.spiderInit(e),hl.cfgObj.code=0,hl.catOpenStatus=!0,hl.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await hl.setClasses(),this.classes=hl.classes}async setFilterObj(){await hl.setFilterObj(),this.filterObj= Line truncated
/*! Bundled license information:
uri-js/dist/es5/uri.all.js:
+1 -1
View File
@@ -1 +1 @@
0781ce50eb420e06572003b938aac220
386350685603251deb582749f2a79360
+226 -218
View File
@@ -1,49 +1,49 @@
var ute=Object.create;var B6=Object.defineProperty;var cte=Object.getOwnPropertyDescriptor;var pte=Object.getOwnPropertyNames;var fte=Object.getPrototypeOf,dte=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),SA=(t,e)=>{for(var n in e)B6(t,n,{get:e[n],enumerable:!0})},TA=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of pte(e))!dte.call(t,i)&&i!==n&&B6(t,i,{get:()=>e[i],enumerable:!(r=cte(e,i))||r.enumerable});return t};var Yr=(t,e,n)=>(n=t!=null?ute(fte(t)):{},TA(e||!t||!t.__esModule?B6(n,"default",{value:t,enumerable:!0}):n,t)),hte=t=>TA(B6({},"__esModule",{value:!0}),t);var AA=k((MOe,xA)=>{"use strict";function mte(t){var e=new t,n=e;function r(){var l=e;return l.next?e=l.next:(e=new t,n=e),l.next=null,l}function i(l){n.next=l,n=l}return{get:r,release:i}}xA.exports=mte});var Id=k(($Oe,Rd)=>{"use strict";var yte=AA();function OA(t,e,n){if(typeof t=="function"&&(n=e,e=t,t=null),!(n>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var r=yte(gte),i=null,l=null,s=0,a=null,o={push:_,drain:Kl,saturated:Kl,pause:c,paused:!1,get concurrency(){return n},set concurrency(x){if(!(x>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=x,!o.paused)for(;i&&s<n;)s++,w()},running:u,resume:d,idle:y,length:f,getQueue:m,unshift:S,empty:Kl,kill:E,killAndDrain:g,error:v};return o;function u(){return s}function c(){o.paused=!0}function f(){for(var x=i,O=0;x;)x=x.next,O++;return O}function m(){for(var x=i,O=[];x;)O.push(x.value),x=x.next;return O}function d(){if(o.paused)for(o.paused=!1;i&&s<n;)s++,w()}function y(){return s===0&&o.length()===0}function _(x,O){var N=r.get();N.context=t,N.release=w,N.value=x,N.callback=O||Kl,N.errorHandler=a,s>=n||o.paused?l?(l.next=N,l=N):(i=N,l=N,o.saturated()):(s++,e.call(t,N.value,N.worked))}function S(x,O){var N=r.get();N.context=t,N.release=w,N.value=x,N.callback=O||Kl,N.errorHandler=a,s>=n||o.paused?i?(N.next=i,i=N):(i=N,l=N,o.saturated()):(s++,e.call(t,N.value,N.worked))}function w(x){x&&r.release(x);var O=i;O&&s<=n?o.paused?s--:(l===i&&(l=null),i=O.next,O.next=null,e.call(t,O.value,O.worked),l===null&&o.empty()):--s===0&&o.drain()}function E(){i=null,l=null,o.drain=Kl}function g(){i=null,l=null,o.drain(),o.drain=Kl}function v(x){a=x}}function Kl(){}function gte(){this.value=null,this.callback=Kl,this.next=null,this.release=Kl,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,r){var i=t.callback,l=t.errorHandler,s=t.value;t.value=null,t.callback=Kl,t.errorHandler&&l(n,s),i.call(t.context,n,r),t.release(t)}}function vte(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function r(c,f){e.call(this,c).then(function(m){f(null,m)},f)}var i=OA(t,r,n),l=i.push,s=i.unshift;return i.push=a,i.unshift=o,i.drained=u,i;function a(c){var f=new Promise(function(m,d){l(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(Kl),f}function o(c){var f=new Promise(function(m,d){s(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(Kl),f}function u(){if(i.idle())return new Promise(function(m){m()});var c=i.drain,f=new Promise(function(m){i.drain=function(){c(),m()}});return f}}Rd.exports=OA;Rd.exports.promise=vte});var Dd=k((BOe,NA)=>{"use strict";var{inherits:_te,format:kd}=require("util");function m3(t,e,n=Error){if(!t)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function r(i,l,s){if(!new.target)return new r(i,l,s);Error.captureStackTrace(this,r),this.code=t,this.message=e,this.name="AvvioError",i&&l&&s?this.message=kd(e,i,l,s):i&&l?this.message=kd(e,i,l):i?this.message=kd(e,i):this.message=e}return r.prototype[Symbol.toStringTag]="Error",r.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},_te(r,n),r}NA.exports={createError:m3,AVV_ERR_EXPOSE_ALREADY_DEFINED:m3("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:m3("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:m3("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:m3("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:m3("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:m3("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var RA=k((HOe,CA)=>{CA.exports=function t(e,n,r){n===void 0&&(n=""),r||(r={});var i=function(o){var u={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return r.unicode===!1?u[o]:o};typeof e=="string"&&(e={label:e});var l=e.nodes||[],s=(e.label||"").split(`
var Nte=Object.create;var q8=Object.defineProperty;var Cte=Object.getOwnPropertyDescriptor;var Rte=Object.getOwnPropertyNames;var Ite=Object.getPrototypeOf,kte=Object.prototype.hasOwnProperty;var k=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),PA=(t,e)=>{for(var n in e)q8(t,n,{get:e[n],enumerable:!0})},LA=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Rte(e))!kte.call(t,r)&&r!==n&&q8(t,r,{get:()=>e[r],enumerable:!(l=Cte(e,r))||l.enumerable});return t};var Ql=(t,e,n)=>(n=t!=null?Nte(Ite(t)):{},LA(e||!t||!t.__esModule?q8(n,"default",{value:t,enumerable:!0}):n,t)),Dte=t=>LA(q8({},"__esModule",{value:!0}),t);var jA=k((fNe,FA)=>{"use strict";function Pte(t){var e=new t,n=e;function l(){var i=e;return i.next?e=i.next:(e=new t,n=e),i.next=null,i}function r(i){n.next=i,n=i}return{get:l,release:r}}FA.exports=Pte});var jd=k((dNe,Fd)=>{"use strict";var Lte=jA();function UA(t,e,n){if(typeof t=="function"&&(n=e,e=t,t=null),!(n>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var l=Lte(Fte),r=null,i=null,s=0,a=null,u={push:_,drain:X3,saturated:X3,pause:c,paused:!1,get concurrency(){return n},set concurrency(x){if(!(x>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(n=x,!u.paused)for(;r&&s<n;)s++,w()},running:o,resume:d,idle:y,length:f,getQueue:m,unshift:S,empty:X3,kill:E,killAndDrain:g,error:v};return u;function o(){return s}function c(){u.paused=!0}function f(){for(var x=r,O=0;x;)x=x.next,O++;return O}function m(){for(var x=r,O=[];x;)O.push(x.value),x=x.next;return O}function d(){if(u.paused)for(u.paused=!1;r&&s<n;)s++,w()}function y(){return s===0&&u.length()===0}function _(x,O){var N=l.get();N.context=t,N.release=w,N.value=x,N.callback=O||X3,N.errorHandler=a,s>=n||u.paused?i?(i.next=N,i=N):(r=N,i=N,u.saturated()):(s++,e.call(t,N.value,N.worked))}function S(x,O){var N=l.get();N.context=t,N.release=w,N.value=x,N.callback=O||X3,N.errorHandler=a,s>=n||u.paused?r?(N.next=r,r=N):(r=N,i=N,u.saturated()):(s++,e.call(t,N.value,N.worked))}function w(x){x&&l.release(x);var O=r;O&&s<=n?u.paused?s--:(i===r&&(i=null),r=O.next,O.next=null,e.call(t,O.value,O.worked),i===null&&u.empty()):--s===0&&u.drain()}function E(){r=null,i=null,u.drain=X3}function g(){r=null,i=null,u.drain(),u.drain=X3}function v(x){a=x}}function X3(){}function Fte(){this.value=null,this.callback=X3,this.next=null,this.release=X3,this.context=null,this.errorHandler=null;var t=this;this.worked=function(n,l){var r=t.callback,i=t.errorHandler,s=t.value;t.value=null,t.callback=X3,t.errorHandler&&i(n,s),r.call(t.context,n,l),t.release(t)}}function jte(t,e,n){typeof t=="function"&&(n=e,e=t,t=null);function l(c,f){e.call(this,c).then(function(m){f(null,m)},f)}var r=UA(t,l,n),i=r.push,s=r.unshift;return r.push=a,r.unshift=u,r.drained=o,r;function a(c){var f=new Promise(function(m,d){i(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(X3),f}function u(c){var f=new Promise(function(m,d){s(c,function(y,_){if(y){d(y);return}m(_)})});return f.catch(X3),f}function o(){if(r.idle())return new Promise(function(m){m()});var c=r.drain,f=new Promise(function(m){r.drain=function(){c(),m()}});return f}}Fd.exports=UA;Fd.exports.promise=jte});var Md=k((hNe,MA)=>{"use strict";var{inherits:Ute,format:Ud}=require("util");function yu(t,e,n=Error){if(!t)throw new Error("Avvio error code must not be empty");if(!e)throw new Error("Avvio base error message must not be empty");function l(r,i,s){if(!new.target)return new l(r,i,s);Error.captureStackTrace(this,l),this.code=t,this.message=e,this.name="AvvioError",r&&i&&s?this.message=Ud(e,r,i,s):r&&i?this.message=Ud(e,r,i):r?this.message=Ud(e,r):this.message=e}return l.prototype[Symbol.toStringTag]="Error",l.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},Ute(l,n),l}MA.exports={createError:yu,AVV_ERR_EXPOSE_ALREADY_DEFINED:yu("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:yu("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:yu("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:yu("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:yu("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:yu("AVV_ERR_READY_TIMEOUT","Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise")}});var BA=k((mNe,$A)=>{$A.exports=function t(e,n,l){n===void 0&&(n=""),l||(l={});var r=function(u){var o={"\u2502":"|","\u2514":"`","\u251C":"+","\u2500":"-","\u252C":"-"};return l.unicode===!1?o[u]:u};typeof e=="string"&&(e={label:e});var i=e.nodes||[],s=(e.label||"").split(`
`),a=`
`+n+(l.length?i("\u2502"):" ")+" ";return n+s.join(a)+`
`+l.map(function(o,u){var c=u===l.length-1,f=o.nodes&&o.nodes.length,m=n+(c?" ":i("\u2502"))+" ";return n+i(c?"\u2514":"\u251C")+i("\u2500")+i(f?"\u252C":"\u2500")+" "+t(o,m,r).slice(n.length+2)}).join("")}});var FA=k((VOe,LA)=>{"use strict";var Ete=RA(),IA=Symbol("avvio.TimeTree.untrackNode"),Pd=Symbol("avvio.TimeTree.trackNode"),kA=Symbol("avvio.TimeTree.getParent"),DA=Symbol("avvio.TimeTree.getNode"),PA=Symbol("avvio.TimeTree.addNode"),Ld=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Pd](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[IA](e){this.tableId.delete(e.id);let n=this.tableLabel.get(e.label);if(n.id){this.tableLabel.delete(e.label);return}n.pop(),n.length===0&&this.tableLabel.delete(e.label)}[kA](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[DA](e){return this.tableId.get(e)}[PA](e,n,r){if(e===null)return this.root={id:"root",label:n,start:r,nodes:[]},this[Pd](this.root),this.root.id;let l=this[kA](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:r,label:n,nodes:[]};return l.nodes.push(a),this[Pd](a),s}start(e,n,r=Date.now()){return this[PA](e,n,r)}stop(e,n=Date.now()){let r=this[DA](e);r&&(r.stop=n,r.diff=r.stop-r.start||0,this[IA](r))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=r=>(r.label=`${r.label} ${r.diff} ms`,r.nodes.length>0&&(r.nodes=r.nodes.map(i=>e(i))),r),n=e(this.toJSON());return Ete(n)}};LA.exports=Ld});var UA=k((qOe,jA)=>{var Mu=1e3,$u=Mu*60,Bu=$u*60,y3=Bu*24,bte=y3*7,wte=y3*365.25;jA.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Ste(t);if(n==="number"&&isFinite(t))return e.long?xte(t):Tte(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Ste(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*wte;case"weeks":case"week":case"w":return n*bte;case"days":case"day":case"d":return n*y3;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Bu;case"minutes":case"minute":case"mins":case"min":case"m":return n*$u;case"seconds":case"second":case"secs":case"sec":case"s":return n*Mu;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Tte(t){var e=Math.abs(t);return e>=y3?Math.round(t/y3)+"d":e>=Bu?Math.round(t/Bu)+"h":e>=$u?Math.round(t/$u)+"m":e>=Mu?Math.round(t/Mu)+"s":t+"ms"}function xte(t){var e=Math.abs(t);return e>=y3?H6(t,e,y3,"day"):e>=Bu?H6(t,e,Bu,"hour"):e>=$u?H6(t,e,$u,"minute"):e>=Mu?H6(t,e,Mu,"second"):t+" ms"}function H6(t,e,n,r){var i=e>=n*1.5;return Math.round(t/n)+" "+r+(i?"s":"")}});var Fd=k((zOe,MA)=>{function Ate(t){n.debug=n,n.default=n,n.coerce=o,n.disable=l,n.enable=i,n.enabled=s,n.humanize=UA(),n.destroy=u,Object.keys(t).forEach(c=>{n[c]=t[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let f=0;for(let m=0;m<c.length;m++)f=(f<<5)-f+c.charCodeAt(m),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(c){let f,m=null,d,y;function _(...S){if(!_.enabled)return;let w=_,E=Number(new Date),g=E-(f||E);w.diff=g,w.prev=f,w.curr=E,f=E,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let v=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(O,N)=>{if(O==="%%")return"%";v++;let R=n.formatters[N];if(typeof R=="function"){let U=S[v];O=R.call(w,U),S.splice(v,1),v--}return O}),n.formatArgs.call(w,S),(w.log||n.log).apply(w,S)}return _.namespace=c,_.useColors=n.useColors(),_.color=n.selectColor(c),_.extend=r,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(d!==n.namespaces&&(d=n.namespaces,y=n.enabled(c)),y),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function r(c,f){let m=n(this.namespace+(typeof f>"u"?":":f)+c);return m.log=this.log,m}function i(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let f,m=(typeof c=="string"?c:"").split(/[\s,]+/),d=m.length;for(f=0;f<d;f++)m[f]&&(c=m[f].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function l(){let c=[...n.names.map(a),...n.skips.map(a).map(f=>"-"+f)].join(",");return n.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let f,m;for(f=0,m=n.skips.length;f<m;f++)if(n.skips[f].test(c))return!1;for(f=0,m=n.names.length;f<m;f++)if(n.names[f].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function o(c){return c instanceof Error?c.stack||c.message:c}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()), Line truncated
`+n+(i.length?r("\u2502"):" ")+" ";return n+s.join(a)+`
`+i.map(function(u,o){var c=o===i.length-1,f=u.nodes&&u.nodes.length,m=n+(c?" ":r("\u2502"))+" ";return n+r(c?"\u2514":"\u251C")+r("\u2500")+r(f?"\u252C":"\u2500")+" "+t(u,m,l).slice(n.length+2)}).join("")}});var JA=k((yNe,GA)=>{"use strict";var Mte=BA(),HA=Symbol("avvio.TimeTree.untrackNode"),$d=Symbol("avvio.TimeTree.trackNode"),VA=Symbol("avvio.TimeTree.getParent"),qA=Symbol("avvio.TimeTree.getNode"),zA=Symbol("avvio.TimeTree.addNode"),Bd=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[$d](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[HA](e){this.tableId.delete(e.id);let n=this.tableLabel.get(e.label);if(n.id){this.tableLabel.delete(e.label);return}n.pop(),n.length===0&&this.tableLabel.delete(e.label)}[VA](e){if(e===null)return this.root;let n=this.tableLabel.get(e);return n.id?n:n[n.length-1]}[qA](e){return this.tableId.get(e)}[zA](e,n,l){if(e===null)return this.root={id:"root",label:n,start:l,nodes:[]},this[$d](this.root),this.root.id;let i=this[VA](e),s=`${n}-${Math.random()}`,a={id:s,parent:e,start:l,label:n,nodes:[]};return i.nodes.push(a),this[$d](a),s}start(e,n,l=Date.now()){return this[zA](e,n,l)}stop(e,n=Date.now()){let l=this[qA](e);l&&(l.stop=n,l.diff=l.stop-l.start||0,this[HA](l))}toJSON(){return Object.assign({},this.root)}prittyPrint(){let e=l=>(l.label=`${l.label} ${l.diff} ms`,l.nodes.length>0&&(l.nodes=l.nodes.map(r=>e(r))),l),n=e(this.toJSON());return Mte(n)}};GA.exports=Bd});var XA=k((gNe,KA)=>{var Bo=1e3,Ho=Bo*60,Vo=Ho*60,gu=Vo*24,$te=gu*7,Bte=gu*365.25;KA.exports=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0)return Hte(t);if(n==="number"&&isFinite(t))return e.long?qte(t):Vte(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Hte(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),l=(e[2]||"ms").toLowerCase();switch(l){case"years":case"year":case"yrs":case"yr":case"y":return n*Bte;case"weeks":case"week":case"w":return n*$te;case"days":case"day":case"d":return n*gu;case"hours":case"hour":case"hrs":case"hr":case"h":return n*Vo;case"minutes":case"minute":case"mins":case"min":case"m":return n*Ho;case"seconds":case"second":case"secs":case"sec":case"s":return n*Bo;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Vte(t){var e=Math.abs(t);return e>=gu?Math.round(t/gu)+"d":e>=Vo?Math.round(t/Vo)+"h":e>=Ho?Math.round(t/Ho)+"m":e>=Bo?Math.round(t/Bo)+"s":t+"ms"}function qte(t){var e=Math.abs(t);return e>=gu?z8(t,e,gu,"day"):e>=Vo?z8(t,e,Vo,"hour"):e>=Ho?z8(t,e,Ho,"minute"):e>=Bo?z8(t,e,Bo,"second"):t+" ms"}function z8(t,e,n,l){var r=e>=n*1.5;return Math.round(t/n)+" "+l+(r?"s":"")}});var Hd=k((vNe,WA)=>{function zte(t){n.debug=n,n.default=n,n.coerce=u,n.disable=i,n.enable=r,n.enabled=s,n.humanize=XA(),n.destroy=o,Object.keys(t).forEach(c=>{n[c]=t[c]}),n.names=[],n.skips=[],n.formatters={};function e(c){let f=0;for(let m=0;m<c.length;m++)f=(f<<5)-f+c.charCodeAt(m),f|=0;return n.colors[Math.abs(f)%n.colors.length]}n.selectColor=e;function n(c){let f,m=null,d,y;function _(...S){if(!_.enabled)return;let w=_,E=Number(new Date),g=E-(f||E);w.diff=g,w.prev=f,w.curr=E,f=E,S[0]=n.coerce(S[0]),typeof S[0]!="string"&&S.unshift("%O");let v=0;S[0]=S[0].replace(/%([a-zA-Z%])/g,(O,N)=>{if(O==="%%")return"%";v++;let R=n.formatters[N];if(typeof R=="function"){let U=S[v];O=R.call(w,U),S.splice(v,1),v--}return O}),n.formatArgs.call(w,S),(w.log||n.log).apply(w,S)}return _.namespace=c,_.useColors=n.useColors(),_.color=n.selectColor(c),_.extend=l,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(d!==n.namespaces&&(d=n.namespaces,y=n.enabled(c)),y),set:S=>{m=S}}),typeof n.init=="function"&&n.init(_),_}function l(c,f){let m=n(this.namespace+(typeof f>"u"?":":f)+c);return m.log=this.log,m}function r(c){n.save(c),n.namespaces=c,n.names=[],n.skips=[];let f,m=(typeof c=="string"?c:"").split(/[\s,]+/),d=m.length;for(f=0;f<d;f++)m[f]&&(c=m[f].replace(/\*/g,".*?"),c[0]==="-"?n.skips.push(new RegExp("^"+c.slice(1)+"$")):n.names.push(new RegExp("^"+c+"$")))}function i(){let c=[...n.names.map(a),...n.skips.map(a).map(f=>"-"+f)].join(",");return n.enable(""),c}function s(c){if(c[c.length-1]==="*")return!0;let f,m;for(f=0,m=n.skips.length;f<m;f++)if(n.skips[f].test(c))return!1;for(f=0,m=n.names.length;f<m;f++)if(n.names[f].test(c))return!0;return!1}function a(c){return c.toString().substring(2,c.toString().length-2).replace(/\.\*\?$/,"*")}function u(c){return c instanceof Error?c.stack||c.message:c}function o(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()), Line truncated
`).join(`
`+l),t.push(i+"m+"+z6.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Mte()+e+" "+t[0]}function Mte(){return Ti.inspectOpts.hideDate?"":new Date().toISOString()+" "}function $te(...t){return process.stderr.write(q6.format(...t)+`
`)}function Bte(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Hte(){return process.env.DEBUG}function Vte(t){t.inspectOpts={};let e=Object.keys(Ti.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=Ti.inspectOpts[e[n]]}z6.exports=Fd()(Ti);var{formatters:zA}=z6.exports;zA.o=function(t){return this.inspectOpts.colors=this.useColors,q6.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};zA.O=function(t){return this.inspectOpts.colors=this.useColors,q6.inspect(t,this.inspectOpts)}});var G6=k((KOe,Ud)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Ud.exports=$A():Ud.exports=GA()});var JA=k((XOe,Bd)=>{"use strict";var qte=Id(),zte=require("events").EventEmitter,Gte=require("util").inherits,pi=G6()("avvio"),{AVV_ERR_READY_TIMEOUT:Jte}=Dd(),Md=Symbol.for("plugin-meta");function Kte(t,e){return t[Md]&&t[Md].name?t[Md].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:t.name?t.name:t.toString().split(`
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function Xte(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function Vu(t,e,n,r,i){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=i===void 0?t._timeout:i,this.name=Kte(e,n),this.isAfter=r,this.q=qte(t,Wte,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}Gte(Vu,zte);Vu.prototype.exec=function(t,e){let n=this.func,r=!1,i=this.name;if(this.parent._error&&!this.isAfter){pi("skipping loading of plugin as parent errored and it is not an after",i),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(o){return pi("override errored",i),e(o)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,pi("exec",i);let l,s=o=>{if(r){pi("loading complete",i);return}this._error=o,pi(o?"exec errored":"exec completed",i),r=!0,l&&clearTimeout(l),e(o)};this.timeout>0&&(pi("setting up timeout",i,this.timeout),l=setTimeout(function(){pi("timed out",i),l=null;let o=new Jte(i);o.fn=n,s(o)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,s);a&&typeof a.then=="function"&&(pi("exec: resolving promise",i),a.then(()=>process.nextTick(s),o=>process.nextTick(s,o)))};Vu.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,r)=>{this._error=n,this.q.pause(),n?(pi("rejecting promise",this.name,n),this._promise.reject(n)):(pi("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(r,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=Xte(),e=this._promise.promise,this.server?t():this.on("start",t)),e};Vu.prototype.enqueue=function(t,e){pi("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};Vu.prototype.finish=function(t,e){pi("finish",this.name,t);let n=()=>{this.loaded||(pi("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(t))};if(t){this._promise&&(this._promise.reject(t),this._promise=null),n();return}let r=()=>{if(pi("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let i=()=>{pi("wrap"),queueMicrotask(r)};this._promise.resolve(),this._promise.promise.then(i,i),this._promise=null}else n();else pi("delayed",this.name),this.q.drain=()=>{pi("drain",this.name),this.q.drain=Yte,queueMicrotask(r)}};queueMicrotask(r),this.q.resume()};function Wte(t,e){let n=this;process.nextTick($d.bind(n),t,e)}function $d(t,e){if(typeof t.func.then=="function"){t.func.then(r=>{typeof r.default=="function"&&(r=r.default),t.func=r,$d.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,r=>{t.finish(r,i=>{this._current.shift(),e(i)})})}function Yte(){}Bd.exports=Vu;Bd.exports.loadPlugin=$d});var QA=k((WOe,Gd)=>{"use strict";var KA=Id(),Qte=require("events").EventEmitter,Zte=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Hd,AVV_ERR_CALLBACK_NOT_FN:r4,AVV_ERR_PLUGIN_NOT_VALID:ene,AVV_ERR_ROOT_PLG_BOOTED:tne,AVV_ERR_READY_TIMEOUT:nne}=Dd(),rne=FA(),zd=JA(),qu=G6()("avvio"),J6=Symbol("kAvvio"),Vd=Symbol("kThenifyDoNotWrap");function ine(t,e,n){let r=e.expose||{},i=r.use||"use",l=r.after||"after",s=r.ready||"ready",a=r.onClose||"onClose",o=r.close||"close";if(t[i])throw new Hd(i);if(t[l])throw new Hd(l);if(t[s])throw new Hd(s);t[i]=function(u,c){return n.use(u,c),this},Object.defineProperty(t,"then",{get:WA.bind(n)}),t[J6]=!0,t[l]=function(u){return typeof u!="function"?n._loadRegistered():(n.after(qd(u,this)),this)},t[s]=function(u){if(u&&typeof u!="function")throw new r4(s,typeof u);return n.ready(u?qd(u,this):void 0)},t[a]=function(u){if(typeof u!="function")throw new r4(a,typeof u);return n.onClose(une(u,this)),this},t[o]=function(u){if(u&&typeof u!="function")throw new r4(o,typeof u);return u?(n.close(qd(u,this)),this):n.close()}}function fi(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof fi)){let r=new fi(t,e,n);return t&&ine(t,e,r),r}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new rne,this._readyQ=KA(this,YA,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=XA},this._closeQ=KA(this,one,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=XA},this._doStart=null,this._root=new zd(this,lne.bind(this),e,!1,0),this._root.once("start",(r,i,l)=>{let s=this.pluginTree.start(null,i,l);this._root.onc Line truncated
causes have become circular...`;let r=ah(t);return r?(e.add(t),n+`
caused by: `+IO(r,e)):n},Tre=t=>IO(t,new Set),kO=(t,e,n)=>{if(!a4(t))return"";let r=n?"":t.message||"";if(e.has(t))return r+": ...";let i=ah(t);if(i){e.add(t);let l=typeof t.cause=="function";return r+(l?"":": ")+kO(i,e,l)}else return r},xre=t=>kO(t,new Set);DO.exports={isErrorLike:a4,getErrorCause:ah,stackWithCauses:Tre,messageWithCauses:xre}});var uh=k((uNe,LO)=>{"use strict";var Are=Symbol("circular-ref-tag"),i8=Symbol("pino-raw-err-ref"),PO=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[i8]},set:function(t){this[i8]=t}}});Object.defineProperty(PO,i8,{writable:!0,value:{}});LO.exports={pinoErrProto:PO,pinoErrorSymbols:{seen:Are,rawSymbol:i8}}});var UO=k((cNe,jO)=>{"use strict";jO.exports=ph;var{messageWithCauses:Ore,stackWithCauses:Nre,isErrorLike:FO}=oh(),{pinoErrProto:Cre,pinoErrorSymbols:Rre}=uh(),{seen:ch}=Rre,{toString:Ire}=Object.prototype;function ph(t){if(!FO(t))return t;t[ch]=void 0;let e=Object.create(Cre);e.type=Ire.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=Ore(t),e.stack=Nre(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>ph(n)));for(let n in t)if(e[n]===void 0){let r=t[n];FO(r)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(r,ch)&&(e[n]=ph(r)):e[n]=r}return delete t[ch],e.raw=t,e}});var $O=k((pNe,MO)=>{"use strict";MO.exports=s8;var{isErrorLike:fh}=oh(),{pinoErrProto:kre,pinoErrorSymbols:Dre}=uh(),{seen:l8}=Dre,{toString:Pre}=Object.prototype;function s8(t){if(!fh(t))return t;t[l8]=void 0;let e=Object.create(kre);e.type=Pre.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>s8(n))),fh(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,l8)&&(e.cause=s8(t.cause));for(let n in t)if(e[n]===void 0){let r=t[n];fh(r)?Object.prototype.hasOwnProperty.call(r,l8)||(e[n]=s8(r)):e[n]=r}return delete t[l8],e.raw=t,e}});var qO=k((fNe,VO)=>{"use strict";VO.exports={mapHttpRequest:Lre,reqSerializer:HO};var dh=Symbol("pino-raw-req-ref"),BO=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[dh]},set:function(t){this[dh]=t}}});Object.defineProperty(BO,dh,{writable:!0,value:{}});function HO(t){let e=t.info||t.socket,n=Object.create(BO);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let r=t.path;n.url=typeof r=="string"?r:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function Lre(t){return{req:HO(t)}}});var KO=k((dNe,JO)=>{"use strict";JO.exports={mapHttpResponse:Fre,resSerializer:GO};var hh=Symbol("pino-raw-res-ref"),zO=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[hh]},set:function(t){this[hh]=t}}});Object.defineProperty(zO,hh,{writable:!0,value:{}});function GO(t){let e=Object.create(zO);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function Fre(t){return{res:GO(t)}}});var yh=k((hNe,XO)=>{"use strict";var mh=UO(),jre=$O(),a8=qO(),o8=KO();XO.exports={err:mh,errWithCause:jre,mapHttpRequest:a8.mapHttpRequest,mapHttpResponse:o8.mapHttpResponse,req:a8.reqSerializer,res:o8.resSerializer,wrapErrorSerializer:function(e){return e===mh?e:function(r){return e(mh(r))}},wrapRequestSerializer:function(e){return e===a8.reqSerializer?e:function(r){return e(a8.reqSerializer(r))}},wrapResponseSerializer:function(e){return e===o8.resSerializer?e:function(r){return e(o8.resSerializer(r))}}}});var gh=k((mNe,WO)=>{"use strict";function Ure(t,e){return e}WO.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=Ure;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let r=n.slice(2),i=[];for(let l of r)l&&i.push(l.getFileName());return i}});var QO=k((yNe,YO)=>{"use strict";YO.exports=Mre;function Mre(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=r=>`fast-redact \u2013 Invalid path (${r})`}=t;return function({paths:i}){i.forEach(l=>{if(typeof l!="string")throw Error(e());try{if(/〇/.test(l))throw Error();let s=(l[0]==="["?"":".")+l.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").r Line truncated
`+i),t.push(r+"m+"+K8.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=rne()+e+" "+t[0]}function rne(){return x2.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ine(...t){return process.stderr.write(J8.format(...t)+`
`)}function sne(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function ane(){return process.env.DEBUG}function une(t){t.inspectOpts={};let e=Object.keys(x2.inspectOpts);for(let n=0;n<e.length;n++)t.inspectOpts[e[n]]=x2.inspectOpts[e[n]]}K8.exports=Hd()(x2);var{formatters:nO}=K8.exports;nO.o=function(t){return this.inspectOpts.colors=this.useColors,J8.inspect(t,this.inspectOpts).split(`
`).map(e=>e.trim()).join(" ")};nO.O=function(t){return this.inspectOpts.colors=this.useColors,J8.inspect(t,this.inspectOpts)}});var X8=k((bNe,qd)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?qd.exports=YA():qd.exports=lO()});var rO=k((wNe,Jd)=>{"use strict";var one=jd(),cne=require("events").EventEmitter,pne=require("util").inherits,f2=X8()("avvio"),{AVV_ERR_READY_TIMEOUT:fne}=Md(),zd=Symbol.for("plugin-meta");function dne(t,e){return t[zd]&&t[zd].name?t[zd].name:typeof e<"u"&&typeof e!="function"&&e.name?e.name:t.name?t.name:t.toString().split(`
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function hne(){let t={};return t.promise=new Promise((e,n)=>{t.resolve=e,t.reject=n}),t}function zo(t,e,n,l,r){this.started=!1,this.func=e,this.opts=n,this.onFinish=null,this.parent=t,this.timeout=r===void 0?t._timeout:r,this.name=dne(e,n),this.isAfter=l,this.q=one(t,mne,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}pne(zo,cne);zo.prototype.exec=function(t,e){let n=this.func,l=!1,r=this.name;if(this.parent._error&&!this.isAfter){f2("skipping loading of plugin as parent errored and it is not an after",r),process.nextTick(e);return}if(this.isAfter)this.server=t;else try{this.server=this.parent.override(t,n,this.opts)}catch(u){return f2("override errored",r),e(u)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,f2("exec",r);let i,s=u=>{if(l){f2("loading complete",r);return}this._error=u,f2(u?"exec errored":"exec completed",r),l=!0,i&&clearTimeout(i),e(u)};this.timeout>0&&(f2("setting up timeout",r,this.timeout),i=setTimeout(function(){f2("timed out",r),i=null;let u=new fne(r);u.fn=n,s(u)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());let a=n(this.server,this.opts,s);a&&typeof a.then=="function"&&(f2("exec: resolving promise",r),a.then(()=>process.nextTick(s),u=>process.nextTick(s,u)))};zo.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let t=()=>{this.server.after((n,l)=>{this._error=n,this.q.pause(),n?(f2("rejecting promise",this.name,n),this._promise.reject(n)):(f2("resolving promise",this.name),this._promise.resolve()),this._promise=null,process.nextTick(l,n)}),this.q.resume()},e;return this._promise?e=Promise.resolve():(this._promise=hne(),e=this._promise.promise,this.server?t():this.on("start",t)),e};zo.prototype.enqueue=function(t,e){f2("enqueue",this.name,t.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(t,e)};zo.prototype.finish=function(t,e){f2("finish",this.name,t);let n=()=>{this.loaded||(f2("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,e(t))};if(t){this._promise&&(this._promise.reject(t),this._promise=null),n();return}let l=()=>{if(f2("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let r=()=>{f2("wrap"),queueMicrotask(l)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else n();else f2("delayed",this.name),this.q.drain=()=>{f2("drain",this.name),this.q.drain=yne,queueMicrotask(l)}};queueMicrotask(l),this.q.resume()};function mne(t,e){let n=this;process.nextTick(Gd.bind(n),t,e)}function Gd(t,e){if(typeof t.func.then=="function"){t.func.then(l=>{typeof l.default=="function"&&(l=l.default),t.func=l,Gd.call(this,t,e)},e);return}let n=this._current[0];this._current.unshift(t),t.exec(n&&n.server||this._server,l=>{t.finish(l,r=>{this._current.shift(),e(r)})})}function yne(){}Jd.exports=zo;Jd.exports.loadPlugin=Gd});var oO=k((SNe,Qd)=>{"use strict";var iO=jd(),gne=require("events").EventEmitter,vne=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Kd,AVV_ERR_CALLBACK_NOT_FN:s1,AVV_ERR_PLUGIN_NOT_VALID:_ne,AVV_ERR_ROOT_PLG_BOOTED:Ene,AVV_ERR_READY_TIMEOUT:bne}=Md(),wne=JA(),Yd=rO(),Go=X8()("avvio"),W8=Symbol("kAvvio"),Xd=Symbol("kThenifyDoNotWrap");function Sne(t,e,n){let l=e.expose||{},r=l.use||"use",i=l.after||"after",s=l.ready||"ready",a=l.onClose||"onClose",u=l.close||"close";if(t[r])throw new Kd(r);if(t[i])throw new Kd(i);if(t[s])throw new Kd(s);t[r]=function(o,c){return n.use(o,c),this},Object.defineProperty(t,"then",{get:aO.bind(n)}),t[W8]=!0,t[i]=function(o){return typeof o!="function"?n._loadRegistered():(n.after(Wd(o,this)),this)},t[s]=function(o){if(o&&typeof o!="function")throw new s1(s,typeof o);return n.ready(o?Wd(o,this):void 0)},t[a]=function(o){if(typeof o!="function")throw new s1(a,typeof o);return n.onClose(Nne(o,this)),this},t[u]=function(o){if(o&&typeof o!="function")throw new s1(u,typeof o);return o?(n.close(Wd(o,this)),this):n.close()}}function d2(t,e,n){if(typeof t=="function"&&arguments.length===1&&(n=t,e={},t=null),typeof e=="function"&&(n=e,e={}),e=e||{},!(this instanceof d2)){let l=new d2(t,e,n);return t&&Sne(t,e,l),l}e.autostart!==!1&&(e.autostart=!0),t=t||this,this._timeout=Number(e.timeout)||0,this._server=t,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new wne,this._readyQ=iO(this,uO,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=sO},this._closeQ=iO(this,One,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=sO},this._doStart=null,this._root=new Yd(this,Tne.bind(this),e,!1,0),this._root.once("start",(l,r,i)=>{let s=this.pluginTree.start(null,r,i);this._root.onc Line truncated
causes have become circular...`;let l=dh(t);return l?(e.add(t),n+`
caused by: `+HO(l,e)):n},Vle=t=>HO(t,new Set),VO=(t,e,n)=>{if(!c1(t))return"";let l=n?"":t.message||"";if(e.has(t))return l+": ...";let r=dh(t);if(r){e.add(t);let i=typeof t.cause=="function";return l+(i?"":": ")+VO(r,e,i)}else return l},qle=t=>VO(t,new Set);qO.exports={isErrorLike:c1,getErrorCause:dh,stackWithCauses:Vle,messageWithCauses:qle}});var mh=k((FNe,GO)=>{"use strict";var zle=Symbol("circular-ref-tag"),ac=Symbol("pino-raw-err-ref"),zO=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[ac]},set:function(t){this[ac]=t}}});Object.defineProperty(zO,ac,{writable:!0,value:{}});GO.exports={pinoErrProto:zO,pinoErrorSymbols:{seen:zle,rawSymbol:ac}}});var XO=k((jNe,KO)=>{"use strict";KO.exports=gh;var{messageWithCauses:Gle,stackWithCauses:Jle,isErrorLike:JO}=hh(),{pinoErrProto:Kle,pinoErrorSymbols:Xle}=mh(),{seen:yh}=Xle,{toString:Wle}=Object.prototype;function gh(t){if(!JO(t))return t;t[yh]=void 0;let e=Object.create(Kle);e.type=Wle.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=Gle(t),e.stack=Jle(t),Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>gh(n)));for(let n in t)if(e[n]===void 0){let l=t[n];JO(l)?n!=="cause"&&!Object.prototype.hasOwnProperty.call(l,yh)&&(e[n]=gh(l)):e[n]=l}return delete t[yh],e.raw=t,e}});var YO=k((UNe,WO)=>{"use strict";WO.exports=oc;var{isErrorLike:vh}=hh(),{pinoErrProto:Yle,pinoErrorSymbols:Qle}=mh(),{seen:uc}=Qle,{toString:Zle}=Object.prototype;function oc(t){if(!vh(t))return t;t[uc]=void 0;let e=Object.create(Yle);e.type=Zle.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=t.message,e.stack=t.stack,Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(n=>oc(n))),vh(t.cause)&&!Object.prototype.hasOwnProperty.call(t.cause,uc)&&(e.cause=oc(t.cause));for(let n in t)if(e[n]===void 0){let l=t[n];vh(l)?Object.prototype.hasOwnProperty.call(l,uc)||(e[n]=oc(l)):e[n]=l}return delete t[uc],e.raw=t,e}});var tN=k((MNe,eN)=>{"use strict";eN.exports={mapHttpRequest:e2e,reqSerializer:ZO};var _h=Symbol("pino-raw-req-ref"),QO=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[_h]},set:function(t){this[_h]=t}}});Object.defineProperty(QO,_h,{writable:!0,value:{}});function ZO(t){let e=t.info||t.socket,n=Object.create(QO);if(n.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),n.method=t.method,t.originalUrl)n.url=t.originalUrl;else{let l=t.path;n.url=typeof l=="string"?l:t.url?t.url.path||t.url:void 0}return t.query&&(n.query=t.query),t.params&&(n.params=t.params),n.headers=t.headers,n.remoteAddress=e&&e.remoteAddress,n.remotePort=e&&e.remotePort,n.raw=t.raw||t,n}function e2e(t){return{req:ZO(t)}}});var iN=k(($Ne,rN)=>{"use strict";rN.exports={mapHttpResponse:t2e,resSerializer:lN};var Eh=Symbol("pino-raw-res-ref"),nN=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Eh]},set:function(t){this[Eh]=t}}});Object.defineProperty(nN,Eh,{writable:!0,value:{}});function lN(t){let e=Object.create(nN);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function t2e(t){return{res:lN(t)}}});var wh=k((BNe,sN)=>{"use strict";var bh=XO(),n2e=YO(),cc=tN(),pc=iN();sN.exports={err:bh,errWithCause:n2e,mapHttpRequest:cc.mapHttpRequest,mapHttpResponse:pc.mapHttpResponse,req:cc.reqSerializer,res:pc.resSerializer,wrapErrorSerializer:function(e){return e===bh?e:function(l){return e(bh(l))}},wrapRequestSerializer:function(e){return e===cc.reqSerializer?e:function(l){return e(cc.reqSerializer(l))}},wrapResponseSerializer:function(e){return e===pc.resSerializer?e:function(l){return e(pc.resSerializer(l))}}}});var Sh=k((HNe,aN)=>{"use strict";function l2e(t,e){return e}aN.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=l2e;let n=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(n))return;let l=n.slice(2),r=[];for(let i of l)i&&r.push(i.getFileName());return r}});var oN=k((VNe,uN)=>{"use strict";uN.exports=r2e;function r2e(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:n=l=>`fast-redact \u2013 Invalid path (${l})`}=t;return function({paths:r}){r.forEach(i=>{if(typeof i!="string")throw Error(e());try{if(/〇/.test(i))throw Error();let s=(i[0]==="["?"":".")+i.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").r Line truncated
'use strict'
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
const \u3007 = null;
o${s}
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(l))}})}}});var u8=k((gNe,ZO)=>{"use strict";ZO.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var tN=k((vNe,eN)=>{"use strict";var $re=u8();eN.exports=Bre;function Bre({paths:t}){let e=[];var n=0;let r=t.reduce(function(i,l,s){var a=l.match($re).map(c=>c.replace(/'|"|`/g,""));let o=l[0]==="[";a=a.map(c=>c[0]==="["?c.substr(1,c.length-2):c);let u=a.indexOf("*");if(u>-1){let c=a.slice(0,u),f=c.join("."),m=a.slice(u+1,a.length),d=m.length>0;n++,e.push({before:c,beforeStr:f,after:m,nested:d})}else i[l]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(l),leadingBracket:o};return i},{});return{wildcards:e,wcLen:n,secret:r}}});var rN=k((_Ne,nN)=>{"use strict";var Hre=u8();nN.exports=Vre;function Vre({secret:t,serialize:e,wcLen:n,strict:r,isCensorFct:i,censorFctTakesPath:l},s){let a=Function("o",`
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(n(i))}})}}});var fc=k((qNe,cN)=>{"use strict";cN.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var fN=k((zNe,pN)=>{"use strict";var i2e=fc();pN.exports=s2e;function s2e({paths:t}){let e=[];var n=0;let l=t.reduce(function(r,i,s){var a=i.match(i2e).map(c=>c.replace(/'|"|`/g,""));let u=i[0]==="[";a=a.map(c=>c[0]==="["?c.substr(1,c.length-2):c);let o=a.indexOf("*");if(o>-1){let c=a.slice(0,o),f=c.join("."),m=a.slice(o+1,a.length),d=m.length>0;n++,e.push({before:c,beforeStr:f,after:m,nested:d})}else r[i]={path:a,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(i),leadingBracket:u};return r},{});return{wildcards:e,wcLen:n,secret:l}}});var hN=k((GNe,dN)=>{"use strict";var a2e=fc();dN.exports=u2e;function u2e({secret:t,serialize:e,wcLen:n,strict:l,isCensorFct:r,censorFctTakesPath:i},s){let a=Function("o",`
if (typeof o !== 'object' || o == null) {
${Jre(r,e)}
${f2e(l,e)}
}
const { censor, secret } = this
${qre(t,i,l)}
${o2e(t,r,i)}
this.compileRestore()
${zre(n>0,i,l)}
${Gre(e)}
`).bind(s);return e===!1&&(a.restore=o=>s.restore(o)),a}function qre(t,e,n){return Object.keys(t).map(r=>{let{escPath:i,leadingBracket:l,path:s}=t[r],a=l?1:0,o=l?"":".",u=[];for(var c;(c=Hre.exec(r))!==null;){let[,y]=c,{index:_,input:S}=c;_>a&&u.push(S.substring(0,_-(y?0:1)))}var f=u.map(y=>`o${o}${y}`).join(" && ");f.length===0?f+=`o${o}${r} != null`:f+=` && o${o}${r} != null`;let m=`
${c2e(n>0,r,i)}
${p2e(e)}
`).bind(s);return e===!1&&(a.restore=u=>s.restore(u)),a}function o2e(t,e,n){return Object.keys(t).map(l=>{let{escPath:r,leadingBracket:i,path:s}=t[l],a=i?1:0,u=i?"":".",o=[];for(var c;(c=a2e.exec(l))!==null;){let[,y]=c,{index:_,input:S}=c;_>a&&o.push(S.substring(0,_-(y?0:1)))}var f=o.map(y=>`o${u}${y}`).join(" && ");f.length===0?f+=`o${u}${l} != null`:f+=` && o${u}${l} != null`;let m=`
switch (true) {
${u.reverse().map(y=>`
case o${o}${y} === censor:
secret[${i}].circle = ${JSON.stringify(y)}
${o.reverse().map(y=>`
case o${u}${y} === censor:
secret[${r}].circle = ${JSON.stringify(y)}
break
`).join(`
`)}
}
`,d=n?`val, ${JSON.stringify(s)}`:"val";return`
if (${f}) {
const val = o${o}${r}
const val = o${u}${l}
if (val === censor) {
secret[${i}].precensored = true
secret[${r}].precensored = true
} else {
secret[${i}].val = val
o${o}${r} = ${e?`censor(${d})`:"censor"}
secret[${r}].val = val
o${u}${l} = ${e?`censor(${d})`:"censor"}
${m}
}
}
`}).join(`
`)}function zre(t,e,n){return t===!0?`
`)}function c2e(t,e,n){return t===!0?`
{
const { wildcards, wcLen, groupRedact, nestedRedact } = this
for (var i = 0; i < wcLen; i++) {
@@ -54,16 +54,16 @@ caused by: `+IO(r,e)):n},Tre=t=>IO(t,new Set),kO=(t,e,n)=>{if(!a4(t))return"";le
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${n})
}
}
`:""}function Gre(t){return t===!1?"return o":`
`:""}function p2e(t){return t===!1?"return o":`
var s = this.serialize(o)
this.restore(o)
return s
`}function Jre(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var _h=k((ENe,sN)=>{"use strict";sN.exports={groupRedact:Xre,groupRestore:Kre,nestedRedact:Yre,nestedRestore:Wre};function Kre({keys:t,values:e,target:n}){if(n==null)return;let r=t.length;for(var i=0;i<r;i++){let l=t[i];n[l]=e[i]}}function Xre(t,e,n,r,i){let l=iN(t,e);if(l==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(l),a=s.length,o=e.length,u=i?[...e]:void 0,c=new Array(a);for(var f=0;f<a;f++){let m=s[f];c[f]=l[m],i?(u[o]=m,l[m]=n(l[m],u)):r?l[m]=n(l[m]):l[m]=n}return{keys:s,values:c,target:l,flat:!0}}function Wre(t){for(let e=0;e<t.length;e++){let{target:n,path:r,value:i}=t[e],l=n;for(let s=r.length-1;s>0;s--)l=l[r[s]];l[r[0]]=i}}function Yre(t,e,n,r,i,l,s){let a=iN(e,n);if(a==null)return;let o=Object.keys(a),u=o.length;for(var c=0;c<u;c++){let f=o[c];Qre(t,a,f,n,r,i,l,s)}return t}function vh(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function Qre(t,e,n,r,i,l,s,a){let o=i.length,u=o-1,c=n;var f=-1,m,d,y,_=null,S=null,w,E,g=!1,v=0,x=0,O=Zre();if(y=m=e[n],typeof m=="object"){for(;m!=null&&++f<o&&(x+=1,n=i[f],_=y,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(g=!0),S=n,f!==u))){if(S){let R=Object.keys(m);for(var N=0;N<R.length;N++){let U=R[N];if(E=m[U],w=n==="*",g)O=ja(O,U,x),v=f,y=lN(E,v-1,n,r,i,l,s,a,c,m,d,y,w,U,f,u,O,t,e[c],x+1);else if(w||typeof E=="object"&&E!==null&&n in E){if(w?y=E:y=E[n],d=f!==u?y:s?a?l(y,[...r,c,...i]):l(y):l,w){let F=o4(ja(O,U,x),y,e[c]);t.push(F),m[U]=d}else if(E[n]!==d)if(d===void 0&&l!==void 0||vh(E,n)&&d===y)O=ja(O,U,x);else{O=ja(O,U,x);let F=o4(ja(O,n,x+1),y,e[c]);t.push(F),E[n]=d}}}S=null}else{if(y=m[n],O=ja(O,n,x),d=f!==u?y:s?a?l(y,[...r,c,...i]):l(y):l,!(vh(m,n)&&d===y||d===void 0&&l!==void 0)){let R=o4(O,y,e[c]);t.push(R),m[n]=d}m=m[n]}if(typeof m!="object")break}}}function iN(t,e){for(var n=-1,r=e.length,i=t;i!=null&&++n<r;)i=i[e[n]];return i}function lN(t,e,n,r,i,l,s,a,o,u,c,f,m,d,y,_,S,w,E,g){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?f=t:f=t[n],c=y!==_?f:s?a?l(f,[...r,o,...i]):l(f):l,m){let v=o4(S,f,E);w.push(v),u[d]=c}else if(t[n]!==c){if(!(c===void 0&&l!==void 0||vh(t,n)&&c===f)){let v=o4(ja(S,n,g+1),f,E);w.push(v),t[n]=c}}}for(let v in t)typeof t[v]=="object"&&(S=ja(S,v,g),lN(t[v],e-1,n,r,i,l,s,a,o,u,c,f,m,d,y,_,S,w,E,g+1))}function Zre(){return{parent:null,key:null,children:[],depth:0}}function ja(t,e,n){if(t.depth===n)return ja(t.parent,e,n);var r={parent:t,key:e,depth:n,children:[]};return t.children.push(r),r}function o4(t,e,n){let r=t,i=[];do i.push(r.key),r=r.parent;while(r.parent!=null);return{path:i,value:e,target:n}}});var oN=k((bNe,aN)=>{"use strict";var{groupRestore:eie,nestedRestore:tie}=_h();aN.exports=nie;function nie({secret:t,wcLen:e}){return function(){if(this.restore)return;let r=Object.keys(t),i=rie(t,r),l=e>0,s=l?{secret:t,groupRestore:eie,nestedRestore:tie}:{secret:t};this.restore=Function("o",iie(i,r,l)).bind(s)}}function rie(t,e){return e.map(n=>{let{circle:r,escPath:i,leadingBracket:l}=t[n],a=r?`o.${r} = secret[${i}].val`:`o${l?"":"."}${n} = secret[${i}].val`,o=`secret[${i}].val = undefined`;return`
if (secret[${i}].val !== undefined) {
`}function f2e(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var xh=k((JNe,gN)=>{"use strict";gN.exports={groupRedact:h2e,groupRestore:d2e,nestedRedact:y2e,nestedRestore:m2e};function d2e({keys:t,values:e,target:n}){if(n==null)return;let l=t.length;for(var r=0;r<l;r++){let i=t[r];n[i]=e[r]}}function h2e(t,e,n,l,r){let i=mN(t,e);if(i==null)return{keys:null,values:null,target:null,flat:!0};let s=Object.keys(i),a=s.length,u=e.length,o=r?[...e]:void 0,c=new Array(a);for(var f=0;f<a;f++){let m=s[f];c[f]=i[m],r?(o[u]=m,i[m]=n(i[m],o)):l?i[m]=n(i[m]):i[m]=n}return{keys:s,values:c,target:i,flat:!0}}function m2e(t){for(let e=0;e<t.length;e++){let{target:n,path:l,value:r}=t[e],i=n;for(let s=l.length-1;s>0;s--)i=i[l[s]];i[l[0]]=r}}function y2e(t,e,n,l,r,i,s){let a=mN(e,n);if(a==null)return;let u=Object.keys(a),o=u.length;for(var c=0;c<o;c++){let f=u[c];g2e(t,a,f,n,l,r,i,s)}return t}function Th(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function g2e(t,e,n,l,r,i,s,a){let u=r.length,o=u-1,c=n;var f=-1,m,d,y,_=null,S=null,w,E,g=!1,v=0,x=0,O=v2e();if(y=m=e[n],typeof m=="object"){for(;m!=null&&++f<u&&(x+=1,n=r[f],_=y,!(n!=="*"&&!S&&!(typeof m=="object"&&n in m)));)if(!(n==="*"&&(S==="*"&&(g=!0),S=n,f!==o))){if(S){let R=Object.keys(m);for(var N=0;N<R.length;N++){let U=R[N];if(E=m[U],w=n==="*",g)O=Fi(O,U,x),v=f,y=yN(E,v-1,n,l,r,i,s,a,c,m,d,y,w,U,f,o,O,t,e[c],x+1);else if(w||typeof E=="object"&&E!==null&&n in E){if(w?y=E:y=E[n],d=f!==o?y:s?a?i(y,[...l,c,...r]):i(y):i,w){let F=p1(Fi(O,U,x),y,e[c]);t.push(F),m[U]=d}else if(E[n]!==d)if(d===void 0&&i!==void 0||Th(E,n)&&d===y)O=Fi(O,U,x);else{O=Fi(O,U,x);let F=p1(Fi(O,n,x+1),y,e[c]);t.push(F),E[n]=d}}}S=null}else{if(y=m[n],O=Fi(O,n,x),d=f!==o?y:s?a?i(y,[...l,c,...r]):i(y):i,!(Th(m,n)&&d===y||d===void 0&&i!==void 0)){let R=p1(O,y,e[c]);t.push(R),m[n]=d}m=m[n]}if(typeof m!="object")break}}}function mN(t,e){for(var n=-1,l=e.length,r=t;r!=null&&++n<l;)r=r[e[n]];return r}function yN(t,e,n,l,r,i,s,a,u,o,c,f,m,d,y,_,S,w,E,g){if(e===0&&(m||typeof t=="object"&&t!==null&&n in t)){if(m?f=t:f=t[n],c=y!==_?f:s?a?i(f,[...l,u,...r]):i(f):i,m){let v=p1(S,f,E);w.push(v),o[d]=c}else if(t[n]!==c){if(!(c===void 0&&i!==void 0||Th(t,n)&&c===f)){let v=p1(Fi(S,n,g+1),f,E);w.push(v),t[n]=c}}}for(let v in t)typeof t[v]=="object"&&(S=Fi(S,v,g),yN(t[v],e-1,n,l,r,i,s,a,u,o,c,f,m,d,y,_,S,w,E,g+1))}function v2e(){return{parent:null,key:null,children:[],depth:0}}function Fi(t,e,n){if(t.depth===n)return Fi(t.parent,e,n);var l={parent:t,key:e,depth:n,children:[]};return t.children.push(l),l}function p1(t,e,n){let l=t,r=[];do r.push(l.key),l=l.parent;while(l.parent!=null);return{path:r,value:e,target:n}}});var _N=k((KNe,vN)=>{"use strict";var{groupRestore:_2e,nestedRestore:E2e}=xh();vN.exports=b2e;function b2e({secret:t,wcLen:e}){return function(){if(this.restore)return;let l=Object.keys(t),r=w2e(t,l),i=e>0,s=i?{secret:t,groupRestore:_2e,nestedRestore:E2e}:{secret:t};this.restore=Function("o",S2e(r,l,i)).bind(s)}}function w2e(t,e){return e.map(n=>{let{circle:l,escPath:r,leadingBracket:i}=t[n],a=l?`o.${l} = secret[${r}].val`:`o${i?"":"."}${n} = secret[${r}].val`,u=`secret[${r}].val = undefined`;return`
if (secret[${r}].val !== undefined) {
try { ${a} } catch (e) {}
${o}
${u}
}
`}).join("")}function iie(t,e,n){return`
`}).join("")}function S2e(t,e,n){return`
const secret = this.secret
${n===!0?`
const keys = Object.keys(secret)
@@ -78,36 +78,36 @@ caused by: `+IO(r,e)):n},Tre=t=>IO(t,new Set),kO=(t,e,n)=>{if(!a4(t))return"";le
`:""}
${t}
return o
`}});var cN=k((wNe,uN)=>{"use strict";uN.exports=lie;function lie(t){let{secret:e,censor:n,compileRestore:r,serialize:i,groupRedact:l,nestedRedact:s,wildcards:a,wcLen:o}=t,u=[{secret:e,censor:n,compileRestore:r}];return i!==!1&&u.push({serialize:i}),o>0&&u.push({groupRedact:l,nestedRedact:s,wildcards:a,wcLen:o}),Object.assign(...u)}});var dN=k((SNe,fN)=>{"use strict";var pN=QO(),sie=tN(),aie=rN(),oie=oN(),{groupRedact:uie,nestedRedact:cie}=_h(),pie=cN(),fie=u8(),die=pN(),Eh=t=>t;Eh.restore=Eh;var hie="[REDACTED]";bh.rx=fie;bh.validator=pN;fN.exports=bh;function bh(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,r=t.remove;if(r===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let i=r===!0?void 0:"censor"in t?t.censor:hie,l=typeof i=="function",s=l&&i.length>1;if(e.length===0)return n||Eh;die({paths:e,serialize:n,censor:i});let{wildcards:a,wcLen:o,secret:u}=sie({paths:e,censor:i}),c=oie({secret:u,wcLen:o}),f="strict"in t?t.strict:!0;return aie({secret:u,wcLen:o,serialize:n,strict:f,isCensorFct:l,censorFctTakesPath:s},pie({secret:u,censor:i,compileRestore:c,serialize:n,groupRedact:uie,nestedRedact:cie,wildcards:a,wcLen:o}))}});var Ku=k((TNe,hN)=>{"use strict";var mie=Symbol("pino.setLevel"),yie=Symbol("pino.getLevel"),gie=Symbol("pino.levelVal"),vie=Symbol("pino.levelComp"),_ie=Symbol("pino.useLevelLabels"),Eie=Symbol("pino.useOnlyCustomLevels"),bie=Symbol("pino.mixin"),wie=Symbol("pino.lsCache"),Sie=Symbol("pino.chindings"),Tie=Symbol("pino.asJson"),xie=Symbol("pino.write"),Aie=Symbol("pino.redactFmt"),Oie=Symbol("pino.time"),Nie=Symbol("pino.timeSliceIndex"),Cie=Symbol("pino.stream"),Rie=Symbol("pino.stringify"),Iie=Symbol("pino.stringifySafe"),kie=Symbol("pino.stringifiers"),Die=Symbol("pino.end"),Pie=Symbol("pino.formatOpts"),Lie=Symbol("pino.messageKey"),Fie=Symbol("pino.errorKey"),jie=Symbol("pino.nestedKey"),Uie=Symbol("pino.nestedKeyStr"),Mie=Symbol("pino.mixinMergeStrategy"),$ie=Symbol("pino.msgPrefix"),Bie=Symbol("pino.wildcardFirst"),Hie=Symbol.for("pino.serializers"),Vie=Symbol.for("pino.formatters"),qie=Symbol.for("pino.hooks"),zie=Symbol.for("pino.metadata");hN.exports={setLevelSym:mie,getLevelSym:yie,levelValSym:gie,levelCompSym:vie,useLevelLabelsSym:_ie,mixinSym:bie,lsCacheSym:wie,chindingsSym:Sie,asJsonSym:Tie,writeSym:xie,serializersSym:Hie,redactFmtSym:Aie,timeSym:Oie,timeSliceIndexSym:Nie,streamSym:Cie,stringifySym:Rie,stringifySafeSym:Iie,stringifiersSym:kie,endSym:Die,formatOptsSym:Pie,messageKeySym:Lie,errorKeySym:Fie,nestedKeySym:jie,wildcardFirstSym:Bie,needsMetadataGsym:zie,useOnlyCustomLevelsSym:Eie,formattersSym:Vie,hooksSym:qie,nestedKeyStrSym:Uie,mixinMergeStrategySym:Mie,msgPrefixSym:$ie}});var Th=k((xNe,vN)=>{"use strict";var Sh=dN(),{redactFmtSym:Gie,wildcardFirstSym:c8}=Ku(),{rx:wh,validator:Jie}=Sh,mN=Jie({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),yN="[Redacted]",gN=!1;function Kie(t,e){let{paths:n,censor:r}=Xie(t),i=n.reduce((a,o)=>{wh.lastIndex=0;let u=wh.exec(o),c=wh.exec(o),f=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(f==="*"&&(f=c8),c===null)return a[f]=null,a;if(a[f]===null)return a;let{index:m}=c,d=`${o.substr(m,o.length-1)}`;return a[f]=a[f]||[],f!==c8&&a[f].length===0&&a[f].push(...a[c8]||[]),f===c8&&Object.keys(a).forEach(function(y){a[y]&&a[y].push(d)}),a[f].push(d),a},{}),l={[Gie]:Sh({paths:n,censor:r,serialize:e,strict:gN})},s=(...a)=>e(typeof r=="function"?r(...a):r);return[...Object.keys(i),...Object.getOwnPropertySymbols(i)].reduce((a,o)=>{if(i[o]===null)a[o]=u=>s(u,[o]);else{let u=typeof r=="function"?(c,f)=>r(c,[o,...f]):r;a[o]=Sh({paths:i[o],censor:u,serialize:e,strict:gN})}return a},l)}function Xie(t){if(Array.isArray(t))return t={paths:t,censor:yN},mN(t),t;let{paths:e,censor:n=yN,remove:r}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return r===!0&&(n=void 0),mN({paths:e,censor:n}),{paths:e,censor:n}}vN.exports=Kie});var EN=k((ANe,_N)=>{"use strict";var Wie=()=>"",Yie=()=>`,"time":${Date.now()}`,Qie=()=>`,"time":${Math.round(Date.now()/1e3)}`,Zie=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;_N.exports={nullTime:Wie,epochTime:Yie,unixTime:Qie,isoTime:Zie}});var wN=k((ONe,bN)=>{"use strict";function ele(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}bN.exports=tle;function tle(t,e,n){var r=n&&n.stringify||ele,i=1;if(typeof t=="object"&&t!==null){var l=e.length+i;if(l===1)return t;var s=new Array(l);s[0]=r(t);for(var a=1;a<l;a++)s[a]=r(e[a]);return s.join(" ")}if(typeof t!="string")return t;var o=e.length;if(o===0)return t;for(var u="",c=1-i,f=-1,m=t&&t.length||0,d=0;d<m;){if(t.charCodeAt(d)===37&&d+1<m){switch(f=f>-1?f:0,t.charCodeAt(d+1)){case 100:case 102:if(c>=o||e[c]==null)Line truncated
`}});var bN=k((XNe,EN)=>{"use strict";EN.exports=T2e;function T2e(t){let{secret:e,censor:n,compileRestore:l,serialize:r,groupRedact:i,nestedRedact:s,wildcards:a,wcLen:u}=t,o=[{secret:e,censor:n,compileRestore:l}];return r!==!1&&o.push({serialize:r}),u>0&&o.push({groupRedact:i,nestedRedact:s,wildcards:a,wcLen:u}),Object.assign(...o)}});var TN=k((WNe,SN)=>{"use strict";var wN=oN(),x2e=fN(),A2e=hN(),O2e=_N(),{groupRedact:N2e,nestedRedact:C2e}=xh(),R2e=bN(),I2e=fc(),k2e=wN(),Ah=t=>t;Ah.restore=Ah;var D2e="[REDACTED]";Oh.rx=I2e;Oh.validator=wN;SN.exports=Oh;function Oh(t={}){let e=Array.from(new Set(t.paths||[])),n="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,l=t.remove;if(l===!0&&n!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let r=l===!0?void 0:"censor"in t?t.censor:D2e,i=typeof r=="function",s=i&&r.length>1;if(e.length===0)return n||Ah;k2e({paths:e,serialize:n,censor:r});let{wildcards:a,wcLen:u,secret:o}=x2e({paths:e,censor:r}),c=O2e({secret:o,wcLen:u}),f="strict"in t?t.strict:!0;return A2e({secret:o,wcLen:u,serialize:n,strict:f,isCensorFct:i,censorFctTakesPath:s},R2e({secret:o,censor:r,compileRestore:c,serialize:n,groupRedact:N2e,nestedRedact:C2e,wildcards:a,wcLen:u}))}});var Wo=k((YNe,xN)=>{"use strict";var P2e=Symbol("pino.setLevel"),L2e=Symbol("pino.getLevel"),F2e=Symbol("pino.levelVal"),j2e=Symbol("pino.levelComp"),U2e=Symbol("pino.useLevelLabels"),M2e=Symbol("pino.useOnlyCustomLevels"),$2e=Symbol("pino.mixin"),B2e=Symbol("pino.lsCache"),H2e=Symbol("pino.chindings"),V2e=Symbol("pino.asJson"),q2e=Symbol("pino.write"),z2e=Symbol("pino.redactFmt"),G2e=Symbol("pino.time"),J2e=Symbol("pino.timeSliceIndex"),K2e=Symbol("pino.stream"),X2e=Symbol("pino.stringify"),W2e=Symbol("pino.stringifySafe"),Y2e=Symbol("pino.stringifiers"),Q2e=Symbol("pino.end"),Z2e=Symbol("pino.formatOpts"),e3e=Symbol("pino.messageKey"),t3e=Symbol("pino.errorKey"),n3e=Symbol("pino.nestedKey"),l3e=Symbol("pino.nestedKeyStr"),r3e=Symbol("pino.mixinMergeStrategy"),i3e=Symbol("pino.msgPrefix"),s3e=Symbol("pino.wildcardFirst"),a3e=Symbol.for("pino.serializers"),u3e=Symbol.for("pino.formatters"),o3e=Symbol.for("pino.hooks"),c3e=Symbol.for("pino.metadata");xN.exports={setLevelSym:P2e,getLevelSym:L2e,levelValSym:F2e,levelCompSym:j2e,useLevelLabelsSym:U2e,mixinSym:$2e,lsCacheSym:B2e,chindingsSym:H2e,asJsonSym:V2e,writeSym:q2e,serializersSym:a3e,redactFmtSym:z2e,timeSym:G2e,timeSliceIndexSym:J2e,streamSym:K2e,stringifySym:X2e,stringifySafeSym:W2e,stringifiersSym:Y2e,endSym:Q2e,formatOptsSym:Z2e,messageKeySym:e3e,errorKeySym:t3e,nestedKeySym:n3e,wildcardFirstSym:s3e,needsMetadataGsym:c3e,useOnlyCustomLevelsSym:M2e,formattersSym:u3e,hooksSym:o3e,nestedKeyStrSym:l3e,mixinMergeStrategySym:r3e,msgPrefixSym:i3e}});var Rh=k((QNe,CN)=>{"use strict";var Ch=TN(),{redactFmtSym:p3e,wildcardFirstSym:dc}=Wo(),{rx:Nh,validator:f3e}=Ch,AN=f3e({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),ON="[Redacted]",NN=!1;function d3e(t,e){let{paths:n,censor:l}=h3e(t),r=n.reduce((a,u)=>{Nh.lastIndex=0;let o=Nh.exec(u),c=Nh.exec(u),f=o[1]!==void 0?o[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):o[0];if(f==="*"&&(f=dc),c===null)return a[f]=null,a;if(a[f]===null)return a;let{index:m}=c,d=`${u.substr(m,u.length-1)}`;return a[f]=a[f]||[],f!==dc&&a[f].length===0&&a[f].push(...a[dc]||[]),f===dc&&Object.keys(a).forEach(function(y){a[y]&&a[y].push(d)}),a[f].push(d),a},{}),i={[p3e]:Ch({paths:n,censor:l,serialize:e,strict:NN})},s=(...a)=>e(typeof l=="function"?l(...a):l);return[...Object.keys(r),...Object.getOwnPropertySymbols(r)].reduce((a,u)=>{if(r[u]===null)a[u]=o=>s(o,[u]);else{let o=typeof l=="function"?(c,f)=>l(c,[u,...f]):l;a[u]=Ch({paths:r[u],censor:o,serialize:e,strict:NN})}return a},i)}function h3e(t){if(Array.isArray(t))return t={paths:t,censor:ON},AN(t),t;let{paths:e,censor:n=ON,remove:l}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return l===!0&&(n=void 0),AN({paths:e,censor:n}),{paths:e,censor:n}}CN.exports=d3e});var IN=k((ZNe,RN)=>{"use strict";var m3e=()=>"",y3e=()=>`,"time":${Date.now()}`,g3e=()=>`,"time":${Math.round(Date.now()/1e3)}`,v3e=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;RN.exports={nullTime:m3e,epochTime:y3e,unixTime:g3e,isoTime:v3e}});var DN=k((eCe,kN)=>{"use strict";function _3e(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}kN.exports=E3e;function E3e(t,e,n){var l=n&&n.stringify||_3e,r=1;if(typeof t=="object"&&t!==null){var i=e.length+r;if(i===1)return t;var s=new Array(i);s[0]=l(t);for(var a=1;a<i;a++)s[a]=l(e[a]);return s.join(" ")}if(typeof t!="string")return t;var u=e.length;if(u===0)return t;for(var o="",c=1-r,f=-1,m=t&&t.length||0,d=0;d<m;){if(t.charCodeAt(d)===37&&d+1<m){switch(f=f>-1?f:0,t.charCodeAt(d+1)){case 100:case 102:if(c>=u||e[c]==null)Line truncated
${w}`,v=`,
${w}`);let te=Math.min(E.length,s),Q=0;for(;Q<te-1;Q++){let ce=a(String(Q),E,y,_,S,w);g+=ce!==void 0?ce:"null",g+=v}let W=a(String(Q),E,y,_,S,w);if(g+=W!==void 0?W:"null",E.length-1>s){let ce=E.length-s-1;g+=`${v}"... ${_3(ce)} not stringified"`}return S!==""&&(g+=`
${x}`),y.pop(),`[${g}]`}let O=Object.keys(E),N=O.length;if(N===0)return"{}";if(l<y.length+1)return'"[Object]"';let R="",U="";S!==""&&(w+=S,v=`,
${w}`,R=" ");let F=Math.min(N,s);i&&!Xh(E)&&(O=Kh(O)),y.push(E);for(let te=0;te<F;te++){let Q=O[te],W=a(Q,E,y,_,S,w);W!==void 0&&(g+=`${U}${_2(Q)}:${R}${W}`,U=v)}if(N>s){let te=N-s;g+=`${U}"...":${R}"${_3(te)} not stringified"`,U=v}return S!==""&&U.length>1&&(g=`
${w}`);let te=Math.min(E.length,s),Q=0;for(;Q<te-1;Q++){let ce=a(String(Q),E,y,_,S,w);g+=ce!==void 0?ce:"null",g+=v}let W=a(String(Q),E,y,_,S,w);if(g+=W!==void 0?W:"null",E.length-1>s){let ce=E.length-s-1;g+=`${v}"... ${Eu(ce)} not stringified"`}return S!==""&&(g+=`
${x}`),y.pop(),`[${g}]`}let O=Object.keys(E),N=O.length;if(N===0)return"{}";if(i<y.length+1)return'"[Object]"';let R="",U="";S!==""&&(w+=S,v=`,
${w}`,R=" ");let F=Math.min(N,s);r&&!tm(E)&&(O=em(O)),y.push(E);for(let te=0;te<F;te++){let Q=O[te],W=a(Q,E,y,_,S,w);W!==void 0&&(g+=`${U}${vs(Q)}:${R}${W}`,U=v)}if(N>s){let te=N-s;g+=`${U}"...":${R}"${Eu(te)} not stringified"`,U=v}return S!==""&&U.length>1&&(g=`
${w}${g}
${x}`),y.pop(),`{${g}}`}case"number":return isFinite(E)?String(E):e?e(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(E);default:return e?e(E):void 0}}function o(m,d,y,_,S,w){switch(typeof d=="object"&&d!==null&&typeof d.toJSON=="function"&&(d=d.toJSON(m)),typeof d){case"string":return _2(d);case"object":{if(d===null)return"null";if(y.indexOf(d)!==-1)return n;let E=w,g="",v=",";if(Array.isArray(d)){if(d.length===0)return"[]";if(l<y.length+1)return'"[Array]"';y.push(d),S!==""&&(w+=S,g+=`
${x}`),y.pop(),`{${g}}`}case"number":return isFinite(E)?String(E):e?e(E):"null";case"boolean":return E===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(E);default:return e?e(E):void 0}}function u(m,d,y,_,S,w){switch(typeof d=="object"&&d!==null&&typeof d.toJSON=="function"&&(d=d.toJSON(m)),typeof d){case"string":return vs(d);case"object":{if(d===null)return"null";if(y.indexOf(d)!==-1)return n;let E=w,g="",v=",";if(Array.isArray(d)){if(d.length===0)return"[]";if(i<y.length+1)return'"[Array]"';y.push(d),S!==""&&(w+=S,g+=`
${w}`,v=`,
${w}`);let N=Math.min(d.length,s),R=0;for(;R<N-1;R++){let F=o(String(R),d[R],y,_,S,w);g+=F!==void 0?F:"null",g+=v}let U=o(String(R),d[R],y,_,S,w);if(g+=U!==void 0?U:"null",d.length-1>s){let F=d.length-s-1;g+=`${v}"... ${_3(F)} not stringified"`}return S!==""&&(g+=`
${w}`);let N=Math.min(d.length,s),R=0;for(;R<N-1;R++){let F=u(String(R),d[R],y,_,S,w);g+=F!==void 0?F:"null",g+=v}let U=u(String(R),d[R],y,_,S,w);if(g+=U!==void 0?U:"null",d.length-1>s){let F=d.length-s-1;g+=`${v}"... ${Eu(F)} not stringified"`}return S!==""&&(g+=`
${E}`),y.pop(),`[${g}]`}y.push(d);let x="";S!==""&&(w+=S,v=`,
${w}`,x=" ");let O="";for(let N of _){let R=o(N,d[N],y,_,S,w);R!==void 0&&(g+=`${O}${_2(N)}:${x}${R}`,O=v)}return S!==""&&O.length>1&&(g=`
${w}`,x=" ");let O="";for(let N of _){let R=u(N,d[N],y,_,S,w);R!==void 0&&(g+=`${O}${vs(N)}:${x}${R}`,O=v)}return S!==""&&O.length>1&&(g=`
${w}${g}
${E}`),y.pop(),`{${g}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(d);default:return e?e(d):void 0}}function u(m,d,y,_,S){switch(typeof d){case"string":return _2(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return u(m,d,y,_,S);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let w=S;if(Array.isArray(d)){if(d.length===0)return"[]";if(l<y.length+1)return'"[Array]"';y.push(d),S+=_;let R=`
${E}`),y.pop(),`{${g}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(d);default:return e?e(d):void 0}}function o(m,d,y,_,S){switch(typeof d){case"string":return vs(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return o(m,d,y,_,S);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let w=S;if(Array.isArray(d)){if(d.length===0)return"[]";if(i<y.length+1)return'"[Array]"';y.push(d),S+=_;let R=`
${S}`,U=`,
${S}`,F=Math.min(d.length,s),te=0;for(;te<F-1;te++){let W=u(String(te),d[te],y,_,S);R+=W!==void 0?W:"null",R+=U}let Q=u(String(te),d[te],y,_,S);if(R+=Q!==void 0?Q:"null",d.length-1>s){let W=d.length-s-1;R+=`${U}"... ${_3(W)} not stringified"`}return R+=`
${w}`,y.pop(),`[${R}]`}let E=Object.keys(d),g=E.length;if(g===0)return"{}";if(l<y.length+1)return'"[Object]"';S+=_;let v=`,
${S}`,x="",O="",N=Math.min(g,s);Xh(d)&&(x+=EC(d,v,s),E=E.slice(d.length),N-=d.length,O=v),i&&(E=Kh(E)),y.push(d);for(let R=0;R<N;R++){let U=E[R],F=u(U,d[U],y,_,S);F!==void 0&&(x+=`${O}${_2(U)}: ${F}`,O=v)}if(g>s){let R=g-s;x+=`${O}"...": "${_3(R)} not stringified"`,O=v}return O!==""&&(x=`
${S}`,F=Math.min(d.length,s),te=0;for(;te<F-1;te++){let W=o(String(te),d[te],y,_,S);R+=W!==void 0?W:"null",R+=U}let Q=o(String(te),d[te],y,_,S);if(R+=Q!==void 0?Q:"null",d.length-1>s){let W=d.length-s-1;R+=`${U}"... ${Eu(W)} not stringified"`}return R+=`
${w}`,y.pop(),`[${R}]`}let E=Object.keys(d),g=E.length;if(g===0)return"{}";if(i<y.length+1)return'"[Object]"';S+=_;let v=`,
${S}`,x="",O="",N=Math.min(g,s);tm(d)&&(x+=IC(d,v,s),E=E.slice(d.length),N-=d.length,O=v),r&&(E=em(E)),y.push(d);for(let R=0;R<N;R++){let U=E[R],F=o(U,d[U],y,_,S);F!==void 0&&(x+=`${O}${vs(U)}: ${F}`,O=v)}if(g>s){let R=g-s;x+=`${O}"...": "${Eu(R)} not stringified"`,O=v}return O!==""&&(x=`
${S}${x}
${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(d);default:return e?e(d):void 0}}function c(m,d,y){switch(typeof d){case"string":return _2(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return c(m,d,y);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let _="";if(Array.isArray(d)){if(d.length===0)return"[]";if(l<y.length+1)return'"[Array]"';y.push(d);let v=Math.min(d.length,s),x=0;for(;x<v-1;x++){let N=c(String(x),d[x],y);_+=N!==void 0?N:"null",_+=","}let O=c(String(x),d[x],y);if(_+=O!==void 0?O:"null",d.length-1>s){let N=d.length-s-1;_+=`,"... ${_3(N)} not stringified"`}return y.pop(),`[${_}]`}let S=Object.keys(d),w=S.length;if(w===0)return"{}";if(l<y.length+1)return'"[Object]"';let E="",g=Math.min(w,s);Xh(d)&&(_+=EC(d,",",s),S=S.slice(d.length),g-=d.length,E=","),i&&(S=Kh(S)),y.push(d);for(let v=0;v<g;v++){let x=S[v],O=c(x,d[x],y);O!==void 0&&(_+=`${E}${_2(x)}:${O}`,E=",")}if(w>s){let v=w-s;_+=`${E}"...":"${_3(v)} not stringified"`}return y.pop(),`{${_}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(r)return String(d);default:return e?e(d):void 0}}function f(m,d,y){if(arguments.length>1){let _="";if(typeof y=="number"?_=" ".repeat(Math.min(y,10)):typeof y=="string"&&(_=y.slice(0,10)),d!=null){if(typeof d=="function")return a("",{"":m},[],d,_,"");if(Array.isArray(d))return o("",m,[],Eae(d),_,"")}if(_.length!==0)return u("",m,[],_,"")}return c("",m,[])}return f}});var OC=k((HNe,AC)=>{"use strict";var Qh=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:xC}=E8(),wae=xC.info;function Sae(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let r=Object.create(xC);r.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{r[c]=e.levels[c]});let i={write:l,add:a,flushSync:s,end:o,minLevel:0,streams:[],clone:u,[Qh]:!0,streamLevels:r};return Array.isArray(t)?t.forEach(a,i):a.call(i,t),t=null,i;function l(c){let f,m=this.lastLevel,{streams:d}=this,y=0,_;for(let S=xae(d.length,e.dedupe);Oae(S,d.length,e.dedupe);S=Aae(S,e.dedupe))if(f=d[S],f.level<=m){if(y!==0&&y!==f.level)break;if(_=f.stream,_[Qh]){let{lastTime:w,lastMsg:E,lastObj:g,lastLogger:v}=this;_.lastLevel=m,_.lastTime=w,_.lastMsg=E,_.lastObj=g,_.lastLogger=v}_.write(c),e.dedupe&&(y=f.level)}else if(!e.dedupe)break}function s(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function a(c){if(!c)return i;let f=typeof c.write=="function"||c.stream,m=c.write?c:c.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d,streamLevels:y}=this,_;typeof c.levelVal=="number"?_=c.levelVal:typeof c.level=="string"?_=y[c.level]:typeof c.level=="number"?_=c.level:_=wae;let S={stream:m,level:_,levelVal:void 0,id:n++};return d.unshift(S),d.sort(Tae),this.minLevel=d[0].level,i}function o(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function u(c){let f=new Array(this.streams.length);for(let m=0;m<f.length;m++)f[m]={level:c,stream:this.streams[m].stream};return{write:l,add:a,minLevel:c,streams:f,clone:u,flushSync:s,[Qh]:!0}}}function Tae(t,e){return t.level-e.level}function xae(t,e){return e?t-1:0}function Aae(t,e){return e?t-1:t+1}function Oae(t,e,n){return n?t>=0:t<e}AC.exports=Sae});var $C=k((VNe,Xl)=>{"use strict";var Nae=require("os"),LC=yh(),Cae=gh(),Rae=Th(),FC=EN(),Iae=_C(),jC=Ku(),{configure:kae}=TC(),{assertDefaultLevelFound:Dae,mappings:UC,genLsCache:Pae,genLevelComparison:Lae,assertLevelComparison:Fae}=Vh(),{DEFAULT_LEVELS:jae,SORTING_ORDER:Uae}=E8(),{createArgsNormalizer:Mae,asChindings:$ae,buildSafeSonicBoom:NC,buildFormatters:Bae,stringify:Zh,normalizeDestFileDescriptor:CC,noop:Hae}=_8(),{version:Vae}=qh(),{chindingsSym:RC,redactFmtSym:qae,serializersSym:IC,timeSym:zae,timeSliceIndexSym:Gae,streamSym:Jae,stringifySym:kC,stringifySafeSym:em,stringifiersSym:DC,setLevelSym:Kae,endSym:Xae,formatOptsSym:Wae,messageKeySym:Yae,errorKeySym:Qae,nestedKeySym:Zae,mixinSym:e2e,levelCompSym:t2e,useOnlyCustomLevelsSym:n2e,formattersSym:PC,hooksSym:r2e,nestedKeyStrSym:i2e,mixinMergeStrategySym:l2e,msgPrefixSym:s2e}=jC,{epochTime:MC,nullTime:a2e}=FC,{pid:o2e}=process,u2e=Nae.hostname(),c2e=LC.err,p2e={level:"info",levelComparison:Uae.ASC,levels:jae,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:o2e,hostname:u2e},serializers:Object.assign(Object.create(null),{err:c2e}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:MC,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},f2e=Mae(p2e),d2e=Object.assign(Object.create(null),LC);function tm(...t){let e={},{opts:n,stream:r}=f2e(e,Cae(),...t),{redact:i,crlf:l,s Line truncated
${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(d);default:return e?e(d):void 0}}function c(m,d,y){switch(typeof d){case"string":return vs(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return c(m,d,y);if(d===null)return"null"}if(y.indexOf(d)!==-1)return n;let _="";if(Array.isArray(d)){if(d.length===0)return"[]";if(i<y.length+1)return'"[Array]"';y.push(d);let v=Math.min(d.length,s),x=0;for(;x<v-1;x++){let N=c(String(x),d[x],y);_+=N!==void 0?N:"null",_+=","}let O=c(String(x),d[x],y);if(_+=O!==void 0?O:"null",d.length-1>s){let N=d.length-s-1;_+=`,"... ${Eu(N)} not stringified"`}return y.pop(),`[${_}]`}let S=Object.keys(d),w=S.length;if(w===0)return"{}";if(i<y.length+1)return'"[Object]"';let E="",g=Math.min(w,s);tm(d)&&(_+=IC(d,",",s),S=S.slice(d.length),g-=d.length,E=","),r&&(S=em(S)),y.push(d);for(let v=0;v<g;v++){let x=S[v],O=c(x,d[x],y);O!==void 0&&(_+=`${E}${vs(x)}:${O}`,E=",")}if(w>s){let v=w-s;_+=`${E}"...":"${Eu(v)} not stringified"`}return y.pop(),`{${_}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(l)return String(d);default:return e?e(d):void 0}}function f(m,d,y){if(arguments.length>1){let _="";if(typeof y=="number"?_=" ".repeat(Math.min(y,10)):typeof y=="string"&&(_=y.slice(0,10)),d!=null){if(typeof d=="function")return a("",{"":m},[],d,_,"");if(Array.isArray(d))return u("",m,[],Mie(d),_,"")}if(_.length!==0)return o("",m,[],_,"")}return c("",m,[])}return f}});var UC=k((mCe,jC)=>{"use strict";var rm=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:FC}=Sc(),Bie=FC.info;function Hie(t,e){let n=0;t=t||[],e=e||{dedupe:!1};let l=Object.create(FC);l.silent=1/0,e.levels&&typeof e.levels=="object"&&Object.keys(e.levels).forEach(c=>{l[c]=e.levels[c]});let r={write:i,add:a,flushSync:s,end:u,minLevel:0,streams:[],clone:o,[rm]:!0,streamLevels:l};return Array.isArray(t)?t.forEach(a,r):a.call(r,t),t=null,r;function i(c){let f,m=this.lastLevel,{streams:d}=this,y=0,_;for(let S=qie(d.length,e.dedupe);Gie(S,d.length,e.dedupe);S=zie(S,e.dedupe))if(f=d[S],f.level<=m){if(y!==0&&y!==f.level)break;if(_=f.stream,_[rm]){let{lastTime:w,lastMsg:E,lastObj:g,lastLogger:v}=this;_.lastLevel=m,_.lastTime=w,_.lastMsg=E,_.lastObj=g,_.lastLogger=v}_.write(c),e.dedupe&&(y=f.level)}else if(!e.dedupe)break}function s(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync()}function a(c){if(!c)return r;let f=typeof c.write=="function"||c.stream,m=c.write?c:c.stream;if(!f)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:d,streamLevels:y}=this,_;typeof c.levelVal=="number"?_=c.levelVal:typeof c.level=="string"?_=y[c.level]:typeof c.level=="number"?_=c.level:_=Bie;let S={stream:m,level:_,levelVal:void 0,id:n++};return d.unshift(S),d.sort(Vie),this.minLevel=d[0].level,r}function u(){for(let{stream:c}of this.streams)typeof c.flushSync=="function"&&c.flushSync(),c.end()}function o(c){let f=new Array(this.streams.length);for(let m=0;m<f.length;m++)f[m]={level:c,stream:this.streams[m].stream};return{write:i,add:a,minLevel:c,streams:f,clone:o,flushSync:s,[rm]:!0}}}function Vie(t,e){return t.level-e.level}function qie(t,e){return e?t-1:0}function zie(t,e){return e?t-1:t+1}function Gie(t,e,n){return n?t>=0:t<e}jC.exports=Hie});var YC=k((yCe,W3)=>{"use strict";var Jie=require("os"),GC=wh(),Kie=Sh(),Xie=Rh(),JC=IN(),Wie=RC(),KC=Wo(),{configure:Yie}=LC(),{assertDefaultLevelFound:Qie,mappings:XC,genLsCache:Zie,genLevelComparison:ese,assertLevelComparison:tse}=Xh(),{DEFAULT_LEVELS:nse,SORTING_ORDER:lse}=Sc(),{createArgsNormalizer:rse,asChindings:ise,buildSafeSonicBoom:MC,buildFormatters:sse,stringify:im,normalizeDestFileDescriptor:$C,noop:ase}=wc(),{version:use}=Wh(),{chindingsSym:BC,redactFmtSym:ose,serializersSym:HC,timeSym:cse,timeSliceIndexSym:pse,streamSym:fse,stringifySym:VC,stringifySafeSym:sm,stringifiersSym:qC,setLevelSym:dse,endSym:hse,formatOptsSym:mse,messageKeySym:yse,errorKeySym:gse,nestedKeySym:vse,mixinSym:_se,levelCompSym:Ese,useOnlyCustomLevelsSym:bse,formattersSym:zC,hooksSym:wse,nestedKeyStrSym:Sse,mixinMergeStrategySym:Tse,msgPrefixSym:xse}=KC,{epochTime:WC,nullTime:Ase}=JC,{pid:Ose}=process,Nse=Jie.hostname(),Cse=GC.err,Rse={level:"info",levelComparison:lse.ASC,levels:nse,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Ose,hostname:Nse},serializers:Object.assign(Object.create(null),{err:Cse}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:WC,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Ise=rse(Rse),kse=Object.assign(Object.create(null),GC);function am(...t){let e={},{opts:n,stream:l}=Ise(e,Kie(),...t),{redact:r,crlf:i,s Line truncated
`:`
`),we=$ae.bind(null,{[RC]:"",[IC]:s,[DC]:Q,[kC]:Zh,[em]:U,[PC]:F}),se="";f!==null&&(m===void 0?se=we(f):se=we(Object.assign({},f,{name:m})));let ee=a instanceof Function?a:a?MC:a2e,me=ee().indexOf(":")+1;if(E&&!y)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(R&&typeof R!="string")throw Error(`Unknown msgPrefix type "${typeof R}" - expected "string"`);Dae(d,y,E);let P=UC(y,E);Fae(_);let G=Lae(_);return Object.assign(e,{levels:P,[t2e]:G,[n2e]:E,[Jae]:r,[zae]:ee,[Gae]:me,[kC]:Zh,[em]:U,[DC]:Q,[Xae]:ce,[Wae]:W,[Yae]:o,[Qae]:u,[Zae]:c,[i2e]:c?`,${JSON.stringify(c)}:{`:"",[IC]:s,[e2e]:S,[l2e]:w,[RC]:se,[PC]:F,[r2e]:v,silent:Hae,onChild:N,[s2e]:R}),Object.setPrototypeOf(e,Iae()),Pae(e),e[Kae](d),e}Xl.exports=tm;Xl.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=CC(t.dest||process.stdout.fd),NC(t)):NC({dest:CC(t),minLength:0});Xl.exports.transport=jh();Xl.exports.multistream=OC();Xl.exports.levels=UC();Xl.exports.stdSerializers=d2e;Xl.exports.stdTimeFunctions=Object.assign({},FC);Xl.exports.symbols=jC;Xl.exports.version=Vae;Xl.exports.default=tm;Xl.exports.pino=tm});var c4=k((qNe,zC)=>{"use strict";var h2e=RO(),w8=$C(),{serializersSym:BC}=w8.symbols,{FST_ERR_LOG_INVALID_DESTINATION:m2e,FST_ERR_LOG_INVALID_LOGGER:y2e}=Ui();function HC(t){if(t.stream&&t.file)throw new m2e;t.file&&(t.stream=w8.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,r=null;return e?(t.logger=void 0,t.genReqId=void 0,e[BC]&&(t.serializers=Object.assign({},t.serializers,e[BC])),r=e.child({},t),t.logger=e,t.genReqId=n):r=w8(t,t.stream),r}var nm={req:function(e){return{method:e.method,url:e.url,version:e.headers&&e.headers["accept-version"],hostname:e.hostname,remoteAddress:e.ip,remotePort:e.socket?e.socket.remotePort:void 0}},err:w8.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function g2e(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function v2e(t){if(!t.logger){let r=h2e;return r.child=()=>r,{logger:r,hasLogger:!1}}if(VC(t.logger))return{logger:HC({logger:t.logger,serializers:Object.assign({},nm,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(r=>{Object.defineProperty(e,r,{value:t.logger[r],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},nm,e.serializers),t.logger=e,{logger:HC(t.logger),hasLogger:!0}}function VC(t,e){let n=["info","error","debug","fatal","warn","trace","child"],r=t?n.filter(i=>!t[i]||typeof t[i]!="function"):n;if(r.length){if(r.length===n.length&&!e)return!1;throw y2e(r.join(","))}else return!0}function _2e(t,e,n,r,i){let l={[t.requestIdLogLabel]:r},s=t.childLoggerFactory.call(t.server,e,l,i||{},n);return t.childLoggerFactory!==qC&&VC(s,!0),s}function qC(t,e,n){return t.child(e,n)}zC.exports={createLogger:v2e,createChildLogger:_2e,defaultChildLoggerFactory:qC,serializers:nm,now:g2e}});var p4=k((zNe,GC)=>{"use strict";GC.exports=E2e;function Yu(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function E2e(t){if(t=t||{},t.circles)return b2e(t);return t.proto?r:n;function e(i,l){for(var s=Object.keys(i),a=new Array(s.length),o=0;o<s.length;o++){var u=s[o],c=i[u];typeof c!="object"||c===null?a[u]=c:c instanceof Date?a[u]=new Date(c):ArrayBuffer.isView(c)?a[u]=Yu(c):a[u]=l(c)}return a}function n(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,n);if(i instanceof Map)return new Map(e(Array.from(i),n));if(i instanceof Set)return new Set(e(Array.from(i),n));var l={};for(var s in i)if(Object.hasOwnProperty.call(i,s)!==!1){var a=i[s];typeof a!="object"||a===null?l[s]=a:a instanceof Date?l[s]=new Date(a):a instanceof Map?l[s]=new Map(e(Array.from(a),n)):a instanceof Set?l[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?l[s]=Yu(a):l[s]=n(a)}return l}function r(i){if(typeof i!="object"||i===null)return i;if(i instanceof Date)return new Date(i);if(Array.isArray(i))return e(i,r);if(i instanceof Map)return new Map(e(Array.from(i),r));if(i instanceof Set)return new Set(e(Array.from(i),r));var l={};for(var s in i){var a=i[s];typeof a!="object"||a===null?l[s]=a:a instanceof Date?l[s]=new Date(a):a instanceof Map?l[s]=new Map(e(Array.from(a),r)):a instanceof Set?l[s]=new Set(e(Array.from(a),r)):ArrayBuffer.isView(a)?l[s]=Yu(a):l[s]=r(a)}return l}}function b2e(t){var e=[],n=[];return t.proto?l:i;function r(s,a){for(var o=Object.keys(s),u=new Array(o.length),c=0;c<o.length;c++){var f=o[c],m=s[f];if(typeof m!="object"||m===null)u[f]=m;else if(m instanceof Date)u[f]=new Date(m);else if(ArrayBuffer.isView(m))u[f]=Yu(m);else{var d=e.indexOf(m);d!==-1?u[f]=n[d]:u[f]=a(m)}}return u}function i(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isAr Line truncated
`:""},this._extScope=e,this._scope=new _s.Scope({parent:e}),this._nodes=[new gm]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let r=this._extScope.value(e,n);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,r,i){let l=this._scope.toName(n);return r!==void 0&&i&&(this._constants[l.str]=r),this._leafNode(new pm(e,l,r)),l}const(e,n,r){return this._def(_s.varKinds.const,e,n,r)}let(e,n,r){return this._def(_s.varKinds.let,e,n,r)}var(e,n,r){return this._def(_s.varKinds.var,e,n,r)}assign(e,n,r){return this._leafNode(new O8(e,n,r))}add(e,n){return this._leafNode(new fm(e,It.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Kt.nil&&this._leafNode(new ym(e)),this}object(...e){let n=["{"];for(let[r,i]of e)n.length>1&&n.push(","),n.push(r),(r!==i||this.opts.es5)&&(n.push(":"),(0,Kt.addCodeArg)(n,i));return n.push("}"),new Kt._Code(n)}if(e,n,r){if(this._blockNode(new w3(e)),n&&r)this.code(n).else().code(r).endIf();else if(n)this.code(n).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new w3(e))}else(){return this._elseNode(new Zu)}endIf(){return this._endBlockNode(w3,Zu)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new vm(e),n)}forRange(e,n,r,i,l=this.opts.es5?_s.varKinds.var:_s.varKinds.let){let s=this._scope.toName(e);return this._for(new _m(l,s,n,r),()=>i(s))}forOf(e,n,r,i=_s.varKinds.const){let l=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Kt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Kt._)`${s}.length`,a=>{this.var(l,(0,Kt._)`${s}[${a}]`),r(l)})}return this._for(new N8("of",i,l,n),()=>r(l))}forIn(e,n,r,i=this.opts.es5?_s.varKinds.var:_s.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Kt._)`Object.keys(${n})`,r);let l=this._scope.toName(e);return this._for(new N8("in",i,l,n),()=>r(l))}endFor(){return this._endBlockNode(S3)}label(e){return this._leafNode(new dm(e))}break(e){return this._leafNode(new hm(e))}return(e){let n=new g4;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(g4)}try(e,n,r){if(!n&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Em;if(this._blockNode(i),this.code(e),n){let l=this.name("e");this._currNode=i.catch=new v4(l),n(l)}return r&&(this._currNode=i.finally=new _4,this.code(r)),this._endBlockNode(v4,_4)}throw(e){return this._leafNode(new mm(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-n;if(r<0||e!==void 0&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Kt.nil,r,i){return this._blockNode(new y4(e,n,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(y4)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let r=this._currNode;if(r instanceof e||n&&r instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof w3))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};It.CodeGen=bm;function T3(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function C8(t,e){return e instanceof Kt._CodeOrName?T3(t,e.names):t}function e1(t,e,n){if(t instanceof Kt.Name)return r(t);if(!i(t))return t;return new Kt._Code(t._items.reduce((l,s)=>(s instanceof Kt.Name&&(s=r(s)),s instanceof Kt._Code?l.push(...s._items):l.push(s),l),[]));function r(l){let s=n[l.str];return s===void 0||e[l.str]!==1?l:(delete e[l.str],s)}function i(l){return l instanceof Kt._Code&&l._items.some(s=>s instanceof Kt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function B2e(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function tR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Kt._)`!${wm(t)}`}It.not=tR;var H2e=nR(It.operators.AND);function V2e(...t){return t.reduce(H2e)}It.and=V2e;var q2e=nR(It.operators.OR);function z2e(...t){return t.reduce(q2e)}It.or=z2e;function nR(t){return(e,n)=>e===Kt.nil?n:n===Kt.nil?e:(0,Kt._)`${wm(e)} ${t} ${wm(n)}`}function wm(t){return t instanceof Kt.Name?t:(0, Line truncated
|| (${s} == "string" && ${i} && ${i} == +${i})`).assign(a,(0,Ot._)`+${i}`);return;case"integer":r.elseIf((0,Ot._)`${s} === "boolean" || ${i} === null
|| (${s} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(a,(0,Ot._)`+${i}`);return;case"boolean":r.elseIf((0,Ot._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(a,!1).elseIf((0,Ot._)`${i} === "true" || ${i} === 1`).assign(a,!0);return;case"null":r.elseIf((0,Ot._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(a,null);return;case"array":r.elseIf((0,Ot._)`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${i} === null`).assign(a,(0,Ot._)`[${i}]`)}}}function Coe({gen:t,parentData:e,parentDataProperty:n},r){t.if((0,Ot._)`${e} !== undefined`,()=>t.assign((0,Ot._)`${e}[${n}]`,r))}function Nm(t,e,n,r=b4.Correct){let i=r===b4.Correct?Ot.operators.EQ:Ot.operators.NEQ,l;switch(t){case"null":return(0,Ot._)`${e} ${i} null`;case"array":l=(0,Ot._)`Array.isArray(${e})`;break;case"object":l=(0,Ot._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":l=s((0,Ot._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":l=s();break;default:return(0,Ot._)`typeof ${e} ${i} ${t}`}return r===b4.Correct?l:(0,Ot.not)(l);function s(a=Ot.nil){return(0,Ot.and)((0,Ot._)`typeof ${e} == "number"`,a,n?(0,Ot._)`isFinite(${e})`:Ot.nil)}}xi.checkDataType=Nm;function Cm(t,e,n,r){if(t.length===1)return Nm(t[0],e,n,r);let i,l=(0,vR.toHash)(t);if(l.array&&l.object){let s=(0,Ot._)`typeof ${e} != "object"`;i=l.null?s:(0,Ot._)`!${e} || ${s}`,delete l.null,delete l.array,delete l.object}else i=Ot.nil;l.number&&delete l.integer;for(let s in l)i=(0,Ot.and)(i,Nm(s,e,n,r));return i}xi.checkDataTypes=Cm;var Roe={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ot._)`{type: ${t}}`:(0,Ot._)`{type: ${e}}`};function Rm(t){let e=Ioe(t);(0,Toe.reportError)(e,Roe)}xi.reportTypeError=Rm;function Ioe(t){let{gen:e,data:n,schema:r}=t,i=(0,vR.schemaRefOrVal)(t,r,"type");return{gen:e,keyword:"type",data:n,schema:r.type,schemaCode:i,schemaValue:i,parentSchema:r,params:{},it:t}}});var wR=k(k8=>{"use strict";Object.defineProperty(k8,"__esModule",{value:!0});k8.assignDefaults=void 0;var r1=st(),koe=Nt();function Doe(t,e){let{properties:n,items:r}=t.schema;if(e==="object"&&n)for(let i in n)bR(t,i,n[i].default);else e==="array"&&Array.isArray(r)&&r.forEach((i,l)=>bR(t,l,i.default))}k8.assignDefaults=Doe;function bR(t,e,n){let{gen:r,compositeRule:i,data:l,opts:s}=t;if(n===void 0)return;let a=(0,r1._)`${l}${(0,r1.getProperty)(e)}`;if(i){(0,koe.checkStrictMode)(t,`default is ignored for: ${a}`);return}let o=(0,r1._)`${a} === undefined`;s.useDefaults==="empty"&&(o=(0,r1._)`${o} || ${a} === null || ${a} === ""`),r.if(o,(0,r1._)`${a} = ${(0,r1.stringify)(n)}`)}});var Ai=k(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.validateUnion=Wn.validateArray=Wn.usePattern=Wn.callValidateCode=Wn.schemaProperties=Wn.allSchemaProperties=Wn.noPropertyInData=Wn.propertyInData=Wn.isOwnProperty=Wn.hasPropFunc=Wn.reportMissingProp=Wn.checkMissingProp=Wn.checkReportMissingProp=void 0;var pr=st(),Im=Nt(),w2=Yl(),Poe=Nt();function Loe(t,e){let{gen:n,data:r,it:i}=t;n.if(Dm(n,r,e,i.opts.ownProperties),()=>{t.setParams({missingProperty:(0,pr._)`${e}`},!0),t.error()})}Wn.checkReportMissingProp=Loe;function Foe({gen:t,data:e,it:{opts:n}},r,i){return(0,pr.or)(...r.map(l=>(0,pr.and)(Dm(t,e,l,n.ownProperties),(0,pr._)`${i} = ${l}`)))}Wn.checkMissingProp=Foe;function joe(t,e){t.setParams({missingProperty:e},!0),t.error()}Wn.reportMissingProp=joe;function SR(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,pr._)`Object.prototype.hasOwnProperty`})}Wn.hasPropFunc=SR;function km(t,e,n){return(0,pr._)`${SR(t)}.call(${e}, ${n})`}Wn.isOwnProperty=km;function Uoe(t,e,n,r){let i=(0,pr._)`${e}${(0,pr.getProperty)(n)} !== undefined`;return r?(0,pr._)`${i} && ${km(t,e,n)}`:i}Wn.propertyInData=Uoe;function Dm(t,e,n,r){let i=(0,pr._)`${e}${(0,pr.getProperty)(n)} === undefined`;return r?(0,pr.or)(i,(0,pr.not)(km(t,e,n))):i}Wn.noPropertyInData=Dm;function TR(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Wn.allSchemaProperties=TR;function Moe(t,e){return TR(e).filter(n=>!(0,Im.alwaysValidSchema)(t,e[n]))}Wn.schemaProperties=Moe;function $oe({schemaCode:t,data:e,it:{gen:n,topSchemaRef:r,schemaPath:i,errorPath:l},it:s},a,o,u){let c=u?(0,pr._)`${t}, ${e}, ${r}${i}`:e,f=[[w2.default.instancePath,(0,pr.strConcat)(w2.default.instancePath,l)],[w2.default.parentData,s.parentData],[w2.default.parentDataProperty,s.parentDataProperty],[w2.default.rootData,w2.default.rootData]];s.opts.dynamicRef&&f.push([w2.default.dynamicAnchors,w2.default.dynamicAnchors]);let m=(0,pr._)`${c}, ${n.object(...f)}`;return o!==pr.nil?(0,pr._)`${a}.call(${o}, ${m})`:(0,pr._)`${a}(${m})`}Wn.callValidateCode=$oe;var Boe=(0,pr._)`new RegExp`;function Hoe({gen:t,it:{opts:e}},n){let r=e.unicodeRegExp?"u":"",{regExp:i}=e.code,l=i(n,r);return t.scopeValue("pattern",{key:l.toString(),ref:l,code:(0,pr._)`${i.code==="new RegExp"?Boe:(0,Poe.useFunc)(t,i)}(${n}, ${r})`})}Wn.usePattern=Hoe;function Voe(t){let{gen:e,data:n,keyword:r,it:i}=t,l=e.name("valid");if(i.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(l,!0),s(()=>e.break()),l;function s(a){let o=e.const("len",(0,pr._)`${n}.length`);e.forRange("i",0,o,u=>{t.subschema({keyword:r,dataProp:u,dataPropType:Im.Type.Num},l),e.if((0,pr.not)(l),a)})}}Wn.validateArray=Voe;function qoe(t){let{gen:e,schema:n,keyword:r,it:i}=t;if(! Line truncated
missingProperty: ${r},
`),Se=ise.bind(null,{[BC]:"",[HC]:s,[qC]:Q,[VC]:im,[sm]:U,[zC]:F}),se="";f!==null&&(m===void 0?se=Se(f):se=Se(Object.assign({},f,{name:m})));let ee=a instanceof Function?a:a?WC:Ase,me=ee().indexOf(":")+1;if(E&&!y)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(S&&typeof S!="function")throw Error(`Unknown mixin type "${typeof S}" - expected "function"`);if(R&&typeof R!="string")throw Error(`Unknown msgPrefix type "${typeof R}" - expected "string"`);Qie(d,y,E);let P=XC(y,E);tse(_);let G=ese(_);return Object.assign(e,{levels:P,[Ese]:G,[bse]:E,[fse]:l,[cse]:ee,[pse]:me,[VC]:im,[sm]:U,[qC]:Q,[hse]:ce,[mse]:W,[yse]:u,[gse]:o,[vse]:c,[Sse]:c?`,${JSON.stringify(c)}:{`:"",[HC]:s,[_se]:S,[Tse]:w,[BC]:se,[zC]:F,[wse]:v,silent:ase,onChild:N,[xse]:R}),Object.setPrototypeOf(e,Wie()),Zie(e),e[dse](d),e}W3.exports=am;W3.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=$C(t.dest||process.stdout.fd),MC(t)):MC({dest:$C(t),minLength:0});W3.exports.transport=Vh();W3.exports.multistream=UC();W3.exports.levels=XC();W3.exports.stdSerializers=kse;W3.exports.stdTimeFunctions=Object.assign({},JC);W3.exports.symbols=KC;W3.exports.version=use;W3.exports.default=am;W3.exports.pino=am});var d1=k((gCe,nR)=>{"use strict";var Dse=BO(),xc=YC(),{serializersSym:QC}=xc.symbols,{FST_ERR_LOG_INVALID_DESTINATION:Pse,FST_ERR_LOG_INVALID_LOGGER:Lse}=M2();function ZC(t){if(t.stream&&t.file)throw new Pse;t.file&&(t.stream=xc.destination(t.file),delete t.file);let e=t.logger,n=t.genReqId,l=null;return e?(t.logger=void 0,t.genReqId=void 0,e[QC]&&(t.serializers=Object.assign({},t.serializers,e[QC])),l=e.child({},t),t.logger=e,t.genReqId=n):l=xc(t,t.stream),l}var um={req:function(e){return{method:e.method,url:e.url,version:e.headers&&e.headers["accept-version"],hostname:e.hostname,remoteAddress:e.ip,remotePort:e.socket?e.socket.remotePort:void 0}},err:xc.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function Fse(){let t=process.hrtime();return t[0]*1e3+t[1]/1e6}function jse(t){if(!t.logger){let l=Dse;return l.child=()=>l,{logger:l,hasLogger:!1}}if(eR(t.logger))return{logger:ZC({logger:t.logger,serializers:Object.assign({},um,t.logger.serializers)}),hasLogger:!0};let e={};return Object.prototype.toString.call(t.logger)==="[object Object]"&&Reflect.ownKeys(t.logger).forEach(l=>{Object.defineProperty(e,l,{value:t.logger[l],writable:!0,enumerable:!0,configurable:!0})}),e.level=e.level||"info",e.serializers=Object.assign({},um,e.serializers),t.logger=e,{logger:ZC(t.logger),hasLogger:!0}}function eR(t,e){let n=["info","error","debug","fatal","warn","trace","child"],l=t?n.filter(r=>!t[r]||typeof t[r]!="function"):n;if(l.length){if(l.length===n.length&&!e)return!1;throw Lse(l.join(","))}else return!0}function Use(t,e,n,l,r){let i={[t.requestIdLogLabel]:l},s=t.childLoggerFactory.call(t.server,e,i,r||{},n);return t.childLoggerFactory!==tR&&eR(s,!0),s}function tR(t,e,n){return t.child(e,n)}nR.exports={createLogger:jse,createChildLogger:Use,defaultChildLoggerFactory:tR,serializers:um,now:Fse}});var h1=k((vCe,lR)=>{"use strict";lR.exports=Mse;function Zo(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function Mse(t){if(t=t||{},t.circles)return $se(t);return t.proto?l:n;function e(r,i){for(var s=Object.keys(r),a=new Array(s.length),u=0;u<s.length;u++){var o=s[u],c=r[o];typeof c!="object"||c===null?a[o]=c:c instanceof Date?a[o]=new Date(c):ArrayBuffer.isView(c)?a[o]=Zo(c):a[o]=i(c)}return a}function n(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return e(r,n);if(r instanceof Map)return new Map(e(Array.from(r),n));if(r instanceof Set)return new Set(e(Array.from(r),n));var i={};for(var s in r)if(Object.hasOwnProperty.call(r,s)!==!1){var a=r[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),n)):a instanceof Set?i[s]=new Set(e(Array.from(a),n)):ArrayBuffer.isView(a)?i[s]=Zo(a):i[s]=n(a)}return i}function l(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return e(r,l);if(r instanceof Map)return new Map(e(Array.from(r),l));if(r instanceof Set)return new Set(e(Array.from(r),l));var i={};for(var s in r){var a=r[s];typeof a!="object"||a===null?i[s]=a:a instanceof Date?i[s]=new Date(a):a instanceof Map?i[s]=new Map(e(Array.from(a),l)):a instanceof Set?i[s]=new Set(e(Array.from(a),l)):ArrayBuffer.isView(a)?i[s]=Zo(a):i[s]=l(a)}return i}}function $se(t){var e=[],n=[];return t.proto?i:r;function l(s,a){for(var u=Object.keys(s),o=new Array(u.length),c=0;c<u.length;c++){var f=u[c],m=s[f];if(typeof m!="object"||m===null)o[f]=m;else if(m instanceof Date)o[f]=new Date(m);else if(ArrayBuffer.isView(m))o[f]=Zo(m);else{var d=e.indexOf(m);d!==-1?o[f]=n[d]:o[f]=a(m)}}return o}function r(s){if(typeof s!="object"||s===null)return s;if(s instanceof Date)return new Date(s);if(Array.isAr Line truncated
`:""},this._extScope=e,this._scope=new Er.Scope({parent:e}),this._nodes=[new Sm]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,n){let l=this._extScope.value(e,n);return(this._values[l.prefix]||(this._values[l.prefix]=new Set)).add(l),l}getScopeValue(e,n){return this._extScope.getValue(e,n)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,n,l,r){let i=this._scope.toName(n);return l!==void 0&&r&&(this._constants[i.str]=l),this._leafNode(new gm(e,i,l)),i}const(e,n,l){return this._def(Er.varKinds.const,e,n,l)}let(e,n,l){return this._def(Er.varKinds.let,e,n,l)}var(e,n,l){return this._def(Er.varKinds.var,e,n,l)}assign(e,n,l){return this._leafNode(new Rc(e,n,l))}add(e,n){return this._leafNode(new vm(e,It.operators.ADD,n))}code(e){return typeof e=="function"?e():e!==Wt.nil&&this._leafNode(new wm(e)),this}object(...e){let n=["{"];for(let[l,r]of e)n.length>1&&n.push(","),n.push(l),(l!==r||this.opts.es5)&&(n.push(":"),(0,Wt.addCodeArg)(n,r));return n.push("}"),new Wt._Code(n)}if(e,n,l){if(this._blockNode(new Su(e)),n&&l)this.code(n).else().code(l).endIf();else if(n)this.code(n).endIf();else if(l)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Su(e))}else(){return this._elseNode(new t0)}endIf(){return this._endBlockNode(Su,t0)}_for(e,n){return this._blockNode(e),n&&this.code(n).endFor(),this}for(e,n){return this._for(new Tm(e),n)}forRange(e,n,l,r,i=this.opts.es5?Er.varKinds.var:Er.varKinds.let){let s=this._scope.toName(e);return this._for(new xm(i,s,n,l),()=>r(s))}forOf(e,n,l,r=Er.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=n instanceof Wt.Name?n:this.var("_arr",n);return this.forRange("_i",0,(0,Wt._)`${s}.length`,a=>{this.var(i,(0,Wt._)`${s}[${a}]`),l(i)})}return this._for(new Ic("of",r,i,n),()=>l(i))}forIn(e,n,l,r=this.opts.es5?Er.varKinds.var:Er.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Wt._)`Object.keys(${n})`,l);let i=this._scope.toName(e);return this._for(new Ic("in",r,i,n),()=>l(i))}endFor(){return this._endBlockNode(Tu)}label(e){return this._leafNode(new _m(e))}break(e){return this._leafNode(new Em(e))}return(e){let n=new E1;if(this._blockNode(n),this.code(e),n.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E1)}try(e,n,l){if(!n&&!l)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Am;if(this._blockNode(r),this.code(e),n){let i=this.name("e");this._currNode=r.catch=new b1(i),n(i)}return l&&(this._currNode=r.finally=new w1,this.code(l)),this._endBlockNode(b1,w1)}throw(e){return this._leafNode(new bm(e))}block(e,n){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(n),this}endBlock(e){let n=this._blockStarts.pop();if(n===void 0)throw new Error("CodeGen: not in self-balancing block");let l=this._nodes.length-n;if(l<0||e!==void 0&&l!==e)throw new Error(`CodeGen: wrong number of nodes: ${l} vs ${e} expected`);return this._nodes.length=n,this}func(e,n=Wt.nil,l,r){return this._blockNode(new _1(e,n,l)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(_1)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,n){let l=this._currNode;if(l instanceof e||n&&l instanceof n)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${n?`${e.kind}/${n.kind}`:e.kind}"`)}_elseNode(e){let n=this._currNode;if(!(n instanceof Su))throw new Error('CodeGen: "else" without "if"');return this._currNode=n.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let n=this._nodes;n[n.length-1]=e}};It.CodeGen=Om;function xu(t,e){for(let n in e)t[n]=(t[n]||0)+(e[n]||0);return t}function kc(t,e){return e instanceof Wt._CodeOrName?xu(t,e.names):t}function n0(t,e,n){if(t instanceof Wt.Name)return l(t);if(!r(t))return t;return new Wt._Code(t._items.reduce((i,s)=>(s instanceof Wt.Name&&(s=l(s)),s instanceof Wt._Code?i.push(...s._items):i.push(s),i),[]));function l(i){let s=n[i.str];return s===void 0||e[i.str]!==1?i:(delete e[i.str],s)}function r(i){return i instanceof Wt._Code&&i._items.some(s=>s instanceof Wt.Name&&e[s.str]===1&&n[s.str]!==void 0)}}function sae(t,e){for(let n in e)t[n]=(t[n]||0)-(e[n]||0)}function fR(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,Wt._)`!${Nm(t)}`}It.not=fR;var aae=dR(It.operators.AND);function uae(...t){return t.reduce(aae)}It.and=uae;var oae=dR(It.operators.OR);function cae(...t){return t.reduce(oae)}It.or=cae;function dR(t){return(e,n)=>e===Wt.nil?n:n===Wt.nil?e:(0,Wt._)`${Nm(e)} ${t} ${Nm(n)}`}function Nm(t){return t instanceof Wt.Name?t:(0, Line truncated
|| (${s} == "string" && ${r} && ${r} == +${r})`).assign(a,(0,Ot._)`+${r}`);return;case"integer":l.elseIf((0,Ot._)`${s} === "boolean" || ${r} === null
|| (${s} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(a,(0,Ot._)`+${r}`);return;case"boolean":l.elseIf((0,Ot._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(a,!1).elseIf((0,Ot._)`${r} === "true" || ${r} === 1`).assign(a,!0);return;case"null":l.elseIf((0,Ot._)`${r} === "" || ${r} === 0 || ${r} === false`),l.assign(a,null);return;case"array":l.elseIf((0,Ot._)`${s} === "string" || ${s} === "number"
|| ${s} === "boolean" || ${r} === null`).assign(a,(0,Ot._)`[${r}]`)}}}function Kae({gen:t,parentData:e,parentDataProperty:n},l){t.if((0,Ot._)`${e} !== undefined`,()=>t.assign((0,Ot._)`${e}[${n}]`,l))}function Pm(t,e,n,l=T1.Correct){let r=l===T1.Correct?Ot.operators.EQ:Ot.operators.NEQ,i;switch(t){case"null":return(0,Ot._)`${e} ${r} null`;case"array":i=(0,Ot._)`Array.isArray(${e})`;break;case"object":i=(0,Ot._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":i=s((0,Ot._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":i=s();break;default:return(0,Ot._)`typeof ${e} ${r} ${t}`}return l===T1.Correct?i:(0,Ot.not)(i);function s(a=Ot.nil){return(0,Ot.and)((0,Ot._)`typeof ${e} == "number"`,a,n?(0,Ot._)`isFinite(${e})`:Ot.nil)}}A2.checkDataType=Pm;function Lm(t,e,n,l){if(t.length===1)return Pm(t[0],e,n,l);let r,i=(0,CR.toHash)(t);if(i.array&&i.object){let s=(0,Ot._)`typeof ${e} != "object"`;r=i.null?s:(0,Ot._)`!${e} || ${s}`,delete i.null,delete i.array,delete i.object}else r=Ot.nil;i.number&&delete i.integer;for(let s in i)r=(0,Ot.and)(r,Pm(s,e,n,l));return r}A2.checkDataTypes=Lm;var Xae={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,Ot._)`{type: ${t}}`:(0,Ot._)`{type: ${e}}`};function Fm(t){let e=Wae(t);(0,Vae.reportError)(e,Xae)}A2.reportTypeError=Fm;function Wae(t){let{gen:e,data:n,schema:l}=t,r=(0,CR.schemaRefOrVal)(t,l,"type");return{gen:e,keyword:"type",data:n,schema:l.type,schemaCode:r,schemaValue:r,parentSchema:l,params:{},it:t}}});var DR=k(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.assignDefaults=void 0;var i0=st(),Yae=Nt();function Qae(t,e){let{properties:n,items:l}=t.schema;if(e==="object"&&n)for(let r in n)kR(t,r,n[r].default);else e==="array"&&Array.isArray(l)&&l.forEach((r,i)=>kR(t,i,r.default))}Lc.assignDefaults=Qae;function kR(t,e,n){let{gen:l,compositeRule:r,data:i,opts:s}=t;if(n===void 0)return;let a=(0,i0._)`${i}${(0,i0.getProperty)(e)}`;if(r){(0,Yae.checkStrictMode)(t,`default is ignored for: ${a}`);return}let u=(0,i0._)`${a} === undefined`;s.useDefaults==="empty"&&(u=(0,i0._)`${u} || ${a} === null || ${a} === ""`),l.if(u,(0,i0._)`${a} = ${(0,i0.stringify)(n)}`)}});var O2=k(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.validateUnion=Yn.validateArray=Yn.usePattern=Yn.callValidateCode=Yn.schemaProperties=Yn.allSchemaProperties=Yn.noPropertyInData=Yn.propertyInData=Yn.isOwnProperty=Yn.hasPropFunc=Yn.reportMissingProp=Yn.checkMissingProp=Yn.checkReportMissingProp=void 0;var fl=st(),jm=Nt(),bs=Q3(),Zae=Nt();function eue(t,e){let{gen:n,data:l,it:r}=t;n.if(Mm(n,l,e,r.opts.ownProperties),()=>{t.setParams({missingProperty:(0,fl._)`${e}`},!0),t.error()})}Yn.checkReportMissingProp=eue;function tue({gen:t,data:e,it:{opts:n}},l,r){return(0,fl.or)(...l.map(i=>(0,fl.and)(Mm(t,e,i,n.ownProperties),(0,fl._)`${r} = ${i}`)))}Yn.checkMissingProp=tue;function nue(t,e){t.setParams({missingProperty:e},!0),t.error()}Yn.reportMissingProp=nue;function PR(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,fl._)`Object.prototype.hasOwnProperty`})}Yn.hasPropFunc=PR;function Um(t,e,n){return(0,fl._)`${PR(t)}.call(${e}, ${n})`}Yn.isOwnProperty=Um;function lue(t,e,n,l){let r=(0,fl._)`${e}${(0,fl.getProperty)(n)} !== undefined`;return l?(0,fl._)`${r} && ${Um(t,e,n)}`:r}Yn.propertyInData=lue;function Mm(t,e,n,l){let r=(0,fl._)`${e}${(0,fl.getProperty)(n)} === undefined`;return l?(0,fl.or)(r,(0,fl.not)(Um(t,e,n))):r}Yn.noPropertyInData=Mm;function LR(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}Yn.allSchemaProperties=LR;function rue(t,e){return LR(e).filter(n=>!(0,jm.alwaysValidSchema)(t,e[n]))}Yn.schemaProperties=rue;function iue({schemaCode:t,data:e,it:{gen:n,topSchemaRef:l,schemaPath:r,errorPath:i},it:s},a,u,o){let c=o?(0,fl._)`${t}, ${e}, ${l}${r}`:e,f=[[bs.default.instancePath,(0,fl.strConcat)(bs.default.instancePath,i)],[bs.default.parentData,s.parentData],[bs.default.parentDataProperty,s.parentDataProperty],[bs.default.rootData,bs.default.rootData]];s.opts.dynamicRef&&f.push([bs.default.dynamicAnchors,bs.default.dynamicAnchors]);let m=(0,fl._)`${c}, ${n.object(...f)}`;return u!==fl.nil?(0,fl._)`${a}.call(${u}, ${m})`:(0,fl._)`${a}(${m})`}Yn.callValidateCode=iue;var sue=(0,fl._)`new RegExp`;function aue({gen:t,it:{opts:e}},n){let l=e.unicodeRegExp?"u":"",{regExp:r}=e.code,i=r(n,l);return t.scopeValue("pattern",{key:i.toString(),ref:i,code:(0,fl._)`${r.code==="new RegExp"?sue:(0,Zae.useFunc)(t,r)}(${n}, ${l})`})}Yn.usePattern=aue;function uue(t){let{gen:e,data:n,keyword:l,it:r}=t,i=e.name("valid");if(r.allErrors){let a=e.let("valid",!0);return s(()=>e.assign(a,!1)),a}return e.var(i,!0),s(()=>e.break()),i;function s(a){let u=e.const("len",(0,fl._)`${n}.length`);e.forRange("i",0,u,o=>{t.subschema({keyword:l,dataProp:o,dataPropType:jm.Type.Num},i),e.if((0,fl.not)(i),a)})}}Yn.validateArray=uue;function oue(t){let{gen:e,schema:n,keyword:l,it:r}=t;if(! Line truncated
missingProperty: ${l},
depsCount: ${e},
deps: ${n}}`};var v1e={keyword:"dependencies",type:"object",schemaType:"object",error:Qs.error,code(t){let[e,n]=_1e(t);FI(t,e),jI(t,n)}};function _1e({schema:t}){let e={},n={};for(let r in t){if(r==="__proto__")continue;let i=Array.isArray(t[r])?e:n;i[r]=t[r]}return[e,n]}function FI(t,e=t.schema){let{gen:n,data:r,it:i}=t;if(Object.keys(e).length===0)return;let l=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let o=(0,M4.propertyInData)(n,r,s,i.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),i.allErrors?n.if(o,()=>{for(let u of a)(0,M4.checkReportMissingProp)(t,u)}):(n.if((0,_y._)`${o} && (${(0,M4.checkMissingProp)(t,a,l)})`),(0,M4.reportMissingProp)(t,l),n.else())}}Qs.validatePropertyDeps=FI;function jI(t,e=t.schema){let{gen:n,data:r,keyword:i,it:l}=t,s=n.name("valid");for(let a in e)(0,g1e.alwaysValidSchema)(l,e[a])||(n.if((0,M4.propertyInData)(n,r,a,l.opts.ownProperties),()=>{let o=t.subschema({keyword:i,schemaProp:a},s);t.mergeValidEvaluated(o,s)},()=>n.var(s,!0)),t.ok(s))}Qs.validateSchemaDeps=jI;Qs.default=v1e});var $I=k(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});var MI=st(),E1e=Nt(),b1e={message:"property name must be valid",params:({params:t})=>(0,MI._)`{propertyName: ${t.propertyName}}`},w1e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:b1e,code(t){let{gen:e,schema:n,data:r,it:i}=t;if((0,E1e.alwaysValidSchema)(i,n))return;let l=e.name("valid");e.forIn("key",r,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},l),e.if((0,MI.not)(l),()=>{t.error(!0),i.allErrors||e.break()})}),t.ok(l)}};Ey.default=w1e});var wy=k(by=>{"use strict";Object.defineProperty(by,"__esModule",{value:!0});var G8=Ai(),ws=st(),S1e=Yl(),J8=Nt(),T1e={message:"must NOT have additional properties",params:({params:t})=>(0,ws._)`{additionalProperty: ${t.additionalProperty}}`},x1e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:T1e,code(t){let{gen:e,schema:n,parentSchema:r,data:i,errsCount:l,it:s}=t;if(!l)throw new Error("ajv implementation error");let{allErrors:a,opts:o}=s;if(s.props=!0,o.removeAdditional!=="all"&&(0,J8.alwaysValidSchema)(s,n))return;let u=(0,G8.allSchemaProperties)(r.properties),c=(0,G8.allSchemaProperties)(r.patternProperties);f(),t.ok((0,ws._)`${l} === ${S1e.default.errors}`);function f(){e.forIn("key",i,S=>{!u.length&&!c.length?y(S):e.if(m(S),()=>y(S))})}function m(S){let w;if(u.length>8){let E=(0,J8.schemaRefOrVal)(s,r.properties,"properties");w=(0,G8.isOwnProperty)(e,E,S)}else u.length?w=(0,ws.or)(...u.map(E=>(0,ws._)`${S} === ${E}`)):w=ws.nil;return c.length&&(w=(0,ws.or)(w,...c.map(E=>(0,ws._)`${(0,G8.usePattern)(t,E)}.test(${S})`))),(0,ws.not)(w)}function d(S){e.code((0,ws._)`delete ${i}[${S}]`)}function y(S){if(o.removeAdditional==="all"||o.removeAdditional&&n===!1){d(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,J8.alwaysValidSchema)(s,n)){let w=e.name("valid");o.removeAdditional==="failing"?(_(S,w,!1),e.if((0,ws.not)(w),()=>{t.reset(),d(S)})):(_(S,w),a||e.if((0,ws.not)(w),()=>e.break()))}}function _(S,w,E){let g={keyword:"additionalProperties",dataProp:S,dataPropType:J8.Type.Str};E===!1&&Object.assign(g,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(g,w)}}};by.default=x1e});var VI=k(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});var A1e=s1(),BI=Ai(),Sy=Nt(),HI=wy(),O1e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:r,data:i,it:l}=t;l.opts.removeAdditional==="all"&&r.additionalProperties===void 0&&HI.default.code(new A1e.KeywordCxt(l,HI.default,"additionalProperties"));let s=(0,BI.allSchemaProperties)(n);for(let f of s)l.definedProperties.add(f);l.opts.unevaluated&&s.length&&l.props!==!0&&(l.props=Sy.mergeEvaluated.props(e,(0,Sy.toHash)(s),l.props));let a=s.filter(f=>!(0,Sy.alwaysValidSchema)(l,n[f]));if(a.length===0)return;let o=e.name("valid");for(let f of a)u(f)?c(f):(e.if((0,BI.propertyInData)(e,i,f,l.opts.ownProperties)),c(f),l.allErrors||e.else().var(o,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(o);function u(f){return l.opts.useDefaults&&!l.compositeRule&&n[f].default!==void 0}function c(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},o)}}};Ty.default=O1e});var JI=k(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});var qI=Ai(),K8=st(),zI=Nt(),GI=Nt(),N1e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:r,parentSchema:i,it:l}=t,{opts:s}=l,a=(0,qI.allSchemaProperties)(n),o=a.filter(_=>(0,zI.alwaysValidSchema)(l,n[_]));if(a.length===0||o.length===a.length&&(!l.opts.unevaluated||l.props===!0))return;let u=s.strictSchema&&!s.allowMatchingProperties&&i.properties,c=e.name("valid");l.props!==!0&&!(l.props instanc Line truncated
`,i+=`const validator = Validator.restoreFromState(validatorState)
`):i+=`const validator = null
deps: ${n}}`};var j0e={keyword:"dependencies",type:"object",schemaType:"object",error:Yr.error,code(t){let[e,n]=U0e(t);JI(t,e),KI(t,n)}};function U0e({schema:t}){let e={},n={};for(let l in t){if(l==="__proto__")continue;let r=Array.isArray(t[l])?e:n;r[l]=t[l]}return[e,n]}function JI(t,e=t.schema){let{gen:n,data:l,it:r}=t;if(Object.keys(e).length===0)return;let i=n.let("missing");for(let s in e){let a=e[s];if(a.length===0)continue;let u=(0,H1.propertyInData)(n,l,s,r.opts.ownProperties);t.setParams({property:s,depsCount:a.length,deps:a.join(", ")}),r.allErrors?n.if(u,()=>{for(let o of a)(0,H1.checkReportMissingProp)(t,o)}):(n.if((0,xy._)`${u} && (${(0,H1.checkMissingProp)(t,a,i)})`),(0,H1.reportMissingProp)(t,i),n.else())}}Yr.validatePropertyDeps=JI;function KI(t,e=t.schema){let{gen:n,data:l,keyword:r,it:i}=t,s=n.name("valid");for(let a in e)(0,F0e.alwaysValidSchema)(i,e[a])||(n.if((0,H1.propertyInData)(n,l,a,i.opts.ownProperties),()=>{let u=t.subschema({keyword:r,schemaProp:a},s);t.mergeValidEvaluated(u,s)},()=>n.var(s,!0)),t.ok(s))}Yr.validateSchemaDeps=KI;Yr.default=j0e});var YI=k(Ay=>{"use strict";Object.defineProperty(Ay,"__esModule",{value:!0});var WI=st(),M0e=Nt(),$0e={message:"property name must be valid",params:({params:t})=>(0,WI._)`{propertyName: ${t.propertyName}}`},B0e={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:$0e,code(t){let{gen:e,schema:n,data:l,it:r}=t;if((0,M0e.alwaysValidSchema)(r,n))return;let i=e.name("valid");e.forIn("key",l,s=>{t.setParams({propertyName:s}),t.subschema({keyword:"propertyNames",data:s,dataTypes:["string"],propertyName:s,compositeRule:!0},i),e.if((0,WI.not)(i),()=>{t.error(!0),r.allErrors||e.break()})}),t.ok(i)}};Ay.default=B0e});var Ny=k(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});var Xc=O2(),Sr=st(),H0e=Q3(),Wc=Nt(),V0e={message:"must NOT have additional properties",params:({params:t})=>(0,Sr._)`{additionalProperty: ${t.additionalProperty}}`},q0e={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:V0e,code(t){let{gen:e,schema:n,parentSchema:l,data:r,errsCount:i,it:s}=t;if(!i)throw new Error("ajv implementation error");let{allErrors:a,opts:u}=s;if(s.props=!0,u.removeAdditional!=="all"&&(0,Wc.alwaysValidSchema)(s,n))return;let o=(0,Xc.allSchemaProperties)(l.properties),c=(0,Xc.allSchemaProperties)(l.patternProperties);f(),t.ok((0,Sr._)`${i} === ${H0e.default.errors}`);function f(){e.forIn("key",r,S=>{!o.length&&!c.length?y(S):e.if(m(S),()=>y(S))})}function m(S){let w;if(o.length>8){let E=(0,Wc.schemaRefOrVal)(s,l.properties,"properties");w=(0,Xc.isOwnProperty)(e,E,S)}else o.length?w=(0,Sr.or)(...o.map(E=>(0,Sr._)`${S} === ${E}`)):w=Sr.nil;return c.length&&(w=(0,Sr.or)(w,...c.map(E=>(0,Sr._)`${(0,Xc.usePattern)(t,E)}.test(${S})`))),(0,Sr.not)(w)}function d(S){e.code((0,Sr._)`delete ${r}[${S}]`)}function y(S){if(u.removeAdditional==="all"||u.removeAdditional&&n===!1){d(S);return}if(n===!1){t.setParams({additionalProperty:S}),t.error(),a||e.break();return}if(typeof n=="object"&&!(0,Wc.alwaysValidSchema)(s,n)){let w=e.name("valid");u.removeAdditional==="failing"?(_(S,w,!1),e.if((0,Sr.not)(w),()=>{t.reset(),d(S)})):(_(S,w),a||e.if((0,Sr.not)(w),()=>e.break()))}}function _(S,w,E){let g={keyword:"additionalProperties",dataProp:S,dataPropType:Wc.Type.Str};E===!1&&Object.assign(g,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(g,w)}}};Oy.default=q0e});var ek=k(Ry=>{"use strict";Object.defineProperty(Ry,"__esModule",{value:!0});var z0e=u0(),QI=O2(),Cy=Nt(),ZI=Ny(),G0e={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,parentSchema:l,data:r,it:i}=t;i.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&ZI.default.code(new z0e.KeywordCxt(i,ZI.default,"additionalProperties"));let s=(0,QI.allSchemaProperties)(n);for(let f of s)i.definedProperties.add(f);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Cy.mergeEvaluated.props(e,(0,Cy.toHash)(s),i.props));let a=s.filter(f=>!(0,Cy.alwaysValidSchema)(i,n[f]));if(a.length===0)return;let u=e.name("valid");for(let f of a)o(f)?c(f):(e.if((0,QI.propertyInData)(e,r,f,i.opts.ownProperties)),c(f),i.allErrors||e.else().var(u,!0),e.endIf()),t.it.definedProperties.add(f),t.ok(u);function o(f){return i.opts.useDefaults&&!i.compositeRule&&n[f].default!==void 0}function c(f){t.subschema({keyword:"properties",schemaProp:f,dataProp:f},u)}}};Ry.default=G0e});var rk=k(Iy=>{"use strict";Object.defineProperty(Iy,"__esModule",{value:!0});var tk=O2(),Yc=st(),nk=Nt(),lk=Nt(),J0e={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:n,data:l,parentSchema:r,it:i}=t,{opts:s}=i,a=(0,tk.allSchemaProperties)(n),u=a.filter(_=>(0,nk.alwaysValidSchema)(i,n[_]));if(a.length===0||u.length===a.length&&(!i.opts.unevaluated||i.props===!0))return;let o=s.strictSchema&&!s.allowMatchingProperties&&r.properties,c=e.name("valid");i.props!==!0&&!(i.props instanc Line truncated
`,r+=`const validator = Validator.restoreFromState(validatorState)
`):r+=`const validator = null
`,`
'use strict'
const { dependencies } = require('fast-json-stringify/lib/standalone')
@@ -117,9 +117,9 @@ ${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";
const serializerState = ${JSON.stringify(n.getState())}
const serializer = Serializer.restoreFromState(serializerState)
${i}
${r}
module.exports = ${t.toString()}(validator, serializer)`}Qy.exports=x4e;Qy.exports.dependencies={Serializer:lm(),Validator:Yy()}});var Hk=k((dRe,Bk)=>{"use strict";var{dependencies:A4e}=Zy(),{Serializer:O4e,Validator:fRe}=A4e,N4e={mode:"standalone"},C4e=O4e.restoreFromState(N4e),R4e=null;Bk.exports=function(e,n){function r(l){let s=l&&typeof l.toJSON=="function"?l.toJSON():l;if(s===null)return"{}";let a=!1,o="{";return s.statusCode!==void 0&&(!a&&(a=!0)||(o+=","),o+='"statusCode":',o+=n.asNumber(s.statusCode)),s.code!==void 0&&(!a&&(a=!0)||(o+=","),o+='"code":',o+=n.asString(s.code)),s.error!==void 0&&(!a&&(a=!0)||(o+=","),o+='"error":',o+=n.asString(s.error)),s.message!==void 0&&(!a&&(a=!0)||(o+=","),o+='"message":',o+=n.asString(s.message)),o+"}"}return r}(R4e,C4e)});var V4=k((hRe,Gk)=>{"use strict";var Vk=require("node:http").STATUS_CODES,I4e=nh(),{kReplyHeaders:k3,kReplyNextErrorHandler:l9,kReplyIsRunningOnErrorHook:k4e,kReplyHasStatusCode:D4e,kRouteContext:zk}=di(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:P4e,FST_ERR_FAILED_ERROR_SERIALIZATION:L4e}=Ui(),{getSchemaSerializer:F4e}=f4(),eg=Hk(),j4e={func:M4e,toJSON(){return this.func.name.toString()+"()"}};function U4e(t,e,n){t[k4e]=!1;let r=t[zk];if(t[l9]===!1){qk(e,t,function(a,o){try{a.raw.writeHead(a.raw.statusCode,a[k3])}catch(u){a.log.warn({req:a.request,res:a,err:u},u&&u.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(o)});return}let i=t[l9]||r.errorHandler;t[l9]=Object.getPrototypeOf(i),delete t[k3]["content-type"],delete t[k3]["content-length"];let l=i.func;if(!l){t[l9]=!1,qk(e,t,n);return}let s=l(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?I4e(s,t):t.send(s))}function M4e(t,e,n){if(B4e(t,n),!n[D4e]||n.statusCode===200){let r=t.statusCode||t.status;n.code(r>=400?r:500)}n.statusCode<500?n.log.info({res:n,err:t},t&&t.message):n.log.error({req:e,res:n,err:t},t&&t.message),n.send(t)}function qk(t,e,n){let r=e.raw,i=e.statusCode;e[k3]["content-type"]=e[k3]["content-type"]??"application/json; charset=utf-8";let l;try{let s=F4e(e[zk],i,e[k3]["content-type"]);l=s===!1?eg({error:Vk[i+""],code:t.code,message:t.message,statusCode:i}):s(Object.create(t,{error:{value:Vk[i+""]},message:{value:t.message},statusCode:{value:i}}))}catch(s){e.log.error({err:s,statusCode:r.statusCode},"The serializer for the given status code failed"),e.code(500),l=eg(new L4e(s.message,t.message))}typeof l!="string"&&!Buffer.isBuffer(l)&&(l=eg(new P4e(typeof l))),e[k3]["content-length"]=""+Buffer.byteLength(l),n(e,l)}function $4e(t=j4e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function B4e(t,e){let n=e.raw,r=n.statusCode;r=r>=400?r:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?r=t.status:t.statusCode>=400&&(r=t.statusCode)),n.statusCode=r}Gk.exports={buildErrorHandler:$4e,handleError:U4e}});var p9=k((mRe,c9)=>{"use strict";var ig=require("node:stream").finished,H4e=require("node:stream").Readable,{kFourOhFourContext:Jk,kPublicRouteContext:Kk,kReplyErrorHandlerCalled:nD,kReplyHijacked:q4,kReplyStartTime:z4,kReplyEndTime:sg,kReplySerializer:Ha,kReplySerializerDefault:a9,kReplyIsError:o9,kReplyHeaders:ar,kReplyTrailers:hi,kReplyHasStatusCode:ag,kReplyIsRunningOnErrorHook:og,kReplyNextErrorHandler:V4e,kDisableRequestLogging:rD,kSchemaResponse:u9,kReplyCacheSerializeFns:C2,kSchemaController:tg,kOptions:q4e,kRouteContext:jt}=di(),{onSendHookRunner:iD,onResponseHookRunner:z4e,preHandlerHookRunner:G4e,preSerializationHookRunner:J4e}=m2(),Xk=sh()[Symbol.for("internals")],K4e=c4(),lg=K4e.now,{handleError:Wk}=V4(),{getSchemaSerializer:X4e}=f4(),ng={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:W4e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:Y4e,FST_ERR_REP_ALREADY_SENT:lD,FST_ERR_REP_SENT_VALUE:Q4e,FST_ERR_SEND_INSIDE_ONERR:Z4e,FST_ERR_BAD_STATUS_CODE:ece,FST_ERR_BAD_TRAILER_NAME:tce,FST_ERR_BAD_TRAILER_VALUE:nce,FST_ERR_MISSING_SERIALIZATION_FN:rce,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:ice}=Ui(),{FSTDEP010:lce,FSTDEP013:sce,FSTDEP019:ace,FSTDEP020:oce}=Fa(),sD=Object.prototype.toString;function nr(t,e,n){this.raw=t,this[Ha]=null,this[nD]=!1,this[o9]=!1,this[og]=!1,this.request=e,this[ar]={},this[hi]=null,this[ag]=!1,this[z4]=void 0,this.log=n}nr.props=[];Object.defineProperties(nr.prototype,{[jt]:{get(){return this.request[jt]}},context:{get(){return ace(),this.request[jt]}},elapsedTime:{get(){return this[z4]===void 0?0:(this[sg]||lg())-this[z4]}},server:{get(){return this.request[jt].server}},sent:{enumerable:!0,get(){return(this[q4]||this.raw.writableEnded)===!0},set(t){if(lce(),t!==!0)throw new Q4e;if(this.sent&&this[q4])throw new lD(this.request.url,this.request.method);this[q4]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[Kk]:{get(){return this.request[Kk]}}});nr.prototype.hijack=function(){return this[q4]=!0,this};nr.prototype.send=function(t){if(this[og]===!0)throw new Z4e;if(this.sent)return this.log.warn Line truncated
module.exports = ${t.toString()}(validator, serializer)`}rg.exports=q1e;rg.exports.dependencies={Serializer:pm(),Validator:lg()}});var Zk=k(($Re,Qk)=>{"use strict";var{dependencies:z1e}=ig(),{Serializer:G1e,Validator:MRe}=z1e,J1e={mode:"standalone"},K1e=G1e.restoreFromState(J1e),X1e=null;Qk.exports=function(e,n){function l(i){let s=i&&typeof i.toJSON=="function"?i.toJSON():i;if(s===null)return"{}";let a=!1,u="{";return s.statusCode!==void 0&&(!a&&(a=!0)||(u+=","),u+='"statusCode":',u+=n.asNumber(s.statusCode)),s.code!==void 0&&(!a&&(a=!0)||(u+=","),u+='"code":',u+=n.asString(s.code)),s.error!==void 0&&(!a&&(a=!0)||(u+=","),u+='"error":',u+=n.asString(s.error)),s.message!==void 0&&(!a&&(a=!0)||(u+=","),u+='"message":',u+=n.asString(s.message)),u+"}"}return l}(X1e,K1e)});var G1=k((BRe,lD)=>{"use strict";var eD=require("node:http").STATUS_CODES,W1e=uh(),{kReplyHeaders:Du,kReplyNextErrorHandler:u9,kReplyIsRunningOnErrorHook:Y1e,kReplyHasStatusCode:Q1e,kRouteContext:nD}=h2(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:Z1e,FST_ERR_FAILED_ERROR_SERIALIZATION:e5e}=M2(),{getSchemaSerializer:t5e}=m1(),sg=Zk(),n5e={func:r5e,toJSON(){return this.func.name.toString()+"()"}};function l5e(t,e,n){t[Y1e]=!1;let l=t[nD];if(t[u9]===!1){tD(e,t,function(a,u){try{a.raw.writeHead(a.raw.statusCode,a[Du])}catch(o){a.log.warn({req:a.request,res:a,err:o},o&&o.message),a.raw.writeHead(a.raw.statusCode)}a.raw.end(u)});return}let r=t[u9]||l.errorHandler;t[u9]=Object.getPrototypeOf(r),delete t[Du]["content-type"],delete t[Du]["content-length"];let i=r.func;if(!i){t[u9]=!1,tD(e,t,n);return}let s=i(e,t.request,t);s!==void 0&&(s!==null&&typeof s.then=="function"?W1e(s,t):t.send(s))}function r5e(t,e,n){if(s5e(t,n),!n[Q1e]||n.statusCode===200){let l=t.statusCode||t.status;n.code(l>=400?l:500)}n.statusCode<500?n.log.info({res:n,err:t},t&&t.message):n.log.error({req:e,res:n,err:t},t&&t.message),n.send(t)}function tD(t,e,n){let l=e.raw,r=e.statusCode;e[Du]["content-type"]=e[Du]["content-type"]??"application/json; charset=utf-8";let i;try{let s=t5e(e[nD],r,e[Du]["content-type"]);i=s===!1?sg({error:eD[r+""],code:t.code,message:t.message,statusCode:r}):s(Object.create(t,{error:{value:eD[r+""]},message:{value:t.message},statusCode:{value:r}}))}catch(s){e.log.error({err:s,statusCode:l.statusCode},"The serializer for the given status code failed"),e.code(500),i=sg(new e5e(s.message,t.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=sg(new Z1e(typeof i))),e[Du]["content-length"]=""+Buffer.byteLength(i),n(e,i)}function i5e(t=n5e,e){if(!e)return t;let n=Object.create(t);return n.func=e,n}function s5e(t,e){let n=e.raw,l=n.statusCode;l=l>=400?l:500,t!=null&&(t.headers!==void 0&&e.headers(t.headers),t.status>=400?l=t.status:t.statusCode>=400&&(l=t.statusCode)),n.statusCode=l}lD.exports={buildErrorHandler:i5e,handleError:l5e}});var h9=k((HRe,d9)=>{"use strict";var cg=require("node:stream").finished,a5e=require("node:stream").Readable,{kFourOhFourContext:rD,kPublicRouteContext:iD,kReplyErrorHandlerCalled:dD,kReplyHijacked:J1,kReplyStartTime:K1,kReplyEndTime:fg,kReplySerializer:Bi,kReplySerializerDefault:c9,kReplyIsError:p9,kReplyHeaders:ul,kReplyTrailers:m2,kReplyHasStatusCode:dg,kReplyIsRunningOnErrorHook:hg,kReplyNextErrorHandler:u5e,kDisableRequestLogging:hD,kSchemaResponse:f9,kReplyCacheSerializeFns:Ns,kSchemaController:ag,kOptions:o5e,kRouteContext:jt}=h2(),{onSendHookRunner:mD,onResponseHookRunner:c5e,preHandlerHookRunner:p5e,preSerializationHookRunner:f5e}=hs(),sD=fh()[Symbol.for("internals")],d5e=d1(),pg=d5e.now,{handleError:aD}=G1(),{getSchemaSerializer:h5e}=m1(),ug={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:m5e,FST_ERR_REP_RESPONSE_BODY_CONSUMED:y5e,FST_ERR_REP_ALREADY_SENT:yD,FST_ERR_REP_SENT_VALUE:g5e,FST_ERR_SEND_INSIDE_ONERR:v5e,FST_ERR_BAD_STATUS_CODE:_5e,FST_ERR_BAD_TRAILER_NAME:E5e,FST_ERR_BAD_TRAILER_VALUE:b5e,FST_ERR_MISSING_SERIALIZATION_FN:w5e,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:S5e}=M2(),{FSTDEP010:T5e,FSTDEP013:x5e,FSTDEP019:A5e,FSTDEP020:O5e}=Li(),gD=Object.prototype.toString;function ll(t,e,n){this.raw=t,this[Bi]=null,this[dD]=!1,this[p9]=!1,this[hg]=!1,this.request=e,this[ul]={},this[m2]=null,this[dg]=!1,this[K1]=void 0,this.log=n}ll.props=[];Object.defineProperties(ll.prototype,{[jt]:{get(){return this.request[jt]}},context:{get(){return A5e(),this.request[jt]}},elapsedTime:{get(){return this[K1]===void 0?0:(this[fg]||pg())-this[K1]}},server:{get(){return this.request[jt].server}},sent:{enumerable:!0,get(){return(this[J1]||this.raw.writableEnded)===!0},set(t){if(T5e(),t!==!0)throw new g5e;if(this.sent&&this[J1])throw new yD(this.request.url,this.request.method);this[J1]=!0}},statusCode:{get(){return this.raw.statusCode},set(t){this.code(t)}},[iD]:{get(){return this.request[iD]}}});ll.prototype.hijack=function(){return this[J1]=!0,this};ll.prototype.send=function(t){if(this[hg]===!0)throw new v5e;if(this.sent)return this.log.warn Line truncated
${n.functions.join(`
`)}
const main = anonymous0
@@ -127,16 +127,16 @@ ${w}`),y.pop(),`{${x}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";
`:s=`
function main (input) {
let json = ''
${l}
${i}
return json
}
${n.functions.join(`
`)}
return main
`;let a=new G9e(e),o=new J9e(e.ajv);for(let c of n.validatorSchemasIds){let f=n.refResolver.getSchema(c);o.addSchema(f,c);let m=n.refResolver.getSchemaDependencies(c);for(let[d,y]of Object.entries(m))o.addSchema(y,d)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:o,serializer:a,code:`validator
`;let a=new p7e(e),u=new f7e(e.ajv);for(let c of n.validatorSchemasIds){let f=n.refResolver.getSchema(c);u.addSchema(f,c);let m=n.refResolver.getSchemaDependencies(c);for(let[d,y]of Object.entries(m))u.addSchema(y,d)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:u,serializer:a,code:`validator
serializer
${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode==="standalone"?Zy()(u,n,a,o):u(o,a)}var W9e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],Y9e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],Q9e=["maxLength","minLength","pattern"],Z9e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function pF(t){for(var e of W9e)if(e in t)return"object";for(var e of Y9e)if(e in t)return"array";for(var e of Q9e)if(e in t)return"string";for(var e of Z9e)if(e in t)return"number";return t.type}function e7e(t,e){let n=e.schema,r=Object.keys(n.properties||{}),i=`
const propertiesKeys = ${JSON.stringify(r)}
${s}`,ajv:u.ajv};let o=new Function("validator","serializer",s);return e.mode==="standalone"?ig()(o,n,a,u):o(u,a)}var m7e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],y7e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],g7e=["maxLength","minLength","pattern"],v7e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function wF(t){for(var e of m7e)if(e in t)return"object";for(var e of y7e)if(e in t)return"array";for(var e of g7e)if(e in t)return"string";for(var e of v7e)if(e in t)return"number";return t.type}function _7e(t,e){let n=e.schema,l=Object.keys(n.properties||{}),r=`
const propertiesKeys = ${JSON.stringify(l)}
for (const [key, value] of Object.entries(obj)) {
if (
propertiesKeys.includes(key) ||
@@ -144,106 +144,106 @@ ${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode===
typeof value === 'function' ||
typeof value === 'symbol'
) continue
`,l=e.getPropertyLocation("patternProperties"),s=l.schema;if(s!==void 0)for(let u in s){let c=l.getPropertyLocation(u);i+=`
if (/${u.replace(/\\*\//g,"\\/")}/.test(key)) {
${w1}
`,i=e.getPropertyLocation("patternProperties"),s=i.schema;if(s!==void 0)for(let o in s){let c=i.getPropertyLocation(o);r+=`
if (/${o.replace(/\\*\//g,"\\/")}/.test(key)) {
${T0}
json += serializer.asString(key) + ':'
${na(t,c,"value")}
${ti(t,c,"value")}
continue
}
`}let o=e.getPropertyLocation("additionalProperties").schema;if(o!==void 0)if(o===!0)i+=`
${w1}
`}let u=e.getPropertyLocation("additionalProperties").schema;if(u!==void 0)if(u===!0)r+=`
${T0}
json += serializer.asString(key) + ':' + JSON.stringify(value)
`;else{let u=e.getPropertyLocation("additionalProperties");i+=`
${w1}
`;else{let o=e.getPropertyLocation("additionalProperties");r+=`
${T0}
json += serializer.asString(key) + ':'
${na(t,u,"value")}
`}return i+=`
${ti(t,o,"value")}
`}return r+=`
}
`,i}function t7e(t,e){let n="",r=e.schema,i=r.required||[],l=e.getPropertyLocation("properties"),s=[],a=[];if(r.properties)for(let u of Object.keys(r.properties)){if(i.indexOf(u)===-1)continue;let c=l.getPropertyLocation(u);c.schema.$ref&&(c=S1(t,e,c.schema.$ref));let f=JSON.stringify(u);c.schema.default===void 0&&(n+=`if (obj[${f}] === undefined) throw new Error('${f} is required!')
`,a.push(u)),s.push(u)}for(let u of i)s.indexOf(u)===-1&&(n+=`if (obj['${u}'] === undefined) throw new Error('"${u}" is required!')
`,r}function E7e(t,e){let n="",l=e.schema,r=l.required||[],i=e.getPropertyLocation("properties"),s=[],a=[];if(l.properties)for(let o of Object.keys(l.properties)){if(r.indexOf(o)===-1)continue;let c=i.getPropertyLocation(o);c.schema.$ref&&(c=x0(t,e,c.schema.$ref));let f=JSON.stringify(o);c.schema.default===void 0&&(n+=`if (obj[${f}] === undefined) throw new Error('${f} is required!')
`,a.push(o)),s.push(o)}for(let o of r)s.indexOf(o)===-1&&(n+=`if (obj['${o}'] === undefined) throw new Error('"${o}" is required!')
`);n+=`
let addComma = false
let json = '${t.wrapObjects?"{":""}'
`;let o=t.wrapObjects;if(t.wrapObjects=!0,r.properties)for(let u of Object.keys(r.properties)){let c=l.getPropertyLocation(u);c.schema.$ref&&(c=S1(t,e,c.schema.$ref));let f=JSON.stringify(u);if(a.indexOf(u)!==-1)n+=`
${w1}
`;let u=t.wrapObjects;if(t.wrapObjects=!0,l.properties)for(let o of Object.keys(l.properties)){let c=i.getPropertyLocation(o);c.schema.$ref&&(c=x0(t,e,c.schema.$ref));let f=JSON.stringify(o);if(a.indexOf(o)!==-1)n+=`
${T0}
json += ${JSON.stringify(f+":")}
${na(t,c,`obj[${f}]`)}
${ti(t,c,`obj[${f}]`)}
`;else{n+=`
if (obj[${f}] !== undefined) {
${w1}
${T0}
json += ${JSON.stringify(f+":")}
${na(t,c,`obj[${f}]`)}
${ti(t,c,`obj[${f}]`)}
}
`;let m=c.schema.default;m!==void 0&&(n+=`
else {
${w1}
${T0}
json += ${JSON.stringify(f+":"+JSON.stringify(m))}
}
`)}}return(r.patternProperties||r.additionalProperties)&&(n+=e7e(t,e)),t.wrapObjects=o,n+=`
`)}}return(l.patternProperties||l.additionalProperties)&&(n+=_7e(t,e)),t.wrapObjects=u,n+=`
return json${t.wrapObjects?" + '}'":""}
`,n}function fF(t,e,n,r){let i=e.getPropertyLocation("allOf");for(let l=0;l<n.allOf.length;l++){let s=n.allOf[l];if(s.$ref){let o=i.getPropertyLocation(l);s=S1(t,o,s.$ref).schema}let a=s.type;if(a===void 0&&(a=pF(s)),a!==void 0){if(r.type!==void 0&&r.type!==a)throw new Error("allOf schemas have different type values");r.type=a}if(s.format!==void 0){if(r.format!==void 0&&r.format!==s.format)throw new Error("allOf schemas have different format values");r.format=s.format}if(s.nullable!==void 0){if(r.nullable!==void 0&&r.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");r.nullable=s.nullable}s.properties!==void 0&&(r.properties===void 0&&(r.properties={}),Object.assign(r.properties,s.properties)),s.additionalProperties!==void 0&&(r.additionalProperties===void 0&&(r.additionalProperties={}),Object.assign(r.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(r.patternProperties===void 0&&(r.patternProperties={}),Object.assign(r.patternProperties,s.patternProperties)),s.required!==void 0&&(r.required===void 0&&(r.required=[]),r.required.push(...s.required)),s.oneOf!==void 0&&(r.oneOf===void 0&&(r.oneOf=[]),r.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(r.anyOf===void 0&&(r.anyOf=[]),r.anyOf.push(...s.anyOf)),s.allOf!==void 0&&fF(t,e,s,r)}delete r.allOf,r.$id=`__fjs_merged_${cF++}`,t.refResolver.addSchema(r),e.addMergedSchema(r,r.$id)}function n7e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let r=tv({},e.schema),i=r.then,l=r.else||{additionalProperties:!0};delete r.if,delete r.then,delete r.else;let a=e.getPropertyLocation("if").getSchemaRef(),o=e.getPropertyLocation("then");o.schema=tv(r,i);let u=e.getPropertyLocation("else");return u.schema=tv(r,l),`
`,n}function SF(t,e,n,l){let r=e.getPropertyLocation("allOf");for(let i=0;i<n.allOf.length;i++){let s=n.allOf[i];if(s.$ref){let u=r.getPropertyLocation(i);s=x0(t,u,s.$ref).schema}let a=s.type;if(a===void 0&&(a=wF(s)),a!==void 0){if(l.type!==void 0&&l.type!==a)throw new Error("allOf schemas have different type values");l.type=a}if(s.format!==void 0){if(l.format!==void 0&&l.format!==s.format)throw new Error("allOf schemas have different format values");l.format=s.format}if(s.nullable!==void 0){if(l.nullable!==void 0&&l.nullable!==s.nullable)throw new Error("allOf schemas have different nullable values");l.nullable=s.nullable}s.properties!==void 0&&(l.properties===void 0&&(l.properties={}),Object.assign(l.properties,s.properties)),s.additionalProperties!==void 0&&(l.additionalProperties===void 0&&(l.additionalProperties={}),Object.assign(l.additionalProperties,s.additionalProperties)),s.patternProperties!==void 0&&(l.patternProperties===void 0&&(l.patternProperties={}),Object.assign(l.patternProperties,s.patternProperties)),s.required!==void 0&&(l.required===void 0&&(l.required=[]),l.required.push(...s.required)),s.oneOf!==void 0&&(l.oneOf===void 0&&(l.oneOf=[]),l.oneOf.push(...s.oneOf)),s.anyOf!==void 0&&(l.anyOf===void 0&&(l.anyOf=[]),l.anyOf.push(...s.anyOf)),s.allOf!==void 0&&SF(t,e,s,l)}delete l.allOf,l.$id=`__fjs_merged_${bF++}`,t.refResolver.addSchema(l),e.addMergedSchema(l,l.$id)}function b7e(t,e,n){t.validatorSchemasIds.add(e.getSchemaId());let l=av({},e.schema),r=l.then,i=l.else||{additionalProperties:!0};delete l.if,delete l.then,delete l.else;let a=e.getPropertyLocation("if").getSchemaRef(),u=e.getPropertyLocation("then");u.schema=av(l,r);let o=e.getPropertyLocation("else");return o.schema=av(l,i),`
if (validator.validate("${a}", ${n})) {
${na(t,o,n)}
${ti(t,u,n)}
} else {
${na(t,u,n)}
${ti(t,o,n)}
}
`}function r7e(t){return`(${t} && typeof ${t}.toJSON === 'function')
`}function w7e(t){return`(${t} && typeof ${t}.toJSON === 'function')
? ${t}.toJSON()
: ${t}
`}function dF(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let r=mF(t);t.functionsNamesBySchema.set(n,r);let i=e.getSchemaRef();i.startsWith(t.rootSchemaId)&&(i=i.replace(t.rootSchemaId,""));let l=`
`,s=n.nullable===!0;return l+=`
// ${i}
function ${r} (input) {
const obj = ${r7e("input")}
`}function TF(t,e){let n=e.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let l=AF(t);t.functionsNamesBySchema.set(n,l);let r=e.getSchemaRef();r.startsWith(t.rootSchemaId)&&(r=r.replace(t.rootSchemaId,""));let i=`
`,s=n.nullable===!0;return i+=`
// ${r}
function ${l} (input) {
const obj = ${w7e("input")}
${s?"":"if (obj === null) return '{}'"}
${t7e(t,e)}
${E7e(t,e)}
}
`,t.functions.push(l),r}function i7e(t,e){let n=e.schema,r=e.getPropertyLocation("items");r.schema=r.schema||{},r.schema.$ref&&(r=S1(t,r,r.schema.$ref));let i=r.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let l=mF(t);t.functionsNamesBySchema.set(n,l);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
function ${l} (obj) {
`,t.functions.push(i),l}function S7e(t,e){let n=e.schema,l=e.getPropertyLocation("items");l.schema=l.schema||{},l.schema.$ref&&(l=x0(t,l,l.schema.$ref));let r=l.schema;if(t.functionsNamesBySchema.has(n))return t.functionsNamesBySchema.get(n);let i=AF(t);t.functionsNamesBySchema.set(n,i);let s=e.getSchemaRef();s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,""));let a=`
function ${i} (obj) {
// ${s}
`,o=n.nullable===!0;if(a+=`
${o?"":"if (obj === null) return '[]'"}
`,u=n.nullable===!0;if(a+=`
${u?"":"if (obj === null) return '[]'"}
if (!Array.isArray(obj)) {
throw new TypeError(\`The value of '${s}' does not match schema definition.\`)
}
const arrayLength = obj.length
`,!n.additionalItems&&Array.isArray(i)&&(a+=`
if (arrayLength > ${i.length}) {
throw new Error(\`Item at ${i.length} does not match schema definition.\`)
`,!n.additionalItems&&Array.isArray(r)&&(a+=`
if (arrayLength > ${r.length}) {
throw new Error(\`Item at ${r.length} does not match schema definition.\`)
}
`),oF==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${M9}) return JSON.stringify(obj)
`),_F==="json-stringify"&&(a+=`if (arrayLength && arrayLength >= ${H9}) return JSON.stringify(obj)
`),a+=`
let jsonOutput = ''
`,Array.isArray(i)){for(let u=0;u<i.length;u++){let c=i[u],f=na(t,r.getPropertyLocation(u),`obj[${u}]`);a+=`
if (${u} < arrayLength) {
if (${hF(c.type,`[${u}]`)}) {
`,Array.isArray(r)){for(let o=0;o<r.length;o++){let c=r[o],f=ti(t,l.getPropertyLocation(o),`obj[${o}]`);a+=`
if (${o} < arrayLength) {
if (${xF(c.type,`[${o}]`)}) {
let json = ''
${f}
jsonOutput += json
if (${u} < arrayLength - 1) {
if (${o} < arrayLength - 1) {
jsonOutput += ','
}
} else {
throw new Error(\`Item at ${u} does not match schema definition.\`)
throw new Error(\`Item at ${o} does not match schema definition.\`)
}
}
`}n.additionalItems&&(a+=`
for (let i = ${i.length}; i < arrayLength; i++) {
for (let i = ${r.length}; i < arrayLength; i++) {
jsonOutput += JSON.stringify(obj[i])
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`)}else{let u=na(t,r,"obj[i]");a+=`
}`)}else{let o=ti(t,l,"obj[i]");a+=`
for (let i = 0; i < arrayLength; i++) {
let json = ''
${u}
${o}
jsonOutput += json
if (i < arrayLength - 1) {
jsonOutput += ','
}
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),l}function hF(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
}`}return a+="\n return `[${jsonOutput}]`\n }",t.functions.push(a),i}function xF(t,e){let n;switch(t){case"null":n=`obj${e} === null`;break;case"string":n=`typeof obj${e} === 'string' ||
obj${e} === null ||
obj${e} instanceof Date ||
obj${e} instanceof RegExp ||
@@ -251,10 +251,10 @@ ${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode===
typeof obj${e} === "object" &&
typeof obj${e}.toString === "function" &&
obj${e}.toString !== Object.prototype.toString
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(i=>hF(i,e)).join(" || ")})`)}return n}function mF(t){return"anonymous"+t.functionsCounter++}function l7e(t,e,n){let i=e.schema.type.sort(a=>a==="null"?-1:1),l="";i.forEach((a,o)=>{e.schema={...e.schema,type:a};let u=yF(t,e,n),c=o===0?"if":"else if";switch(a){case"null":l+=`
)`;break;case"integer":n=`Number.isInteger(obj${e})`;break;case"number":n=`Number.isFinite(obj${e})`;break;case"boolean":n=`typeof obj${e} === 'boolean'`;break;case"object":n=`obj${e} && typeof obj${e} === 'object' && obj${e}.constructor === Object`;break;case"array":n=`Array.isArray(obj${e})`;break;default:Array.isArray(t)&&(n=`(${t.map(r=>xF(r,e)).join(" || ")})`)}return n}function AF(t){return"anonymous"+t.functionsCounter++}function T7e(t,e,n){let r=e.schema.type.sort(a=>a==="null"?-1:1),i="";r.forEach((a,u)=>{e.schema={...e.schema,type:a};let o=OF(t,e,n),c=u===0?"if":"else if";switch(a){case"null":i+=`
${c} (${n} === null)
${u}
`;break;case"string":{l+=`
${o}
`;break;case"string":{i+=`
${c}(
typeof ${n} === "string" ||
${n} === null ||
@@ -266,181 +266,189 @@ ${s}`,ajv:o.ajv};let u=new Function("validator","serializer",s);return e.mode===
${n}.toString !== Object.prototype.toString
)
)
${u}
`;break}case"array":{l+=`
${o}
`;break}case"array":{i+=`
${c}(Array.isArray(${n}))
${u}
`;break}case"integer":{l+=`
${o}
`;break}case"integer":{i+=`
${c}(Number.isInteger(${n}) || ${n} === null)
${u}
`;break}default:{l+=`
${o}
`;break}default:{i+=`
${c}(typeof ${n} === "${a}" || ${n} === null)
${u}
`;break}}});let s=e.getSchemaRef();return s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,"")),l+=`
${o}
`;break}}});let s=e.getSchemaRef();return s.startsWith(t.rootSchemaId)&&(s=s.replace(t.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${s}' does not match schema definition.\`)
`,l}function yF(t,e,n){let r=e.schema;switch(r.type){case"null":return"json += 'null'";case"string":return r.format==="date-time"?`json += serializer.asDateTime(${n})`:r.format==="date"?`json += serializer.asDate(${n})`:r.format==="time"?`json += serializer.asTime(${n})`:`json += serializer.asString(${n})`;case"integer":return`json += serializer.asInteger(${n})`;case"number":return`json += serializer.asNumber(${n})`;case"boolean":return`json += serializer.asBoolean(${n})`;case"object":return`json += ${dF(t,e)}(${n})`;case"array":return`json += ${i7e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${r.type} unsupported`)}}function s7e(t,e){let n=t.schema,r=n.type,i=Array.isArray(r)&&r.includes("null"),l="";return i&&(l+=`
`,i}function OF(t,e,n){let l=e.schema;switch(l.type){case"null":return"json += 'null'";case"string":return l.format==="date-time"?`json += serializer.asDateTime(${n})`:l.format==="date"?`json += serializer.asDate(${n})`:l.format==="time"?`json += serializer.asTime(${n})`:`json += serializer.asString(${n})`;case"integer":return`json += serializer.asInteger(${n})`;case"number":return`json += serializer.asNumber(${n})`;case"boolean":return`json += serializer.asBoolean(${n})`;case"object":return`json += ${TF(t,e)}(${n})`;case"array":return`json += ${S7e(t,e)}(${n})`;case void 0:return`json += JSON.stringify(${n})`;default:throw new Error(`${l.type} unsupported`)}}function x7e(t,e){let n=t.schema,l=n.type,r=Array.isArray(l)&&l.includes("null"),i="";return r&&(i+=`
if (${e} === null) {
json += 'null'
} else {
`),l+=`json += '${JSON.stringify(n.const).replace(K9e,"\\'")}'`,i&&(l+=`
`),i+=`json += '${JSON.stringify(n.const).replace(d7e,"\\'")}'`,r&&(i+=`
}
`),l}function na(t,e,n){let r=e.schema;if(typeof r=="boolean")return`json += JSON.stringify(${n})`;if(r.$ref&&(e=S1(t,e,r.$ref),r=e.schema),r.type===void 0){let a=pF(r);a&&(r.type=a)}if(r.if&&r.then)return n7e(t,e,n);r.allOf&&(fF(t,e,r,q9e(r)),r=e.schema);let i=r.type,l="";if((i===void 0||i==="object")&&(r.anyOf||r.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),r.type==="object"){t.wrapObjects=!1;let c=dF(t,e);l+=`
`),i}function ti(t,e,n){let l=e.schema;if(typeof l=="boolean")return`json += JSON.stringify(${n})`;if(l.$ref&&(e=x0(t,e,l.$ref),l=e.schema),l.type===void 0){let a=wF(l);a&&(l.type=a)}if(l.if&&l.then)return b7e(t,e,n);l.allOf&&(SF(t,e,l,o7e(l)),l=e.schema);let r=l.type,i="";if((r===void 0||r==="object")&&(l.anyOf||l.oneOf)){if(t.validatorSchemasIds.add(e.getSchemaId()),l.type==="object"){t.wrapObjects=!1;let c=TF(t,e);i+=`
json += '{'
json += ${c}(${n})
json += ','
`}let a=r.anyOf?"anyOf":"oneOf",o=e.getPropertyLocation(a);for(let c=0;c<e.schema[a].length;c++){let f=o.getPropertyLocation(c),m=f.getSchemaRef(),d=na(t,f,n);l+=`
`}let a=l.anyOf?"anyOf":"oneOf",u=e.getPropertyLocation(a);for(let c=0;c<e.schema[a].length;c++){let f=u.getPropertyLocation(c),m=f.getSchemaRef(),d=ti(t,f,n);i+=`
${c===0?"if":"else if"}(validator.validate("${m}", ${n}))
${d}
`}let u=e.getSchemaRef();return u.startsWith(t.rootSchemaId)&&(u=u.replace(t.rootSchemaId,"")),l+=`
else throw new TypeError(\`The value of '${u}' does not match schema definition.\`)
`,r.type==="object"&&(l+=`
`}let o=e.getSchemaRef();return o.startsWith(t.rootSchemaId)&&(o=o.replace(t.rootSchemaId,"")),i+=`
else throw new TypeError(\`The value of '${o}' does not match schema definition.\`)
`,l.type==="object"&&(i+=`
json += '}'
`,t.wrapObjects=!0),l}let s=r.nullable===!0;return s&&(l+=`
`,t.wrapObjects=!0),i}let s=l.nullable===!0;return s&&(i+=`
if (${n} === null) {
json += 'null'
} else {
`),r.const!==void 0?l+=s7e(e,n):Array.isArray(i)?l+=l7e(t,e,n):l+=yF(t,e,n),s&&(l+=`
`),l.const!==void 0?i+=x7e(e,n):Array.isArray(r)?i+=T7e(t,e,n):i+=OF(t,e,n),s&&(i+=`
}
`),l}T1.exports=rv;T1.exports.default=rv;T1.exports.build=rv;T1.exports.validLargeArrayMechanisms=uF;T1.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var _F=k((SIe,iv)=>{"use strict";var a7e=lv();function vF(t={readMode:!0}){if(t.readMode===!0&&typeof t.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(t.readMode!==!0&&typeof t.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(t.readMode===!0)return function(){return function(r){return t.restoreFunction(r)}};let e=a7e();return function(r,i={}){i.mode="standalone";let l=e(r,i);return function(s){let a=l(s);return t.storeFunction(s,a),new Function(a)}}}iv.exports=vF;iv.exports.default=vF});var lv=k((TIe,ac)=>{"use strict";var o7e=gF();function sv(){return function(e,n){let r=Object.assign({},n,{schema:e});return u7e.bind(null,r)}}function u7e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),o7e(e,t)}ac.exports=sv;ac.exports.default=sv;ac.exports.SerializerSelector=sv;ac.exports.StandaloneSerializer=_F()});var Ja=k(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});oc.checkMetadata=void 0;var c7e=Nt(),p7e={keyword:"metadata",schemaType:"object",code(t){EF(t);let{gen:e,schema:n,it:r}=t;if((0,c7e.alwaysValidSchema)(r,n))return;let i=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},i),t.ok(i)}};function EF({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}oc.checkMetadata=EF;oc.default=p7e});var $9=k(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.hasRef=void 0;var bF=N3(),uc=st(),f7e=A2(),wF=Yl(),SF=Wm(),d7e=Ja(),h7e={keyword:"ref",schemaType:"string",code(t){(0,d7e.checkMetadata)(t);let{gen:e,data:n,schema:r,parentSchema:i,it:l}=t,{schemaEnv:{root:s}}=l,a=e.name("valid");i.nullable?(e.var(a,(0,uc._)`${n} === null`),e.if((0,uc.not)(a),o)):(e.var(a,!1),o()),t.ok(a);function o(){var f;let m=(f=s.schema.definitions)===null||f===void 0?void 0:f[r];if(!m)throw new f7e.default(l.opts.uriResolver,"",r,`No definition ${r}`);av(m)||!l.opts.inlineRefs?u(m):c(m)}function u(f){let m=bF.compileSchema.call(l.self,new bF.SchemaEnv({schema:f,root:s,schemaPath:`/definitions/${r}`})),d=(0,SF.getValidate)(t,m),y=e.const("_errs",wF.default.errors);(0,SF.callRef)(t,d,m,m.$async),e.assign(a,(0,uc._)`${y} === ${wF.default.errors}`)}function c(f){let m=e.scopeValue("schema",l.opts.code.source===!0?{ref:f,code:(0,uc.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:uc.nil,topSchemaRef:m,errSchemaPath:`/definitions/${r}`},a)}}};function av(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&av(n))return!0}return!1}cc.hasRef=av;cc.default=h7e});var uv=k(ov=>{"use strict";Object.defineProperty(ov,"__esModule",{value:!0});var m7e=/t|\s/i,y7e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,g7e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,v7e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function xF(t,e){let n=t.split(m7e);return n.length===2&&TF(n[0])&&_7e(n[1])||e&&n.length===1&&TF(n[0])}ov.default=xF;function TF(t){let e=y7e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3];return r>=1&&r<=12&&i>=1&&(i<=v7e[r]||r===2&&i===29&&(n%100===0?n%400===0:n%4===0))}function _7e(t){let e=g7e.exec(t);if(!e)return!1;let n=+e[1],r=+e[2],i=+e[3],l=+(e[4]||0),s=+(e[5]||0);return n<=23&&r<=59&&i<=59||n-l===23&&r-s===59&&i===60}xF.code='require("ajv/dist/runtime/timestamp").default'});var x1=k(I2=>{"use strict";Object.defineProperty(I2,"__esModule",{value:!0});I2.typeErrorParams=I2.typeErrorMessage=I2.typeError=void 0;var E7e=st();function b7e(t){return{message:e=>AF(e,t),params:e=>OF(e,t)}}I2.typeError=b7e;function AF({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}I2.typeErrorMessage=AF;function OF({parentSchema:t},e){return(0,E7e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}I2.typeErrorParams=OF});var cv=k(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.intRange=void 0;var Dl=st(),w7e=uv(),S7e=Nt(),T7e=Ja(),NF=x1();A1.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var x7e={message:t=>(0,NF.typeErrorMessage)(t,t.schema),params:t=>(0,NF.typeErrorParams)(t,t.schema)};function A7e(t){let{gen:e,data:n,it:r}=t,{timestamp:i,allowDate:l}=r.opts;if(i==="date")return(0,Dl._)`${n} instanceof Date `;let s=(0,S7e.useFunc)(e,w7e.default),a=l?(0,Dl._)`, true`:Dl.nil,o=(0,Dl._)`typeof ${n} == "string" && ${s}(${n}${a})`;return i==="string"?o:(0,Dl.or)((0,Dl._)`${n} instanceof Date`,o)}var O7e={keyword:"type",schemaType:"string",error:x7e,code(t){(0,T7e.checkMetadata)(t);let{data:e,schema:n,parentSchema:r,it:i}=t,l;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},Fpe=97,jpe=48;function P2(t,e){let n="",r;for(P2.message=void 0;r=t[e++],r!=='"';)if(r==="\\")if(r=t[e],r in nj)n+=nj[r],e++;else if(r==="u"){e++;let l=4,s=0;for(;l--;){if(s<<=4,r=t[e],r===void 0){i("unexpected end");return}if(r=r.toLowerCase(),r>="a"&&r<="f")s+=r.charCodeAt(0)-Fpe+10;else if(r>="0"&&r<="9")s+=r.charCodeAt(0)-jpe;else{i(`unexpected token ${r}`);return}e++}n+=String.fromCharCode(s)}else{i(`unexpected token ${r}`);return}else if(r===void 0){i("unexpected end");return}else if(r.charCodeAt(0)>=32)n+=r;else{i(`unexpected token ${r}`);return}return P2.position=e,n;function i(l){P2.position=e,P2.message=l}}L2.parseJsonString=P2;P2.message=void 0;P2.position=0;P2.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var hj=k(Dv=>{"use strict";Object.defineProperty(Dv,"__esModule",{value:!0});var Upe=bv(),aj=N3(),tt=st(),Mpe=A2(),Ht=Yl(),$pe=Ai(),Bpe=$9(),Hpe=cv(),Nv=rj(),oj=Nt(),Vpe=uv(),qpe={elements:Kpe,values:Xpe,discriminator:Ype,properties:ij,optionalProperties:ij,enum:Zpe,type:Qpe,ref:efe};function uj(t,e){let n=aj.getCompilingSchema.call(this,t);if(n)return n;let{es5:r,lines:i}=this.opts.code,{ownProperties:l}=this.opts,s=new tt.CodeGen(this.scope,{es5:r,lines:i,ownProperties:l}),a=s.scopeName("parse"),o={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Ht.default.data,parseName:a,char:s.name("c")},u;try{this._compilations.add(t),t.parseName=a,zpe(o),s.optimize(this.opts.code.optimize);let c=s.toString();u=`${s.scopeRefs(Ht.default.scope)}return ${c}`;let m=new Function(`${Ht.default.scope}`,u)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}catch(c){throw u&&this.logger.error("Error compiling parser, function code:",u),delete t.parse,delete t.parseName,c}finally{this._compilations.delete(t)}return t}Dv.default=uj;var Ov=(0,tt._)`undefined`;function zpe(t){let{gen:e,parseName:n,char:r}=t;e.func(n,(0,tt._)`${Ht.default.json}, ${Ht.default.jsonPos}, ${Ht.default.jsonPart}`,!1,()=>{e.let(Ht.default.data),e.let(r),e.assign((0,tt._)`${n}.message`,Ov),e.assign((0,tt._)`${n}.position`,Ov),e.assign(Ht.default.jsonPos,(0,tt._)`${Ht.default.jsonPos} || 0`),e.const(Ht.default.jsonLen,(0,tt._)`${Ht.default.json}.length`),z9(t),kv(t),e.if(Ht.default.jsonPart,()=>{e.assign((0,tt._)`${n}.position`,Ht.default.jsonPos),e.return(Ht.default.data)}),e.if((0,tt._)`${Ht.default.jsonPos} === ${Ht.default.jsonLen}`,()=>e.return(Ht.default.data)),R1(t)})}function z9(t){let e;for(let n of Upe.jtdForms)if(n in t.schema){e=n;break}e?Jpe(t,qpe[e]):Rv(t)}var Gpe=sj(!0,sj(!1,R1));function Jpe(t,e){let{gen:n,schema:r,data:i}=t;if(!r.nullable)return e(t);dc(t,"null",e,()=>n.assign(i,null))}function Kpe(t){let{gen:e,schema:n,data:r}=t;ra(t,"[");let i=e.let("i",0);e.assign(r,(0,tt._)`[]`),Cv(t,"]",()=>{let l=e.let("el");z9({...t,schema:n.elements,data:l}),e.assign((0,tt._)`${r}[${i}++]`,l)})}function Xpe(t){let{gen:e,schema:n,data:r}=t;ra(t,"{"),e.assign(r,(0,tt._)`{}`),Cv(t,"}",()=>Wpe(t,n.values))}function Cv(t,e,n){cj(t,e,n),ra(t,e)}function cj(t,e,n){let{gen:r}=t;r.for((0,tt._)`;${Ht.default.jsonPos}<${Ht.default.jsonLen} && ${G9(1)}!==${e};`,()=>{n(),dc(t,",",()=>r.break(),i)});function i(){dc(t,e,()=>{},R1)}}function Wpe(t,e){let{gen:n}=t,r=n.let("key");$3({...t,data:r}),ra(t,":"),fj(t,r,e)}function Ype(t){let{gen:e,data:n,schema:r}=t,{discriminator:i,mapping:l}=r;ra(t,"{"),e.assign(n,(0,tt._)`{}`);let s=e.const("pos",Ht.default.jsonPos),a=e.let("value"),o=e.let("tag");cj(t,"}",()=>{let u=e.let("key");$3({...t,data:u}),ra(t,":"),e.if((0,tt._)`${u} === ${i}`,()=>{$3({...t,data:o}),e.assign((0,tt._)`${n}[${u}]`,o),e.break()},()=>Rv({...t,data:a}))}),e.assign(Ht.default.jsonPos,s),e.if((0,tt._)`${o} === undefined`),Qa(t,(0,tt.str)`discriminator tag not found`);for(let u in l)e.elseIf((0,tt._)`${o} === ${u}`),pj({...t,schema:l[u]},i);e.else(),Qa(t,(0,tt.str)`discriminator value not in schema`),e.endIf()}function ij(t){let{gen:e,data:n}=t;ra(t,"{"),e.assign(n,(0,tt._)`{}`),pj(t)}function pj(t,e){let{gen:n,schema:r,data:i}=t,{properties:l,optionalProperties:s,additionalProperties:a}=r;if(Cv(t,"}",()=>{let o=n.let("key");if($3({...t,data:o}),ra(t,":"),n.if(!1),lj(t,o,l),lj(t,o,s),e){n.elseIf((0,tt._)`${o} === ${e}`);let u=n.let("tag");$3({...t,data:u})}n.else(),a?Rv({...t,data:(0,tt._)`${i}[${o}]`}):Qa(t,(0,tt.str)`property ${o} not allowed`),n.endIf()}),l){let o=(0,$pe.hasPropFunc)(n),u=(0,tt.and)(...Object.keys(l).map(c=>(0,tt._)`${o}.call(${i}, ${c})`));n.if((0,tt.not)(u),()=>Qa(t,(0,tt.str)`missing required properties`))}}function lj(t,e,n={}){let{gen:r}=t;for(let i in n)r.elseIf((0,tt._)`${e} === ${i}`),fj(t,e,n[i])}function fj(t,e,n){z9({...t,schema:n,data:(0,tt._)`${t.data}[${e}]`})}function Qpe(t){let{gen:e,schema:n,data:r,self:i}=t;switch(n.type){case"boolean":Gpe(t);break;case"string":$3(t);break;case"timestamp":{$3(t);let l=(0,oj.useFunc)(e,Vpe.default),{allowDate:s,parseDate:a}=i.opts,o=s?(0,tt._)`!${l}(${r}, true)`:(0,tt._)`!${l}(${r})`,u=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function kj(t){return t[Symbol.for("fastify.display-name")]}function Dj(t){return!!t[Symbol.for("skip-override")]}function Pj(t){let e=yc(t);if(!e)return;let n=e.dependencies;n&&(qv(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(r=>{qv(this[zv].indexOf(r)>-1,`The dependency '${r}' of plugin '${e.name}' is not registered`)}))}function Lj(t){let e=yc(t);if(!e)return;let{decorators:n,name:r}=e;n&&(n.fastify&&Vv(this,"Fastify",n.fastify,r),n.reply&&Vv(this,"Reply",n.reply,r),n.request&&Vv(this,"Request",n.request,r))}var Ife={Fastify:Tfe,Request:Afe,Reply:xfe};function Vv(t,e,n,r){qv(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(i=>{let l=typeof r=="string"?` required by '${r}'`:"";if(!Ife[e].call(t,i))throw new Nfe(i,l,e)})}function kfe(t){let e=yc(t);if(!e)return;let n=e.fastify,r=/-rc.+$/.test(this.version);if(!(r===!0&&Hv.gt(this.version,Hv.coerce(n))===!0)&&n&&Hv.satisfies(this.version,n,{includePrerelease:r})===!1)throw new Ofe(e.name,n,this.version)}function Dfe(t){let e=yc(t);if(!e)return;let n=e.name;if(n)return this[zv].push(n),n}function Pfe(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&Cfe(e||"anonymous")}function Lfe(t){let e=Dfe.call(this,t)||Ij(t);return Pfe.call(this,t,e),kfe.call(this,t),Lj.call(this,t),Pj.call(this,t),Dj(t)}Gv.exports={getPluginName:Ij,getFuncPreview:Rfe,kRegisteredPlugins:zv,getDisplayName:kj,registerPlugin:Lfe};Gv.exports[Sfe]={shouldSkipOverride:Dj,getMeta:yc,checkDecorators:Lj,checkDependencies:Pj}});var K9=k((QIe,Fj)=>{"use strict";function Ffe(t,e){let n=e||Ufe();return t?Mfe(t,n):n}function jfe(t,e){return t.genReqId(e)}function Ufe(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function Mfe(t,e){return function(n){return n.headers[t]||e(n)}}Fj.exports={getGenReqId:jfe,reqIdGenFactory:Ffe}});var $j=k((ZIe,Mj)=>{"use strict";var jj=12,$fe=0,Kv=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function Bfe(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,r="",i=0,l=0,s=e,a=jj;e>-1&&e<n;){var o=Uj(t[e+1],4),u=Uj(t[e+2],0),c=o|u,f=Kv[c];if(a=Kv[256+a+f],l=l<<6|c&Kv[364+f],a===jj)r+=t.slice(i,s),r+=l<=65535?String.fromCharCode(l):String.fromCharCode(55232+(l>>10),56320+(l&1023)),l=0,i=e+3,e=s=t.indexOf("%",i);else{if(a===$fe)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return r+t.slice(i)}var Hfe={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function Uj(t,e){var n=Hfe[t];return n===void 0?255:n<<e}Mj.exports=Bfe});var zj=k((eke,qj)=>{"use strict";var Bj=$j(),Hj=/\+/g,Vj=function(){};Vj.prototype=Object.create(null);function Vfe(t){let e=new Vj;if(typeof t!="string")return e;let n=t.length,r="",i="",l=-1,s=-1,a=!1,o=!1,u=!1,c=!1,f=!1,m=0;for(let d=0;d<n+1;d++)if(m=d!==n?t.charCodeAt(d):38,m===38){if(f=s>l,f||(s=d),r=t.slice(l+1,s),f||r.length>0){u&&(r=r.replace(Hj," ")),a&&(r=Bj(r)||r),f&&(i=t.slice(s+1,d),c&&(i=i.replace(Hj," ")),o&&(i=Bj(i)||i));let y=e[r];y===void 0?e[r]=i:y.pop?y.push(i):e[r]=[y,i]}i="",l=d,s=d,a=!1,o=!1,u=!1,c=!1}else m===61?s<=l?s=d:o=!0:m===43?s>l?c=!0:u=!0:m===37&&(s>l?o=!0:a=!0);return e}qj.exports=Vfe});var Jj=k((tke,Gj)=>{var ia=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),qfe=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function zfe(t){let e=t.length;if(e===0)return"";let n="",r=0,i=0;e:for(;i<e;i++){let l=t.charCodeAt(i);for(;l<128;){if(qfe[l]!==1&&(r<i&&(n+=t.slice(r,i)),r=i+1,n+=ia[l]),++i===e)break e;l=t.charCodeAt(i)}if(r<i&&(n+=t.slice(r,i)),l<2048){r=i+1,n+=ia[192|l>>6]+ia[128|l&63];continue}if(l<55296||l>=57344){r=i+1,n+=ia[224|l>>12]+ia[128|l>>6&63]+ia[128|l&63];continue}if(++i,i>=e)throw new Error("URI malformed");let s=t.charCodeAt(i)&1023;r=i+1,l=65536+((l&1023)<<10|s),n+=ia[240|l>>18]+ia[128|l>>12&63]+ia[128|l>>6&63]+ia[128|l&63]}return r===0?t:r<e?n+t.slice(r):n}Gj.exports={encodeString:zfe}});var Wj=k((nke,Xj)=>{"use Line truncated
`),i}A0.exports=ov;A0.exports.default=ov;A0.exports.build=ov;A0.exports.validLargeArrayMechanisms=EF;A0.exports.restore=function({code:t,validator:e,serializer:n}){return Function.apply(null,["validator","serializer",t]).apply(null,[e,n])}});var RF=k((WIe,cv)=>{"use strict";var A7e=pv();function CF(t={readMode:!0}){if(t.readMode===!0&&typeof t.restoreFunction!="function")throw new Error("You must provide a function for the restoreFunction-option when readMode ON");if(t.readMode!==!0&&typeof t.storeFunction!="function")throw new Error("You must provide a function for the storeFunction-option when readMode OFF");if(t.readMode===!0)return function(){return function(l){return t.restoreFunction(l)}};let e=A7e();return function(l,r={}){r.mode="standalone";let i=e(l,r);return function(s){let a=i(s);return t.storeFunction(s,a),new Function(a)}}}cv.exports=CF;cv.exports.default=CF});var pv=k((YIe,c5)=>{"use strict";var O7e=NF();function fv(){return function(e,n){let l=Object.assign({},n,{schema:e});return N7e.bind(null,l)}}function N7e(t,{schema:e}){return t.schema&&e.$id&&t.schema[e.$id]&&(t.schema={...t.schema},delete t.schema[e.$id]),O7e(e,t)}c5.exports=fv;c5.exports.default=fv;c5.exports.SerializerSelector=fv;c5.exports.StandaloneSerializer=RF()});var Gi=k(p5=>{"use strict";Object.defineProperty(p5,"__esModule",{value:!0});p5.checkMetadata=void 0;var C7e=Nt(),R7e={keyword:"metadata",schemaType:"object",code(t){IF(t);let{gen:e,schema:n,it:l}=t;if((0,C7e.alwaysValidSchema)(l,n))return;let r=e.name("valid");t.subschema({keyword:"metadata",jtdMetadata:!0},r),t.ok(r)}};function IF({it:t,keyword:e},n){if(t.jtdMetadata!==n)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}p5.checkMetadata=IF;p5.default=R7e});var V9=k(d5=>{"use strict";Object.defineProperty(d5,"__esModule",{value:!0});d5.hasRef=void 0;var kF=Cu(),f5=st(),I7e=xs(),DF=Q3(),PF=ny(),k7e=Gi(),D7e={keyword:"ref",schemaType:"string",code(t){(0,k7e.checkMetadata)(t);let{gen:e,data:n,schema:l,parentSchema:r,it:i}=t,{schemaEnv:{root:s}}=i,a=e.name("valid");r.nullable?(e.var(a,(0,f5._)`${n} === null`),e.if((0,f5.not)(a),u)):(e.var(a,!1),u()),t.ok(a);function u(){var f;let m=(f=s.schema.definitions)===null||f===void 0?void 0:f[l];if(!m)throw new I7e.default(i.opts.uriResolver,"",l,`No definition ${l}`);dv(m)||!i.opts.inlineRefs?o(m):c(m)}function o(f){let m=kF.compileSchema.call(i.self,new kF.SchemaEnv({schema:f,root:s,schemaPath:`/definitions/${l}`})),d=(0,PF.getValidate)(t,m),y=e.const("_errs",DF.default.errors);(0,PF.callRef)(t,d,m,m.$async),e.assign(a,(0,f5._)`${y} === ${DF.default.errors}`)}function c(f){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:f,code:(0,f5.stringify)(f)}:{ref:f});t.subschema({schema:f,dataTypes:[],schemaPath:f5.nil,topSchemaRef:m,errSchemaPath:`/definitions/${l}`},a)}}};function dv(t){for(let e in t){let n;if(e==="ref"||typeof(n=t[e])=="object"&&dv(n))return!0}return!1}d5.hasRef=dv;d5.default=D7e});var mv=k(hv=>{"use strict";Object.defineProperty(hv,"__esModule",{value:!0});var P7e=/t|\s/i,L7e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,F7e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,j7e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function FF(t,e){let n=t.split(P7e);return n.length===2&&LF(n[0])&&U7e(n[1])||e&&n.length===1&&LF(n[0])}hv.default=FF;function LF(t){let e=L7e.exec(t);if(!e)return!1;let n=+e[1],l=+e[2],r=+e[3];return l>=1&&l<=12&&r>=1&&(r<=j7e[l]||l===2&&r===29&&(n%100===0?n%400===0:n%4===0))}function U7e(t){let e=F7e.exec(t);if(!e)return!1;let n=+e[1],l=+e[2],r=+e[3],i=+(e[4]||0),s=+(e[5]||0);return n<=23&&l<=59&&r<=59||n-i===23&&l-s===59&&r===60}FF.code='require("ajv/dist/runtime/timestamp").default'});var O0=k(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.typeErrorParams=Rs.typeErrorMessage=Rs.typeError=void 0;var M7e=st();function $7e(t){return{message:e=>jF(e,t),params:e=>UF(e,t)}}Rs.typeError=$7e;function jF({parentSchema:t},e){return t?.nullable?`must be ${e} or null`:`must be ${e}`}Rs.typeErrorMessage=jF;function UF({parentSchema:t},e){return(0,M7e._)`{type: ${e}, nullable: ${!!t?.nullable}}`}Rs.typeErrorParams=UF});var yv=k(N0=>{"use strict";Object.defineProperty(N0,"__esModule",{value:!0});N0.intRange=void 0;var P3=st(),B7e=mv(),H7e=Nt(),V7e=Gi(),MF=O0();N0.intRange={int8:[-128,127,3],uint8:[0,255,3],int16:[-32768,32767,5],uint16:[0,65535,5],int32:[-2147483648,2147483647,10],uint32:[0,4294967295,10]};var q7e={message:t=>(0,MF.typeErrorMessage)(t,t.schema),params:t=>(0,MF.typeErrorParams)(t,t.schema)};function z7e(t){let{gen:e,data:n,it:l}=t,{timestamp:r,allowDate:i}=l.opts;if(r==="date")return(0,P3._)`${n} instanceof Date `;let s=(0,H7e.useFunc)(e,B7e.default),a=i?(0,P3._)`, true`:P3.nil,u=(0,P3._)`typeof ${n} == "string" && ${s}(${n}${a})`;return r==="string"?u:(0,P3.or)((0,P3._)`${n} instanceof Date`,u)}var G7e={keyword:"type",schemaType:"string",error:q7e,code(t){(0,V7e.checkMetadata)(t);let{data:e,schema:n,parentSchema:l,it:r}=t,i;switch(n){case"boole Line truncated
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},tfe=97,nfe=48;function Ds(t,e){let n="",l;for(Ds.message=void 0;l=t[e++],l!=='"';)if(l==="\\")if(l=t[e],l in dj)n+=dj[l],e++;else if(l==="u"){e++;let i=4,s=0;for(;i--;){if(s<<=4,l=t[e],l===void 0){r("unexpected end");return}if(l=l.toLowerCase(),l>="a"&&l<="f")s+=l.charCodeAt(0)-tfe+10;else if(l>="0"&&l<="9")s+=l.charCodeAt(0)-nfe;else{r(`unexpected token ${l}`);return}e++}n+=String.fromCharCode(s)}else{r(`unexpected token ${l}`);return}else if(l===void 0){r("unexpected end");return}else if(l.charCodeAt(0)>=32)n+=l;else{r(`unexpected token ${l}`);return}return Ds.position=e,n;function r(i){Ds.position=e,Ds.message=i}}Ps.parseJsonString=Ds;Ds.message=void 0;Ds.position=0;Ds.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var xj=k(Mv=>{"use strict";Object.defineProperty(Mv,"__esModule",{value:!0});var lfe=Ov(),vj=Cu(),tt=st(),rfe=xs(),Ht=Q3(),ife=O2(),sfe=V9(),afe=yv(),Pv=hj(),_j=Nt(),ufe=mv(),ofe={elements:dfe,values:hfe,discriminator:yfe,properties:mj,optionalProperties:mj,enum:vfe,type:gfe,ref:_fe};function Ej(t,e){let n=vj.getCompilingSchema.call(this,t);if(n)return n;let{es5:l,lines:r}=this.opts.code,{ownProperties:i}=this.opts,s=new tt.CodeGen(this.scope,{es5:l,lines:r,ownProperties:i}),a=s.scopeName("parse"),u={self:this,gen:s,schema:t.schema,schemaEnv:t,definitions:e,data:Ht.default.data,parseName:a,char:s.name("c")},o;try{this._compilations.add(t),t.parseName=a,cfe(u),s.optimize(this.opts.code.optimize);let c=s.toString();o=`${s.scopeRefs(Ht.default.scope)}return ${c}`;let m=new Function(`${Ht.default.scope}`,o)(this.scope.get());this.scope.value(a,{ref:m}),t.parse=m}catch(c){throw o&&this.logger.error("Error compiling parser, function code:",o),delete t.parse,delete t.parseName,c}finally{this._compilations.delete(t)}return t}Mv.default=Ej;var Dv=(0,tt._)`undefined`;function cfe(t){let{gen:e,parseName:n,char:l}=t;e.func(n,(0,tt._)`${Ht.default.json}, ${Ht.default.jsonPos}, ${Ht.default.jsonPart}`,!1,()=>{e.let(Ht.default.data),e.let(l),e.assign((0,tt._)`${n}.message`,Dv),e.assign((0,tt._)`${n}.position`,Dv),e.assign(Ht.default.jsonPos,(0,tt._)`${Ht.default.jsonPos} || 0`),e.const(Ht.default.jsonLen,(0,tt._)`${Ht.default.json}.length`),K9(t),Uv(t),e.if(Ht.default.jsonPart,()=>{e.assign((0,tt._)`${n}.position`,Ht.default.jsonPos),e.return(Ht.default.data)}),e.if((0,tt._)`${Ht.default.jsonPos} === ${Ht.default.jsonLen}`,()=>e.return(Ht.default.data)),k0(t)})}function K9(t){let e;for(let n of lfe.jtdForms)if(n in t.schema){e=n;break}e?ffe(t,ofe[e]):Fv(t)}var pfe=gj(!0,gj(!1,k0));function ffe(t,e){let{gen:n,schema:l,data:r}=t;if(!l.nullable)return e(t);y5(t,"null",e,()=>n.assign(r,null))}function dfe(t){let{gen:e,schema:n,data:l}=t;ni(t,"[");let r=e.let("i",0);e.assign(l,(0,tt._)`[]`),Lv(t,"]",()=>{let i=e.let("el");K9({...t,schema:n.elements,data:i}),e.assign((0,tt._)`${l}[${r}++]`,i)})}function hfe(t){let{gen:e,schema:n,data:l}=t;ni(t,"{"),e.assign(l,(0,tt._)`{}`),Lv(t,"}",()=>mfe(t,n.values))}function Lv(t,e,n){bj(t,e,n),ni(t,e)}function bj(t,e,n){let{gen:l}=t;l.for((0,tt._)`;${Ht.default.jsonPos}<${Ht.default.jsonLen} && ${X9(1)}!==${e};`,()=>{n(),y5(t,",",()=>l.break(),r)});function r(){y5(t,e,()=>{},k0)}}function mfe(t,e){let{gen:n}=t,l=n.let("key");Bu({...t,data:l}),ni(t,":"),Sj(t,l,e)}function yfe(t){let{gen:e,data:n,schema:l}=t,{discriminator:r,mapping:i}=l;ni(t,"{"),e.assign(n,(0,tt._)`{}`);let s=e.const("pos",Ht.default.jsonPos),a=e.let("value"),u=e.let("tag");bj(t,"}",()=>{let o=e.let("key");Bu({...t,data:o}),ni(t,":"),e.if((0,tt._)`${o} === ${r}`,()=>{Bu({...t,data:u}),e.assign((0,tt._)`${n}[${o}]`,u),e.break()},()=>Fv({...t,data:a}))}),e.assign(Ht.default.jsonPos,s),e.if((0,tt._)`${u} === undefined`),Yi(t,(0,tt.str)`discriminator tag not found`);for(let o in i)e.elseIf((0,tt._)`${u} === ${o}`),wj({...t,schema:i[o]},r);e.else(),Yi(t,(0,tt.str)`discriminator value not in schema`),e.endIf()}function mj(t){let{gen:e,data:n}=t;ni(t,"{"),e.assign(n,(0,tt._)`{}`),wj(t)}function wj(t,e){let{gen:n,schema:l,data:r}=t,{properties:i,optionalProperties:s,additionalProperties:a}=l;if(Lv(t,"}",()=>{let u=n.let("key");if(Bu({...t,data:u}),ni(t,":"),n.if(!1),yj(t,u,i),yj(t,u,s),e){n.elseIf((0,tt._)`${u} === ${e}`);let o=n.let("tag");Bu({...t,data:o})}n.else(),a?Fv({...t,data:(0,tt._)`${r}[${u}]`}):Yi(t,(0,tt.str)`property ${u} not allowed`),n.endIf()}),i){let u=(0,ife.hasPropFunc)(n),o=(0,tt.and)(...Object.keys(i).map(c=>(0,tt._)`${u}.call(${r}, ${c})`));n.if((0,tt.not)(o),()=>Yi(t,(0,tt.str)`missing required properties`))}}function yj(t,e,n={}){let{gen:l}=t;for(let r in n)l.elseIf((0,tt._)`${e} === ${r}`),Sj(t,e,n[r])}function Sj(t,e,n){K9({...t,schema:n,data:(0,tt._)`${t.data}[${e}]`})}function gfe(t){let{gen:e,schema:n,data:l,self:r}=t;switch(n.type){case"boolean":pfe(t);break;case"string":Bu(t);break;case"timestamp":{Bu(t);let i=(0,_j.useFunc)(e,ufe.default),{allowDate:s,parseDate:a}=r.opts,u=s?(0,tt._)`!${i}(${l}, true)`:(0,tt._)`!${i}(${l})`,o=a? Line truncated
`).slice(0,2).map(e=>e.trim()).join(" -- ")}function Vj(t){return t[Symbol.for("fastify.display-name")]}function qj(t){return!!t[Symbol.for("skip-override")]}function zj(t){let e=_5(t);if(!e)return;let n=e.dependencies;n&&(Wv(Array.isArray(n),"The dependencies should be an array of strings"),n.forEach(l=>{Wv(this[Yv].indexOf(l)>-1,`The dependency '${l}' of plugin '${e.name}' is not registered`)}))}function Gj(t){let e=_5(t);if(!e)return;let{decorators:n,name:l}=e;n&&(n.fastify&&Xv(this,"Fastify",n.fastify,l),n.reply&&Xv(this,"Reply",n.reply,l),n.request&&Xv(this,"Request",n.request,l))}var Wfe={Fastify:Vfe,Request:zfe,Reply:qfe};function Xv(t,e,n,l){Wv(Array.isArray(n),"The decorators should be an array of strings"),n.forEach(r=>{let i=typeof l=="string"?` required by '${l}'`:"";if(!Wfe[e].call(t,r))throw new Jfe(r,i,e)})}function Yfe(t){let e=_5(t);if(!e)return;let n=e.fastify,l=/-rc.+$/.test(this.version);if(!(l===!0&&Kv.gt(this.version,Kv.coerce(n))===!0)&&n&&Kv.satisfies(this.version,n,{includePrerelease:l})===!1)throw new Gfe(e.name,n,this.version)}function Qfe(t){let e=_5(t);if(!e)return;let n=e.name;if(n)return this[Yv].push(n),n}function Zfe(t,e){t.constructor.name==="AsyncFunction"&&t.length===3&&Kfe(e||"anonymous")}function ede(t){let e=Qfe.call(this,t)||Hj(t);return Zfe.call(this,t,e),Yfe.call(this,t),Gj.call(this,t),zj.call(this,t),qj(t)}Qv.exports={getPluginName:Hj,getFuncPreview:Xfe,kRegisteredPlugins:Yv,getDisplayName:Vj,registerPlugin:ede};Qv.exports[Hfe]={shouldSkipOverride:qj,getMeta:_5,checkDecorators:Gj,checkDependencies:zj}});var Y9=k((xke,Jj)=>{"use strict";function tde(t,e){let n=e||lde();return t?rde(t,n):n}function nde(t,e){return t.genReqId(e)}function lde(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function rde(t,e){return function(n){return n.headers[t]||e(n)}}Jj.exports={getGenReqId:nde,reqIdGenFactory:tde}});var Yj=k((Ake,Wj)=>{"use strict";var Kj=12,ide=0,e_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];function sde(t){var e=t.indexOf("%");if(e===-1)return t;for(var n=t.length,l="",r=0,i=0,s=e,a=Kj;e>-1&&e<n;){var u=Xj(t[e+1],4),o=Xj(t[e+2],0),c=u|o,f=e_[c];if(a=e_[256+a+f],i=i<<6|c&e_[364+f],a===Kj)l+=t.slice(r,s),l+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(i&1023)),i=0,r=e+3,e=s=t.indexOf("%",r);else{if(a===ide)return null;if(e+=3,e<n&&t.charCodeAt(e)===37)continue;return null}}return l+t.slice(r)}var ade={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function Xj(t,e){var n=ade[t];return n===void 0?255:n<<e}Wj.exports=sde});var nU=k((Oke,tU)=>{"use strict";var Qj=Yj(),Zj=/\+/g,eU=function(){};eU.prototype=Object.create(null);function ude(t){let e=new eU;if(typeof t!="string")return e;let n=t.length,l="",r="",i=-1,s=-1,a=!1,u=!1,o=!1,c=!1,f=!1,m=0;for(let d=0;d<n+1;d++)if(m=d!==n?t.charCodeAt(d):38,m===38){if(f=s>i,f||(s=d),l=t.slice(i+1,s),f||l.length>0){o&&(l=l.replace(Zj," ")),a&&(l=Qj(l)||l),f&&(r=t.slice(s+1,d),c&&(r=r.replace(Zj," ")),u&&(r=Qj(r)||r));let y=e[l];y===void 0?e[l]=r:y.pop?y.push(r):e[l]=[y,r]}r="",i=d,s=d,a=!1,u=!1,o=!1,c=!1}else m===61?s<=i?s=d:u=!0:m===43?s>i?c=!0:o=!0:m===37&&(s>i?u=!0:a=!0);return e}tU.exports=ude});var rU=k((Nke,lU)=>{var li=Array.from({length:256},(t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),ode=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);function cde(t){let e=t.length;if(e===0)return"";let n="",l=0,r=0;e:for(;r<e;r++){let i=t.charCodeAt(r);for(;i<128;){if(ode[i]!==1&&(l<r&&(n+=t.slice(l,r)),l=r+1,n+=li[i]),++r===e)break e;i=t.charCodeAt(r)}if(l<r&&(n+=t.slice(l,r)),i<2048){l=r+1,n+=li[192|i>>6]+li[128|i&63];continue}if(i<55296||i>=57344){l=r+1,n+=li[224|i>>12]+li[128|i>>6&63]+li[128|i&63];continue}if(++r,r>=e)throw new Error("URI malformed");let s=t.charCodeAt(r)&1023;l=r+1,i=65536+((i&1023)<<10|s),n+=li[240|i>>18]+li[128|i>>12&63]+li[128|i>>6&63]+li[128|i&63]}return l===0?t:l<e?n+t.slice(l):n}lU.exports={encodeString:cde}});var aU=k((Cke,sU)=>{"use Line truncated
`).join(`
`+e+u);n+=e+o+l+f+`
`,n+=mU(s,e+u)}return n}function Qfe(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function yU(t){return Array.isArray(t)?t.map(e=>yU(e)):typeof t=="symbol"?t.toString():typeof t=="function"?Qfe(t):t}function Zfe(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),r={},i=e.includeMeta;Array.isArray(i)||(i=Reflect.ownKeys(n));for(let l of i){if(!Object.prototype.hasOwnProperty.call(n,l))continue;let s=l.toString(),a=n[l];if(a!=null){let o=JSON.stringify(yU(a));r[s]=o}}return r}function ede(t){let e="";for(let[n,r]of Object.entries(t))e+=`
\u2022 (${n}) ${r}`;return e}function tde(t){let e={...t.opts.constraints},n=e[dU.name];return delete e[dU.name],{...t,method:n,opts:{constraints:e}}}function nde(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=ede(t.metaData),e}function rde(t){return t.reduce((e,n)=>{for(let r of e)if(fU(n.opts.constraints,r.opts.constraints)&&fU(n.metaData,r.metaData))return r.method+=", "+n.method,e;return e.push(n),e},[])}function ide(t,e,n){let r=t.routes;return n.method===void 0&&(r=r.map(tde)),r=r.map(i=>(i.metaData=Zfe(i,n),i)),n.method===void 0&&(r=rde(r)),r.map(nde).join(`
${e}`)}function Q9(t,e,n,r){if((t.isLeafNode||r.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[hU]=ide(t,n,r)),n=""),t.staticChildren)for(let i of Object.values(t.staticChildren))Q9(i,e,n+i.prefix,r);if(t.parametricChildren)for(let i of Object.values(t.parametricChildren)){let l=Array.from(i.nodePaths).join("|");Q9(i,e,n+l,r)}t.wildcardChild&&Q9(t.wildcardChild,e,"*",r)}function lde(t,e){let n={};return Q9(t,n,t.prefix,e),mU(n)}gU.exports={prettyPrintTree:lde}});var EU=k((fke,_U)=>{"use strict";var sde=Y9(),Zv=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,n){let r=n.params,i=n.opts.constraints||{},l={params:r,constraints:i,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(r)},s=Object.keys(i);s.length===0&&(this.unconstrainedHandler=l);for(let o of s)this.constraints.includes(o)||(o==="version"?this.constraints.unshift(o):this.constraints.push(o));let a=s.includes(sde.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(l),this.handlers.sort((o,u)=>Object.keys(o.constraints).length-Object.keys(u.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,i)}_compileCreateParamsObject(e){let n=[];for(let r=0;r<e.length;r++)n.push(`'${e[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let r=0;r<this.handlers.length;r++){let l=this.handlers[r].constraints[n];if(l!==void 0){let s=e.get(l)||0;s|=1<<r,e.set(l,s)}}}_constrainedIndexBitmask(e){let n=0;for(let r=0;r<this.handlers.length;r++)this.handlers[r].constraints[e]!==void 0&&(n|=1<<r);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let r of this.constraints){let i=e.newStoreForConstraint(r);this.constrainedHandlerStores[r]=i,this._buildConstraintStore(i,r)}let n=[];n.push(`
`+e+o);n+=e+u+i+f+`
`,n+=AU(s,e+o)}return n}function gde(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function OU(t){return Array.isArray(t)?t.map(e=>OU(e)):typeof t=="symbol"?t.toString():typeof t=="function"?gde(t):t}function vde(t,e){if(!e.includeMeta)return{};let n=e.buildPrettyMeta(t),l={},r=e.includeMeta;Array.isArray(r)||(r=Reflect.ownKeys(n));for(let i of r){if(!Object.prototype.hasOwnProperty.call(n,i))continue;let s=i.toString(),a=n[i];if(a!=null){let u=JSON.stringify(OU(a));l[s]=u}}return l}function _de(t){let e="";for(let[n,l]of Object.entries(t))e+=`
\u2022 (${n}) ${l}`;return e}function Ede(t){let e={...t.opts.constraints},n=e[TU.name];return delete e[TU.name],{...t,method:n,opts:{constraints:e}}}function bde(t){let e=` (${t.method})`,n=t.opts.constraints||{};return Object.keys(n).length!==0&&(e+=" "+JSON.stringify(n)),e+=_de(t.metaData),e}function wde(t){return t.reduce((e,n)=>{for(let l of e)if(SU(n.opts.constraints,l.opts.constraints)&&SU(n.metaData,l.metaData))return l.method+=", "+n.method,e;return e.push(n),e},[])}function Sde(t,e,n){let l=t.routes;return n.method===void 0&&(l=l.map(Ede)),l=l.map(r=>(r.metaData=vde(r,n),r)),n.method===void 0&&(l=wde(l)),l.map(bde).join(`
${e}`)}function t7(t,e,n,l){if((t.isLeafNode||l.commonPrefix!==!1)&&(n=n||"(empty root node)",e=e[n]={},t.isLeafNode&&(e[xU]=Sde(t,n,l)),n=""),t.staticChildren)for(let r of Object.values(t.staticChildren))t7(r,e,n+r.prefix,l);if(t.parametricChildren)for(let r of Object.values(t.parametricChildren)){let i=Array.from(r.nodePaths).join("|");t7(r,e,n+i,l)}t.wildcardChild&&t7(t.wildcardChild,e,"*",l)}function Tde(t,e){let n={};return t7(t,n,t.prefix,e),AU(n)}NU.exports={prettyPrintTree:Tde}});var IU=k((Mke,RU)=>{"use strict";var xde=e7(),i_=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,n){let l=n.params,r=n.opts.constraints||{},i={params:l,constraints:r,handler:n.handler,store:n.store||null,_createParamsObject:this._compileCreateParamsObject(l)},s=Object.keys(r);s.length===0&&(this.unconstrainedHandler=i);for(let u of s)this.constraints.includes(u)||(u==="version"?this.constraints.unshift(u):this.constraints.push(u));let a=s.includes(xde.name);if(!a&&this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(i),this.handlers.sort((u,o)=>Object.keys(u.constraints).length-Object.keys(o.constraints).length),a||this._compileGetHandlerMatchingConstraints(e,r)}_compileCreateParamsObject(e){let n=[];for(let l=0;l<e.length;l++)n.push(`'${e[l]}': paramsArray[${l}]`);return new Function("paramsArray",`return {${n.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,n){for(let l=0;l<this.handlers.length;l++){let i=this.handlers[l].constraints[n];if(i!==void 0){let s=e.get(i)||0;s|=1<<l,e.set(i,s)}}}_constrainedIndexBitmask(e){let n=0;for(let l=0;l<this.handlers.length;l++)this.handlers[l].constraints[e]!==void 0&&(n|=1<<l);return~n}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let l of this.constraints){let r=e.newStoreForConstraint(l);this.constrainedHandlerStores[l]=r,this._buildConstraintStore(r,l)}let n=[];n.push(`
let candidates = ${(1<<this.handlers.length)-1}
let mask, matches
`);for(let r of this.constraints){n.push(`
mask = ${this._constrainedIndexBitmask(r)}
value = derivedConstraints.${r}
`);let l=e.strategies[r].mustMatchWhenDerived?"matches":"(matches | mask)";n.push(`
`);for(let l of this.constraints){n.push(`
mask = ${this._constrainedIndexBitmask(l)}
value = derivedConstraints.${l}
`);let i=e.strategies[l].mustMatchWhenDerived?"matches":"(matches | mask)";n.push(`
if (value === undefined) {
candidates &= mask
} else {
matches = this.constrainedHandlerStores.${r}.get(value) || 0
candidates &= ${l}
matches = this.constrainedHandlerStores.${l}.get(value) || 0
candidates &= ${i}
}
if (candidates === 0) return null;
`)}for(let r in e.strategies)e.strategies[r].mustMatchWhenDerived&&!this.constraints.includes(r)&&n.push(`if (derivedConstraints.${r} !== undefined) return null`);n.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",n.join(`
`))}};_U.exports=Zv});var wU=k((dke,bU)=>{"use strict";var ade=EU(),i7={STATIC:0,PARAMETRIC:1,WILDCARD:2},Z9=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,n){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new ade),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},e7=class extends Z9{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let r=this.staticChildren[e.charAt(n)];return r===void 0||!r.matchPrefix(e,n)?null:r}getStaticChild(e,n=0){if(e.length===n)return this;let r=this.findStaticMatchingChild(e,n);return r?r.getStaticChild(e,n+r.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let i=1;for(;i<n.prefix.length;i++)if(e.charCodeAt(i)!==n.prefix.charCodeAt(i)){n=n.split(this,i);break}return n.createStaticChild(e.slice(i))}let r=e.charAt(0);return this.staticChildren[r]=new t7(e),this.staticChildren[r]}},t7=class t extends e7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=i7.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,r=this.parametricChildren.find(i=>(i.regex&&i.regex.source)===n);return r||null}createParametricChild(e,n,r){let i=this.getParametricChild(e);return i?(i.nodePaths.add(r),i):(i=new n7(e,n,r),this.parametricChildren.push(i),this.parametricChildren.sort((l,s)=>l.isRegex?s.isRegex?l.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(l.staticSuffix)?1:l.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),i)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new r7,this.wildcardChild}split(e,n){let r=this.prefix.slice(0,n),i=this.prefix.slice(n);this.prefix=i,this._compilePrefixMatch();let l=new t(r);return l.staticChildren[i.charAt(0)]=this,e.staticChildren[r.charAt(0)]=l,l}getNextNode(e,n,r,i){let l=this.findStaticMatchingChild(e,n),s=0;if(l===null){if(this.parametricChildren.length===0)return this.wildcardChild;l=this.parametricChildren[0],s=1}this.wildcardChild!==null&&r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)r.push({paramsCount:i,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return l}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let r=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},n7=class extends e7{constructor(e,n,r){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=i7.PARAMETRIC,this.nodePaths=new Set([r])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},r7=class extends Z9{constructor(){super(),this.kind=i7.WILDCARD}getNextNode(){return null}};bU.exports={StaticNode:t7,ParametricNode:n7,WildcardNode:r7,NODE_TYPES:i7}});var TU=k((hke,SU)=>{"use strict";var ode=require("assert");function bc(){if(!(this instanceof bc))return new bc;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}bc.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,r,i]=t.split(".");return n=Number(n)||0,r=Number(r)||0,i=Number(i)||0,n>=this.maxMajor&&(this.maxMajor=n,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),r>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=r,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),i>=(this.store[`${n}.${r}`]||0)&&(this.maxPatches[`${n}.${r}`]=i,this.store[`${n}.${r}.x`]=e),this.store[`${n}.${r}.${i}`]=e,this};bc.prototype.get=function(t){return this.store[t]};SU.exports={name:"version",mustMatchWhenDerived:!0,storage:bc,validate(t){ode(typeof t=="string","Version should be a string")}}});var AU=k((mke,xU)=>{"use strict";var ude=require("assert");function cde(){let t={},e=[];return{get:n=>{let r=t[n];if(r)return r;for(let i of e)if(i.host.test(n))return i.value},set:(n,r)=>{n instanceof RegExp?e.push({host:n,value:r}):t[n]=r}}}xU.exports={name:"host",mustMatchWhenDerived:!1,storage:cde,validate(t){ude(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var NU=k((yke,OU)=>{"use strict";var pde=TU(),fde=AU(),e_=require("assert"),t_=class{constructor(e){if(this.strategies={version:pde,host:fde},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(e_(typeof e.name=="string"&&e.name!=="","strategy.name is required."),e_(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};OU.exports=t_});var RU=k((gke,CU)=>{"use strict";var dde=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];CU.exports=dde});var DU=k((vke,kU)=>{"use strict";function IU(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function hde(t,e){let n=!1,r=!1,i="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let o=t.charCodeAt(s+1),u=t.charCodeAt(s+2);IU(o,u)===null?n=!0:(r=!0,o===50&&u===53&&(n=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(a===63||a===35||a===59&&e){i=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:i,shouldDecodeParam:r}}function mde(t){let e=t.indexOf("%");if(e===-1)return t;let n="",r=e;for(let i=e;i<t.length;i++)if(t.charCodeAt(i)===37){let l=t.charCodeAt(i+1),s=t.charCodeAt(i+2),a=IU(l,s);n+=t.slice(r,i)+a,r=i+3}return t.slice(0,e)+n+t.slice(r)}kU.exports={safeDecodeURI:hde,safeDecodeURIComponent:mde}});var a_=k((_ke,$U)=>{"use strict";var Ur=require("assert"),yde=eU(),l7=cU(),i_=i1(),{prettyPrintTree:gde}=vU(),{StaticNode:PU,NODE_TYPES:n_}=wU(),vde=NU(),F1=RU(),r_=Y9(),{safeDecodeURI:_de,safeDecodeURIComponent:LU}=DU(),FU=/^https?:\/\/.*?\//,H3=/(\/:[^/()]*?)\?(\/?)/;if(!l7(FU))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!l7(H3))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Er(t){if(!(this instanceof Er))return new Er(t);t=t||{},this._opts=t,t.defaultRoute?(Ur(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(Ur(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(Ur(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Ede,t.querystringParser?(Ur(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:yde.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new vde(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Er.prototype.on=function(e,n,r,i,l){typeof r=="function"&&(i!==void 0&&(l=i),i=r,r={}),Ur(typeof n=="string","Path should be a string"),Ur(n.length>0,"The path could not be empty"),Ur(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),Ur(typeof i=="function","Handler should be a function");let s=n.match(H3);if(s){Ur(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let u=n.replace(H3,"$1$2"),c=n.replace(H3,"$2");this.on(e,u,r,i,l),this.on(e,c,r,i,l);return}let a=n;this.ignoreDuplicateSlashes&&(n=l_(n)),this.ignoreTrailingSlash&&(n=s_(n));let o=Array.isArray(e)?e:[e];for(let u of o)Ur(typeof u=="string","Method should be a string"),Ur(F1.includes(u),`Method '${u}' is not an http method.`),this._on(u,n,r,i,l,a)};Er.prototype._on=function(e,n,r,i,l){let s={};r.constraints!==void 0&&(Ur(typeof r.constraints=="object"&&r.constraints!==null,"Constraints should be an object"),Object.keys(r.constraints).length!==0&&(s=r.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new PU("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new PU(""),this.trees[e].staticChildren["/"]=m}let o=this.trees[e],u=o.prefix.length,c=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let d=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,y=a.charCodeAt(m)===42;if(d||y||m===a.length&&m!==u){let _=a.slice(u,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),o=o.createStaticChild(_)}if(d){let _=!1,S=[],w=m+1;for(let E=w;;E++){let g=a.charCodeAt(E),v=g===40,x=g===45||g===46,O=g===47||E===a.length;if(v||x||O){let N=a.slice(w,E);if(c.push(N),_=_||v||x,v){let F=MU(a,E),te=a.slice(E,F+1);this.allowUnsafeRegex||Ur(l7(new RegExp(te)),`The regex '${te}' is not safe!`),S.push(UU(te)),E=F+1}else S.push("(.*?)");let R=E;for(;E<a.length;E++){let F=a.charCodeAt(E);if(F===47)break;if(F===58)if(a.charCodeAt(E+1)===58)E++;else break}let U=a.slice(R,E);if(U& Line truncated
`)}for(let l in e.strategies)e.strategies[l].mustMatchWhenDerived&&!this.constraints.includes(l)&&n.push(`if (derivedConstraints.${l} !== undefined) return null`);n.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",n.join(`
`))}};RU.exports=i_});var DU=k(($ke,kU)=>{"use strict";var Ade=IU(),a7={STATIC:0,PARAMETRIC:1,WILDCARD:2},n7=class{constructor(){this.isLeafNode=!1,this.routes=null,this.handlerStorage=null}addRoute(e,n){this.routes===null&&(this.routes=[]),this.handlerStorage===null&&(this.handlerStorage=new Ade),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(n,e)}},l7=class extends n7{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,n){let l=this.staticChildren[e.charAt(n)];return l===void 0||!l.matchPrefix(e,n)?null:l}getStaticChild(e,n=0){if(e.length===n)return this;let l=this.findStaticMatchingChild(e,n);return l?l.getStaticChild(e,n+l.prefix.length):null}createStaticChild(e){if(e.length===0)return this;let n=this.staticChildren[e.charAt(0)];if(n){let r=1;for(;r<n.prefix.length;r++)if(e.charCodeAt(r)!==n.prefix.charCodeAt(r)){n=n.split(this,r);break}return n.createStaticChild(e.slice(r))}let l=e.charAt(0);return this.staticChildren[l]=new r7(e),this.staticChildren[l]}},r7=class t extends l7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=a7.STATIC,this._compilePrefixMatch()}getParametricChild(e){let n=e&&e.source,l=this.parametricChildren.find(r=>(r.regex&&r.regex.source)===n);return l||null}createParametricChild(e,n,l){let r=this.getParametricChild(e);return r?(r.nodePaths.add(l),r):(r=new i7(e,n,l),this.parametricChildren.push(r),this.parametricChildren.sort((i,s)=>i.isRegex?s.isRegex?i.staticSuffix===null?1:s.staticSuffix===null?-1:s.staticSuffix.endsWith(i.staticSuffix)?1:i.staticSuffix.endsWith(s.staticSuffix)?-1:0:-1:1),r)}getWildcardChild(){return this.wildcardChild?this.wildcardChild:null}createWildcardChild(){return this.wildcardChild=this.getWildcardChild()||new s7,this.wildcardChild}split(e,n){let l=this.prefix.slice(0,n),r=this.prefix.slice(n);this.prefix=r,this._compilePrefixMatch();let i=new t(l);return i.staticChildren[r.charAt(0)]=this,e.staticChildren[l.charAt(0)]=i,i}getNextNode(e,n,l,r){let i=this.findStaticMatchingChild(e,n),s=0;if(i===null){if(this.parametricChildren.length===0)return this.wildcardChild;i=this.parametricChildren[0],s=1}this.wildcardChild!==null&&l.push({paramsCount:r,brotherPathIndex:n,brotherNode:this.wildcardChild});for(let a=this.parametricChildren.length-1;a>=s;a--)l.push({paramsCount:r,brotherPathIndex:n,brotherNode:this.parametricChildren[a]});return i}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let n=1;n<this.prefix.length;n++){let l=this.prefix.charCodeAt(n);e.push(`path.charCodeAt(i + ${n}) === ${l}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},i7=class extends l7{constructor(e,n,l){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=n||null,this.kind=a7.PARAMETRIC,this.nodePaths=new Set([l])}getNextNode(e,n){return this.findStaticMatchingChild(e,n)}},s7=class extends n7{constructor(){super(),this.kind=a7.WILDCARD}getNextNode(){return null}};kU.exports={StaticNode:r7,ParametricNode:i7,WildcardNode:s7,NODE_TYPES:a7}});var LU=k((Bke,PU)=>{"use strict";var Ode=require("assert");function T5(){if(!(this instanceof T5))return new T5;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}T5.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[n,l,r]=t.split(".");return n=Number(n)||0,l=Number(l)||0,r=Number(r)||0,n>=this.maxMajor&&(this.maxMajor=n,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),l>=(this.maxMinors[n]||0)&&(this.maxMinors[n]=l,this.store[`${n}.x`]=e,this.store[`${n}.x.x`]=e),r>=(this.store[`${n}.${l}`]||0)&&(this.maxPatches[`${n}.${l}`]=r,this.store[`${n}.${l}.x`]=e),this.store[`${n}.${l}.${r}`]=e,this};T5.prototype.get=function(t){return this.store[t]};PU.exports={name:"version",mustMatchWhenDerived:!0,storage:T5,validate(t){Ode(typeof t=="string","Version should be a string")}}});var jU=k((Hke,FU)=>{"use strict";var Nde=require("assert");function Cde(){let t={},e=[];return{get:n=>{let l=t[n];if(l)return l;for(let r of e)if(r.host.test(n))return r.value},set:(n,l)=>{n instanceof RegExp?e.push({host:n,value:l}):t[n]=l}}}FU.exports={name:"host",mustMatchWhenDerived:!1,storage:Cde,validate(t){Nde(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var MU=k((Vke,UU)=>{"use strict";var Rde=LU(),Ide=jU(),s_=require("assert"),a_=class{constructor(e){if(this.strategies={version:Rde,host:Ide},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,e)for(let n of Object.values(e))this.addConstraintStrategy(n)}isStrategyUsed(e){return this.strategiesInUse.has(e)||this.asyncStrategiesInUse.has(e)}hasConstraintStrategy(e){let n=this.strategies[e];return n!==void 0?n.isCustom||this.isStrategyUsed(e):!1}addConstraintStrategy(e){if(s_(typeof e.name=="string"&&e.name!=="","strategy.name is required."),s_(e.storage&&typeof e.storage=="function Line truncated
`)).bind(this)}};UU.exports=a_});var BU=k((qke,$U)=>{"use strict";var kde=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"];$U.exports=kde});var qU=k((zke,VU)=>{"use strict";function HU(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function Dde(t,e){let n=!1,l=!1,r="";for(let s=1;s<t.length;s++){let a=t.charCodeAt(s);if(a===37){let u=t.charCodeAt(s+1),o=t.charCodeAt(s+2);HU(u,o)===null?n=!0:(l=!0,u===50&&o===53&&(n=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(a===63||a===35||a===59&&e){r=t.slice(s+1),t=t.slice(0,s);break}}return{path:n?decodeURI(t):t,querystring:r,shouldDecodeParam:l}}function Pde(t){let e=t.indexOf("%");if(e===-1)return t;let n="",l=e;for(let r=e;r<t.length;r++)if(t.charCodeAt(r)===37){let i=t.charCodeAt(r+1),s=t.charCodeAt(r+2),a=HU(i,s);n+=t.slice(l,r)+a,l=r+3}return t.slice(0,e)+n+t.slice(l)}VU.exports={safeDecodeURI:Dde,safeDecodeURIComponent:Pde}});var d_=k((Gke,YU)=>{"use strict";var Ml=require("assert"),Lde=pU(),u7=bU(),c_=s0(),{prettyPrintTree:Fde}=CU(),{StaticNode:zU,NODE_TYPES:u_}=DU(),jde=MU(),U0=BU(),o_=e7(),{safeDecodeURI:Ude,safeDecodeURIComponent:GU}=qU(),JU=/^https?:\/\/.*?\//,Vu=/(\/:[^/()]*?)\?(\/?)/;if(!u7(JU))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!u7(Vu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function bl(t){if(!(this instanceof bl))return new bl(t);t=t||{},this._opts=t,t.defaultRoute?(Ml(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(Ml(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(Ml(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=Mde,t.querystringParser?(Ml(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:Lde.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.constrainer=new jde(t.constraints),this.useSemicolonDelimiter=t.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}bl.prototype.on=function(e,n,l,r,i){typeof l=="function"&&(r!==void 0&&(i=r),r=l,l={}),Ml(typeof n=="string","Path should be a string"),Ml(n.length>0,"The path could not be empty"),Ml(n[0]==="/"||n[0]==="*","The first character of a path should be `/` or `*`"),Ml(typeof r=="function","Handler should be a function");let s=n.match(Vu);if(s){Ml(n.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let o=n.replace(Vu,"$1$2"),c=n.replace(Vu,"$2");this.on(e,o,l,r,i),this.on(e,c,l,r,i);return}let a=n;this.ignoreDuplicateSlashes&&(n=p_(n)),this.ignoreTrailingSlash&&(n=f_(n));let u=Array.isArray(e)?e:[e];for(let o of u)Ml(typeof o=="string","Method should be a string"),Ml(U0.includes(o),`Method '${o}' is not an http method.`),this._on(o,n,l,r,i,a)};bl.prototype._on=function(e,n,l,r,i){let s={};l.constraints!==void 0&&(Ml(typeof l.constraints=="object"&&l.constraints!==null,"Constraints should be an object"),Object.keys(l.constraints).length!==0&&(s=l.constraints)),this.constrainer.validateConstraints(s),this.constrainer.noteUsage(s),this.trees[e]===void 0&&(this.trees[e]=new zU("/"));let a=n;if(a==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new zU(""),this.trees[e].staticChildren["/"]=m}let u=this.trees[e],o=u.prefix.length,c=[];for(let m=0;m<=a.length;m++){if(a.charCodeAt(m)===58&&a.charCodeAt(m+1)===58){m++;continue}let d=a.charCodeAt(m)===58&&a.charCodeAt(m+1)!==58,y=a.charCodeAt(m)===42;if(d||y||m===a.length&&m!==o){let _=a.slice(o,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),u=u.createStaticChild(_)}if(d){let _=!1,S=[],w=m+1;for(let E=w;;E++){let g=a.charCodeAt(E),v=g===40,x=g===45||g===46,O=g===47||E===a.length;if(v||x||O){let N=a.slice(w,E);if(c.push(N),_=_||v||x,v){let F=WU(a,E),te=a.slice(E,F+1);this.allowUnsafeRegex||Ml(u7(new RegExp(te)),`The regex '${te}' is not safe!`),S.push(XU(te)),E=F+1}else S.push("(.*?)");let R=E;for(;E<a.length;E++){let F=a.charCodeAt(E);if(F===47)break;if(F===58)if(a.charCodeAt(E+1)===58)E++;else break}let U=a.slice(R,E);if(U& Line truncated
Content-Length: ${Te.length}\r
Content-Type: application/json\r
\r
${Te}`),ve.destroy(ie)}function me(ie,ve){ie.headers["accept-version"]!==void 0&&(ie.headers[sme]=ie.headers["accept-version"],ie.headers["accept-version"]=void 0),d.router.lookup(ie,ve)}function P(ie,ve,Te){if(a){let ft=QM(F.server,ve),Pe=WM(F,o,ve,ft),Lt=new y7(ft,null,ve,null,Pe,F),wr=new kc(Te,Lt,Pe);return l===!1&&Pe.info({req:Lt},"incoming request"),a(new Ame(ie),Lt,wr)}let Xe=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${ie}' is not a valid url component","statusCode":400}`;Te.writeHead(400,{"Content-Type":"application/json","Content-Length":Xe.length}),Te.end(Xe)}function G(ie,ve,Te){if(ie!==!1)return function(ft){if(ft){if(a){let Lt=QM(F.server,ve),wr=WM(F,o,ve,Lt),Ft=new y7(Lt,null,ve,null,wr,F),Zt=new kc(Te,Ft,wr);return l===!1&&wr.info({req:Ft},"incoming request"),a(new xme,Ft,Zt)}let Pe='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Te.writeHead(500,{"Content-Type":"application/json","Content-Length":Pe.length}),Te.end(Pe)}}}function V(ie,ve){return te('Cannot call "setNotFoundHandler"!'),d.setNotFoundHandler.call(this,ie,ve,U,m.routeHandler),this}function q(ie){return te('Cannot call "setValidatorCompiler"!'),this[U2].setValidatorCompiler(ie),this}function Zn(ie){return te('Cannot call "setSchemaErrorFormatter"!'),r$(ie),this[I_]=ie.bind(this),this}function Tt(ie){return te('Cannot call "setSerializerCompiler"!'),this[U2].setSerializerCompiler(ie),this}function Qe(ie){te('Cannot call "setSchemaController"!');let ve=this[U2],Te=KM.buildSchemaController(ve,Object.assign({},ve.opts,ie));return this[U2]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function pt(ie){return te('Cannot call "setReplySerializer"!'),this[JM]=ie,this}function ze(ie){return te('Cannot call "setErrorHandler"!'),this[m7]=n$(this[m7],ie.bind(this)),this}function Me(ie){return te('Cannot call "setChildLoggerFactory"!'),this[D_]=ie,this}function $t(ie={}){return ie.includeMeta=ie.includeHooks?ie.includeMeta?L_.concat(ie.includeMeta):L_:ie.includeMeta,m.printRoutes(ie)}function gt(ie,{rewriteUrl:ve,logger:Te}){let Xe;return function(Pe,Lt){if(Xe===void 0&&(Xe=ie.isAsyncConstraint()),ve){Pe.originalUrl=Pe.url;let wr=ve.call(N,Pe);if(typeof wr=="string")Pe.url=wr;else{let Ft=new Fme(Pe.url,typeof wr);Pe.destroy(Ft)}}ie.routing(Pe,Lt,G(Xe,Pe,Lt))}}function Et(ie){return te('Cannot call "setGenReqId"!'),this[P_]=ZM(this[R_].requestIdHeader,ie),this}}g7.errorCodes=q3;function r$(t){if(typeof t!="function")throw new t$(typeof t);if(t.constructor.name==="AsyncFunction")throw new t$("AsyncFunction")}v7.exports=g7;v7.exports.fastify=g7;v7.exports.default=g7});var Rq=k((EPe,Cq)=>{"use strict";Cq.exports=Error});var kq=k((bPe,Iq)=>{"use strict";Iq.exports=EvalError});var Pq=k((wPe,Dq)=>{"use strict";Dq.exports=RangeError});var Fq=k((SPe,Lq)=>{"use strict";Lq.exports=ReferenceError});var Sb=k((TPe,jq)=>{"use strict";jq.exports=SyntaxError});var _0=k((xPe,Uq)=>{"use strict";Uq.exports=TypeError});var $q=k((APe,Mq)=>{"use strict";Mq.exports=URIError});var Hq=k((OPe,Bq)=>{"use strict";Bq.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var l=Object.getOwnPropertySymbols(e);if(l.length!==1||l[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}});var zq=k((NPe,qq)=>{"use strict";var Vq=typeof Symbol<"u"&&Symbol,jEe=Hq();qq.exports=function(){return typeof Vq!="function"||typeof Symbol!="function"||typeof Vq("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:jEe()}});var Jq=k((CPe,Gq)=>{"use strict";var Tb={__proto__:null,foo:{}},UEe=Object;Gq.exports=function(){return{__proto__:Tb}.foo===Tb.foo&&!(Tb instanceof UEe)}});var Wq=k((RPe,Xq)=>{"use strict";var MEe="Function.prototype.bind called on incompatible ",$Ee=Object.prototype.toString,BEe=Math.max,HEe="[object Function]",Kq=function(e,n){for(var r=[],i=0;i<e.length;i+=1)r[i]=e[i];for(var l=0;l<n.length;l+=1)r[l+e.length]=n[l];return r},VEe=function(e,n){for(var r=[],i=n||0,l=0;i<e.length;i+=1,l+=1)r[l]=e[i];return r},qEe=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};Xq.exports=function(e){var n=this;if(typeof n!="function"||$Ee.apply(n)!==HEe)throw new TypeError(MEe+n);for(var r=VEe(arguments,1),i,l=function(){if(this instanceof i){var c=n.apply(this,Kq(r,arguments));return Object(c)===c?c:this}return n.apply(e, Line truncated
`)>=0)return!1;return!0}function Jbe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=ya.call(Array(t.indent+1)," ");else return null;return{base:n,prev:ya.call(Array(e+1),n)}}function Ub(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+ya.call(t,","+n)+`
`+e.prev}function Xp(t,e){var n=jb(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=to(t,i)?e(t[i],t):""}var l=typeof kb=="function"?kb(t):[],s;if(x0){s={};for(var a=0;a<l.length;a++)s["$"+l[a]]=l[a]}for(var o in t)to(t,o)&&(n&&String(Number(o))===o&&o<t.length||x0&&s["$"+o]instanceof Symbol||(Vz.call(/[^\w$]/,o)?r.push(e(o,t)+": "+e(t[o],t)):r.push(o+": "+e(t[o],t))));if(typeof kb=="function")for(var u=0;u<l.length;u++)qz.call(t,l[u])&&r.push("["+e(l[u])+"]: "+e(t[l[u]],t));return r}});var Zz=k((VPe,Qz)=>{"use strict";var Yz=fu(),A0=Nz(),Kbe=Wz(),Xbe=_0(),Qp=Yz("%WeakMap%",!0),Zp=Yz("%Map%",!0),Wbe=A0("WeakMap.prototype.get",!0),Ybe=A0("WeakMap.prototype.set",!0),Qbe=A0("WeakMap.prototype.has",!0),Zbe=A0("Map.prototype.get",!0),ewe=A0("Map.prototype.set",!0),twe=A0("Map.prototype.has",!0),Hb=function(t,e){for(var n=t,r;(r=n.next)!==null;n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r},nwe=function(t,e){var n=Hb(t,e);return n&&n.value},rwe=function(t,e,n){var r=Hb(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}},iwe=function(t,e){return!!Hb(t,e)};Qz.exports=function(){var e,n,r,i={assert:function(l){if(!i.has(l))throw new Xbe("Side channel does not contain "+Kbe(l))},get:function(l){if(Qp&&l&&(typeof l=="object"||typeof l=="function")){if(e)return Wbe(e,l)}else if(Zp){if(n)return Zbe(n,l)}else if(r)return nwe(r,l)},has:function(l){if(Qp&&l&&(typeof l=="object"||typeof l=="function")){if(e)return Qbe(e,l)}else if(Zp){if(n)return twe(n,l)}else if(r)return iwe(r,l);return!1},set:function(l,s){Qp&&l&&(typeof l=="object"||typeof l=="function")?(e||(e=new Qp),Ybe(e,l,s)):Zp?(n||(n=new Zp),ewe(n,l,s)):(r||(r={key:{},next:null}),rwe(r,l,s))}};return i}});var ef=k((qPe,eG)=>{"use strict";var lwe=String.prototype.replace,swe=/%20/g,Vb={RFC1738:"RFC1738",RFC3986:"RFC3986"};eG.exports={default:Vb.RFC3986,formatters:{RFC1738:function(t){return lwe.call(t,swe,"+")},RFC3986:function(t){return String(t)}},RFC1738:Vb.RFC1738,RFC3986:Vb.RFC3986}});var Gb=k((zPe,nG)=>{"use strict";var awe=ef(),qb=Object.prototype.hasOwnProperty,du=Array.isArray,ga=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),owe=function(e){for(;e.length>1;){var n=e.pop(),r=n.obj[n.prop];if(du(r)){for(var i=[],l=0;l<r.length;++l)typeof r[l]<"u"&&i.push(r[l]);n.obj[n.prop]=i}}},tG=function(e,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(r[i]=e[i]);return r},uwe=function t(e,n,r){if(!n)return e;if(typeof n!="object"){if(du(e))e.push(n);else if(e&&typeof e=="object")(r&&(r.plainObjects||r.allowPrototypes)||!qb.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var i=e;return du(e)&&!du(n)&&(i=tG(e,r)),du(e)&&du(n)?(n.forEach(function(l,s){if(qb.call(e,s)){var a=e[s];a&&typeof a=="object"&&l&&typeof l=="object"?e[s]=t(a,l,r):e.push(l)}else e[s]=l}),e):Object.keys(n).reduce(function(l,s){var a=n[s];return qb.call(l,s)?l[s]=t(l[s],a,r):l[s]=a,l},i)},cwe=function(e,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},e)},pwe=function(t,e,n){var r=t.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},zb=1024,fwe=function(e,n,r,i,l){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),r==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",o=0;o<s.length;o+=zb){for(var u=s.length>=zb?s.slice(o,o+zb):s,c=[],f=0;f<u.length;++f){var m=u.charCodeAt(f);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||l===awe.RFC1738&&(m===40||m===41)){c[c.length]=u.charAt(f);continue}if(m<128){c[c.length]=ga[m];continue}if(m<2048){c[c.length]=ga[192|m>>6]+ga[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=ga[224|m>>12]+ga[128|m>>6&63]+ga[128|m&63];continue}f+=1,m=65536+((m&1023)<<10|u.charCodeAt(f)&1023),c[c.length]=ga[240|m>>18]+ga[128|m>>12&63]+ga[128|m>>6&63]+ga[128|m&63]}a+=c.join("")}return a},dwe=function(e){for(var n=[{obj:{o:e},prop:"o"}],r=[],i=0;i<n.length;++i)for(var l=n[i],s=l.obj[l.prop],a=Object.keys(s),o=0;o<a.length;++o){var u=a[o],c=s[u];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:s,prop:u}),r.push(c))}return owe(n),e},hwe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},mwe=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},ywe=function(e,n){return[].concat(e,n)},gwe=function(e,n){if(du(e)){for(var r=[],i=0;i<e.length;i+=1)r.push(n(e[i]));return r}return n(e)};nG.exports={arrayToObject:tG,assign:cwe,combine:ywe,compact:dwe,decode:pwe,encode:fwe,isBuffer:mwe,isRegExp:hwe,maybeMap:gwe,merge:uwe}});var oG=k((GPe,aG)=>{"use strict";var iG=Zz(),tf=Gb(),R5=ef(),vwe=Object.prototype.hasOwnProperty,lG={brack Line truncated
`;ln.DEFAULT_CONTENT_TYPE="application/octet-stream";ln.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=aw.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),rJ.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(t,e,n),l=this._multiPartFooter();r(i),r(e),r(l),this._trackLength(i,e,n)};ln.prototype._trackLength=function(t,e,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(t)+ln.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof XSe))&&(n.knownLength||this._valuesToMeasure.push(e))};ln.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):KSe.stat(t.path,function(n,r){var i;if(n){e(n);return}i=r.size-(t.start?t.start:0),e(null,i)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};ln.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(e,n),i=this._getContentType(e,n),l="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header=="object"&&sw(s,n.header);var a;for(var o in s)s.hasOwnProperty(o)&&(a=s[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(l+=o+": "+a.join("; ")+ln.LINE_BREAK)));return"--"+this.getBoundary()+ln.LINE_BREAK+l+ln.LINE_BREAK};ln.prototype._getContentDisposition=function(t,e){var n,r;return typeof e.filepath=="string"?n=iw.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=iw.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=iw.basename(t.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};ln.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=lw.lookup(t.name)),!n&&t.path&&(n=lw.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=lw.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=ln.DEFAULT_CONTENT_TYPE),n};ln.prototype._multiPartFooter=function(){return function(t){var e=ln.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};ln.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ln.LINE_BREAK};ln.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};ln.prototype.setBoundary=function(t){this._boundary=t};ln.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ln.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(ln.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ln.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};ln.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};ln.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ln.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}WSe.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){t(n);return}r.forEach(function(i){e+=i}),t(null,e)})};ln.prototype.submit=function(t,e){var n,r,i={method:"post"};return typeof t=="string"?(t=JSe(t),r=sw({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},i)):(r=sw(t,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(t.headers),r.protocol=="https:"?n=GSe.request(r):n=zSe.request(r),this.getLength(function(l,s){if(l&&l!=="Unknown stream"){this._error(l);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,o=function(u,c){return n.removeListener("error",o),n.removeListener("response",a),e.call(this,u,c)};a=o.bind(this,null),n.on("error",o),n.on("response",a)}}.bind(this)),n};ln.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,f.message,f.stack);var m=new Error("tunneling socket could not be established, cause="+f.message);m.code="ECONNRESET",e.request.emit("error",m),r.removeSocket(i)}};a2.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var r=this.requests.shift();r&&this.createSocket(r,function(i){r.request.onSocket(i)})}};function oK(t,e){var n=this;a2.prototype.createSocket.call(n,t,function(r){var i=t.request.getHeader("host"),l=Hw({},n.options,{socket:r,servername:i?i.replace(/:.*$/,""):t.host}),s=KTe.connect(0,l);n.sockets[n.sockets.indexOf(r)]=s,e(s)})}function uK(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function Hw(t){for(var e=1,n=arguments.length;e<n;++e){var r=arguments[e];if(typeof r=="object")for(var i=Object.keys(r),l=0,s=i.length;l<s;++l){var a=i[l];r[a]!==void 0&&(t[a]=r[a])}}return t}var oo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?oo=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:oo=function(){};F0.debug=oo});var fK=k((UUe,pK)=>{pK.exports=cK()});var mZ=k(bu=>{"use strict";Object.defineProperty(bu,"__esModule",{value:!0});bu.removeTrailingChar=bu.merge=void 0;var EOe=(...t)=>{let e={};return t.forEach(function(n){var r;for(r in n)r in e&&e[r]===null?e[r]=n[r]:r in e&&Array.isArray(e[r])?e[r]=e[r].concat(n[r]):r in e&&typeof e[r]=="object"?e[r]=(0,bu.merge)(e[r],n[r]):e[r]=n[r]}),e};bu.merge=EOe;var bOe=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;bu.removeTrailingChar=bOe});var U0=k(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});Qo.DataError=Qo.DatabaseError=Qo.NestedError=void 0;var X5=class extends Error{inner;id;constructor(e,n,r){super(e),this.inner=r,this.id=n,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
`+this.inner:e}};Qo.NestedError=X5;var hT=class extends X5{};Qo.DatabaseError=hT;var mT=class extends X5{};Qo.DataError=mT});var ET=k(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.getArrayIndicies=al.validateArrayIndex=al.validateArrayIndicies=al.isInt=al.ArrayInfo=al.arrayRegex=void 0;var Sf=U0(),wOe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;al.arrayRegex=wOe;var yT={},gT=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let r=n[0]??0;if(this.append=r===""||n[n.length-1]==="",this.indicies=n,vT(r))this.index=parseInt(r);else if(!this.append)throw new Sf.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(yT[e])return yT[e];let r=(0,al.arrayRegex)().exec(e.trim());if(r!=null){let i=r[1],l="["+r[2].toString()+"]",s=_T(l);return yZ(s),yT[e]=new t(i,s)}return null}getIndex(e,n){if(this.append)return-1;let r=this.index;if(r==-1){let i=n?e:e[this.property];return i.length===0?0:i.length-1}return r}getData(e){if(this.append)throw new Sf.DataError("Can't get data when appending",100);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r[n]}setData(e,n){if(this.append){let r=e[this.property];this.indicies.forEach(i=>{i!==""&&(i=+i,i===-1&&(i=r.length-1),r=r[+i])}),r.push(n)}else{let{index:r,dataForProperty:i}=this.getArrayDataAndIndexFromProperty(e);r===-1?i.push(n):i[r]=n}}delete(e){if(this.append)throw new Sf.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);r.splice(n,1)}isValid(e){let{index:n,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);return r.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,r=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let i=0;i<this.indicies.length-1;i++){let l=+this.indicies[i];l===-1&&(l=r.length-1),r=r[l]}n===-1&&(n=r.length-1)}return{index:n,dataForProperty:r}}isMultiDimensional(){return this.indicies.length>1}};al.ArrayInfo=gT;function vT(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}al.isInt=vT;function yZ(t){let e=t.filter(n=>n==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&t[t.length-1]!=="")throw Error("Append index must be at the end of the nested array")}al.validateArrayIndicies=yZ;function gZ(t){if(t.length!==0&&!vT(t))throw new Sf.DataError("Only numerical values accepted for array index",200)}al.validateArrayIndex=gZ;function _T(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));gZ(e);let n=e.length+2;return[e,..._T(t.substring(n))]}al.getArrayIndicies=_T});var EZ=k(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.DBParentData=void 0;var vZ=ET(),_Z=U0(),bT=class{parent;data;db;dataPath;constructor(e,n,r,i){this.parent=i,this.data=e,this.db=n,this.dataPath=r}checkArray(e=!1){let n=vZ.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new _Z.DataError("DataPath: /"+this.dataPath+". Can't find index "+n.index+" in array "+n.property,10);return n}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let n=vZ.ArrayInfo.processArray(this.parent);if(n){if(!this.data.hasOwnProperty(n.property))this.data[n.property]=[];else if(!Array.isArray(this.data[n.property]))throw new _Z.DataError("DataPath: /"+this.dataPath+". "+n.property+" is not an array.",11);n.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};Tf.DBParentData=bT});var wZ=k((nze,bZ)=>{bZ.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(l,s,a){var o;typeof l!="function"?(i.hasOwnProperty(l)||(i[l]=new t),o=i[l]):(a=s,s=l,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,o.readers--,o.queue.length&&o.queue[0]())}}();if(o.readers<0||o.queue.length){var f=!1;if(o.queue.push(function(){!f&&o.readers>=0&&(f=!0,o.queue.shift(),o.readers++,s.call(u,c),o.queue.length&&o.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){f||(f=!0,o.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else o.readers++,s.call(a.scope,c)}function n(l,s,a){var o;typeof l!="function"?(i.hasOwnProperty(l)||(i[l]=new t),o=i[l]):(a=s,s=l,o=r),a||(a={});var u=null;a.hasOwnProperty("scope")&&(u=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,o.readers=0,o.queue.length&&o.queue[0]())}}();if(o.readers||o.queue.length){var f=!1;if(o.queue.push(function(){f|| Line truncated
`:t(e.children):j7(e)?t(e.children):da(e)?e.data:""},textContent:i0,innerText:$7,getChildren:Y7,getParent:CB,getSiblings:RB,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:PE,prevElementSibling:LE,removeElement:J3,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var r=e.next=t.next;if(r&&(r.prev=e),r=e.parent=t.parent){let i=r.children;i[i.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){J3(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null},append:function(t,e){J3(e);var n=t.parent,r=t.next;if(e.next=r,((e.prev=t).next=e).parent=n,r){if(r.prev=e,n){let i=n.children;i.splice(i.lastIndexOf(r),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){J3(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1?((t=t.children[1]).prev=e).next=t:e.next=null},prepend:function(t,e){J3(e);var n,r=t.parent;r&&(n=r.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,(e.next=t).prev=e},filter:O7,find:FE,findOneChild:function(t,e){return e.find(t)},findOne:sE,existsOne:function t(e,n){return n.some(r=>yt(r)&&(e(r)||t(e,r.children)))},findAll:function(t,e){for(var n=[],r=[e],i=[0];;)if(i[0]>=r[0].length){if(r.length===1)return n;r.shift(),i.shift()}else{let l=r[0][i[0]++];yt(l)&&(t(l)&&n.push(l),0<l.children.length)&&(i.unshift(0),r.unshift(l.children))}},testElement:function(t,e){return!(t=f$(t))||t(e)},getElements:function(t,e,n,r=1/0){return(t=f$(t))?O7(t,e,n,r):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),sE(IB("id",t),e,n)},getElementsByTagName:Q1,getElementsByTagType:function(t,e,n=!0,r=1/0){return O7(B7.tag_type(t),e,n,r)},removeSubsets:function(t){let e=t.length;for(;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(let r=n.parent;r;r=r.parent)if(t.includes(r)){t.splice(e,1);break}}return t},get DocumentPosition(){return is},compareDocumentPosition:kB,uniqueSort:l0,getFeed:function(t){return(t=_7(uye,t))?(t.name==="feed"?function(e){var n={type:"atom",items:Q1("entry",e=e.children).map(i=>{var l={media:d$(i=i.children)},s=(_l(l,"id","id",i),_l(l,"title","title",i),(s=_7("link",i))==null?void 0:s.attribs.href);return s&&(l.link=s),(s=M2("summary",i)||M2("content",i))&&(l.description=s),(s=M2("updated",i))&&(l.pubDate=new Date(s)),l})},r=(_l(n,"id","id",e),_l(n,"title","title",e),(r=_7("link",e))==null?void 0:r.attribs.href);return r&&(n.link=r),_l(n,"description","subtitle",e),(r=M2("updated",e))&&(n.updated=new Date(r)),_l(n,"author","email",e,!0),n}:function(r){var n=(n=(n=_7("channel",r.children))==null?void 0:n.children)!=null?n:[],r={type:r.name.substr(0,3),id:"",items:Q1("item",r.children).map(l=>{var s={media:d$(l=l.children)};return _l(s,"id","guid",l),_l(s,"title","title",l),_l(s,"link","link",l),_l(s,"description","description",l),(l=M2("pubDate",l)||M2("dc:date",l))&&(s.pubDate=new Date(l)),s})},i=(_l(r,"title","title",n),_l(r,"link","link",n),_l(r,"description","description",n),M2("lastBuildDate",n));return i&&(r.updated=new Date(i)),_l(r,"author","managingEditor",n,!0),r})(t):null}}),Z1=function(){return(Z1=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function DB(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function cye(t,e){return DB(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,Z1(Z1(Z1({},DE),this==null?void 0:this._options),rE(e??{})))}function pye(t){return DB(this,t,Z1(Z1({},this._options),{xmlMode:!0}))}function l5(t){for(var e=t||(this?this.root():[]),n="",r=0;r<e.length;r++)n+=i0(e[r]);return n}function fye(t,e,n){return n===void 0&&(n=typeof e=="boolean"&&e),t&&typeof t=="string"?(typeof e=="boolean"&&(n=e),e=this.load(t,DE,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function dye(){return this(this._root)}function PB(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function hye(t,e){if(h$(t)&&h$(e)){for(var n=t.length,r=+e.length,i=0;i<r;i++)t[n++]=e[i];return t.length=n,t}}function h$(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var K3,mye=Object.freeze({__proto__:null,html:cye,xml:pye,text:l5,parseHTML:fye,root:dye,contains:PB,merge:hye});function fa(t){return t.cheerio!=null}function Nr(t,e){for(var n=t.length,r=0;r<n;r++)e(t[r],r);return t}function j_(e){var e="length"in e?Array.prototype.map.call(e,function(r){return U7(r,!0)}):[U7(e,!0)],n=new i2(e);return e.forEach(function(r){r.parent=n}),e}function aE(t){var e, Line truncated
${Te}`),ve.destroy(re)}function me(re,ve){re.headers["accept-version"]!==void 0&&(re.headers[xme]=re.headers["accept-version"],re.headers["accept-version"]=void 0),d.router.lookup(re,ve)}function P(re,ve,Te){if(a){let dt=o$(F.server,ve),Le=a$(F,u,ve,dt),Lt=new _7(dt,null,ve,null,Le,F),Sl=new L5(Te,Lt,Le);return i===!1&&Le.info({req:Lt},"incoming request"),a(new zme(re),Lt,Sl)}let Xe=`{"error":"Bad Request","code":"FST_ERR_BAD_URL","message":"'${re}' is not a valid url component","statusCode":400}`;Te.writeHead(400,{"Content-Type":"application/json","Content-Length":Xe.length}),Te.end(Xe)}function G(re,ve,Te){if(re!==!1)return function(dt){if(dt){if(a){let Lt=o$(F.server,ve),Sl=a$(F,u,ve,Lt),Ft=new _7(Lt,null,ve,null,Sl,F),en=new L5(Te,Ft,Sl);return i===!1&&Sl.info({req:Ft},"incoming request"),a(new qme,Ft,en)}let Le='{"error":"Internal Server Error","message":"Unexpected error from async constraint","statusCode":500}';Te.writeHead(500,{"Content-Type":"application/json","Content-Length":Le.length}),Te.end(Le)}}}function V(re,ve){return te('Cannot call "setNotFoundHandler"!'),d.setNotFoundHandler.call(this,re,ve,U,m.routeHandler),this}function q(re){return te('Cannot call "setValidatorCompiler"!'),this[Us].setValidatorCompiler(re),this}function el(re){return te('Cannot call "setSchemaErrorFormatter"!'),h$(re),this[j_]=re.bind(this),this}function Tt(re){return te('Cannot call "setSerializerCompiler"!'),this[Us].setSerializerCompiler(re),this}function Qe(re){te('Cannot call "setSchemaController"!');let ve=this[Us],Te=i$.buildSchemaController(ve,Object.assign({},ve.opts,re));return this[Us]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function ft(re){return te('Cannot call "setReplySerializer"!'),this[r$]=re,this}function ze(re){return te('Cannot call "setErrorHandler"!'),this[v7]=d$(this[v7],re.bind(this)),this}function $e(re){return te('Cannot call "setChildLoggerFactory"!'),this[M_]=re,this}function $t(re={}){return re.includeMeta=re.includeHooks?re.includeMeta?B_.concat(re.includeMeta):B_:re.includeMeta,m.printRoutes(re)}function vt(re,{rewriteUrl:ve,logger:Te}){let Xe;return function(Le,Lt){if(Xe===void 0&&(Xe=re.isAsyncConstraint()),ve){Le.originalUrl=Le.url;let Sl=ve.call(N,Le);if(typeof Sl=="string")Le.url=Sl;else{let Ft=new tye(Le.url,typeof Sl);Le.destroy(Ft)}}re.routing(Le,Lt,G(Xe,Le,Lt))}}function Et(re){return te('Cannot call "setGenReqId"!'),this[$_]=c$(this[F_].requestIdHeader,re),this}}E7.errorCodes=zu;function h$(t){if(typeof t!="function")throw new f$(typeof t);if(t.constructor.name==="AsyncFunction")throw new f$("AsyncFunction")}b7.exports=E7;b7.exports.fastify=E7;b7.exports.default=E7});var Bq=k((XPe,$q)=>{"use strict";$q.exports=Error});var Vq=k((WPe,Hq)=>{"use strict";Hq.exports=EvalError});var zq=k((YPe,qq)=>{"use strict";qq.exports=RangeError});var Jq=k((QPe,Gq)=>{"use strict";Gq.exports=ReferenceError});var kb=k((ZPe,Kq)=>{"use strict";Kq.exports=SyntaxError});var w4=k((eLe,Xq)=>{"use strict";Xq.exports=TypeError});var Yq=k((tLe,Wq)=>{"use strict";Wq.exports=URIError});var Zq=k((nLe,Qq)=>{"use strict";Qq.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),l=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var r=42;e[n]=r;for(n in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var i=Object.getOwnPropertySymbols(e);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,n);if(s.value!==r||s.enumerable!==!0)return!1}return!0}});var nz=k((lLe,tz)=>{"use strict";var ez=typeof Symbol<"u"&&Symbol,tbe=Zq();tz.exports=function(){return typeof ez!="function"||typeof Symbol!="function"||typeof ez("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:tbe()}});var rz=k((rLe,lz)=>{"use strict";var Db={__proto__:null,foo:{}},nbe=Object;lz.exports=function(){return{__proto__:Db}.foo===Db.foo&&!(Db instanceof nbe)}});var az=k((iLe,sz)=>{"use strict";var lbe="Function.prototype.bind called on incompatible ",rbe=Object.prototype.toString,ibe=Math.max,sbe="[object Function]",iz=function(e,n){for(var l=[],r=0;r<e.length;r+=1)l[r]=e[r];for(var i=0;i<n.length;i+=1)l[i+e.length]=n[i];return l},abe=function(e,n){for(var l=[],r=n||0,i=0;r<e.length;r+=1,i+=1)l[i]=e[r];return l},ube=function(t,e){for(var n="",l=0;l<t.length;l+=1)n+=t[l],l+1<t.length&&(n+=e);return n};sz.exports=function(e){var n=this;if(typeof n!="function"||rbe.apply(n)!==sbe)throw new TypeError(lbe+n);for(var l=abe(arguments,1),r,i=function(){if(this instanceof r){var c=n.apply(this,iz(l,arguments));return Object(c)===c?c:this}return n.apply(e, Line truncated
`)>=0)return!1;return!0}function pwe(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=mi.call(Array(t.indent+1)," ");else return null;return{base:n,prev:mi.call(Array(e+1),n)}}function Jb(t,e){if(t.length===0)return"";var n=`
`+e.prev+e.base;return n+mi.call(t,","+n)+`
`+e.prev}function tf(t,e){var n=Gb(t),l=[];if(n){l.length=t.length;for(var r=0;r<t.length;r++)l[r]=na(t,r)?e(t[r],t):""}var i=typeof Bb=="function"?Bb(t):[],s;if(N4){s={};for(var a=0;a<i.length;a++)s["$"+i[a]]=i[a]}for(var u in t)na(t,u)&&(n&&String(Number(u))===u&&u<t.length||N4&&s["$"+u]instanceof Symbol||(eG.call(/[^\w$]/,u)?l.push(e(u,t)+": "+e(t[u],t)):l.push(u+": "+e(t[u],t))));if(typeof Bb=="function")for(var o=0;o<i.length;o++)tG.call(t,i[o])&&l.push("["+e(i[o])+"]: "+e(t[i[o]],t));return l}});var cG=k((vLe,oG)=>{"use strict";var uG=ho(),C4=Mz(),fwe=aG(),dwe=w4(),rf=uG("%WeakMap%",!0),sf=uG("%Map%",!0),hwe=C4("WeakMap.prototype.get",!0),mwe=C4("WeakMap.prototype.set",!0),ywe=C4("WeakMap.prototype.has",!0),gwe=C4("Map.prototype.get",!0),vwe=C4("Map.prototype.set",!0),_we=C4("Map.prototype.has",!0),Yb=function(t,e){for(var n=t,l;(l=n.next)!==null;n=l)if(l.key===e)return n.next=l.next,l.next=t.next,t.next=l,l},Ewe=function(t,e){var n=Yb(t,e);return n&&n.value},bwe=function(t,e,n){var l=Yb(t,e);l?l.value=n:t.next={key:e,next:t.next,value:n}},wwe=function(t,e){return!!Yb(t,e)};oG.exports=function(){var e,n,l,r={assert:function(i){if(!r.has(i))throw new dwe("Side channel does not contain "+fwe(i))},get:function(i){if(rf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return hwe(e,i)}else if(sf){if(n)return gwe(n,i)}else if(l)return Ewe(l,i)},has:function(i){if(rf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return ywe(e,i)}else if(sf){if(n)return _we(n,i)}else if(l)return wwe(l,i);return!1},set:function(i,s){rf&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new rf),mwe(e,i,s)):sf?(n||(n=new sf),vwe(n,i,s)):(l||(l={key:{},next:null}),bwe(l,i,s))}};return r}});var af=k((_Le,pG)=>{"use strict";var Swe=String.prototype.replace,Twe=/%20/g,Qb={RFC1738:"RFC1738",RFC3986:"RFC3986"};pG.exports={default:Qb.RFC3986,formatters:{RFC1738:function(t){return Swe.call(t,Twe,"+")},RFC3986:function(t){return String(t)}},RFC1738:Qb.RFC1738,RFC3986:Qb.RFC3986}});var tw=k((ELe,dG)=>{"use strict";var xwe=af(),Zb=Object.prototype.hasOwnProperty,mo=Array.isArray,yi=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),Awe=function(e){for(;e.length>1;){var n=e.pop(),l=n.obj[n.prop];if(mo(l)){for(var r=[],i=0;i<l.length;++i)typeof l[i]<"u"&&r.push(l[i]);n.obj[n.prop]=r}}},fG=function(e,n){for(var l=n&&n.plainObjects?Object.create(null):{},r=0;r<e.length;++r)typeof e[r]<"u"&&(l[r]=e[r]);return l},Owe=function t(e,n,l){if(!n)return e;if(typeof n!="object"){if(mo(e))e.push(n);else if(e&&typeof e=="object")(l&&(l.plainObjects||l.allowPrototypes)||!Zb.call(Object.prototype,n))&&(e[n]=!0);else return[e,n];return e}if(!e||typeof e!="object")return[e].concat(n);var r=e;return mo(e)&&!mo(n)&&(r=fG(e,l)),mo(e)&&mo(n)?(n.forEach(function(i,s){if(Zb.call(e,s)){var a=e[s];a&&typeof a=="object"&&i&&typeof i=="object"?e[s]=t(a,i,l):e.push(i)}else e[s]=i}),e):Object.keys(n).reduce(function(i,s){var a=n[s];return Zb.call(i,s)?i[s]=t(i[s],a,l):i[s]=a,i},r)},Nwe=function(e,n){return Object.keys(n).reduce(function(l,r){return l[r]=n[r],l},e)},Cwe=function(t,e,n){var l=t.replace(/\+/g," ");if(n==="iso-8859-1")return l.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(l)}catch{return l}},ew=1024,Rwe=function(e,n,l,r,i){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),l==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",u=0;u<s.length;u+=ew){for(var o=s.length>=ew?s.slice(u,u+ew):s,c=[],f=0;f<o.length;++f){var m=o.charCodeAt(f);if(m===45||m===46||m===95||m===126||m>=48&&m<=57||m>=65&&m<=90||m>=97&&m<=122||i===xwe.RFC1738&&(m===40||m===41)){c[c.length]=o.charAt(f);continue}if(m<128){c[c.length]=yi[m];continue}if(m<2048){c[c.length]=yi[192|m>>6]+yi[128|m&63];continue}if(m<55296||m>=57344){c[c.length]=yi[224|m>>12]+yi[128|m>>6&63]+yi[128|m&63];continue}f+=1,m=65536+((m&1023)<<10|o.charCodeAt(f)&1023),c[c.length]=yi[240|m>>18]+yi[128|m>>12&63]+yi[128|m>>6&63]+yi[128|m&63]}a+=c.join("")}return a},Iwe=function(e){for(var n=[{obj:{o:e},prop:"o"}],l=[],r=0;r<n.length;++r)for(var i=n[r],s=i.obj[i.prop],a=Object.keys(s),u=0;u<a.length;++u){var o=a[u],c=s[o];typeof c=="object"&&c!==null&&l.indexOf(c)===-1&&(n.push({obj:s,prop:o}),l.push(c))}return Awe(n),e},kwe=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Dwe=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Pwe=function(e,n){return[].concat(e,n)},Lwe=function(e,n){if(mo(e)){for(var l=[],r=0;r<e.length;r+=1)l.push(n(e[r]));return l}return n(e)};dG.exports={arrayToObject:fG,assign:Nwe,combine:Pwe,compact:Iwe,decode:Cwe,encode:Rwe,isBuffer:Dwe,isRegExp:kwe,maybeMap:Lwe,merge:Owe}});var _G=k((bLe,vG)=>{"use strict";var mG=cG(),uf=tw(),D6=af(),Fwe=Object.prototype.hasOwnProperty,yG={brack Line truncated
`;an.DEFAULT_CONTENT_TYPE="application/octet-stream";an.prototype.append=function(t,e,n){n=n||{},typeof n=="string"&&(n={filename:n});var l=yw.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),hJ.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,n),i=this._multiPartFooter();l(r),l(e),l(i),this._trackLength(r,e,n)};an.prototype._trackLength=function(t,e,n){var l=0;n.knownLength!=null?l+=+n.knownLength:Buffer.isBuffer(e)?l=e.length:typeof e=="string"&&(l=Buffer.byteLength(e)),this._valueLength+=l,this._overheadLength+=Buffer.byteLength(t)+an.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof dTe))&&(n.knownLength||this._valuesToMeasure.push(e))};an.prototype._lengthRetriever=function(t,e){t.hasOwnProperty("fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):fTe.stat(t.path,function(n,l){var r;if(n){e(n);return}r=l.size-(t.start?t.start:0),e(null,r)}):t.hasOwnProperty("httpVersion")?e(null,+t.headers["content-length"]):t.hasOwnProperty("httpModule")?(t.on("response",function(n){t.pause(),e(null,+n.headers["content-length"])}),t.resume()):e("Unknown stream")};an.prototype._multiPartHeader=function(t,e,n){if(typeof n.header=="string")return n.header;var l=this._getContentDisposition(e,n),r=this._getContentType(e,n),i="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(l||[]),"Content-Type":[].concat(r||[])};typeof n.header=="object"&&mw(s,n.header);var a;for(var u in s)s.hasOwnProperty(u)&&(a=s[u],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(i+=u+": "+a.join("; ")+an.LINE_BREAK)));return"--"+this.getBoundary()+an.LINE_BREAK+i+an.LINE_BREAK};an.prototype._getContentDisposition=function(t,e){var n,l;return typeof e.filepath=="string"?n=dw.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t.name||t.path?n=dw.basename(e.filename||t.name||t.path):t.readable&&t.hasOwnProperty("httpVersion")&&(n=dw.basename(t.client._httpMessage.path||"")),n&&(l='filename="'+n+'"'),l};an.prototype._getContentType=function(t,e){var n=e.contentType;return!n&&t.name&&(n=hw.lookup(t.name)),!n&&t.path&&(n=hw.lookup(t.path)),!n&&t.readable&&t.hasOwnProperty("httpVersion")&&(n=t.headers["content-type"]),!n&&(e.filepath||e.filename)&&(n=hw.lookup(e.filepath||e.filename)),!n&&typeof t=="object"&&(n=an.DEFAULT_CONTENT_TYPE),n};an.prototype._multiPartFooter=function(){return function(t){var e=an.LINE_BREAK,n=this._streams.length===0;n&&(e+=this._lastBoundary()),t(e)}.bind(this)};an.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+an.LINE_BREAK};an.prototype.getHeaders=function(t){var e,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)t.hasOwnProperty(e)&&(n[e.toLowerCase()]=t[e]);return n};an.prototype.setBoundary=function(t){this._boundary=t};an.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};an.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),n=0,l=this._streams.length;n<l;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?t=Buffer.concat([t,this._streams[n]]):t=Buffer.concat([t,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(an.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};an.prototype._generateBoundary=function(){for(var t="--------------------------",e=0;e<24;e++)t+=Math.floor(Math.random()*10).toString(16);this._boundary=t};an.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};an.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};an.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}hTe.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,l){if(n){t(n);return}l.forEach(function(r){e+=r}),t(null,e)})};an.prototype.submit=function(t,e){var n,l,r={method:"post"};return typeof t=="string"?(t=pTe(t),l=mw({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(l=mw(t,r),l.port||(l.port=l.protocol=="https:"?443:80)),l.headers=this.getHeaders(t.headers),l.protocol=="https:"?n=cTe.request(l):n=oTe.request(l),this.getLength(function(i,s){if(i&&i!=="Unknown stream"){this._error(i);return}if(s&&n.setHeader("Content-Length",s),this.pipe(n),e){var a,u=function(o,c){return n.removeListener("error",u),n.removeListener("response",a),e.call(this,o,c)};a=u.bind(this,null),n.on("error",u),n.on("response",a)}}.bind(this)),n};an.prototype._error=function(t){this.error||(this.error=t,this.pause(),this.emit("error" Line truncated
`,f.message,f.stack);var m=new Error("tunneling socket could not be established, cause="+f.message);m.code="ECONNRESET",e.request.emit("error",m),l.removeSocket(r)}};ss.prototype.removeSocket=function(e){var n=this.sockets.indexOf(e);if(n!==-1){this.sockets.splice(n,1);var l=this.requests.shift();l&&this.createSocket(l,function(r){l.request.onSocket(r)})}};function _K(t,e){var n=this;ss.prototype.createSocket.call(n,t,function(l){var r=t.request.getHeader("host"),i=Yw({},n.options,{socket:l,servername:r?r.replace(/:.*$/,""):t.host}),s=fxe.connect(0,i);n.sockets[n.sockets.indexOf(l)]=s,e(s)})}function EK(t,e,n){return typeof t=="string"?{host:t,port:e,localAddress:n}:t}function Yw(t){for(var e=1,n=arguments.length;e<n;++e){var l=arguments[e];if(typeof l=="object")for(var r=Object.keys(l),i=0,s=r.length;i<s;++i){var a=r[i];l[a]!==void 0&&(t[a]=l[a])}}return t}var oa;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?oa=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:oa=function(){};M4.debug=oa});var SK=k((dMe,wK)=>{wK.exports=bK()});var PZ=k(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.removeTrailingChar=So.merge=void 0;var JOe=(...t)=>{let e={};return t.forEach(function(n){var l;for(l in n)l in e&&e[l]===null?e[l]=n[l]:l in e&&Array.isArray(e[l])?e[l]=e[l].concat(n[l]):l in e&&typeof e[l]=="object"?e[l]=(0,So.merge)(e[l],n[l]):e[l]=n[l]}),e};So.merge=JOe;var KOe=(t,e)=>t.length>1&&t.endsWith(e)?t.substring(0,t.length-1):t;So.removeTrailingChar=KOe});var B4=k(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.DataError=Za.DatabaseError=Za.NestedError=void 0;var Q6=class extends Error{inner;id;constructor(e,n,l){super(e),this.inner=l,this.id=n,this.name=this.constructor.name}toString(){let e=this.name+": "+this.message;return this.inner?e+`:
`+this.inner:e}};Za.NestedError=Q6;var xT=class extends Q6{};Za.DatabaseError=xT;var AT=class extends Q6{};Za.DataError=AT});var IT=k(u3=>{"use strict";Object.defineProperty(u3,"__esModule",{value:!0});u3.getArrayIndicies=u3.validateArrayIndex=u3.validateArrayIndicies=u3.isInt=u3.ArrayInfo=u3.arrayRegex=void 0;var Cf=B4(),XOe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;u3.arrayRegex=XOe;var OT={},NT=class t{property;index=0;append=!1;indicies=[];constructor(e,n){this.property=e;let l=n[0]??0;if(this.append=l===""||n[n.length-1]==="",this.indicies=n,CT(l))this.index=parseInt(l);else if(!this.append)throw new Cf.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(OT[e])return OT[e];let l=(0,u3.arrayRegex)().exec(e.trim());if(l!=null){let r=l[1],i="["+l[2].toString()+"]",s=RT(i);return LZ(s),OT[e]=new t(r,s)}return null}getIndex(e,n){if(this.append)return-1;let l=this.index;if(l==-1){let r=n?e:e[this.property];return r.length===0?0:r.length-1}return l}getData(e){if(this.append)throw new Cf.DataError("Can't get data when appending",100);let{index:n,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);return l[n]}setData(e,n){if(this.append){let l=e[this.property];this.indicies.forEach(r=>{r!==""&&(r=+r,r===-1&&(r=l.length-1),l=l[+r])}),l.push(n)}else{let{index:l,dataForProperty:r}=this.getArrayDataAndIndexFromProperty(e);l===-1?r.push(n):r[l]=n}}delete(e){if(this.append)throw new Cf.DataError("Can't delete an appended data",10);let{index:n,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);l.splice(n,1)}isValid(e){let{index:n,dataForProperty:l}=this.getArrayDataAndIndexFromProperty(e);return l.hasOwnProperty(n)}getArrayDataAndIndexFromProperty(e){let n=0,l=e instanceof Array?e:e[this.property]??e;if(this.indicies.length>0){n=+this.indicies[this.indicies.length-1];for(let r=0;r<this.indicies.length-1;r++){let i=+this.indicies[r];i===-1&&(i=l.length-1),l=l[i]}n===-1&&(n=l.length-1)}return{index:n,dataForProperty:l}}isMultiDimensional(){return this.indicies.length>1}};u3.ArrayInfo=NT;function CT(t){return!isNaN(t)&&Number(t)==t&&!isNaN(parseInt(t,10))}u3.isInt=CT;function LZ(t){let e=t.filter(n=>n==="");if(e.length>1)throw Error("Only one append index is supported for nested arrays");if(e.length===1&&t[t.length-1]!=="")throw Error("Append index must be at the end of the nested array")}u3.validateArrayIndicies=LZ;function FZ(t){if(t.length!==0&&!CT(t))throw new Cf.DataError("Only numerical values accepted for array index",200)}u3.validateArrayIndex=FZ;function RT(t){if(t.length===0)return[];if(t.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=t.substring(1,t.indexOf("]"));FZ(e);let n=e.length+2;return[e,...RT(t.substring(n))]}u3.getArrayIndicies=RT});var MZ=k(Rf=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});Rf.DBParentData=void 0;var jZ=IT(),UZ=B4(),kT=class{parent;data;db;dataPath;constructor(e,n,l,r){this.parent=r,this.data=e,this.db=n,this.dataPath=l}checkArray(e=!1){let n=jZ.ArrayInfo.processArray(this.parent);if(n&&(!n.append||e)&&!n.isValid(this.data))throw new UZ.DataError("DataPath: /"+this.dataPath+". Can't find index "+n.index+" in array "+n.property,10);return n}getData(){if(this.parent===void 0)return this.data;let e=this.checkArray();return e?e.getData(this.data):this.data[this.parent]}setData(e){if(this.parent===void 0){this.db.resetData(e);return}let n=jZ.ArrayInfo.processArray(this.parent);if(n){if(!this.data.hasOwnProperty(n.property))this.data[n.property]=[];else if(!Array.isArray(this.data[n.property]))throw new UZ.DataError("DataPath: /"+this.dataPath+". "+n.property+" is not an array.",11);n.setData(this.data,e)}else this.data[this.parent]=e}delete(){if(this.parent===void 0){this.db.resetData({});return}let e=this.checkArray(!0);e?e.delete(this.data):delete this.data[this.parent]}};Rf.DBParentData=kT});var BZ=k(($ze,$Z)=>{$Z.exports=function(){"use strict";function t(){this.readers=0,this.queue=[]}function e(i,s,a){var u;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new t),u=r[i]):(a=s,s=i,u=l),a||(a={});var o=null;a.hasOwnProperty("scope")&&(o=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,u.readers--,u.queue.length&&u.queue[0]())}}();if(u.readers<0||u.queue.length){var f=!1;if(u.queue.push(function(){!f&&u.readers>=0&&(f=!0,u.queue.shift(),u.readers++,s.call(o,c),u.queue.length&&u.queue[0]())}),a.hasOwnProperty("timeout")){var m=null;a.hasOwnProperty("timeoutCallback")&&(m=a.timeoutCallback),setTimeout(function(){f||(f=!0,u.queue.shift(),m&&m.call(a.scope))},a.timeout)}}else u.readers++,s.call(a.scope,c)}function n(i,s,a){var u;typeof i!="function"?(r.hasOwnProperty(i)||(r[i]=new t),u=r[i]):(a=s,s=i,u=l),a||(a={});var o=null;a.hasOwnProperty("scope")&&(o=a.scope);var c=function(){var d=!1;return function(){d||(d=!0,u.readers=0,u.queue.length&&u.queue[0]())}}();if(u.readers||u.queue.length){var f=!1;if(u.queue.push(function(){f|| Line truncated
`:t(e.children):$7(e)?t(e.children):fi(e)?e.data:""},textContent:s4,innerText:V7,getChildren:ep,getParent:$B,getSiblings:BB,getAttributeValue:function(t,e){return(t=t.attribs)==null?void 0:t[e]},hasAttrib:function(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null},getName:function(t){return t.name},nextElementSibling:$E,prevElementSibling:BE,removeElement:Ku,replaceElement:function(t,e){let n=e.prev=t.prev;n&&(n.next=e);var l=e.next=t.next;if(l&&(l.prev=e),l=e.parent=t.parent){let r=l.children;r[r.lastIndexOf(t)]=e,t.parent=null}},appendChild:function(t,e){Ku(e),e.next=null,1<(e.parent=t).children.push(e)?((t=t.children[t.children.length-2]).next=e).prev=t:e.prev=null},append:function(t,e){Ku(e);var n=t.parent,l=t.next;if(e.next=l,((e.prev=t).next=e).parent=n,l){if(l.prev=e,n){let r=n.children;r.splice(r.lastIndexOf(l),0,e)}}else n&&n.children.push(e)},prependChild:function(t,e){Ku(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1?((t=t.children[1]).prev=e).next=t:e.next=null},prepend:function(t,e){Ku(e);var n,l=t.parent;l&&(n=l.children).splice(n.indexOf(t),0,e),t.prev&&(t.prev.next=e),e.parent=l,e.prev=t.prev,(e.next=t).prev=e},filter:R7,find:HE,findOneChild:function(t,e){return e.find(t)},findOne:fE,existsOne:function t(e,n){return n.some(l=>gt(l)&&(e(l)||t(e,l.children)))},findAll:function(t,e){for(var n=[],l=[e],r=[0];;)if(r[0]>=l[0].length){if(l.length===1)return n;l.shift(),r.shift()}else{let i=l[0][r[0]++];gt(i)&&(t(i)&&n.push(i),0<i.children.length)&&(r.unshift(0),l.unshift(i.children))}},testElement:function(t,e){return!(t=S$(t))||t(e)},getElements:function(t,e,n,l=1/0){return(t=S$(t))?R7(t,e,n,l):[]},getElementById:function(t,e,n=!0){return Array.isArray(e)||(e=[e]),fE(HB("id",t),e,n)},getElementsByTagName:e4,getElementsByTagType:function(t,e,n=!0,l=1/0){return R7(q7.tag_type(t),e,n,l)},removeSubsets:function(t){let e=t.length;for(;0<=--e;){var n=t[e];if(0<e&&0<=t.lastIndexOf(n,e-1))t.splice(e,1);else for(let l=n.parent;l;l=l.parent)if(t.includes(l)){t.splice(e,1);break}}return t},get DocumentPosition(){return ir},compareDocumentPosition:VB,uniqueSort:a4,getFeed:function(t){return(t=w7(Nye,t))?(t.name==="feed"?function(e){var n={type:"atom",items:e4("entry",e=e.children).map(r=>{var i={media:T$(r=r.children)},s=(E3(i,"id","id",r),E3(i,"title","title",r),(s=w7("link",r))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=Ms("summary",r)||Ms("content",r))&&(i.description=s),(s=Ms("updated",r))&&(i.pubDate=new Date(s)),i})},l=(E3(n,"id","id",e),E3(n,"title","title",e),(l=w7("link",e))==null?void 0:l.attribs.href);return l&&(n.link=l),E3(n,"description","subtitle",e),(l=Ms("updated",e))&&(n.updated=new Date(l)),E3(n,"author","email",e,!0),n}:function(l){var n=(n=(n=w7("channel",l.children))==null?void 0:n.children)!=null?n:[],l={type:l.name.substr(0,3),id:"",items:e4("item",l.children).map(i=>{var s={media:T$(i=i.children)};return E3(s,"id","guid",i),E3(s,"title","title",i),E3(s,"link","link",i),E3(s,"description","description",i),(i=Ms("pubDate",i)||Ms("dc:date",i))&&(s.pubDate=new Date(i)),s})},r=(E3(l,"title","title",n),E3(l,"link","link",n),E3(l,"description","description",n),Ms("lastBuildDate",n));return r&&(l.updated=new Date(r)),E3(l,"author","managingEditor",n,!0),l})(t):null}}),t4=function(){return(t4=Object.assign||function(t){for(var e,n=1,l=arguments.length;n<l;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function qB(t,e,n){return t?t(e??t._root.children,null,void 0,n).toString():""}function Cye(t,e){return qB(this,function(n){return!(typeof n!="object"||n==null||"length"in n||"type"in n)}(t)?void(e=t):t,t4(t4(t4({},ME),this==null?void 0:this._options),oE(e??{})))}function Rye(t){return qB(this,t,t4(t4({},this._options),{xmlMode:!0}))}function u6(t){for(var e=t||(this?this.root():[]),n="",l=0;l<e.length;l++)n+=s4(e[l]);return n}function Iye(t,e,n){return n===void 0&&(n=typeof e=="boolean"&&e),t&&typeof t=="string"?(typeof e=="boolean"&&(n=e),e=this.load(t,ME,!1),n||e("script").remove(),e.root()[0].children.slice()):null}function kye(){return this(this._root)}function zB(t,e){if(e!==t){for(var n=e;n&&n!==n.parent;)if((n=n.parent)===t)return!0}return!1}function Dye(t,e){if(x$(t)&&x$(e)){for(var n=t.length,l=+e.length,r=0;r<l;r++)t[n++]=e[r];return t.length=n,t}}function x$(t){if(!Array.isArray(t)){if(typeof t!="object"||!Object.prototype.hasOwnProperty.call(t,"length")||typeof t.length!="number"||t.length<0)return!1;for(var e=0;e<t.length;e++)if(!(e in t))return!1}return!0}var Xu,Pye=Object.freeze({__proto__:null,html:Cye,xml:Rye,text:u6,parseHTML:Iye,root:kye,contains:zB,merge:Dye});function pi(t){return t.cheerio!=null}function Cl(t,e){for(var n=t.length,l=0;l<n;l++)e(t[l],l);return t}function V_(e){var e="length"in e?Array.prototype.map.call(e,function(l){return B7(l,!0)}):[B7(e,!0)],n=new ls(e);return e.forEach(function(l){l.parent=n}),e}function dE(t){var e, Line truncated
:is(button, input, select, textarea, optgroup, option)[disabled],
optgroup[disabled] > option,
fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},MB={};function $B(t,e){var n=e.getSiblings(t);return n.length<=1||(t=n.indexOf(t))<0||t===n.length-1?[]:n.slice(t+1).filter(e.isTag)}function pE(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var H_=(t,e,n,r,i)=>{let l=i(e,pE(n),r);return l===Pt.trueFunc?t:l===Pt.falseFunc?Pt.falseFunc:s=>l(s)&&t(s)},V_={is:H_,matches:H_,where:H_,not(t,e,n,r,i){let l=i(e,pE(n),r);return l===Pt.falseFunc?t:l===Pt.trueFunc?Pt.falseFunc:s=>!l(s)&&t(s)},has(t,e,n,r,i){let l=n.adapter,s=pE(n),a=(s.relativeSelector=!0,e.some(c=>c.some(uE))?[MB]:void 0),o=i(e,s,a);if(o===Pt.falseFunc)return Pt.falseFunc;let u=function(c,f){return c===Pt.falseFunc?Pt.falseFunc:m=>f.isTag(m)&&c(m)}(o,l);if(a&&o!==Pt.trueFunc){let{shouldTestNextSiblings:c=!1}=o;return d=>{if(!t(d))return!1;a[0]=d;var m=l.getChildren(d),d=c?[...m,...$B(d,l)]:m;return l.existsOne(u,d)}}return c=>t(c)&&l.existsOne(u,l.getChildren(c))}};function q_(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function Iye(t,e,n,r,i){let{adapter:l,equals:s}=n;switch(e.type){case at.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case at.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case at.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),Oye[e.action](t,e,n);case at.Pseudo:return function(a,o,u,c,f){let{name:m,data:d}=o;if(Array.isArray(d)){if(m in V_)return V_[m](a,d,u,c,f);throw new Error(`Unknown pseudo-class :${m}(${d})`)}let y=(o=u.pseudos)==null?void 0:o[m],_=typeof y=="string"?y:Rye[m];if(typeof _=="string"){if(d!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=Z7(_);return V_.is(a,S,u,c,f)}if(typeof y=="function")return x$(y,m,d,1),S=>y(S,d)&&a(S);if(m in cE)return cE[m](a,d,u,c);if(m in T$){let S=T$[m];return x$(S,m,d,2),w=>S(w,u,d)&&a(w)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,r,i);case at.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let a=e.name;return n.xmlMode&&!n.lowerCaseTags||(a=a.toLowerCase()),function(o){return l.getName(o)===a&&t(o)}}case at.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(o){let u=o;for(;u=q_(u,l);)if(t(u))return!0;return!1};let a=new WeakSet;return function(o){let u=o;for(;u=q_(u,l);)if(!a.has(u)){if(l.isTag(u)&&t(u))return!0;a.add(u)}return!1}}case"_flexibleDescendant":return function(a){let o=a;do if(t(o))return!0;while(o=q_(o,l));return!1};case at.Parent:return function(a){return l.getChildren(a).some(o=>l.isTag(o)&&t(o))};case at.Child:return function(a){return(a=l.getParent(a))!=null&&l.isTag(a)&&t(a)};case at.Sibling:return function(a){var o=l.getSiblings(a);for(let c=0;c<o.length;c++){var u=o[c];if(s(a,u))break;if(l.isTag(u)&&t(u))return!0}return!1};case at.Adjacent:return l.prevElementSibling?function(a){return(a=l.prevElementSibling(a))!=null&&t(a)}:function(a){var o=l.getSiblings(a);let u;for(let f=0;f<o.length;f++){var c=o[f];if(s(a,c))break;l.isTag(c)&&(u=c)}return!!u&&t(u)};case at.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function BB(t){return t.type===at.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(BB)))}var kye={type:at.Descendant},Dye={type:"_flexibleDescendant"},Pye={type:at.Pseudo,name:"scope",data:null};function HB(t,e,n){t.forEach(Tye),n=(s=e.context)!=null?s:n;let r=Array.isArray(n),i=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:o},u){var c=!(u==null||!u.every(f=>{var m=o.isTag(f)&&o.getParent(f);return f===MB||m&&o.isTag(m)}));for(let f of a){if(!(0<f.length&&uE(f[0])&&f[0].type!==at.Descendant)){if(!c||f.some(BB))continue;f.unshift(kye)}f.unshift(Pye)}})(t,e,i);else if(t.some(a=>0<a.length&&uE(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let l=!1;var s=t.map(a=>{if(2<=a.length){let[o,u]=a;o.type===at.Pseudo&&o.name==="scope"&&(r&&u.type===at.D Line truncated
`)}}):{name:r,value:i.replace(O$,`\r
`)}}).toArray()}}),Vc=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var r=0;r<t.length;r++)this[r]=t[r];this.length=t.length}},VE=(Vc.prototype.cheerio="[cheerio object]",Vc.prototype.splice=Array.prototype.splice,Vc.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(Vc.prototype,gye,Qye,ige,lge,age),function(t,e){return(VE=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,r){n.__proto__=r}:function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])}))(t,e)}),oge=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}VE(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},qc=function(){return(qc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},uge=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),mr="\uFFFD",N$=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(D=D||{}),"--"),C$="[CDATA[",R$="doctype",$1="script",cge="public",pge="system";function tH(t){return 55296<=t&&t<=57343}function nH(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function rH(t){return 64976<=t&&t<=65007||uge.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&(U+=" "),this.message=U+(this.message||""),this.firstUpdate=!1,this},v}function u(w){return n.toString.call(w)==="[object Function]"}function c(w){return n.toString.call(w)==="[object Array]"}function f(w){return n.toString.call(w)==="[object String]"}function m(w){return n.toString.call(w)==="[object Object]"}function d(w){var E=function(g){return g?typeof g=="string"?g.split("."):[g]:[]}(w);return function(g){for(var v=g,x=0;x<E.length;x++){var O=E[x];if(!s(v,O))return;v=v[O]}return v}}function y(w){return Array.prototype.slice.call(w)}function _(w,E,g){return Array.prototype.indexOf.call(w||[],E,g)}function S(w){var E,g=[];for(E in w)s(w,E)&&g.push(E);return g}l.hasOwnProp=s,l._prettifyError=function(w,E,g){return(g=g.Update?g:new l.TemplateError(g)).Update(w),E||(w=g,(g=new Error(w.message)).name=w.name),g},Object.setPrototypeOf?Object.setPrototypeOf(o.prototype,Error.prototype):o.prototype=Object.create(Error.prototype,{constructor:{value:o}}),l.TemplateError=o,l.escape=function(w){return w.replace(i,a)},l.isFunction=u,l.isArray=c,l.isString=f,l.isObject=m,l.getAttrGetter=d,l.groupBy=function(w,E,g){for(var v={},x=u(E)?E:d(E),O=0;O<w.length;O++){var N=w[O],R=x(N,O);if(R===void 0&&g===!0)throw new TypeError('groupby: attribute "'+E+'" resolved to undefined');(v[R]||(v[R]=[])).push(N)}return v},l.toArray=y,l.without=function(w){var E=[];if(w)for(var g=w.length,v=y(arguments).slice(1),x=-1;++x<g;)_(v,w[x])===-1&&E.push(w[x]);return E},l.repeat=function(w,E){for(var g="",v=0;v<E;v++)g+=w;return g},l.each=function(w,E,g){if(w!=null){if(e.forEach&&w.forEach===e.forEach)w.forEach(E,g);else if(w.length===+w.length)for(var v=0,x=w.length;v<x;v++)E.call(g,w[v],v,w)}},l.map=function(w,E){var g=[];if(w!=null){if(e.map&&w.map===e.map)return w.map(E);for(var v=0;v<w.length;v++)g[g.length]=E(w[v],v);w.length===+w.length&&(g.length=w.length)}return g},l.asyncIter=function(w,E,g){var v=-1;(function x(){++v<w.length?E(w[v],v,x,g):g()})()},l.asyncFor=function(w,E,g){var v=S(w||{}),x=v.length,O=-1;(function N(){var R=v[++O];O<x?E(R,w[R],O,x,N):g()})()},l.indexOf=_,l.keys=S,l._entries=function(w){return S(w).map(function(E){return[E,w[E]]})},l._values=function(w){return S(w).map(function(E){return w[E]})},l._assign=l.extend=function(w,E){return w=w||{},S(E).forEach(function(g){w[g]=E[g]}),w},l.inOperator=function(w,E){if(c(E)||f(E))return E.indexOf(w)!==-1;if(m(E))return w in E;throw new Error('Cannot use "in" operator to search for "'+w+'" in unexpected types.')}});function NH(){throw new Error("setTimeout has not been defined")}function CH(){throw new Error("clearTimeout has not been defined")}var H2=NH,V2=CH;function RH(t){if(H2===setTimeout)return setTimeout(t,0);if((H2===NH||!H2)&&setTimeout)return(H2=setTimeout)(t,0);try{return H2(t,0)}catch{try{return H2.call(null,t,0)}catch{return H2.call(this,t,0)}}}typeof t2.setTimeout=="function"&&(H2=setTimeout),typeof t2.clearTimeout=="function"&&(V2=clearTimeout);var Y3,r2=[],n0=!1,D7=-1;function ove(){n0&&Y3&&(n0=!1,Y3.length?r2=Y3.concat(r2):D7=-1,r2.length)&&IH()}function IH(){if(!n0){var t=RH(ove);n0=!0;for(var e=r2.length;e;){for(Y3=r2,r2=[];++D7<e;)Y3&&Y3[D7].run();D7=-1,e=r2.length}Y3=null,n0=!1,function(n){if(V2===clearTimeout)return clearTimeout(n);if((V2===CH||!V2)&&clearTimeout)return(V2=clearTimeout)(n);try{V2(n)}catch{try{return V2.call(null,n)}catch{return V2.call(this,n)}}}(t)}}function kH(t,e){this.fun=t,this.array=e}function ru(){}kH.prototype.run=function(){this.fun.apply(null,this.array)};var uve=ru,cve=ru,pve=ru,fve=ru,dve=ru,hve=ru,mve=ru,G1=t2.performance||{},yve=G1.now||G1.mozNow||G1.msNow||G1.oNow||G1.webkitNow||function(){return new Date().getTime()},gve=new Date,X2={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];r2.push(new kH(t,e)),r2.length!==1||n0||RH(IH)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:uve,addListener:cve,once:pve,off:fve,removeListener:dve,removeAllListeners:hve,emit:mve,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*yve.call(G1),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-gve)/1e3}};function q2(){}function Qn(){Qn.init.call(this)}function DH(t){return t._maxListeners===void 0?Qn.defaultMaxListeners:t._maxListeners}function sB(t,e,n,r){var i,l;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(i=t._events)?(i.newListener&&(t.emit("newListener",e,n.listener||n),i=t._events),l=i[e]):(i=t._events=new q2,t._eventsCount=0),l?(typeof l=="function"?l=i[e]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),!l.warned&&(r=DH(t))&&0<r&&l.length>r&&(l.warned=!0,(r=new Error("Possible EventEm Line truncated
\r\xA0`,fB="()[]{}%*-+~/#,:|.<>=!",UH="string",MH="whitespace",$H="data",BH="block-start",HH="block-end",VH="variable-start",qH="variable-end",zH="comment",GH="left-paren",JH="right-paren",KH="left-bracket",XH="right-bracket",WH="left-curly",YH="right-curly",QH="operator",ZH="comma",eV="colon",tV="tilde",nV="pipe",rV="float",iV="boolean",CE="none",lV="symbol",sV="regex";function ll(t,e,n,r){return{type:t,value:e,lineno:n,colno:r}}var Sve=function(){function t(n,r){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(r=r||{}).tags||{},this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!r.trimBlocks,this.lstripBlocks=!!r.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,r=this.colno;if(this.in_code){var i=this.current();if(this.isFinished())return null;if(i==='"'||i==="'")return ll(UH,this._parseString(i),n,r);if(d=this._extract(pB))return ll(MH,d,n,r);if(d=(d=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((i=this.current())===`
`?this.forward():i==="\r"&&(this.forward(),(i=this.current())===`
`?this.forward():this.back())),ll(HH,d,n,r);if(d=(d=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,ll(qH,d,n,r);if(i==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var l="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}l+=this.current(),this.forward()}for(var s=["g","i","m","y"],a="";!this.isFinished()&&s.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return ll(sV,{body:l,flags:a},n,r)}if(fB.indexOf(i)!==-1){this.forward();var o,u=["==","===","!=","!==","<=",">=","//","**"],c=i+this.current();switch(Le.indexOf(u,c)!==-1&&(this.forward(),Le.indexOf(u,(i=c)+this.current())!==-1)&&(i=c+this.current(),this.forward()),i){case"(":o=GH;break;case")":o=JH;break;case"[":o=KH;break;case"]":o=XH;break;case"{":o=WH;break;case"}":o=YH;break;case",":o=ZH;break;case":":o=eV;break;case"~":o=tV;break;case"|":o=nV;break;default:o=QH}return ll(o,i,n,r)}if((d=this._extractUntil(pB+fB)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),u=this._extract("0123456789"),ll(rV,d+"."+u,n,r)):ll("int",d,n,r);if(d.match(/^(true|false)$/))return ll(iV,d,n,r);if(d==="none"||d==="null")return ll(CE,d,n,r);if(d)return ll(lV,d,n,r);throw new Error("Unexpected value while parsing: "+d)}var f,m=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(d=(d=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,ll(BH,d,n,r);if(d=(d=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,ll(VH,d,n,r);var d="",y=!1;for(this._matches(this.tags.COMMENT_START)&&(y=!0,d=this._extractString(this.tags.COMMENT_START));(f=this._extractUntil(m))!==null;){if(d+=f,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!y){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=d.length){var _=d.slice(-this.colno);if(/^\s+$/.test(_)&&!(d=d.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!y)throw new Error("unexpected end of comment");d+=this._extractString(this.tags.COMMENT_END);break}d+=this.current(),this.forward()}if(f===null&&y)throw new Error("expected end of comment, got end of file");return ll(y?zH:$H,d,n,r)},e._parseString=function(n){this.forward();for(var r="";!this.isFinished()&&this.current()!==n;){var i=this.current();if(i==="\\")switch(this.forward(),this.current()){case"n":r+=`
`;break;case"t":r+=" ";break;case"r":r+="\r";break;default:r+=this.current()}else r+=i;this.forward()}return this.forward(),r},e._matches=function(n){return this.index+n.length>this.len?null:this.str.slice(this.index,this.index+n.length)===n},e._extractString=function(n){return this._matches(n)?(this.forwardN(n.length),n):null},e._extractUntil=function(n){return this._extractMatching(!0,n||"")},e._extract=function(n){return this._extractMatching(!1,n)},e._extractMatching=function(n,r){if(this.isFinished())return null;var i=r.indexOf(this.current());if(n&&i===-1||!n&&i!==-1){var l=this.current();this.forward();for(var s=r.indexOf(this.current());(n&&s===-1||!n&&s!==-1)&&!this.isFinished();)l+=this.current(),this.forward(),s=r.indexOf(this.current());return l}return""},e._extractRegex=function(n){return(n=this.currentStr().match(n))?(this.forwardN(n[0].length),n):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(n){for(var r=0;r<n;r++)this.forward()},e.forward=function(){this.index++,this.previous()===`
`?(this.lineno++,this.colno=0):this.colno++},e.backN=function(n){for(var r=0;r<n;r++)this.back()},e.back=function(){var n;this.index--,this.current()===`
)`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},WB={};function YB(t,e){var n=e.getSiblings(t);return n.length<=1||(t=n.indexOf(t))<0||t===n.length-1?[]:n.slice(t+1).filter(e.isTag)}function gE(t){return{xmlMode:!!t.xmlMode,lowerCaseAttributeNames:!!t.lowerCaseAttributeNames,lowerCaseTags:!!t.lowerCaseTags,quirksMode:!!t.quirksMode,cacheResults:!!t.cacheResults,pseudos:t.pseudos,adapter:t.adapter,equals:t.equals}}var K_=(t,e,n,l,r)=>{let i=r(e,gE(n),l);return i===Pt.trueFunc?t:i===Pt.falseFunc?Pt.falseFunc:s=>i(s)&&t(s)},X_={is:K_,matches:K_,where:K_,not(t,e,n,l,r){let i=r(e,gE(n),l);return i===Pt.falseFunc?t:i===Pt.trueFunc?Pt.falseFunc:s=>!i(s)&&t(s)},has(t,e,n,l,r){let i=n.adapter,s=gE(n),a=(s.relativeSelector=!0,e.some(c=>c.some(mE))?[WB]:void 0),u=r(e,s,a);if(u===Pt.falseFunc)return Pt.falseFunc;let o=function(c,f){return c===Pt.falseFunc?Pt.falseFunc:m=>f.isTag(m)&&c(m)}(u,i);if(a&&u!==Pt.trueFunc){let{shouldTestNextSiblings:c=!1}=u;return d=>{if(!t(d))return!1;a[0]=d;var m=i.getChildren(d),d=c?[...m,...YB(d,i)]:m;return i.existsOne(o,d)}}return c=>t(c)&&i.existsOne(o,i.getChildren(c))}};function W_(t,e){return(t=e.getParent(t))&&e.isTag(t)?t:null}function Wye(t,e,n,l,r){let{adapter:i,equals:s}=n;switch(e.type){case at.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case at.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case at.Attribute:if(e.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(e.name=e.name.toLowerCase()),Gye[e.action](t,e,n);case at.Pseudo:return function(a,u,o,c,f){let{name:m,data:d}=u;if(Array.isArray(d)){if(m in X_)return X_[m](a,d,o,c,f);throw new Error(`Unknown pseudo-class :${m}(${d})`)}let y=(u=o.pseudos)==null?void 0:u[m],_=typeof y=="string"?y:Xye[m];if(typeof _=="string"){if(d!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=np(_);return X_.is(a,S,o,c,f)}if(typeof y=="function")return F$(y,m,d,1),S=>y(S,d)&&a(S);if(m in yE)return yE[m](a,d,o,c);if(m in L$){let S=L$[m];return F$(S,m,d,2),w=>S(w,o,d)&&a(w)}throw new Error("Unknown pseudo-class :"+m)}(t,e,n,l,r);case at.Tag:{if(e.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let a=e.name;return n.xmlMode&&!n.lowerCaseTags||(a=a.toLowerCase()),function(u){return i.getName(u)===a&&t(u)}}case at.Descendant:{if(n.cacheResults===!1||typeof WeakSet>"u")return function(u){let o=u;for(;o=W_(o,i);)if(t(o))return!0;return!1};let a=new WeakSet;return function(u){let o=u;for(;o=W_(o,i);)if(!a.has(o)){if(i.isTag(o)&&t(o))return!0;a.add(o)}return!1}}case"_flexibleDescendant":return function(a){let u=a;do if(t(u))return!0;while(u=W_(u,i));return!1};case at.Parent:return function(a){return i.getChildren(a).some(u=>i.isTag(u)&&t(u))};case at.Child:return function(a){return(a=i.getParent(a))!=null&&i.isTag(a)&&t(a)};case at.Sibling:return function(a){var u=i.getSiblings(a);for(let c=0;c<u.length;c++){var o=u[c];if(s(a,o))break;if(i.isTag(o)&&t(o))return!0}return!1};case at.Adjacent:return i.prevElementSibling?function(a){return(a=i.prevElementSibling(a))!=null&&t(a)}:function(a){var u=i.getSiblings(a);let o;for(let f=0;f<u.length;f++){var c=u[f];if(s(a,c))break;i.isTag(c)&&(o=c)}return!!o&&t(o)};case at.Universal:if(e.namespace!=null&&e.namespace!=="*")throw new Error("Namespaced universal selectors are not yet supported by css-select");return t}}function QB(t){return t.type===at.Pseudo&&(t.name==="scope"||Array.isArray(t.data)&&t.data.some(e=>e.some(QB)))}var Yye={type:at.Descendant},Qye={type:"_flexibleDescendant"},Zye={type:at.Pseudo,name:"scope",data:null};function ZB(t,e,n){t.forEach(Vye),n=(s=e.context)!=null?s:n;let l=Array.isArray(n),r=n&&(Array.isArray(n)?n:[n]);if(e.relativeSelector!==!1)(function(a,{adapter:u},o){var c=!(o==null||!o.every(f=>{var m=u.isTag(f)&&u.getParent(f);return f===WB||m&&u.isTag(m)}));for(let f of a){if(!(0<f.length&&mE(f[0])&&f[0].type!==at.Descendant)){if(!c||f.some(QB))continue;f.unshift(Yye)}f.unshift(Zye)}})(t,e,r);else if(t.some(a=>0<a.length&&mE(a[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let i=!1;var s=t.map(a=>{if(2<=a.length){let[u,o]=a;u.type===at.Pseudo&&u.name==="scope"&&(l&&o.type===at.D Line truncated
`)}}):{name:l,value:r.replace(U$,`\r
`)}}).toArray()}}),G5=function(t,e,n){if(this.length=0,this.options=n,this._root=e,t){for(var l=0;l<t.length;l++)this[l]=t[l];this.length=t.length}},XE=(G5.prototype.cheerio="[cheerio object]",G5.prototype.splice=Array.prototype.splice,G5.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(G5.prototype,Fye,gge,Sge,Tge,Age),function(t,e){return(XE=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(n,l){n.__proto__=l}:function(n,l){for(var r in l)Object.prototype.hasOwnProperty.call(l,r)&&(n[r]=l[r])}))(t,e)}),Oge=function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}XE(t,e),t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)},J5=function(){return(J5=Object.assign||function(t){for(var e,n=1,l=arguments.length;n<l;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Nge=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),yl="\uFFFD",M$=(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.NUMBER_SIGN=35]="NUMBER_SIGN",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",t[t.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_F=102]="LATIN_SMALL_F",t[t.LATIN_SMALL_X=120]="LATIN_SMALL_X",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",t[t.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER"}(D=D||{}),"--"),$$="[CDATA[",B$="doctype",H0="script",Cge="public",Rge="system";function fH(t){return 55296<=t&&t<=57343}function dH(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&1<=t&&t<=31||127<=t&&t<=159}function hH(t){return 64976<=t&&t<=65007||Nge.has(t)}(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comm Line truncated
`,this.firstUpdate&&(U+=" "),this.message=U+(this.message||""),this.firstUpdate=!1,this},v}function o(w){return n.toString.call(w)==="[object Function]"}function c(w){return n.toString.call(w)==="[object Array]"}function f(w){return n.toString.call(w)==="[object String]"}function m(w){return n.toString.call(w)==="[object Object]"}function d(w){var E=function(g){return g?typeof g=="string"?g.split("."):[g]:[]}(w);return function(g){for(var v=g,x=0;x<E.length;x++){var O=E[x];if(!s(v,O))return;v=v[O]}return v}}function y(w){return Array.prototype.slice.call(w)}function _(w,E,g){return Array.prototype.indexOf.call(w||[],E,g)}function S(w){var E,g=[];for(E in w)s(w,E)&&g.push(E);return g}i.hasOwnProp=s,i._prettifyError=function(w,E,g){return(g=g.Update?g:new i.TemplateError(g)).Update(w),E||(w=g,(g=new Error(w.message)).name=w.name),g},Object.setPrototypeOf?Object.setPrototypeOf(u.prototype,Error.prototype):u.prototype=Object.create(Error.prototype,{constructor:{value:u}}),i.TemplateError=u,i.escape=function(w){return w.replace(r,a)},i.isFunction=o,i.isArray=c,i.isString=f,i.isObject=m,i.getAttrGetter=d,i.groupBy=function(w,E,g){for(var v={},x=o(E)?E:d(E),O=0;O<w.length;O++){var N=w[O],R=x(N,O);if(R===void 0&&g===!0)throw new TypeError('groupby: attribute "'+E+'" resolved to undefined');(v[R]||(v[R]=[])).push(N)}return v},i.toArray=y,i.without=function(w){var E=[];if(w)for(var g=w.length,v=y(arguments).slice(1),x=-1;++x<g;)_(v,w[x])===-1&&E.push(w[x]);return E},i.repeat=function(w,E){for(var g="",v=0;v<E;v++)g+=w;return g},i.each=function(w,E,g){if(w!=null){if(e.forEach&&w.forEach===e.forEach)w.forEach(E,g);else if(w.length===+w.length)for(var v=0,x=w.length;v<x;v++)E.call(g,w[v],v,w)}},i.map=function(w,E){var g=[];if(w!=null){if(e.map&&w.map===e.map)return w.map(E);for(var v=0;v<w.length;v++)g[g.length]=E(w[v],v);w.length===+w.length&&(g.length=w.length)}return g},i.asyncIter=function(w,E,g){var v=-1;(function x(){++v<w.length?E(w[v],v,x,g):g()})()},i.asyncFor=function(w,E,g){var v=S(w||{}),x=v.length,O=-1;(function N(){var R=v[++O];O<x?E(R,w[R],O,x,N):g()})()},i.indexOf=_,i.keys=S,i._entries=function(w){return S(w).map(function(E){return[E,w[E]]})},i._values=function(w){return S(w).map(function(E){return w[E]})},i._assign=i.extend=function(w,E){return w=w||{},S(E).forEach(function(g){w[g]=E[g]}),w},i.inOperator=function(w,E){if(c(E)||f(E))return E.indexOf(w)!==-1;if(m(E))return w in E;throw new Error('Cannot use "in" operator to search for "'+w+'" in unexpected types.')}});function MH(){throw new Error("setTimeout has not been defined")}function $H(){throw new Error("clearTimeout has not been defined")}var Hs=MH,Vs=$H;function BH(t){if(Hs===setTimeout)return setTimeout(t,0);if((Hs===MH||!Hs)&&setTimeout)return(Hs=setTimeout)(t,0);try{return Hs(t,0)}catch{try{return Hs.call(null,t,0)}catch{return Hs.call(this,t,0)}}}typeof es.setTimeout=="function"&&(Hs=setTimeout),typeof es.clearTimeout=="function"&&(Vs=clearTimeout);var Qu,ns=[],r4=!1,F7=-1;function Ove(){r4&&Qu&&(r4=!1,Qu.length?ns=Qu.concat(ns):F7=-1,ns.length)&&HH()}function HH(){if(!r4){var t=BH(Ove);r4=!0;for(var e=ns.length;e;){for(Qu=ns,ns=[];++F7<e;)Qu&&Qu[F7].run();F7=-1,e=ns.length}Qu=null,r4=!1,function(n){if(Vs===clearTimeout)return clearTimeout(n);if((Vs===$H||!Vs)&&clearTimeout)return(Vs=clearTimeout)(n);try{Vs(n)}catch{try{return Vs.call(null,n)}catch{return Vs.call(this,n)}}}(t)}}function VH(t,e){this.fun=t,this.array=e}function ro(){}VH.prototype.run=function(){this.fun.apply(null,this.array)};var Nve=ro,Cve=ro,Rve=ro,Ive=ro,kve=ro,Dve=ro,Pve=ro,K0=es.performance||{},Lve=K0.now||K0.mozNow||K0.msNow||K0.oNow||K0.webkitNow||function(){return new Date().getTime()},Fve=new Date,Ws={nextTick:function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];ns.push(new VH(t,e)),ns.length!==1||r4||BH(HH)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Nve,addListener:Cve,once:Rve,off:Ive,removeListener:kve,removeAllListeners:Dve,emit:Pve,binding:function(t){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(t){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(t){var n=.001*Lve.call(K0),e=Math.floor(n),n=Math.floor(n%1*1e9);return t&&(e-=t[0],(n-=t[1])<0)&&(e--,n+=1e9),[e,n]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-Fve)/1e3}};function zs(){}function Zn(){Zn.init.call(this)}function qH(t){return t._maxListeners===void 0?Zn.defaultMaxListeners:t._maxListeners}function gB(t,e,n,l){var r,i;if(typeof n!="function")throw new TypeError('"listener" argument must be a function');return(r=t._events)?(r.newListener&&(t.emit("newListener",e,n.listener||n),r=t._events),i=r[e]):(r=t._events=new zs,t._eventsCount=0),i?(typeof i=="function"?i=r[e]=l?[n,i]:[i,n]:l?i.unshift(n):i.push(n),!i.warned&&(l=qH(t))&&0<l&&i.length>l&&(i.warned=!0,(l=new Error("Possible EventEm Line truncated
\r\xA0`,SB="()[]{}%*-+~/#,:|.<>=!",XH="string",WH="whitespace",YH="data",QH="block-start",ZH="block-end",eV="variable-start",tV="variable-end",nV="comment",lV="left-paren",rV="right-paren",iV="left-bracket",sV="right-bracket",aV="left-curly",uV="right-curly",oV="operator",cV="comma",pV="colon",fV="tilde",dV="pipe",hV="float",mV="boolean",LE="none",yV="symbol",gV="regex";function s3(t,e,n,l){return{type:t,value:e,lineno:n,colno:l}}var Hve=function(){function t(n,l){this.str=n,this.index=0,this.len=n.length,this.lineno=0,this.colno=0,this.in_code=!1,n=(l=l||{}).tags||{},this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!l.trimBlocks,this.lstripBlocks=!!l.lstripBlocks}var e=t.prototype;return e.nextToken=function(){var n=this.lineno,l=this.colno;if(this.in_code){var r=this.current();if(this.isFinished())return null;if(r==='"'||r==="'")return s3(XH,this._parseString(r),n,l);if(d=this._extract(wB))return s3(WH,d,n,l);if(d=(d=this._extractString(this.tags.BLOCK_END))||this._extractString("-"+this.tags.BLOCK_END))return this.in_code=!1,this.trimBlocks&&((r=this.current())===`
`?this.forward():r==="\r"&&(this.forward(),(r=this.current())===`
`?this.forward():this.back())),s3(ZH,d,n,l);if(d=(d=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,s3(tV,d,n,l);if(r==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var i="";!this.isFinished();){if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}i+=this.current(),this.forward()}for(var s=["g","i","m","y"],a="";!this.isFinished()&&s.indexOf(this.current())!==-1;)a+=this.current(),this.forward();return s3(gV,{body:i,flags:a},n,l)}if(SB.indexOf(r)!==-1){this.forward();var u,o=["==","===","!=","!==","<=",">=","//","**"],c=r+this.current();switch(Fe.indexOf(o,c)!==-1&&(this.forward(),Fe.indexOf(o,(r=c)+this.current())!==-1)&&(r=c+this.current(),this.forward()),r){case"(":u=lV;break;case")":u=rV;break;case"[":u=iV;break;case"]":u=sV;break;case"{":u=aV;break;case"}":u=uV;break;case",":u=cV;break;case":":u=pV;break;case"~":u=fV;break;case"|":u=dV;break;default:u=oV}return s3(u,r,n,l)}if((d=this._extractUntil(wB+SB)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),o=this._extract("0123456789"),s3(hV,d+"."+o,n,l)):s3("int",d,n,l);if(d.match(/^(true|false)$/))return s3(mV,d,n,l);if(d==="none"||d==="null")return s3(LE,d,n,l);if(d)return s3(yV,d,n,l);throw new Error("Unexpected value while parsing: "+d)}var f,m=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if(d=(d=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,s3(QH,d,n,l);if(d=(d=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,s3(eV,d,n,l);var d="",y=!1;for(this._matches(this.tags.COMMENT_START)&&(y=!0,d=this._extractString(this.tags.COMMENT_START));(f=this._extractUntil(m))!==null;){if(d+=f,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!y){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&0<this.colno&&this.colno<=d.length){var _=d.slice(-this.colno);if(/^\s+$/.test(_)&&!(d=d.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!y)throw new Error("unexpected end of comment");d+=this._extractString(this.tags.COMMENT_END);break}d+=this.current(),this.forward()}if(f===null&&y)throw new Error("expected end of comment, got end of file");return s3(y?nV:YH,d,n,l)},e._parseString=function(n){this.forward();for(var l="";!this.isFinished()&&this.current()!==n;){var r=this.current();if(r==="\\")switch(this.forward(),this.current()){case"n":l+=`
`;break;case"t":l+=" ";break;case"r":l+="\r";break;default:l+=this.current()}else l+=r;this.forward()}return this.forward(),l},e._matches=function(n){return this.index+n.length>this.len?null:this.str.slice(this.index,this.index+n.length)===n},e._extractString=function(n){return this._matches(n)?(this.forwardN(n.length),n):null},e._extractUntil=function(n){return this._extractMatching(!0,n||"")},e._extract=function(n){return this._extractMatching(!1,n)},e._extractMatching=function(n,l){if(this.isFinished())return null;var r=l.indexOf(this.current());if(n&&r===-1||!n&&r!==-1){var i=this.current();this.forward();for(var s=l.indexOf(this.current());(n&&s===-1||!n&&s!==-1)&&!this.isFinished();)i+=this.current(),this.forward(),s=l.indexOf(this.current());return i}return""},e._extractRegex=function(n){return(n=this.currentStr().match(n))?(this.forwardN(n[0].length),n):null},e.isFinished=function(){return this.index>=this.len},e.forwardN=function(n){for(var l=0;l<n;l++)this.forward()},e.forward=function(){this.index++,this.previous()===`
`?(this.lineno++,this.colno=0):this.colno++},e.backN=function(n){for(var l=0;l<n;l++)this.back()},e.back=function(){var n;this.index--,this.current()===`
`?(this.lineno--,n=this.src.lastIndexOf(`
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Ge={lex:function(t,e){return new Sve(t,e)},TOKEN_STRING:UH,TOKEN_WHITESPACE:MH,TOKEN_DATA:$H,TOKEN_BLOCK_START:BH,TOKEN_BLOCK_END:HH,TOKEN_VARIABLE_START:VH,TOKEN_VARIABLE_END:qH,TOKEN_COMMENT:zH,TOKEN_LEFT_PAREN:GH,TOKEN_RIGHT_PAREN:JH,TOKEN_LEFT_BRACKET:KH,TOKEN_RIGHT_BRACKET:XH,TOKEN_LEFT_CURLY:WH,TOKEN_RIGHT_CURLY:YH,TOKEN_OPERATOR:QH,TOKEN_COMMA:ZH,TOKEN_COLON:eV,TOKEN_TILDE:tV,TOKEN_PIPE:nV,TOKEN_INT:"int",TOKEN_FLOAT:rV,TOKEN_BOOLEAN:iV,TOKEN_NONE:CE,TOKEN_SYMBOL:lV,TOKEN_SPECIAL:"special",TOKEN_REGEX:sV};function dB(t,e){for(var n,r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,typeof(n=function(l){if(typeof l!="object"||l===null)return l;var s=l[Symbol.toPrimitive];if(s===void 0)return String(l);if(typeof(s=s.call(l,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function GE(t,e,n){return e&&dB(t.prototype,e),n&&dB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function aV(t,e){t.prototype=Object.create(e.prototype),oV(t.prototype.constructor=t,e)}function oV(t,e){return(oV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function uV(t,e,n){n=n||{},Le.keys(n).forEach(function(i){n[i]=function(l,s){return typeof l!="function"||typeof s!="function"?s:function(){var a=this.parent,o=(this.parent=l,s.apply(this,arguments));return this.parent=a,o}}(t.prototype[i],n[i])});var r=function(i){function l(){return i.apply(this,arguments)||this}return aV(l,i),GE(l,[{key:"typename",get:function(){return e}}]),l}(t);return Le._assign(r.prototype,n),r}var Tve=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(e,n){return typeof e=="object"&&(n=e,e="anonymous"),uV(this,e,n)},GE(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),xve=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return aV(e,t),e.prototype.init=function(){},e.extend=function(n,r){return typeof n=="object"&&(r=n,n="anonymous"),uV(this,n,r)},GE(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(Qn),o0={Obj:Tve,EmitterObj:xve};function hB(t,e){for(var n,r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,typeof(n=function(l){if(typeof l!="object"||l===null)return l;var s=l[Symbol.toPrimitive];if(s===void 0)return String(l);if(typeof(s=s.call(l,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key))=="symbol"?n:String(n),i)}}function JE(t,e,n){return e&&hB(t.prototype,e),n&&hB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function tp(t,e){t.prototype=Object.create(e.prototype),cV(t.prototype.constructor=t,e)}function cV(t,e){return(cV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}function mB(t,e,n){t instanceof e&&n.push(t),t instanceof lr&&t.findAll(e,n)}var lr=function(t){function e(){return t.apply(this,arguments)||this}tp(e,t);var n=e.prototype;return n.init=function(r,i){for(var l=arguments,s=this,a=arguments.length,o=new Array(2<a?a-2:0),u=2;u<a;u++)o[u-2]=arguments[u];this.lineno=r,this.colno=i,this.fields.forEach(function(c,f){s[c]=f=(f=l[f+2])===void 0?null:f})},n.findAll=function(r,i){var l=this;return i=i||[],this instanceof ha?this.children.forEach(function(s){return mB(s,r,i)}):this.fields.forEach(function(s){return mB(l[s],r,i)}),i},n.iterFields=function(r){var i=this;this.fields.forEach(function(l){r(i[l],l)})},e}(o0.Obj),KE=function(t){function e(){return t.apply(this,arguments)||this}return tp(e,t),JE(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(lr),ha=function(t){function e(){return t.apply(this,arguments)||this}tp(e,t);var n=e.prototype;return n.init=function(r,i,l){t.prototype.init.call(this,r,i,l||[])},n.addChild=function(r){this.children.push(r)},JE(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(lr),Ave=ha.extend("Root"),pV=KE.extend("Literal"),Ove=KE.extend("Symbol"),Nve=ha.extend("Group"),Cve=ha.extend("Array"),Rve=lr.extend("Pair",{fields:["key","value"]}),fV=ha.extend("Dict"),Ive=lr.extend("LookupVal",{fields:["target","val"]}),dV=lr.extend("If",{fields:["cond","body","else_"]}),kve=dV.extend("IfAsync"),Dve=lr.extend("InlineIf",{fields:["cond","body","else_"]}),XE=lr.extend("For",{fields:["arr","name","body","else_"]}),Pve=XE.extend("AsyncEach"),Lve=XE.extend("AsyncAll"),hV= Line truncated
`);r.forEach(function(i,l){i&&(n&&0<l||!n)&&process.stdout.write(" ".repeat(e)),l=l===r.length-1?"":`
`,process.stdout.write(i+l)})}var X={Node:lr,Root:Ave,NodeList:ha,Value:KE,Literal:pV,Symbol:Ove,Group:Nve,Array:Cve,Pair:Rve,Dict:fV,Output:Kve,Capture:Xve,TemplateData:Wve,If:dV,IfAsync:kve,InlineIf:Dve,For:XE,AsyncEach:Pve,AsyncAll:Lve,Macro:hV,Caller:Fve,Import:jve,FromImport:Uve,FunCall:mV,Filter:yV,FilterAsync:Mve,KeywordArgs:$ve,Block:Bve,Super:Hve,Extends:Vve,Include:qve,Set:zve,Switch:Gve,Case:Jve,LookupVal:Ive,BinOp:Ll,In:Yve,Is:Qve,Or:Zve,And:e_e,Not:t_e,Add:n_e,Concat:r_e,Sub:i_e,Mul:l_e,Div:s_e,FloorDiv:a_e,Mod:o_e,Pow:u_e,Neg:c_e,Pos:p_e,Compare:f_e,CompareOperand:d_e,CallExtension:RE,CallExtensionAsync:h_e,printNodes:function t(e,n){var r,i;n=n||0,H1(e.typename+": ",n),e instanceof ha?(H1(`
`),e.children.forEach(function(l){t(l,n+2)})):e instanceof RE?(H1(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(l){t(l,n+2)})):(r=[],i=null,e.iterFields(function(l,s){l instanceof lr?r.push([s,l]):(i=i||{})[s]=l}),i?H1(JSON.stringify(i,null,2)+`
`,null,!0):H1(`
`),r.forEach(function(a){var s=a[0],a=a[1];H1("["+s+"] =>",n+2),t(a,n+4)}))}};function gV(t,e){return(gV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}X.Node,X.Root,X.NodeList,X.Value,X.Literal,X.Group,X.Pair,X.Dict,X.Output,X.Capture,X.TemplateData,X.If,X.IfAsync,X.InlineIf,X.For,X.AsyncEach,X.AsyncAll,X.Macro,X.Caller,X.Import,X.FromImport,X.FunCall,X.Filter,X.FilterAsync,X.KeywordArgs,X.Block,X.Super,X.Extends,X.Include,X.Switch,X.Case,X.LookupVal,X.BinOp,X.In,X.Is,X.Or,X.And,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.CompareOperand,X.CallExtension,X.CallExtensionAsync,X.printNodes;var yB=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),gV(r.prototype.constructor=r,e);var r=n.prototype;return r.init=function(i){this.tokens=i,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},r.nextToken=function(i){var l;if(this.peeked){if(i||this.peeked.type!==Ge.TOKEN_WHITESPACE)return l=this.peeked,this.peeked=null,l;this.peeked=null}if(l=this.tokens.nextToken(),!i)for(;l&&l.type===Ge.TOKEN_WHITESPACE;)l=this.tokens.nextToken();return l},r.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},r.pushToken=function(i){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=i},r.error=function(i,l,s){var a;return l!==void 0&&s!==void 0||(l=(a=this.peekToken()||{}).lineno,s=a.colno),l!==void 0&&(l+=1),s!==void 0&&(s+=1),new Le.TemplateError(i,l,s)},r.fail=function(i,l,s){throw this.error(i,l,s)},r.skip=function(i){var l=this.nextToken();return!(!l||l.type!==i)||(this.pushToken(l),!1)},r.expect=function(i){var l=this.nextToken();return l.type!==i&&this.fail("expected "+i+", got "+l.type,l.lineno,l.colno),l},r.skipValue=function(i,l){var s=this.nextToken();return!(!s||s.type!==i||s.value!==l)||(this.pushToken(s),!1)},r.skipSymbol=function(i){return this.skipValue(Ge.TOKEN_SYMBOL,i)},r.advanceAfterBlockEnd=function(i){var l;return i||((l=this.peekToken())||this.fail("unexpected end of file"),l.type!==Ge.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),i=this.nextToken().value),(l=this.nextToken())&&l.type===Ge.TOKEN_BLOCK_END?l.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+i+" statement"),l},r.advanceAfterVariableEnd=function(){var i=this.nextToken();i&&i.type===Ge.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=i.value.charAt(i.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(i),this.fail("expected variable end"))},r.parseFor=function(){var i,l,s=this.peekToken();if(this.skipSymbol("for")?(i=new X.For(s.lineno,s.colno),l="endfor"):this.skipSymbol("asyncEach")?(i=new X.AsyncEach(s.lineno,s.colno),l="endeach"):this.skipSymbol("asyncAll")?(i=new X.AsyncAll(s.lineno,s.colno),l="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),i.name=this.parsePrimary(),i.name instanceof X.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Ge.TOKEN_COMMA){var a=i.name;for(i.name=new X.Array(a.lineno,a.colno),i.name.addChild(a);this.skip(Ge.TOKEN_COMMA);){var o=this.parsePrimary();i.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),i.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),i.body=this.parseUntilBlocks(l,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),i.else_=this.parseUntilBlocks(l)),this.advanceAfterBlockEnd(),i},r.parseMacro=function(){var i=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),l=this.parseSignature(),s=new X.Macro(i.lineno,i.colno,s,l);return this.advanceAfterBlockEnd(i.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},r.parseCall=function(){var i=this.peekToken(),o=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new X.NodeList),l=this.parsePrimary(),s=(this.advanceAfterBlockEnd(i.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new X.Symbol(i.lineno,i.colno,"caller")),o=new X.Caller(i.lineno,i.colno,a,o,s);return(s=l.args.children)[s.length-1]instanceof X.KeywordArgs||s.push(new X.KeywordArgs),s[s.length-1].addChild(new X.Pair(i.lineno,i.colno,a,o)),new X.Output(i.lineno,i.colno,[l])},r.parseWithContext=function(){var i=this.peekToken(),l=null;return this.skipSymbol("with")?l=!0:this.skipSymbol("without")&&(l=!1),l===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",i.lineno,i.colno),l},r.parseImport=function(){var i=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",i.lineno,i.colno),this.parseExpression()),l=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`)},r._emitLines=function(){for(var i=this,l=arguments.length,s=new Array(l),a=0;a<l;a++)s[a]=arguments[a];s.forEach(function(o){return i._emitLine(o)})},r._emitFuncBegin=function(i,l){this.buffer="output",this._scopeClosers="",this._emitLine("function "+l+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+i.lineno+";"),this._emitLine("var colno = "+i.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},r._emitFuncEnd=function(i){i||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},r._addScopeLevel=function(){this._scopeClosers+="})"},r._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},r._withScopedSyntax=function(i){var l=this._scopeClosers;this._scopeClosers="",i.call(this),this._closeScopeLevels(),this._scopeClosers=l},r._makeCallback=function(i){var l=this._tmpid();return"function("+l+(i?","+i:"")+`) {
if(`+l+") { cb("+l+"); return; }"},r._tmpid=function(){return this.lastId++,"t_"+this.lastId},r._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},r._compileChildren=function(i,l){var s=this;i.children.forEach(function(a){s.compile(a,l)})},r._compileAggregate=function(i,l,s,a){var o=this;s&&this._emit(s),i.children.forEach(function(u,c){0<c&&o._emit(","),o.compile(u,l)}),a&&this._emit(a)},r._compileExpression=function(i,l){this.assertType(i,X.Literal,X.Symbol,X.Group,X.Array,X.Dict,X.FunCall,X.Caller,X.Filter,X.LookupVal,X.Compare,X.InlineIf,X.In,X.Is,X.And,X.Or,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.NodeList),this.compile(i,l)},r.assertType=function(i){for(var l=arguments.length,s=new Array(1<l?l-1:0),a=1;a<l;a++)s[a-1]=arguments[a];s.some(function(o){return i instanceof o})||this.fail("assertType: invalid type: "+i.typename,i.lineno,i.colno)},r.compileCallExtension=function(i,l,s){var a=this,o=i.args,u=i.contentArgs,c=typeof i.autoescape!="boolean"||i.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+i.extName+'")["'+i.prop+'"]('),this._emit("context"),(o||u)&&this._emit(","),o&&(o instanceof X.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),o.children.forEach(function(f,m){a._compileExpression(f,l),m===o.children.length-1&&!u.length||a._emit(",")})),u.length&&u.forEach(function(f,m){var d;0<m&&a._emit(","),f?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),d=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(f,l),a._emitLine("cb(null, "+d+");")}),a._popBuffer(),a._emitLine("return "+d+";"),a._emitLine("}")):a._emit("null")}),s?(i=this._tmpid(),this._emitLine(", "+this._makeCallback(i)),this._emitLine(this.buffer+" += runtime.suppressValue("+i+", "+c+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+c+` && env.opts.autoescape);
`))},r.compileCallExtensionAsync=function(i,l){this.compileCallExtension(i,l,!0)},r.compileNodeList=function(i,l){this._compileChildren(i,l)},r.compileLiteral=function(i){var l;typeof i.value=="string"?(l=(l=(l=(l=(l=(l=i.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+l+'"')):i.value===null?this._emit("null"):this._emit(i.value.toString())},r.compileSymbol=function(i,l){i=i.value,(l=l.lookup(i))?this._emit(l):this._emit('runtime.contextOrFrameLookup(context, frame, "'+i+'")')},r.compileGroup=function(i,l){this._compileAggregate(i,l,"(",")")},r.compileArray=function(i,l){this._compileAggregate(i,l,"[","]")},r.compileDict=function(i,l){this._compileAggregate(i,l,"{","}")},r.compilePair=function(a,l){var s=a.key,a=a.value;s instanceof X.Symbol?s=new X.Literal(s.lineno,s.colno,s.value):s instanceof X.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,l),this._emit(": "),this._compileExpression(a,l)},r.compileInlineIf=function(i,l){this._emit("("),this.compile(i.cond,l),this._emit("?"),this.compile(i.body,l),this._emit(":"),i.else_!==null?this.compile(i.else_,l):this._emit('""'),this._emit(")")},r.compileIn=function(i,l){this._emit("runtime.inOperator("),this.compile(i.left,l),this._emit(","),this.compile(i.right,l),this._emit(")")},r.compileIs=function(i,l){var s=(i.right.name||i.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(i.left,l),i.right.args&&(this._emit(","),this.compile(i.right.args,l)),this._emit(") === true")},r._binOpEmitter=function(i,l,s){this.compile(i.left,l),this._emit(s),this.compile(i.right,l)},r.compileOr=function(i,l){return this._binOpEmitter(i,l," || ")},r.compileAnd=function(i,l){return this._binOpEmitter(i,l," && ")},r.compileAdd=function(i,l){return this._binOpEmitter(i,l," + ")},r.compileConcat=function(i,l){return this._binOpEmitter(i,l,' + "" + ')},r.compileSub=function(i,l){return this._binOpEmitter(i,l," - ")},r.compileMul=function(i,l){return this._binOpEmitter(i,l," * ")},r.compileDiv=function(i,l){return this._binOpEmitter(i,l," / ")},r.compileMod=function(i,l){return this._binOpEmitter(i,l," % ")},r.compileNot=function(i,l){this._emit("!"),this.compile(i.target,l)},r.compileFloorDiv=function(i,l){this._emit("Math.floor("),this.compile(i.left,l),this._emit(" / "),this.compile(i.right,l),this._emit(")")},r.compilePow=function(i,l){this._emit("Math.pow("),this.compile(i.left,l),this._emit(", "),this.compile(i.right,l),this._emit(")")},r.compileNeg=function(i,l){this._emit("-"),this.compile(i.target,l)},r.compilePos=function(i,l){this._emit("+"),this.compile(i.target,l)},r.compileCompare=function(i,l){var s=this;this.compile(i.expr,l),i.ops.forEach(function(a){s._emit(" "+w_e[a.type]+" "),s.compile(a.expr,l)})},r.compileLookupVal=function(i,l){this._emit("runtime.memberLookup(("),this._compileExpression(i.target,l),this._emit("),"),this._compileExpression(i.val,l),this._emit(")")},r._getNodeName=function(i){switch(i.typename){case"Symbol":return i.value;case"FunCall":return"the return value of ("+this._getNodeName(i.name)+")";case"LookupVal":return this._getNodeName(i.target)+'["'+this._getNodeName(i.val)+'"]';case"Literal":return i.value.toString();default:return"--expression--"}},r.compileFunCall=function(i,l){this._emit("(lineno = "+i.lineno+", colno = "+i.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(i.name,l),this._emit(', "'+this._getNodeName(i.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(i.args,l,"[","])"),this._emit(")")},r.compileFilter=function(i,l){var s=i.name;this.assertType(s,X.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(i.args,l),this._emit(")")},r.compileFilterAsync=function(i,l){var s=i.name,a=i.symbol.value;this.assertType(s,X.Symbol),l.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(i.args,l),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},r.compileKeywordArgs=function(i,l){this._emit("runtime.makeKeywordArgs("),this.compileDict(i,l),this._emit(")")},r.compileSet=function(i,l){var s=this,a=[];i.targets.forEach(function(o){o=o.value,(o=l.lookup(o))==null&&(o=s._tmpid(),s._emitLine("var "+o+";")),a.push(o)}),i.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(i.value,l)):(this._emit(a.join(" = ")+" = "),this.compile(i.body,l)),this._emitLine(";"),i.targets.forEach(function(o,u){o=o.value,s._emitLine('frame.set("'+o+'", '+(u=a[u])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+o+'", '+u+");"),s._emitLine("}"),o.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+o+'", '+u+");"),s._emitLine("}"))})},r.compileSwitch=function(i,l){var s=this;this._emit("switch ("),this.compile(i.expr,l),this._emit(") {"),i.cases.forEach(fun Line truncated
else {`),this._withScopedSyntax(function(){a.compile(i.else_,l),s&&a._emit("cb()")})):s&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},r.compileIfAsync=function(i,l){this._emit("(function(cb) {"),this.compileIf(i,l,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},r._emitLoopBindings=function(i,l,s,a){var o=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:a+" - "+s},{name:"revindex0",val:a+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(u){o._emitLine('frame.set("loop.'+u.name+'", '+u.val+");")})},r.compileFor=function(i,l){var s,a,o,u,c=this,f=this._tmpid(),m=this._tmpid(),d=this._tmpid();l=l.push(),this._emitLine("frame = frame.push();"),this._emit("var "+d+" = "),this._compileExpression(i.arr,l),this._emitLine(";"),this._emit("if("+d+") {"),this._emitLine(d+" = runtime.fromIterator("+d+");"),i.name instanceof X.Array?(this._emitLine("var "+f+";"),this._emitLine("if(runtime.isArray("+d+")) {"),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for("+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),i.name.children.forEach(function(y,_){var S=c._tmpid();c._emitLine("var "+S+" = "+d+"["+f+"]["+_+"];"),c._emitLine('frame.set("'+y+'", '+d+"["+f+"]["+_+"]);"),l.set(i.name.children[_].value,S)}),this._emitLoopBindings(i,d,f,m),this._withScopedSyntax(function(){c.compile(i.body,l)}),this._emitLine("}"),this._emitLine("} else {"),u=(s=i.name.children)[0],s=s[1],a=this._tmpid(),o=this._tmpid(),l.set(u.value,a),l.set(s.value,o),this._emitLine(f+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+d+").length;"),this._emitLine("for(var "+a+" in "+d+") {"),this._emitLine(f+"++;"),this._emitLine("var "+o+" = "+d+"["+a+"];"),this._emitLine('frame.set("'+u.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+o+");"),this._emitLoopBindings(i,d,f,m),this._withScopedSyntax(function(){c.compile(i.body,l)}),this._emitLine("}")):(u=this._tmpid(),l.set(i.name.value,u),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for(var "+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),this._emitLine("var "+u+" = "+d+"["+f+"];"),this._emitLine('frame.set("'+i.name.value+'", '+u+");"),this._emitLoopBindings(i,d,f,m),this._withScopedSyntax(function(){c.compile(i.body,l)})),this._emitLine("}"),this._emitLine("}"),i.else_&&(this._emitLine("if (!"+m+") {"),this.compile(i.else_,l),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r._compileAsyncLoop=function(i,l,s){var a,o=this,u=this._tmpid(),c=this._tmpid(),f=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(l=l.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(i.arr,l),this._emitLine(");"),i.name instanceof X.Array?(a=i.name.children.length,this._emit("runtime."+m+"("+f+", "+a+", function("),i.name.children.forEach(function(d){o._emit(d.value+",")}),this._emit(u+","+c+",next) {"),i.name.children.forEach(function(d){d=d.value,l.set(d,d),o._emitLine('frame.set("'+d+'", '+d+");")})):(a=i.name.value,this._emitLine("runtime."+m+"("+f+", 1, function("+a+", "+u+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),l.set(a,a)),this._emitLoopBindings(i,f,u,c),this._withScopedSyntax(function(){var d;s&&(d=o._pushBuffer()),o.compile(i.body,l),o._emitLine("next("+u+(d?","+d:"")+");"),s&&o._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),i.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(i.else_,l),this._emitLine("}")),this._emitLine("frame = frame.pop();")},r.compileAsyncEach=function(i,l){this._compileAsyncLoop(i,l)},r.compileAsyncAll=function(i,l){this._compileAsyncLoop(i,l,!0)},r._compileMacro=function(i,_){var s=this,a=[],o=null,u="macro_"+this._tmpid(),c=_!==void 0,f=(i.args.children.forEach(function(S,w){w===i.args.children.length-1&&S instanceof X.Dict?o=S:(s.assertType(S,X.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),d=(o&&o.children||[]).map(function(S){return'"'+S.key.value+'"'}),y=c?_.push(!0):new Y_,_=(this._emitLines("var "+u+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+d.join(", ")+"], ","function ("+f.join(", ")+") {","var callerFrame = frame;","frame = "+(c?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),y.set(S.value,"l_"+S.value)}),o&&o.children.forEach(function(S){var w=S.key.value;s._emit('frame.set("'+w+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+w+'")'),s._emit(' ? kwargs["'+w+'"] : '),s._compileExpression(S.value,y),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(i.body,y)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine( Line truncated
`))})},r.compileRoot=function(i,l){var s=this,a=(l&&this.fail("compileRoot: root node can't have frame"),l=new Y_,this._emitFuncBegin(i,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(i,l),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(l=i.findAll(X.Block)).forEach(function(o,u){var c=o.name.value;if(a.indexOf(c)!==-1)throw new Error('Block "'+c+'" defined more than once.');a.push(c),s._emitFuncBegin(o,"b_"+c),c=new Y_,s._emitLine("var frame = frame.push(true);"),s.compile(o.body,c),s._emitFuncEnd()}),this._emitLine("return {"),l.forEach(function(o,u){o="b_"+o.name.value,s._emitLine(o+": "+o+",")}),this._emitLine(`root: root
};`)},r.compile=function(i,l){var s=this["compile"+i.typename];s?s.call(this,i,l):this.fail("compile: Cannot compile node: "+i.typename,i.lineno,i.colno)},r.getCode=function(){return this.codebuf.join("")},n}(o0.Obj),S_e={compile:function(s,e,n,r,i){var l=new vB(r,(i=i===void 0?{}:i).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,o){return o(a)},s);return l.compile(v_e.transform(m_e.parse(s,n,i),e,r)),l.getCode()},Compiler:vB},T_e=ht(function(t){function e(d,y){return d==null||d===!1?y:d}function n(d){return d!=d}function r(d){var y=(d=e(d,"")).toLowerCase();return mt.copySafeness(d,y.charAt(0).toUpperCase()+y.slice(1))}function i(d){if(Le.isString(d))return d.split("");if(Le.isObject(d))return Le._entries(d||{}).map(function(y){return{key:y[0],value:y[1]}});if(Le.isArray(d))return d;throw new Le.TemplateError("list filter: type not iterable")}function l(d){return function(y,_,S){var w=this,E=w.env.getTest(_=_===void 0?"truthy":_);return Le.toArray(y).filter(function(g){return E.call(w,g,S)===d})}}function s(d){return mt.copySafeness(d,d.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(d,y,_){for(var S=[],w=[],E=0;E<d.length;E++)E%y==0&&w.length&&(S.push(w),w=[]),w.push(d[E]);if(w.length){if(_)for(E=w.length;E<y;E++)w.push(_);S.push(w)}return S},t.capitalize=r,t.center=function(d,y){var _;return(d=e(d,"")).length>=(y=y||80)?d:(y-=d.length,_=Le.repeat(" ",y/2-y%2),y=Le.repeat(" ",y/2),mt.copySafeness(d,_+d+y))},t.default=function(d,y,_){return _?d||y:d!==void 0?d:y},t.dictsort=function(d,y,_){if(!Le.isObject(d))throw new Le.TemplateError("dictsort filter: val must be an object");var S,w,E=[];for(w in d)E.push([w,d[w]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new Le.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return E.sort(function(g,v){return g=g[S],v=v[S],y||(Le.isString(g)&&(g=g.toUpperCase()),Le.isString(v)&&(v=v.toUpperCase())),v<g?1:g===v?0:-1}),E},t.dump=function(d,y){return JSON.stringify(d,null,y)},t.escape=function(d){return d instanceof mt.SafeString?d:mt.markSafe(Le.escape((d=d??"").toString()))},t.safe=function(d){return d instanceof mt.SafeString?d:mt.markSafe((d=d??"").toString())},t.first=function(d){return d[0]},t.forceescape=function(d){return mt.markSafe(Le.escape((d=d??"").toString()))},t.groupby=function(d,y){return Le.groupBy(d,y,this.env.opts.throwOnUndefined)},t.indent=function(d,E,_){if((d=e(d,""))==="")return"";E=E||4;var S=d.split(`
`),w=Le.repeat(" ",E),E=S.map(function(g,v){return v!==0||_?""+w+g:g}).join(`
`);return mt.copySafeness(d,E)},t.join=function(d,y,_){return y=y||"",(d=_?Le.map(d,function(S){return S[_]}):d).join(y)},t.last=function(d){return d[d.length-1]},t.length=function(d){return(d=e(d,""))!==void 0?typeof Map=="function"&&d instanceof Map||typeof Set=="function"&&d instanceof Set?d.size:(!Le.isObject(d)||d instanceof mt.SafeString?d:Le.keys(d)).length:0},t.list=i,t.lower=function(d){return(d=e(d,"")).toLowerCase()},t.nl2br=function(d){return d==null?"":mt.copySafeness(d,d.replace(/\r\n|\n/g,`<br />
`))},t.random=function(d){return d[Math.floor(Math.random()*d.length)]},t.reject=l(!1),t.rejectattr=function(d,y){return d.filter(function(_){return!_[y]})},t.select=l(!0),t.selectattr=function(d,y){return d.filter(function(_){return!!_[y]})},t.replace=function(d,y,_,S){var w=d;if(y instanceof RegExp)return d.replace(y,_);S===void 0&&(S=-1);var E="";if(typeof y=="number")y=""+y;else if(typeof y!="string")return d;if(typeof(d=typeof d=="number"?""+d:d)!="string"&&!(d instanceof mt.SafeString))return d;if(y==="")return E=_+d.split("").join(_)+_,mt.copySafeness(d,E);var g=d.indexOf(y);if(S===0||g===-1)return d;for(var v=0,x=0;-1<g&&(S===-1||x<S);)E+=d.substring(v,g)+_,v=g+y.length,x++,g=d.indexOf(y,v);return v<d.length&&(E+=d.substring(v)),mt.copySafeness(w,E)},t.reverse=function(d){var y;return(y=Le.isString(d)?i(d):Le.map(d,function(_){return _})).reverse(),Le.isString(d)?mt.copySafeness(d,y.join("")):y},t.round=function(d,y,_){return y=y||0,y=Math.pow(10,y),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(d*y)/y},t.slice=function(d,y,_){for(var S=Math.floor(d.length/y),w=d.length%y,E=[],g=0,v=0;v<y;v++){var x=g+v*S;v<w&&g++,x=d.slice(x,g+(v+1)*S),_&&w<=v&&x.push(_),E.push(x)}return E},t.sum=function(d,y,_){return(_=_===void 0?0:_)+(d=y?Le.map(d,function(S){return S[y]}):d).reduce(function(S,w){return S+w},0)},t.sort=mt.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(E,y,_,S){var w=this,E=Le.map(E,function(v){return v}),g=Le.getAttrGetter(S);return E.sort(function(v,x){if(v=S?g(v):v,x=S?g(x):x,w.env.opts.throwOnUndefined&&S&&(v===void 0||x===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&Le.isString(v)&&Le.isString(x)&&(v=v.toLowerCase(),x=x.toLowerCase()),v<x?y?1:-1:x<v?y?-1:1:0}),E}),t.string=function(d){return mt.copySafeness(d,d)},t.striptags=function(d,S){var _=s((d=e(d,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?_.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
`,this.index-1),this.colno=n===-1?this.index:this.index-n):this.colno--},e.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},e.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},e.previous=function(){return this.str.charAt(this.index-1)},t}(),Ge={lex:function(t,e){return new Hve(t,e)},TOKEN_STRING:XH,TOKEN_WHITESPACE:WH,TOKEN_DATA:YH,TOKEN_BLOCK_START:QH,TOKEN_BLOCK_END:ZH,TOKEN_VARIABLE_START:eV,TOKEN_VARIABLE_END:tV,TOKEN_COMMENT:nV,TOKEN_LEFT_PAREN:lV,TOKEN_RIGHT_PAREN:rV,TOKEN_LEFT_BRACKET:iV,TOKEN_RIGHT_BRACKET:sV,TOKEN_LEFT_CURLY:aV,TOKEN_RIGHT_CURLY:uV,TOKEN_OPERATOR:oV,TOKEN_COMMA:cV,TOKEN_COLON:pV,TOKEN_TILDE:fV,TOKEN_PIPE:dV,TOKEN_INT:"int",TOKEN_FLOAT:hV,TOKEN_BOOLEAN:mV,TOKEN_NONE:LE,TOKEN_SYMBOL:yV,TOKEN_SPECIAL:"special",TOKEN_REGEX:gV};function TB(t,e){for(var n,l=0;l<e.length;l++){var r=e[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(r.key))=="symbol"?n:String(n),r)}}function QE(t,e,n){return e&&TB(t.prototype,e),n&&TB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function vV(t,e){t.prototype=Object.create(e.prototype),_V(t.prototype.constructor=t,e)}function _V(t,e){return(_V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}function EV(t,e,n){n=n||{},Fe.keys(n).forEach(function(r){n[r]=function(i,s){return typeof i!="function"||typeof s!="function"?s:function(){var a=this.parent,u=(this.parent=i,s.apply(this,arguments));return this.parent=a,u}}(t.prototype[r],n[r])});var l=function(r){function i(){return r.apply(this,arguments)||this}return vV(i,r),QE(i,[{key:"typename",get:function(){return e}}]),i}(t);return Fe._assign(l.prototype,n),l}var Vve=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(e,n){return typeof e=="object"&&(n=e,e="anonymous"),EV(this,e,n)},QE(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),qve=function(t){function e(){var n;return(n=t.call(this)||this).init.apply(n,arguments),n}return vV(e,t),e.prototype.init=function(){},e.extend=function(n,l){return typeof n=="object"&&(l=n,n="anonymous"),EV(this,n,l)},QE(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(Zn),c4={Obj:Vve,EmitterObj:qve};function xB(t,e){for(var n,l=0;l<e.length;l++){var r=e[l];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,typeof(n=function(i){if(typeof i!="object"||i===null)return i;var s=i[Symbol.toPrimitive];if(s===void 0)return String(i);if(typeof(s=s.call(i,"string"))!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}(r.key))=="symbol"?n:String(n),r)}}function ZE(t,e,n){return e&&xB(t.prototype,e),n&&xB(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function rp(t,e){t.prototype=Object.create(e.prototype),bV(t.prototype.constructor=t,e)}function bV(t,e){return(bV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}function AB(t,e,n){t instanceof e&&n.push(t),t instanceof sl&&t.findAll(e,n)}var sl=function(t){function e(){return t.apply(this,arguments)||this}rp(e,t);var n=e.prototype;return n.init=function(l,r){for(var i=arguments,s=this,a=arguments.length,u=new Array(2<a?a-2:0),o=2;o<a;o++)u[o-2]=arguments[o];this.lineno=l,this.colno=r,this.fields.forEach(function(c,f){s[c]=f=(f=i[f+2])===void 0?null:f})},n.findAll=function(l,r){var i=this;return r=r||[],this instanceof di?this.children.forEach(function(s){return AB(s,l,r)}):this.fields.forEach(function(s){return AB(i[s],l,r)}),r},n.iterFields=function(l){var r=this;this.fields.forEach(function(i){l(r[i],i)})},e}(c4.Obj),eb=function(t){function e(){return t.apply(this,arguments)||this}return rp(e,t),ZE(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(sl),di=function(t){function e(){return t.apply(this,arguments)||this}rp(e,t);var n=e.prototype;return n.init=function(l,r,i){t.prototype.init.call(this,l,r,i||[])},n.addChild=function(l){this.children.push(l)},ZE(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(sl),zve=di.extend("Root"),wV=eb.extend("Literal"),Gve=eb.extend("Symbol"),Jve=di.extend("Group"),Kve=di.extend("Array"),Xve=sl.extend("Pair",{fields:["key","value"]}),SV=di.extend("Dict"),Wve=sl.extend("LookupVal",{fields:["target","val"]}),TV=sl.extend("If",{fields:["cond","body","else_"]}),Yve=TV.extend("IfAsync"),Qve=sl.extend("InlineIf",{fields:["cond","body","else_"]}),tb=sl.extend("For",{fields:["arr","name","body","else_"]}),Zve=tb.extend("AsyncEach"),e_e=tb.extend("AsyncAll"),xV= Line truncated
`);l.forEach(function(r,i){r&&(n&&0<i||!n)&&process.stdout.write(" ".repeat(e)),i=i===l.length-1?"":`
`,process.stdout.write(r+i)})}var X={Node:sl,Root:zve,NodeList:di,Value:eb,Literal:wV,Symbol:Gve,Group:Jve,Array:Kve,Pair:Xve,Dict:SV,Output:d_e,Capture:h_e,TemplateData:m_e,If:TV,IfAsync:Yve,InlineIf:Qve,For:tb,AsyncEach:Zve,AsyncAll:e_e,Macro:xV,Caller:t_e,Import:n_e,FromImport:l_e,FunCall:AV,Filter:OV,FilterAsync:r_e,KeywordArgs:i_e,Block:s_e,Super:a_e,Extends:u_e,Include:o_e,Set:c_e,Switch:p_e,Case:f_e,LookupVal:Wve,BinOp:F3,In:y_e,Is:g_e,Or:v_e,And:__e,Not:E_e,Add:b_e,Concat:w_e,Sub:S_e,Mul:T_e,Div:x_e,FloorDiv:A_e,Mod:O_e,Pow:N_e,Neg:C_e,Pos:R_e,Compare:I_e,CompareOperand:k_e,CallExtension:FE,CallExtensionAsync:D_e,printNodes:function t(e,n){var l,r;n=n||0,q0(e.typename+": ",n),e instanceof di?(q0(`
`),e.children.forEach(function(i){t(i,n+2)})):e instanceof FE?(q0(e.extName+"."+e.prop+`
`),e.args&&t(e.args,n+2),e.contentArgs&&e.contentArgs.forEach(function(i){t(i,n+2)})):(l=[],r=null,e.iterFields(function(i,s){i instanceof sl?l.push([s,i]):(r=r||{})[s]=i}),r?q0(JSON.stringify(r,null,2)+`
`,null,!0):q0(`
`),l.forEach(function(a){var s=a[0],a=a[1];q0("["+s+"] =>",n+2),t(a,n+4)}))}};function NV(t,e){return(NV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}X.Node,X.Root,X.NodeList,X.Value,X.Literal,X.Group,X.Pair,X.Dict,X.Output,X.Capture,X.TemplateData,X.If,X.IfAsync,X.InlineIf,X.For,X.AsyncEach,X.AsyncAll,X.Macro,X.Caller,X.Import,X.FromImport,X.FunCall,X.Filter,X.FilterAsync,X.KeywordArgs,X.Block,X.Super,X.Extends,X.Include,X.Switch,X.Case,X.LookupVal,X.BinOp,X.In,X.Is,X.Or,X.And,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.CompareOperand,X.CallExtension,X.CallExtensionAsync,X.printNodes;var OB=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(l=n).prototype=Object.create(e.prototype),NV(l.prototype.constructor=l,e);var l=n.prototype;return l.init=function(r){this.tokens=r,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},l.nextToken=function(r){var i;if(this.peeked){if(r||this.peeked.type!==Ge.TOKEN_WHITESPACE)return i=this.peeked,this.peeked=null,i;this.peeked=null}if(i=this.tokens.nextToken(),!r)for(;i&&i.type===Ge.TOKEN_WHITESPACE;)i=this.tokens.nextToken();return i},l.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},l.pushToken=function(r){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=r},l.error=function(r,i,s){var a;return i!==void 0&&s!==void 0||(i=(a=this.peekToken()||{}).lineno,s=a.colno),i!==void 0&&(i+=1),s!==void 0&&(s+=1),new Fe.TemplateError(r,i,s)},l.fail=function(r,i,s){throw this.error(r,i,s)},l.skip=function(r){var i=this.nextToken();return!(!i||i.type!==r)||(this.pushToken(i),!1)},l.expect=function(r){var i=this.nextToken();return i.type!==r&&this.fail("expected "+r+", got "+i.type,i.lineno,i.colno),i},l.skipValue=function(r,i){var s=this.nextToken();return!(!s||s.type!==r||s.value!==i)||(this.pushToken(s),!1)},l.skipSymbol=function(r){return this.skipValue(Ge.TOKEN_SYMBOL,r)},l.advanceAfterBlockEnd=function(r){var i;return r||((i=this.peekToken())||this.fail("unexpected end of file"),i.type!==Ge.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),r=this.nextToken().value),(i=this.nextToken())&&i.type===Ge.TOKEN_BLOCK_END?i.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+r+" statement"),i},l.advanceAfterVariableEnd=function(){var r=this.nextToken();r&&r.type===Ge.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=r.value.charAt(r.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(r),this.fail("expected variable end"))},l.parseFor=function(){var r,i,s=this.peekToken();if(this.skipSymbol("for")?(r=new X.For(s.lineno,s.colno),i="endfor"):this.skipSymbol("asyncEach")?(r=new X.AsyncEach(s.lineno,s.colno),i="endeach"):this.skipSymbol("asyncAll")?(r=new X.AsyncAll(s.lineno,s.colno),i="endall"):this.fail("parseFor: expected for{Async}",s.lineno,s.colno),r.name=this.parsePrimary(),r.name instanceof X.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===Ge.TOKEN_COMMA){var a=r.name;for(r.name=new X.Array(a.lineno,a.colno),r.name.addChild(a);this.skip(Ge.TOKEN_COMMA);){var u=this.parsePrimary();r.name.addChild(u)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',s.lineno,s.colno),r.arr=this.parseExpression(),this.advanceAfterBlockEnd(s.value),r.body=this.parseUntilBlocks(i,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),r.else_=this.parseUntilBlocks(i)),this.advanceAfterBlockEnd(),r},l.parseMacro=function(){var r=this.peekToken(),s=(this.skipSymbol("macro")||this.fail("expected macro"),this.parsePrimary(!0)),i=this.parseSignature(),s=new X.Macro(r.lineno,r.colno,s,i);return this.advanceAfterBlockEnd(r.value),s.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),s},l.parseCall=function(){var r=this.peekToken(),u=(this.skipSymbol("call")||this.fail("expected call"),this.parseSignature(!0)||new X.NodeList),i=this.parsePrimary(),s=(this.advanceAfterBlockEnd(r.value),this.parseUntilBlocks("endcall")),a=(this.advanceAfterBlockEnd(),new X.Symbol(r.lineno,r.colno,"caller")),u=new X.Caller(r.lineno,r.colno,a,u,s);return(s=i.args.children)[s.length-1]instanceof X.KeywordArgs||s.push(new X.KeywordArgs),s[s.length-1].addChild(new X.Pair(r.lineno,r.colno,a,u)),new X.Output(r.lineno,r.colno,[i])},l.parseWithContext=function(){var r=this.peekToken(),i=null;return this.skipSymbol("with")?i=!0:this.skipSymbol("without")&&(i=!1),i===null||this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",r.lineno,r.colno),i},l.parseImport=function(){var r=this.peekToken(),a=(this.skipSymbol("import")||this.fail("parseImport: expected import",r.lineno,r.colno),this.parseExpression()),i=(this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword Line truncated
`)},l._emitLines=function(){for(var r=this,i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];s.forEach(function(u){return r._emitLine(u)})},l._emitFuncBegin=function(r,i){this.buffer="output",this._scopeClosers="",this._emitLine("function "+i+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+r.lineno+";"),this._emitLine("var colno = "+r.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},l._emitFuncEnd=function(r){r||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},l._addScopeLevel=function(){this._scopeClosers+="})"},l._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},l._withScopedSyntax=function(r){var i=this._scopeClosers;this._scopeClosers="",r.call(this),this._closeScopeLevels(),this._scopeClosers=i},l._makeCallback=function(r){var i=this._tmpid();return"function("+i+(r?","+r:"")+`) {
if(`+i+") { cb("+i+"); return; }"},l._tmpid=function(){return this.lastId++,"t_"+this.lastId},l._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},l._compileChildren=function(r,i){var s=this;r.children.forEach(function(a){s.compile(a,i)})},l._compileAggregate=function(r,i,s,a){var u=this;s&&this._emit(s),r.children.forEach(function(o,c){0<c&&u._emit(","),u.compile(o,i)}),a&&this._emit(a)},l._compileExpression=function(r,i){this.assertType(r,X.Literal,X.Symbol,X.Group,X.Array,X.Dict,X.FunCall,X.Caller,X.Filter,X.LookupVal,X.Compare,X.InlineIf,X.In,X.Is,X.And,X.Or,X.Not,X.Add,X.Concat,X.Sub,X.Mul,X.Div,X.FloorDiv,X.Mod,X.Pow,X.Neg,X.Pos,X.Compare,X.NodeList),this.compile(r,i)},l.assertType=function(r){for(var i=arguments.length,s=new Array(1<i?i-1:0),a=1;a<i;a++)s[a-1]=arguments[a];s.some(function(u){return r instanceof u})||this.fail("assertType: invalid type: "+r.typename,r.lineno,r.colno)},l.compileCallExtension=function(r,i,s){var a=this,u=r.args,o=r.contentArgs,c=typeof r.autoescape!="boolean"||r.autoescape;s||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+r.extName+'")["'+r.prop+'"]('),this._emit("context"),(u||o)&&this._emit(","),u&&(u instanceof X.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),u.children.forEach(function(f,m){a._compileExpression(f,i),m===u.children.length-1&&!o.length||a._emit(",")})),o.length&&o.forEach(function(f,m){var d;0<m&&a._emit(","),f?(a._emitLine("function(cb) {"),a._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),d=a._pushBuffer(),a._withScopedSyntax(function(){a.compile(f,i),a._emitLine("cb(null, "+d+");")}),a._popBuffer(),a._emitLine("return "+d+";"),a._emitLine("}")):a._emit("null")}),s?(r=this._tmpid(),this._emitLine(", "+this._makeCallback(r)),this._emitLine(this.buffer+" += runtime.suppressValue("+r+", "+c+" && env.opts.autoescape);"),this._addScopeLevel()):(this._emit(")"),this._emit(", "+c+` && env.opts.autoescape);
`))},l.compileCallExtensionAsync=function(r,i){this.compileCallExtension(r,i,!0)},l.compileNodeList=function(r,i){this._compileChildren(r,i)},l.compileLiteral=function(r){var i;typeof r.value=="string"?(i=(i=(i=(i=(i=(i=r.value.replace(/\\/g,"\\\\")).replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')):r.value===null?this._emit("null"):this._emit(r.value.toString())},l.compileSymbol=function(r,i){r=r.value,(i=i.lookup(r))?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+r+'")')},l.compileGroup=function(r,i){this._compileAggregate(r,i,"(",")")},l.compileArray=function(r,i){this._compileAggregate(r,i,"[","]")},l.compileDict=function(r,i){this._compileAggregate(r,i,"{","}")},l.compilePair=function(a,i){var s=a.key,a=a.value;s instanceof X.Symbol?s=new X.Literal(s.lineno,s.colno,s.value):s instanceof X.Literal&&typeof s.value=="string"||this.fail("compilePair: Dict keys must be strings or names",s.lineno,s.colno),this.compile(s,i),this._emit(": "),this._compileExpression(a,i)},l.compileInlineIf=function(r,i){this._emit("("),this.compile(r.cond,i),this._emit("?"),this.compile(r.body,i),this._emit(":"),r.else_!==null?this.compile(r.else_,i):this._emit('""'),this._emit(")")},l.compileIn=function(r,i){this._emit("runtime.inOperator("),this.compile(r.left,i),this._emit(","),this.compile(r.right,i),this._emit(")")},l.compileIs=function(r,i){var s=(r.right.name||r.right).value;this._emit('env.getTest("'+s+'").call(context, '),this.compile(r.left,i),r.right.args&&(this._emit(","),this.compile(r.right.args,i)),this._emit(") === true")},l._binOpEmitter=function(r,i,s){this.compile(r.left,i),this._emit(s),this.compile(r.right,i)},l.compileOr=function(r,i){return this._binOpEmitter(r,i," || ")},l.compileAnd=function(r,i){return this._binOpEmitter(r,i," && ")},l.compileAdd=function(r,i){return this._binOpEmitter(r,i," + ")},l.compileConcat=function(r,i){return this._binOpEmitter(r,i,' + "" + ')},l.compileSub=function(r,i){return this._binOpEmitter(r,i," - ")},l.compileMul=function(r,i){return this._binOpEmitter(r,i," * ")},l.compileDiv=function(r,i){return this._binOpEmitter(r,i," / ")},l.compileMod=function(r,i){return this._binOpEmitter(r,i," % ")},l.compileNot=function(r,i){this._emit("!"),this.compile(r.target,i)},l.compileFloorDiv=function(r,i){this._emit("Math.floor("),this.compile(r.left,i),this._emit(" / "),this.compile(r.right,i),this._emit(")")},l.compilePow=function(r,i){this._emit("Math.pow("),this.compile(r.left,i),this._emit(", "),this.compile(r.right,i),this._emit(")")},l.compileNeg=function(r,i){this._emit("-"),this.compile(r.target,i)},l.compilePos=function(r,i){this._emit("+"),this.compile(r.target,i)},l.compileCompare=function(r,i){var s=this;this.compile(r.expr,i),r.ops.forEach(function(a){s._emit(" "+B_e[a.type]+" "),s.compile(a.expr,i)})},l.compileLookupVal=function(r,i){this._emit("runtime.memberLookup(("),this._compileExpression(r.target,i),this._emit("),"),this._compileExpression(r.val,i),this._emit(")")},l._getNodeName=function(r){switch(r.typename){case"Symbol":return r.value;case"FunCall":return"the return value of ("+this._getNodeName(r.name)+")";case"LookupVal":return this._getNodeName(r.target)+'["'+this._getNodeName(r.val)+'"]';case"Literal":return r.value.toString();default:return"--expression--"}},l.compileFunCall=function(r,i){this._emit("(lineno = "+r.lineno+", colno = "+r.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(r.name,i),this._emit(', "'+this._getNodeName(r.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(r.args,i,"[","])"),this._emit(")")},l.compileFilter=function(r,i){var s=r.name;this.assertType(s,X.Symbol),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emit(")")},l.compileFilterAsync=function(r,i){var s=r.name,a=r.symbol.value;this.assertType(s,X.Symbol),i.set(a,a),this._emit('env.getFilter("'+s.value+'").call(context, '),this._compileAggregate(r.args,i),this._emitLine(", "+this._makeCallback(a)),this._addScopeLevel()},l.compileKeywordArgs=function(r,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(r,i),this._emit(")")},l.compileSet=function(r,i){var s=this,a=[];r.targets.forEach(function(u){u=u.value,(u=i.lookup(u))==null&&(u=s._tmpid(),s._emitLine("var "+u+";")),a.push(u)}),r.value?(this._emit(a.join(" = ")+" = "),this._compileExpression(r.value,i)):(this._emit(a.join(" = ")+" = "),this.compile(r.body,i)),this._emitLine(";"),r.targets.forEach(function(u,o){u=u.value,s._emitLine('frame.set("'+u+'", '+(o=a[o])+", true);"),s._emitLine("if(frame.topLevel) {"),s._emitLine('context.setVariable("'+u+'", '+o+");"),s._emitLine("}"),u.charAt(0)!=="_"&&(s._emitLine("if(frame.topLevel) {"),s._emitLine('context.addExport("'+u+'", '+o+");"),s._emitLine("}"))})},l.compileSwitch=function(r,i){var s=this;this._emit("switch ("),this.compile(r.expr,i),this._emit(") {"),r.cases.forEach(fun Line truncated
else {`),this._withScopedSyntax(function(){a.compile(r.else_,i),s&&a._emit("cb()")})):s&&(this._emitLine(`}
else {`),this._emit("cb()")),this._emitLine("}")},l.compileIfAsync=function(r,i){this._emit("(function(cb) {"),this.compileIf(r,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},l._emitLoopBindings=function(r,i,s,a){var u=this;[{name:"index",val:s+" + 1"},{name:"index0",val:s},{name:"revindex",val:a+" - "+s},{name:"revindex0",val:a+" - "+s+" - 1"},{name:"first",val:s+" === 0"},{name:"last",val:s+" === "+a+" - 1"},{name:"length",val:a}].forEach(function(o){u._emitLine('frame.set("loop.'+o.name+'", '+o.val+");")})},l.compileFor=function(r,i){var s,a,u,o,c=this,f=this._tmpid(),m=this._tmpid(),d=this._tmpid();i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+d+" = "),this._compileExpression(r.arr,i),this._emitLine(";"),this._emit("if("+d+") {"),this._emitLine(d+" = runtime.fromIterator("+d+");"),r.name instanceof X.Array?(this._emitLine("var "+f+";"),this._emitLine("if(runtime.isArray("+d+")) {"),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for("+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),r.name.children.forEach(function(y,_){var S=c._tmpid();c._emitLine("var "+S+" = "+d+"["+f+"]["+_+"];"),c._emitLine('frame.set("'+y+'", '+d+"["+f+"]["+_+"]);"),i.set(r.name.children[_].value,S)}),this._emitLoopBindings(r,d,f,m),this._withScopedSyntax(function(){c.compile(r.body,i)}),this._emitLine("}"),this._emitLine("} else {"),o=(s=r.name.children)[0],s=s[1],a=this._tmpid(),u=this._tmpid(),i.set(o.value,a),i.set(s.value,u),this._emitLine(f+" = -1;"),this._emitLine("var "+m+" = runtime.keys("+d+").length;"),this._emitLine("for(var "+a+" in "+d+") {"),this._emitLine(f+"++;"),this._emitLine("var "+u+" = "+d+"["+a+"];"),this._emitLine('frame.set("'+o.value+'", '+a+");"),this._emitLine('frame.set("'+s.value+'", '+u+");"),this._emitLoopBindings(r,d,f,m),this._withScopedSyntax(function(){c.compile(r.body,i)}),this._emitLine("}")):(o=this._tmpid(),i.set(r.name.value,o),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for(var "+f+"=0; "+f+" < "+d+".length; "+f+"++) {"),this._emitLine("var "+o+" = "+d+"["+f+"];"),this._emitLine('frame.set("'+r.name.value+'", '+o+");"),this._emitLoopBindings(r,d,f,m),this._withScopedSyntax(function(){c.compile(r.body,i)})),this._emitLine("}"),this._emitLine("}"),r.else_&&(this._emitLine("if (!"+m+") {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},l._compileAsyncLoop=function(r,i,s){var a,u=this,o=this._tmpid(),c=this._tmpid(),f=this._tmpid(),m=s?"asyncAll":"asyncEach",m=(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+f+" = runtime.fromIterator("),this._compileExpression(r.arr,i),this._emitLine(");"),r.name instanceof X.Array?(a=r.name.children.length,this._emit("runtime."+m+"("+f+", "+a+", function("),r.name.children.forEach(function(d){u._emit(d.value+",")}),this._emit(o+","+c+",next) {"),r.name.children.forEach(function(d){d=d.value,i.set(d,d),u._emitLine('frame.set("'+d+'", '+d+");")})):(a=r.name.value,this._emitLine("runtime."+m+"("+f+", 1, function("+a+", "+o+", "+c+",next) {"),this._emitLine('frame.set("'+a+'", '+a+");"),i.set(a,a)),this._emitLoopBindings(r,f,o,c),this._withScopedSyntax(function(){var d;s&&(d=u._pushBuffer()),u.compile(r.body,i),u._emitLine("next("+o+(d?","+d:"")+");"),s&&u._popBuffer()}),this._tmpid());this._emitLine("}, "+this._makeCallback(m)),this._addScopeLevel(),s&&this._emitLine(this.buffer+" += "+m+";"),r.else_&&(this._emitLine("if (!"+f+".length) {"),this.compile(r.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},l.compileAsyncEach=function(r,i){this._compileAsyncLoop(r,i)},l.compileAsyncAll=function(r,i){this._compileAsyncLoop(r,i,!0)},l._compileMacro=function(r,_){var s=this,a=[],u=null,o="macro_"+this._tmpid(),c=_!==void 0,f=(r.args.children.forEach(function(S,w){w===r.args.children.length-1&&S instanceof X.Dict?u=S:(s.assertType(S,X.Symbol),a.push(S))}),[].concat(a.map(function(S){return"l_"+S.value}),["kwargs"])),m=a.map(function(S){return'"'+S.value+'"'}),d=(u&&u.children||[]).map(function(S){return'"'+S.key.value+'"'}),y=c?_.push(!0):new lE,_=(this._emitLines("var "+o+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+d.join(", ")+"], ","function ("+f.join(", ")+") {","var callerFrame = frame;","frame = "+(c?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),a.forEach(function(S){s._emitLine('frame.set("'+S.value+'", l_'+S.value+");"),y.set(S.value,"l_"+S.value)}),u&&u.children.forEach(function(S){var w=S.key.value;s._emit('frame.set("'+w+'", '),s._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+w+'")'),s._emit(' ? kwargs["'+w+'"] : '),s._compileExpression(S.value,y),s._emit(");")}),this._pushBuffer());return this._withScopedSyntax(function(){s.compile(r.body,y)}),this._emitLine("frame = "+(c?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+_+");"),this._emitLine( Line truncated
`))})},l.compileRoot=function(r,i){var s=this,a=(i&&this.fail("compileRoot: root node can't have frame"),i=new lE,this._emitFuncBegin(r,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(r,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0,[]);(i=r.findAll(X.Block)).forEach(function(u,o){var c=u.name.value;if(a.indexOf(c)!==-1)throw new Error('Block "'+c+'" defined more than once.');a.push(c),s._emitFuncBegin(u,"b_"+c),c=new lE,s._emitLine("var frame = frame.push(true);"),s.compile(u.body,c),s._emitFuncEnd()}),this._emitLine("return {"),i.forEach(function(u,o){u="b_"+u.name.value,s._emitLine(u+": "+u+",")}),this._emitLine(`root: root
};`)},l.compile=function(r,i){var s=this["compile"+r.typename];s?s.call(this,r,i):this.fail("compile: Cannot compile node: "+r.typename,r.lineno,r.colno)},l.getCode=function(){return this.codebuf.join("")},n}(c4.Obj),H_e={compile:function(s,e,n,l,r){var i=new CB(l,(r=r===void 0?{}:r).throwOnUndefined),s=(n||[]).map(function(a){return a.preprocess}).filter(function(a){return!!a}).reduce(function(a,u){return u(a)},s);return i.compile(j_e.transform(P_e.parse(s,n,r),e,l)),i.getCode()},Compiler:CB},V_e=mt(function(t){function e(d,y){return d==null||d===!1?y:d}function n(d){return d!=d}function l(d){var y=(d=e(d,"")).toLowerCase();return yt.copySafeness(d,y.charAt(0).toUpperCase()+y.slice(1))}function r(d){if(Fe.isString(d))return d.split("");if(Fe.isObject(d))return Fe._entries(d||{}).map(function(y){return{key:y[0],value:y[1]}});if(Fe.isArray(d))return d;throw new Fe.TemplateError("list filter: type not iterable")}function i(d){return function(y,_,S){var w=this,E=w.env.getTest(_=_===void 0?"truthy":_);return Fe.toArray(y).filter(function(g){return E.call(w,g,S)===d})}}function s(d){return yt.copySafeness(d,d.replace(/^\s*|\s*$/g,""))}(t=t.exports={}).abs=Math.abs,t.batch=function(d,y,_){for(var S=[],w=[],E=0;E<d.length;E++)E%y==0&&w.length&&(S.push(w),w=[]),w.push(d[E]);if(w.length){if(_)for(E=w.length;E<y;E++)w.push(_);S.push(w)}return S},t.capitalize=l,t.center=function(d,y){var _;return(d=e(d,"")).length>=(y=y||80)?d:(y-=d.length,_=Fe.repeat(" ",y/2-y%2),y=Fe.repeat(" ",y/2),yt.copySafeness(d,_+d+y))},t.default=function(d,y,_){return _?d||y:d!==void 0?d:y},t.dictsort=function(d,y,_){if(!Fe.isObject(d))throw new Fe.TemplateError("dictsort filter: val must be an object");var S,w,E=[];for(w in d)E.push([w,d[w]]);if(_===void 0||_==="key")S=0;else{if(_!=="value")throw new Fe.TemplateError("dictsort filter: You can only sort by either key or value");S=1}return E.sort(function(g,v){return g=g[S],v=v[S],y||(Fe.isString(g)&&(g=g.toUpperCase()),Fe.isString(v)&&(v=v.toUpperCase())),v<g?1:g===v?0:-1}),E},t.dump=function(d,y){return JSON.stringify(d,null,y)},t.escape=function(d){return d instanceof yt.SafeString?d:yt.markSafe(Fe.escape((d=d??"").toString()))},t.safe=function(d){return d instanceof yt.SafeString?d:yt.markSafe((d=d??"").toString())},t.first=function(d){return d[0]},t.forceescape=function(d){return yt.markSafe(Fe.escape((d=d??"").toString()))},t.groupby=function(d,y){return Fe.groupBy(d,y,this.env.opts.throwOnUndefined)},t.indent=function(d,E,_){if((d=e(d,""))==="")return"";E=E||4;var S=d.split(`
`),w=Fe.repeat(" ",E),E=S.map(function(g,v){return v!==0||_?""+w+g:g}).join(`
`);return yt.copySafeness(d,E)},t.join=function(d,y,_){return y=y||"",(d=_?Fe.map(d,function(S){return S[_]}):d).join(y)},t.last=function(d){return d[d.length-1]},t.length=function(d){return(d=e(d,""))!==void 0?typeof Map=="function"&&d instanceof Map||typeof Set=="function"&&d instanceof Set?d.size:(!Fe.isObject(d)||d instanceof yt.SafeString?d:Fe.keys(d)).length:0},t.list=r,t.lower=function(d){return(d=e(d,"")).toLowerCase()},t.nl2br=function(d){return d==null?"":yt.copySafeness(d,d.replace(/\r\n|\n/g,`<br />
`))},t.random=function(d){return d[Math.floor(Math.random()*d.length)]},t.reject=i(!1),t.rejectattr=function(d,y){return d.filter(function(_){return!_[y]})},t.select=i(!0),t.selectattr=function(d,y){return d.filter(function(_){return!!_[y]})},t.replace=function(d,y,_,S){var w=d;if(y instanceof RegExp)return d.replace(y,_);S===void 0&&(S=-1);var E="";if(typeof y=="number")y=""+y;else if(typeof y!="string")return d;if(typeof(d=typeof d=="number"?""+d:d)!="string"&&!(d instanceof yt.SafeString))return d;if(y==="")return E=_+d.split("").join(_)+_,yt.copySafeness(d,E);var g=d.indexOf(y);if(S===0||g===-1)return d;for(var v=0,x=0;-1<g&&(S===-1||x<S);)E+=d.substring(v,g)+_,v=g+y.length,x++,g=d.indexOf(y,v);return v<d.length&&(E+=d.substring(v)),yt.copySafeness(w,E)},t.reverse=function(d){var y;return(y=Fe.isString(d)?r(d):Fe.map(d,function(_){return _})).reverse(),Fe.isString(d)?yt.copySafeness(d,y.join("")):y},t.round=function(d,y,_){return y=y||0,y=Math.pow(10,y),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(d*y)/y},t.slice=function(d,y,_){for(var S=Math.floor(d.length/y),w=d.length%y,E=[],g=0,v=0;v<y;v++){var x=g+v*S;v<w&&g++,x=d.slice(x,g+(v+1)*S),_&&w<=v&&x.push(_),E.push(x)}return E},t.sum=function(d,y,_){return(_=_===void 0?0:_)+(d=y?Fe.map(d,function(S){return S[y]}):d).reduce(function(S,w){return S+w},0)},t.sort=yt.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(E,y,_,S){var w=this,E=Fe.map(E,function(v){return v}),g=Fe.getAttrGetter(S);return E.sort(function(v,x){if(v=S?g(v):v,x=S?g(x):x,w.env.opts.throwOnUndefined&&S&&(v===void 0||x===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&Fe.isString(v)&&Fe.isString(x)&&(v=v.toLowerCase(),x=x.toLowerCase()),v<x?y?1:-1:x<v?y?-1:1:0}),E}),t.string=function(d){return yt.copySafeness(d,d)},t.striptags=function(d,S){var _=s((d=e(d,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),S=S?_.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
`).replace(/\n\n\n+/g,`
`):_.replace(/\s+/gi," ");return mt.copySafeness(d,S)},t.title=function(d){var y=(d=e(d,"")).split(" ").map(r);return mt.copySafeness(d,y.join(" "))},t.trim=s,t.truncate=function(d,y,_,S){var w=d;return(d=e(d,"")).length<=(y=y||255)?d:(d=_?d.substring(0,y):((_=d.lastIndexOf(" ",y))===-1&&(_=y),d.substring(0,_)),mt.copySafeness(w,d+=S??"..."))},t.upper=function(d){return(d=e(d,"")).toUpperCase()},t.urlencode=function(d){var y=encodeURIComponent;return Le.isString(d)?y(d):(Le.isArray(d)?d:Le._entries(d)).map(function(w){var S=w[0],w=w[1];return y(S)+"="+y(w)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,o=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,u=/^https?:\/\/.*$/,c=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(d,y,_){n(y)&&(y=1/0);var S=_===!0?' rel="nofollow"':"";return d.split(/(\s+)/).filter(function(w){return w&&w.length}).map(function(w){var E=w.match(a),g=(E=E?E[1]:w).substr(0,y);return u.test(E)?'<a href="'+E+'"'+S+">"+g+"</a>":c.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":o.test(E)?'<a href="mailto:'+E+'">'+E+"</a>":f.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":w}).join("")},t.wordcount=function(d){return(d=(d=e(d,""))?d.match(/\w+/g):null)?d.length:null},t.float=function(d,y){return n(d=parseFloat(d))?y:d},mt.makeMacro(["value","default","base"],[],function(d,y,_){return _===void 0&&(_=10),n(d=parseInt(d,_))?y:d}));t.int=m,t.d=t.default,t.e=t.escape}),X7={};function wV(t,e){for(var n=0,r=t.length-1;0<=r;r--){var i=t[r];i==="."?t.splice(r,1):i===".."?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var x_e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Q_=function(t){return x_e.exec(t).slice(1)};function Z_(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var r=0<=n?arguments[n]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return(e?"/":"")+wV(YE(t.split("/"),function(i){return!!i}),!e).join("/")||"."}function _B(t){var e=SV(t),n=A_e(t,-1)==="/";return(t=(t=wV(YE(t.split("/"),function(r){return!!r}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function SV(t){return t.charAt(0)==="/"}var r0={extname:function(t){return Q_(t)[3]},basename:function(t,e){return t=Q_(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=Q_(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(u){for(var c=0;c<u.length&&u[c]==="";c++);for(var f=u.length-1;0<=f&&u[f]==="";f--);return f<c?[]:u.slice(c,f-c+1)}t=Z_(t).substr(1),e=Z_(e).substr(1);for(var r=n(t.split("/")),i=n(e.split("/")),l=Math.min(r.length,i.length),s=l,a=0;a<l;a++)if(r[a]!==i[a]){s=a;break}for(var o=[],a=s;a<r.length;a++)o.push("..");return(o=o.concat(i.slice(s))).join("/")},join:function(){return _B(YE(Array.prototype.slice.call(arguments,0),function(t,e){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},isAbsolute:SV,normalize:_B,resolve:Z_};function YE(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}var A_e="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)};function TV(t,e){return(TV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var QE=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),TV(r.prototype.constructor=r,e);var r=n.prototype;return r.resolve=function(i,l){return r0.resolve(r0.dirname(i),l)},r.isRelative=function(i){return i.indexOf("./")===0||i.indexOf("../")===0},n}(o0.EmitterObj);function xV(t,e){return(xV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var O_e=function(t){var e,n;function r(i){var l;return(l=t.call(this)||this).precompiled=i||{},l}return n=t,(e=r).prototype=Object.create(n.prototype),xV(e.prototype.constructor=e,n),r.prototype.getSource=function(i){return this.precompiled[i]?{src:{type:"code",obj:this.precompiled[i]},path:i}:null},r}(QE);function AV(t,e){t.prototype=Object.create(e.prototype),OV(t.prototype.constructor=t,e)}function OV(t,e){return(OV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n})(t,e)}var N_e=O_e,C_e=function(t){function e(n,r){var i=t.call(this)||this;return typeof r=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),r=r||{},i.pathsToNames={},i.noCache=!!r.noCache,n?(n=Array.isArray(n)?n:[n],i.searchPaths=n.map(r0.normalize)):i.searchPaths=["."],r.watch,i}return AV(e,t),e.prototype.getSource=function(n){for(var r=null,i=this.searchPaths,l=0;l<i.length;l++){var s=r0.resoLine truncated
`):_.replace(/\s+/gi," ");return yt.copySafeness(d,S)},t.title=function(d){var y=(d=e(d,"")).split(" ").map(l);return yt.copySafeness(d,y.join(" "))},t.trim=s,t.truncate=function(d,y,_,S){var w=d;return(d=e(d,"")).length<=(y=y||255)?d:(d=_?d.substring(0,y):((_=d.lastIndexOf(" ",y))===-1&&(_=y),d.substring(0,_)),yt.copySafeness(w,d+=S??"..."))},t.upper=function(d){return(d=e(d,"")).toUpperCase()},t.urlencode=function(d){var y=encodeURIComponent;return Fe.isString(d)?y(d):(Fe.isArray(d)?d:Fe._entries(d)).map(function(w){var S=w[0],w=w[1];return y(S)+"="+y(w)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,u=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,o=/^https?:\/\/.*$/,c=/^www\./,f=/\.(?:org|net|com)(?:\:|\/|$)/,m=(t.urlize=function(d,y,_){n(y)&&(y=1/0);var S=_===!0?' rel="nofollow"':"";return d.split(/(\s+)/).filter(function(w){return w&&w.length}).map(function(w){var E=w.match(a),g=(E=E?E[1]:w).substr(0,y);return o.test(E)?'<a href="'+E+'"'+S+">"+g+"</a>":c.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":u.test(E)?'<a href="mailto:'+E+'">'+E+"</a>":f.test(E)?'<a href="http://'+E+'"'+S+">"+g+"</a>":w}).join("")},t.wordcount=function(d){return(d=(d=e(d,""))?d.match(/\w+/g):null)?d.length:null},t.float=function(d,y){return n(d=parseFloat(d))?y:d},yt.makeMacro(["value","default","base"],[],function(d,y,_){return _===void 0&&(_=10),n(d=parseInt(d,_))?y:d}));t.int=m,t.d=t.default,t.e=t.escape}),Q7={};function DV(t,e){for(var n=0,l=t.length-1;0<=l;l--){var r=t[l];r==="."?t.splice(l,1):r===".."?(t.splice(l,1),n++):n&&(t.splice(l,1),n--)}if(e)for(;n--;)t.unshift("..");return t}var q_e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,rE=function(t){return q_e.exec(t).slice(1)};function iE(){for(var t="",e=!1,n=arguments.length-1;-1<=n&&!e;n--){var l=0<=n?arguments[n]:"/";if(typeof l!="string")throw new TypeError("Arguments to path.resolve must be strings");l&&(t=l+"/"+t,e=l.charAt(0)==="/")}return(e?"/":"")+DV(lb(t.split("/"),function(r){return!!r}),!e).join("/")||"."}function RB(t){var e=PV(t),n=z_e(t,-1)==="/";return(t=(t=DV(lb(t.split("/"),function(l){return!!l}),!e).join("/"))||e?t:".")&&n&&(t+="/"),(e?"/":"")+t}function PV(t){return t.charAt(0)==="/"}var i4={extname:function(t){return rE(t)[3]},basename:function(t,e){return t=rE(t)[2],e&&t.substr(-1*e.length)===e?t.substr(0,t.length-e.length):t},dirname:function(n){var e=(n=rE(n))[0],n=n[1];return e||n?e+(n&&n.substr(0,n.length-1)):"."},sep:"/",delimiter:":",relative:function(t,e){function n(o){for(var c=0;c<o.length&&o[c]==="";c++);for(var f=o.length-1;0<=f&&o[f]==="";f--);return f<c?[]:o.slice(c,f-c+1)}t=iE(t).substr(1),e=iE(e).substr(1);for(var l=n(t.split("/")),r=n(e.split("/")),i=Math.min(l.length,r.length),s=i,a=0;a<i;a++)if(l[a]!==r[a]){s=a;break}for(var u=[],a=s;a<l.length;a++)u.push("..");return(u=u.concat(r.slice(s))).join("/")},join:function(){return RB(lb(Array.prototype.slice.call(arguments,0),function(t,e){if(typeof t!="string")throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},isAbsolute:PV,normalize:RB,resolve:iE};function lb(t,e){if(t.filter)return t.filter(e);for(var n=[],l=0;l<t.length;l++)e(t[l],l,t)&&n.push(t[l]);return n}var z_e="ab".substr(-1)==="b"?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)};function LV(t,e){return(LV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}var rb=function(t){var e;function n(){return t.apply(this,arguments)||this}e=t,(l=n).prototype=Object.create(e.prototype),LV(l.prototype.constructor=l,e);var l=n.prototype;return l.resolve=function(r,i){return i4.resolve(i4.dirname(r),i)},l.isRelative=function(r){return r.indexOf("./")===0||r.indexOf("../")===0},n}(c4.EmitterObj);function FV(t,e){return(FV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}var G_e=function(t){var e,n;function l(r){var i;return(i=t.call(this)||this).precompiled=r||{},i}return n=t,(e=l).prototype=Object.create(n.prototype),FV(e.prototype.constructor=e,n),l.prototype.getSource=function(r){return this.precompiled[r]?{src:{type:"code",obj:this.precompiled[r]},path:r}:null},l}(rb);function jV(t,e){t.prototype=Object.create(e.prototype),UV(t.prototype.constructor=t,e)}function UV(t,e){return(UV=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n})(t,e)}var J_e=G_e,K_e=function(t){function e(n,l){var r=t.call(this)||this;return typeof l=="boolean"&&console.log("[nunjucks] Warning: you passed a boolean as the second argument to FileSystemLoader, but it now takes an options object. See http://mozilla.github.io/nunjucks/api.html#filesystemloader"),l=l||{},r.pathsToNames={},r.noCache=!!l.noCache,n?(n=Array.isArray(n)?n:[n],r.searchPaths=n.map(i4.normalize)):r.searchPaths=["."],l.watch,r}return jV(e,t),e.prototype.getSource=function(n){for(var l=null,r=this.searchPaths,i=0;i<r.length;i++){var s=i4.resoLine truncated
/* [wrapped with `+L+`] */
`)):C}(A,function(C,L){return Kr(m,function(z){var K="_."+z[0];L&z[1]&&!cs(C,K)&&C.push(K)}),C.sort()}(function(){var C=A.match(ol);return C?C[1].split(dr):[]}(),b)))}function Vx(p){var h=0,b=0;return function(){var A=BZ(),C=16-(A-b);if(b=A,0<C){if(800<=++h)return arguments[0]}else h=0;return p.apply(n,arguments)}}function C6(p,h){var b=-1,A=p.length,C=A-1;for(h=h===n?A:h;++b<h;){var L=qf(b,C),z=p[L];p[L]=p[b],p[b]=z}return p.length=h,p}var qx=function(){var p=D6(function(b){var A=[];return b.charCodeAt(0)===46&&A.push(""),b.replace(ft,function(C,L,z,K){A.push(z?K.replace(bi,"$1"):L||C)}),A},function(b){return h.size===500&&h.clear(),b}),h=p.cache;return p}();function Gs(p){var h;return typeof p=="string"||Il(p)?p:(h=p+"")=="0"&&1/p==-1/0?"-0":h}function d3(p){if(p!=null){try{return s6.call(p)}catch{}try{return p+""}catch{}}return""}function zx(p){var h;return p instanceof Jt?p.clone():((h=new fs(p.__wrapped__,p.__chain__)).__actions__=ul(p.__actions__),h.__index__=p.__index__,h.__values__=p.__values__,h)}function Gx(p,h,b){var A=p==null?0:p.length;return A?((b=b==null?0:At(b))<0&&(b=Wr(A+b,0)),Ms(p,ot(h,3),b)):-1}function Jx(p,h,b){var A,C=p==null?0:p.length;return C?(A=C-1,b!==n&&(A=At(b),A=b<0?Wr(C+A,0):Di(A,C-1)),Ms(p,ot(h,3),A,!0)):-1}function Kx(p){return p!=null&&p.length?Si(p,1):[]}function Xx(p){return p&&p.length?p[0]:n}function zl(p){var h=p==null?0:p.length;return h?p[h-1]:n}function Wx(p,h){return p&&p.length&&h&&h.length?Vf(p,h):p}kf=Rt(function(p,h){return Dr(p)?X0(p,Si(h,1,Dr,!0)):[]}),Hs=Rt(function(p,h){var b=zl(h);return Dr(b)&&(b=n),Dr(p)?X0(p,Si(h,1,Dr,!0),ot(b,2)):[]}),z0=Rt(function(p,h){var b=zl(h);return Dr(b)&&(b=n),Dr(p)?X0(p,Si(h,1,Dr,!0),n,b):[]}),Wt=Rt(function(p){var h=an(p,Xf);return h.length&&h[0]===p[0]?Mf(h):[]}),Cu=Rt(function(p){var h=zl(p),b=an(p,Xf);return h===zl(b)?h=n:b.pop(),b.length&&b[0]===p[0]?Mf(b,ot(h,2)):[]}),Df=Rt(function(p){var h=zl(p),b=an(p,Xf);return(h=typeof h=="function"?h:n)&&b.pop(),b.length&&b[0]===p[0]?Mf(b,n,h):[]}),Pi=Rt(Wx);var nee=Ra(function(p,h){var b=p==null?0:p.length,A=Lf(p,h);return ux(p,an(h,function(C){return Ia(C,b)?+C:C}).sort(_x)),A});function cd(p){return p==null?p:VZ.call(p)}var ree=Rt(function(p){return p2(Si(p,1,Dr,!0))}),iee=Rt(function(p){var h=zl(p);return Dr(h)&&(h=n),p2(Si(p,1,Dr,!0),ot(h,2))}),lee=Rt(function(p){var h=typeof(h=zl(p))=="function"?h:n;return p2(Si(p,1,Dr,!0),n,h)});function pd(p){var h;return p&&p.length?(h=0,p=ui(p,function(b){if(Dr(b))return h=Wr(b.length,h),!0}),e6(h,function(b){return an(p,$s(b))})):[]}function Yx(p,h){return p&&p.length?(p=pd(p),h==null?p:an(p,function(b){return oi(h,n,b)})):[]}var see=Rt(function(p,h){return Dr(p)?X0(p,h):[]}),aee=Rt(function(p){return Kf(ui(p,Dr))}),oee=Rt(function(p){var h=zl(p);return Dr(h)&&(h=n),Kf(ui(p,Dr),ot(h,2))}),uee=Rt(function(p){var h=typeof(h=zl(p))=="function"?h:n;return Kf(ui(p,Dr),n,h)}),cee=Rt(pd),pee=Rt(function(p){var h=typeof(h=1<(h=p.length)?p[h-1]:n)=="function"?(p.pop(),h):n;return Yx(p,h)});function Qx(p){return(p=I(p)).__chain__=!0,p}function R6(p,h){return h(p)}var fee=Ra(function(p){function h(L){return Lf(L,p)}var b=p.length,A=b?p[0]:0,C=this.__wrapped__;return!(1<b||this.__actions__.length)&&C instanceof Jt&&Ia(A)?((C=C.slice(A,+A+(b?1:0))).__actions__.push({func:R6,args:[h],thisArg:n}),new fs(C,this.__chain__).thru(function(L){return b&&!L.length&&L.push(n),L})):this.thru(h)}),dee=w6(function(p,h,b){Xn.call(p,b)?++p[b]:Na(p,b,1)}),hee=xx(Gx),mee=xx(Jx);function Zx(p,h){return(St(p)?Kr:c2)(p,ot(h,3))}function eA(p,h){return(St(p)?function(b,A){for(var C=b==null?0:b.length;C--&&A(b[C],C,b)!==!1;);return b}:WT)(p,ot(h,3))}var yee=w6(function(p,h,b){Xn.call(p,b)?p[b].push(h):Na(p,b,[h])}),gee=Rt(function(p,h,b){var A=-1,C=typeof h=="function",L=cl(p)?he(p.length):[];return c2(p,function(z){L[++A]=C?oi(h,z,b):W0(z,h,b)}),L}),vee=w6(function(p,h,b){Na(p,b,h)});function I6(p,h){return(St(p)?an:rx)(p,ot(h,3))}var _ee=w6(function(p,h,b){p[b?0:1].push(h)},function(){return[[],[]]}),Eee=Rt(function(p,h){var b;return p==null?[]:(1<(b=h.length)&&Qi(p,h[0],h[1])?h=[]:2<b&&Qi(h[0],h[1],h[2])&&(h=[h[0]]),ax(p,Si(h,1),[]))}),k6=dd||function(){return cr.Date.now()};function tA(p,h,b){return h=b?n:h,h=p&&h==null?p.length:h,Ca(p,a,n,n,n,n,h)}function nA(p,h){var b;if(typeof h!="function")throw new Hl(r);return p=At(p),function(){return 0<--p&&(b=h.apply(this,arguments)),p<=1&&(h=n),b}}var fd=Rt(function(p,h,b){var A,C=1;return b.length&&(A=xa(b,Lu(fd)),C|=s),Ca(p,C,h,b,A)}),rA=Rt(function(p,h,b){var A,C=3;return b.length&&(A=xa(b,Lu(rA)),C|=s),Ca(h,C,p,b,A)});function iA(p,h,b){var A,C,L,z,K,re,pe=0,fe=!1,Ae=!1,Ee=!0;if(typeof p!="function")throw new Hl(r);function _e(We){var it=A,ct=C;return A=C=n,pe=We,z=p.apply(ct,it)}function xe(We){var it=We-re;return re===n||h<=it||it<0||Ae&&L<=We-pe}function nt(){var We=k6();if(xe(We))return ke(We);K=t4(nt,function(it){var ct=h-(it-re);return Ae?Di(ct,L-(it-pe)):ct}(We))}function ke(We){return K=n,Ee&&A?_e(We):(A=C=n, Line truncated
`;if(p.replace(fe,function(Ee,_e,xe,nt,ke,De){return xe=xe||nt,pe+=p.slice(K,De).replace(Hr,PT),_e&&(A=!0,pe+=`' +
`)):C}(A,function(C,L){return Xl(m,function(z){var K="_."+z[0];L&z[1]&&!pr(C,K)&&C.push(K)}),C.sort()}(function(){var C=A.match(o3);return C?C[1].split(hl):[]}(),b)))}function eA(p){var h=0,b=0;return function(){var A=see(),C=16-(A-b);if(b=A,0<C){if(800<=++h)return arguments[0]}else h=0;return p.apply(n,arguments)}}function k8(p,h){var b=-1,A=p.length,C=A-1;for(h=h===n?A:h;++b<h;){var L=Wf(b,C),z=p[L];p[L]=p[b],p[b]=z}return p.length=h,p}var tA=function(){var p=F8(function(b){var A=[];return b.charCodeAt(0)===46&&A.push(""),b.replace(dt,function(C,L,z,K){A.push(z?K.replace(w2,"$1"):L||C)}),A},function(b){return h.size===500&&h.clear(),b}),h=p.cache;return p}();function zr(p){var h;return typeof p=="string"||k3(p)?p:(h=p+"")=="0"&&1/p==-1/0?"-0":h}function hu(p){if(p!=null){try{return o8.call(p)}catch{}try{return p+""}catch{}}return""}function nA(p){var h;return p instanceof Xt?p.clone():((h=new dr(p.__wrapped__,p.__chain__)).__actions__=c3(p.__actions__),h.__index__=p.__index__,h.__values__=p.__values__,h)}function lA(p,h,b){var A=p==null?0:p.length;return A?((b=b==null?0:At(b))<0&&(b=Yl(A+b,0)),Mr(p,ut(h,3),b)):-1}function rA(p,h,b){var A,C=p==null?0:p.length;return C?(A=C-1,b!==n&&(A=At(b),A=b<0?Yl(C+A,0):P2(A,C-1)),Mr(p,ut(h,3),A,!0)):-1}function iA(p){return p!=null&&p.length?T2(p,1):[]}function sA(p){return p&&p.length?p[0]:n}function G3(p){var h=p==null?0:p.length;return h?p[h-1]:n}function aA(p,h){return p&&p.length&&h&&h.length?Xf(p,h):p}Uf=Rt(function(p,h){return Pl(p)?Q4(p,T2(h,1,Pl,!0)):[]}),Hr=Rt(function(p,h){var b=G3(h);return Pl(b)&&(b=n),Pl(p)?Q4(p,T2(h,1,Pl,!0),ut(b,2)):[]}),K4=Rt(function(p,h){var b=G3(h);return Pl(b)&&(b=n),Pl(p)?Q4(p,T2(h,1,Pl,!0),n,b):[]}),Qt=Rt(function(p){var h=on(p,td);return h.length&&h[0]===p[0]?zf(h):[]}),Io=Rt(function(p){var h=G3(p),b=on(p,td);return h===G3(b)?h=n:b.pop(),b.length&&b[0]===p[0]?zf(b,ut(h,2)):[]}),Mf=Rt(function(p){var h=G3(p),b=on(p,td);return(h=typeof h=="function"?h:n)&&b.pop(),b.length&&b[0]===p[0]?zf(b,n,h):[]}),L2=Rt(aA);var bee=Ci(function(p,h){var b=p==null?0:p.length,A=Bf(p,h);return Ex(p,on(h,function(C){return Ri(C,b)?+C:C}).sort(Rx)),A});function yd(p){return p==null?p:uee.call(p)}var wee=Rt(function(p){return cs(T2(p,1,Pl,!0))}),See=Rt(function(p){var h=G3(p);return Pl(h)&&(h=n),cs(T2(p,1,Pl,!0),ut(h,2))}),Tee=Rt(function(p){var h=typeof(h=G3(p))=="function"?h:n;return cs(T2(p,1,Pl,!0),n,h)});function gd(p){var h;return p&&p.length?(h=0,p=c2(p,function(b){if(Pl(b))return h=Yl(b.length,h),!0}),l8(h,function(b){return on(p,$r(b))})):[]}function uA(p,h){return p&&p.length?(p=gd(p),h==null?p:on(p,function(b){return o2(h,n,b)})):[]}var xee=Rt(function(p,h){return Pl(p)?Q4(p,h):[]}),Aee=Rt(function(p){return ed(c2(p,Pl))}),Oee=Rt(function(p){var h=G3(p);return Pl(h)&&(h=n),ed(c2(p,Pl),ut(h,2))}),Nee=Rt(function(p){var h=typeof(h=G3(p))=="function"?h:n;return ed(c2(p,Pl),n,h)}),Cee=Rt(gd),Ree=Rt(function(p){var h=typeof(h=1<(h=p.length)?p[h-1]:n)=="function"?(p.pop(),h):n;return uA(p,h)});function oA(p){return(p=I(p)).__chain__=!0,p}function D8(p,h){return h(p)}var Iee=Ci(function(p){function h(L){return Bf(L,p)}var b=p.length,A=b?p[0]:0,C=this.__wrapped__;return!(1<b||this.__actions__.length)&&C instanceof Xt&&Ri(A)?((C=C.slice(A,+A+(b?1:0))).__actions__.push({func:D8,args:[h],thisArg:n}),new dr(C,this.__chain__).thru(function(L){return b&&!L.length&&L.push(n),L})):this.thru(h)}),kee=x8(function(p,h,b){Wn.call(p,b)?++p[b]:Oi(p,b,1)}),Dee=Fx(lA),Pee=Fx(rA);function cA(p,h){return(St(p)?Xl:os)(p,ut(h,3))}function pA(p,h){return(St(p)?function(b,A){for(var C=b==null?0:b.length;C--&&A(b[C],C,b)!==!1;);return b}:ax)(p,ut(h,3))}var Lee=x8(function(p,h,b){Wn.call(p,b)?p[b].push(h):Oi(p,b,[h])}),Fee=Rt(function(p,h,b){var A=-1,C=typeof h=="function",L=p3(p)?he(p.length):[];return os(p,function(z){L[++A]=C?o2(h,z,b):Z4(z,h,b)}),L}),jee=x8(function(p,h,b){Oi(p,b,h)});function P8(p,h){return(St(p)?on:hx)(p,ut(h,3))}var Uee=x8(function(p,h,b){p[b?0:1].push(h)},function(){return[[],[]]}),Mee=Rt(function(p,h){var b;return p==null?[]:(1<(b=h.length)&&Z2(p,h[0],h[1])?h=[]:2<b&&Z2(h[0],h[1],h[2])&&(h=[h[0]]),vx(p,T2(h,1),[]))}),L8=_d||function(){return pl.Date.now()};function fA(p,h,b){return h=b?n:h,h=p&&h==null?p.length:h,Ni(p,a,n,n,n,n,h)}function dA(p,h){var b;if(typeof h!="function")throw new V3(l);return p=At(p),function(){return 0<--p&&(b=h.apply(this,arguments)),p<=1&&(h=n),b}}var vd=Rt(function(p,h,b){var A,C=1;return b.length&&(A=Ti(b,jo(vd)),C|=s),Ni(p,C,h,b,A)}),hA=Rt(function(p,h,b){var A,C=3;return b.length&&(A=Ti(b,jo(hA)),C|=s),Ni(h,C,p,b,A)});function mA(p,h,b){var A,C,L,z,K,le,pe=0,fe=!1,Ae=!1,Ee=!0;if(typeof p!="function")throw new V3(l);function _e(We){var rt=A,ct=C;return A=C=n,pe=We,z=p.apply(ct,rt)}function xe(We){var rt=We-le;return le===n||h<=rt||rt<0||Ae&&L<=We-pe}function nt(){var We=L8();if(xe(We))return ke(We);K=r1(nt,function(rt){var ct=h-(rt-le);return Ae?P2(ct,L-(rt-pe)):ct}(We))}function ke(We){return K=n,Ee&&A?_e(We):(A=C= Line truncated
`;if(p.replace(fe,function(Ee,_e,xe,nt,ke,De){return xe=xe||nt,pe+=p.slice(K,De).replace(Vl,zT),_e&&(A=!0,pe+=`' +
__e(`+_e+`) +
'`),ke&&(C=!0,pe+=`';
`+ke+`;
__p += '`),xe&&(pe+=`' +
((__t = (`+xe+`)) == null ? '' : __t) +
'`),K=De+Ee.length,Ee}),pe+=`';
`,re=Xn.call(h,"variable")&&h.variable){if(Sr.test(re))throw new rt("Invalid `variable` option passed into `_.template`")}else pe=`with (obj) {
`,le=Wn.call(h,"variable")&&h.variable){if(Tl.test(le))throw new lt("Invalid `variable` option passed into `_.template`")}else pe=`with (obj) {
`+pe+`
}
`;if(pe=(C?pe.replace(Tt,""):pe).replace(Qe,"$1").replace(pt,"$1;"),pe="function("+(re||"obj")+`) {
`+(re?"":`obj || (obj = {});
`;if(pe=(C?pe.replace(Tt,""):pe).replace(Qe,"$1").replace(ft,"$1;"),pe="function("+(le||"obj")+`) {
`+(le?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(A?", __e = _.escape":"")+(C?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+pe+`return __p
}`,(fe=bA(function(){return wt(L,Ae+"return "+pe).apply(n,z)})).source=pe,yd(fe))throw fe;return fe},I.times=function(p,h){if((p=At(p))<1||u<p)return[];var b=f,A=Di(p,f);for(h=ot(h),p-=f,A=e6(A,h);++b<p;)h(b);return A},I.toFinite=Da,I.toInteger=At,I.toLength=pA,I.toLower=function(p){return dn(p).toLowerCase()},I.toNumber=Jl,I.toSafeInteger=function(p){return p?c3(At(p),-9007199254740991,u):p===0?p:0},I.toString=dn,I.toUpper=function(p){return dn(p).toUpperCase()},I.trim=function(p,h,b){return(p=dn(p))&&(b||h===n)?Ta(p):p&&(h=Rl(h))?d2(b=ps(p),t6(b,h=ps(h)),n6(b,h)+1).join(""):p},I.trimEnd=function(p,h,b){return(p=dn(p))&&(b||h===n)?p.slice(0,LT(p)+1):p&&(h=Rl(h))?d2(b=ps(p),0,n6(b,ps(h))+1).join(""):p},I.trimStart=function(p,h,b){return(p=dn(p))&&(b||h===n)?p.replace(wr,""):p&&(h=Rl(h))?d2(b=ps(p),t6(b,ps(h))).join(""):p},I.truncate=function(p,C){var b,z=30,A="...",C=(gr(C)&&(b="separator"in C?C.separator:b,z="length"in C?At(C.length):z,A="omission"in C?Rl(C.omission):A),(p=dn(p)).length);if((C=l3(p)?(L=ps(p)).length:C)<=z)return p;if((C=z-Au(A))<1)return A;var L,z=L?d2(L,0,C).join(""):p.slice(0,C);if(b!==n)if(L&&(C+=z.length-C),gd(b)){if(p.slice(C).search(b)){var K,re=z;for((b=b.global?b:s3(b.source,dn(Ul.exec(b))+"g")).lastIndex=0;K=b.exec(re);)var pe=K.index;z=z.slice(0,pe===n?C:pe)}}else p.indexOf(Rl(b),C)!=C&&-1<(L=z.lastIndexOf(b))&&(z=z.slice(0,L));return z+A},I.unescape=function(p){return(p=dn(p))&&$t.test(p)?p.replace(ze,DZ):p},I.uniqueId=function(p){var h=++LZ;return dn(p)+h},I.upperCase=zee,I.upperFirst=Ed,I.each=Zx,I.eachRight=eA,I.first=Xx,Sd(I,(Od={},Vs(I,function(p,h){Xn.call(I.prototype,h)||(Od[h]=p)}),Od),{chain:!1}),I.VERSION="4.17.21",Kr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){I[p].placeholder=I}),Kr(["drop","take"],function(p,h){Jt.prototype[p]=function(b){b=b===n?1:Wr(At(b),0);var A=this.__filtered__&&!h?new Jt(this):this.clone();return A.__filtered__?A.__takeCount__=Di(b,A.__takeCount__):A.__views__.push({size:Di(b,f),type:p+(A.__dir__<0?"Right":"")}),A},Jt.prototype[p+"Right"]=function(b){return this.reverse()[p](b).reverse()}}),Kr(["filter","map","takeWhile"],function(p,h){var b=h+1,A=b==1||b==3;Jt.prototype[p]=function(C){var L=this.clone();return L.__iteratees__.push({iteratee:ot(C,3),type:b}),L.__filtered__=L.__filtered__||A,L}}),Kr(["head","last"],function(p,h){var b="take"+(h?"Right":"");Jt.prototype[p]=function(){return this[b](1).value()[0]}}),Kr(["initial","tail"],function(p,h){var b="drop"+(h?"":"Right");Jt.prototype[p]=function(){return this.__filtered__?new Jt(this):this[b](1)}}),Jt.prototype.compact=function(){return this.filter(fl)},Jt.prototype.find=function(p){return this.filter(p).head()},Jt.prototype.findLast=function(p){return this.reverse().find(p)},Jt.prototype.invokeMap=Rt(function(p,h){return typeof p=="function"?new Jt(this):this.map(function(b){return W0(b,p,h)})}),Jt.prototype.reject=function(p){return this.filter(P6(ot(p)))},Jt.prototype.slice=function(p,h){p=At(p);var b=this;return b.__filtered__&&(0<p||h<0)?new Jt(b):(p<0?b=b.takeRight(-p):p&&(b=b.drop(p)),h!==n?(h=At(h))<0?b.dropRight(-h):b.take(h-p):b)},Jt.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},Jt.prototype.toArray=function(){return this.take(f)},Vs(Jt.prototype,function(p,h){var b=/^(?:filter|find|map|reject)|While$/.test(h),A=/^(?:head|last)$/.test(h),C=I[A?"take"+(h=="last"?"Right":""):h],L=A||/^find/.test(h);C&&(I.prototype[h]=function(){function z(nt){return nt=C.apply(I,Us([nt],pe)),A&&Ae?nt[0]:nt}var K,re=this.__wrapped__,pe=A?[1]:arguments,xe=re instanceof Jt,Ee=pe[0],fe=xe||St(re),Ae=(fe&&b&&typeof Ee=="function"&&Ee.length!=1&&(xe=fe=!1),this.__chain__),Ee=!!this.__actions__.length,_e=L&&!Ae,xe=xe&&!Ee;return!L&&fe?(re=xe?re:new Jt(this),(K=p.apply(re,pe)).__actions__.push({func:R6,args:[z],thisArg:n}),new fs(K,Ae)):_e&&xe?p.apply(this,pe):(K=this.thru(z),_e?A?K.value()[0]:K.value():K)})}),Kr(["pop","push","shift","sort","splice","unshift"],function(p){var h=l6[p],b=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",A=/^(?:pop|shift)$/.test(p);I.prototype[p]=function(){var C,L=arguments;return A&&!this.__chain__?(C=this.value(),h.apply(St(C)?C:[],L)):this[b](function(z){return h.apply(St(z)?z:[],L)})}}),Vs(Jt.prototype,function(p,h){var b,A=I[h];A&&(b=A.name+"",Xn.call(Iu,b)||(Iu[b]=[]),Iu[b].push({name:h,func:A}))}),Iu[S6(n,2).name]=[{name:"wrapper",func:n}],Jt.prototype.clone=function(){var p=new Jt(this.__wrapped__);return p.__actions__=ul(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=ul(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=ul(this.__views__),p},Jt.prototype.reverse=function(){var p;return this.__filtered__?((p=new Jt(this)).__dir__=-1,p.__filtered__=!0):(p=this.clone()).__dir__*=-1,p},Jt.prototype.value=function(){var p=this.__wrapped__.value(),h=this.__dir__,b=St(p),A=h<0,C=b?p.length:0,L=function(We,it,ct){for(var hr=-1,Or=ct.length;++hr<O Line truncated
`)){let o=a.trim();if(o)if(o.startsWith("#")){if(o.startsWith("#EXT")){let u=lEe(o,l);u&&s.push(u)}}else s.push(o)}return s.length!==0&&s[0].name==="EXTM3U"||He("The EXTM3U tag MUST be the first line."),s}(t,e),r=sEe(n,e);return r.source=t,r}var aEe=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],oEe=["#EXT-X-MEDIA"],fb=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(aEe.some(r=>n.startsWith(r)))super.push(n);else{if(this.includes(n)){if(oEe.some(r=>n.startsWith(r)))continue;He(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function yb(t,e){let n=1e3;e&&(n=Math.pow(10,e));let r=Math.round(t*n)/n;return e?r.toFixed(e):r}function uEe(t){let e=[`DATA-ID="${t.id}"`];return t.language&&e.push(`LANGUAGE="${t.language}"`),t.value?e.push(`VALUE="${t.value}"`):t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function nq(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",r=[`METHOD=${t.method}`];return t.uri&&r.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&He("IV must be a 128-bit unsigned integer"),r.push(`IV=${ZV(t.iv)}`)),t.format&&r.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&r.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${r.join(",")}`}function cEe(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",r=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&r.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&r.push(`URI="${e.uri}"`),e.codecs&&r.push(`CODECS="${e.codecs}"`),e.resolution&&r.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&r.push(`FRAME-RATE=${yb(e.frameRate,3)}`),e.hdcpLevel&&r.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){r.push(`AUDIO="${e.audio[0].groupId}"`);for(let i of e.audio)t.push(bp(i))}if(e.video.length>0){r.push(`VIDEO="${e.video[0].groupId}"`);for(let i of e.video)t.push(bp(i))}if(e.subtitles.length>0){r.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let i of e.subtitles)t.push(bp(i))}if(W_e().allowClosedCaptionsNone&&e.closedCaptions.length===0)r.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){r.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let i of e.closedCaptions)t.push(bp(i))}if(e.score&&r.push(`SCORE=${e.score}`),e.allowedCpc){let i=[];for(let{format:l,cpcList:s}of e.allowedCpc)i.push(`${l}:${s.join("/")}`);r.push(`ALLOWED-CPC="${i.join(",")}"`)}e.videoRange&&r.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&r.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&r.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${r.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function bp(t){let e=[`TYPE=${t.type}`,`GROUP-ID="${t.groupId}"`,`NAME="${t.name}"`];return t.isDefault!==void 0&&e.push("DEFAULT="+(t.isDefault?"YES":"NO")),t.autoselect!==void 0&&e.push("AUTOSELECT="+(t.autoselect?"YES":"NO")),t.forced!==void 0&&e.push("FORCED="+(t.forced?"YES":"NO")),t.language&&e.push(`LANGUAGE="${t.language}"`),t.assocLanguage&&e.push(`ASSOC-LANGUAGE="${t.assocLanguage}"`),t.instreamId&&e.push(`INSTREAM-ID="${t.instreamId}"`),t.characteristics&&e.push(`CHARACTERISTICS="${t.characteristics}"`),t.channels&&e.push(`CHANNELS="${t.channels}"`),t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function pEe(t,e,n,r,i=1,l=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let u=nq(e.key);u!==n&&(t.push(u),n=u)}if(e.map){let u=function(c){let f=[`URI="${c.uri}"`];return c.byterange&&f.push(`BYTERANGE="${ob(c.byterange)}"`),`#EXT-X-MAP:${f.join(",")}`}(e.map);u!==r&&(t.push(u),r=u)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${ab(e.programDateTime)}`),e.dateRange&&t.push(function(u){let c=[`ID="${u.id}"`];u.start&&c.push(`START-DATE="${ab(u.start)}"`),u.end&&c.push(`END-DATE="${ab(u.end)}"`),u.duration&&c.push(`DURATION=${u.duration}`),u.plannedDuration&&c.push(`PLANNED-DURATION=${u.plannedDuration}`),u.classId&&c.push(`CLASS="${u.classId}"`),u.endOnNext&&c.push("END-ON-NEXT=YES");for(let f of Object.keys(u.attributes))f.startsWith("X-")?typeof u.attributes[f]=="number"?c.push(`${f}=${u.attributes[f]}`):c.push(`${f}="${u.attributes[f]}"`):f.startsWith("SCTE35-")&&c.push(`${f}=${ZV(u.attributes[f])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(u,c){let f="";for(let m of c)if(m.type==="OUT")f="OUT",u.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")f="IN",u.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let d=m.value?`:${m.value}`:"";u.push(`#${m.tagName}${d}`)}return f}(t,e.markers)),e.parts.length>0&&(s=function(u,c){let f=!1;for(let m of c)if(m.hint){let d=[];if(d.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:y,length:_}=m.byterange;d.push(`BYTERANGE-START=${y}`),_&&d.push(`BYTERANGE-LENGTH=${_}`)}u.push(`#EXT-X-PRELOAD-HINT:${d.join(",")}`),f=!0}else{let d=[];d.push( Line truncated
`)}var iq="hls_cache",Lp=[],au={},E5={},su={},Pp="";function fEe(t,e){if(Lp.push(t),au[t]=e,Lp.length>5){let n=Lp.shift();dEe(n)}}function dEe(t){delete au[t],delete Lp[t],new JSFile(iq+"/"+t).delete()}function hEe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=gb(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=gb(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=gb(t,n.key.uri));return e}async function lq(t,e){let n=md5X(t);if(au[n])return au[n];let r={},i=t;for(;r=await req(i,{headers:e,redirect:0}),r.headers.location;)i=r.headers.location;if(r.code==200){var l=r.content;let s=hEe(i,tq(l));return fEe(n,{code:r.code,plist:s,key:n,headers:r.headers}),au[n]}return{}}async function sq(t,e,n){if(!au[t])return{};let i=au[t].plist.segments,l=!su[t];if(l){su[t]={};for(let c of i){let f=md5X(c.uri+c.mediaSequenceNumber.toString());su[t][f]={file:iq+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in su[t]){let f=su[t][c];f.index>=e?f.order=f.index-e:f.order=i.length-e+f.index}l&&mEe(t,5,n);let s=i[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),o=su[t][a];if(o.state==1||o.state==-1){let c=new JSFile(o.file);if(await c.exist())return o.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};o.state=-1}if(o.state==-1&&aq(t,o,n),o.state==0){var u=new JSProxyStream;u.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return o.read=!0,new Promise(async function(f,m){let d=new JSFile(o.file+".dl");await d.open("r"),async function y(){let _=await d.size();if(_>c){var S=await d.read(_-c,c);await u.write(S),c=_}if(o.state==1||o.state<0){u.done(),await d.close(),await d.delete(),o.read=!1,f();return}setTimeout(y,5)}()}),{buffer:3,content:u}}}async function aq(t,e,n){if(e.state>=0||!E5[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let r=new JSFile(e.file+".dl");await r.open("w");let i=await req(e.uri,{buffer:3,headers:n,stream:r,timeout:[5e3,1e4]});if(i.error||i.code>=300){await r.close(),e.read||await r.delete(),e.state=-1;return}await r.close(),e.read?await r.copy(e.file):await r.move(e.file),e.state=1}async function mEe(t,e,n){Pp&&Pp!=t&&delete E5[Pp],Pp=t,E5[t]=!0;for(let r=0;r<e&&E5[t];r++)new Promise(function(i,l){(async function s(){if(!E5[t]){i();return}let a=B.pickBy(su[t],function(u){return u.state==-1}),o=B.minBy(Object.values(a),function(u){return u.order});if(!o){i();return}await aq(t,o,n),setTimeout(s,5)})()})}function gb(t,e){var n=t.split("/"),r=e.split("/");n.pop();for(var i=0;i<r.length;i++)r[i]!="."&&(r[i]==".."?n.pop():n.push(r[i]));return n.join("/")}function oq(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let r=Number(n[0]),i=n[4];e.push(`<d p="${r},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${i}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var Fp=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new aa(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":zr,Referer:this.siteUrl+"/"}}async reconnnect(e,n,r,i,l,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),Z2(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,r,i,l,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,r,i,l,s,a){return a.headers.location!==void 0?i?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,r,i,l,s):a.content.length>0?(this.reconnectTimes=0,l?{cookie:a.headers["set-cookie"],content:a.content}:a.content):s===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,r,i,l,s))}async fetch(e,n,r,i=!1,l=!1,s=0){let a=_p(n),o=e;B.isEmpty(a)||(o=e+"?"+a);let u=new p5(o),c;return c=await req(u.toString(),{method:"get",headers:r,buffer:s,data:null}),c.code===200||c.code===302||c.code===301||l?await this.getResponse(e,n,r,i,l,s,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${u},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,n,r,i,l,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let r=await this.fetch(e,null,n);if(B.isEmpty(r))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return Be(r)}async parseVodShortLisLine truncated
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&aTe[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};var vJ=Symbol("internals");function P5(t){return t&&String(t).trim().toLowerCase()}function pf(t){return t===!1||t==null?t:Z.isArray(t)?t.map(pf):String(t)}function oTe(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}var uTe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function hw(t,e,n,r,i){if(Z.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!Z.isString(e)){if(Z.isString(r))return e.indexOf(r)!==-1;if(Z.isRegExp(r))return r.test(e)}}function cTe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function pTe(t,e){let n=Z.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,l,s){return this[r].call(this,e,i,l,s)},configurable:!0})})}var k0=class{constructor(e){e&&this.set(e)}set(e,n,r){let i=this;function l(a,o,u){let c=P5(o);if(!c)throw new Error("header name must be a non-empty string");let f=Z.findKey(i,c);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||o]=pf(a))}let s=(a,o)=>Z.forEach(a,(u,c)=>l(u,c,o));return Z.isPlainObject(e)||e instanceof this.constructor?s(e,n):Z.isString(e)&&(e=e.trim())&&!uTe(e)?s(gJ(e),n):e!=null&&l(n,e,r),this}get(e,n){if(e=P5(e),e){let r=Z.findKey(this,e);if(r){let i=this[r];if(!n)return i;if(n===!0)return oTe(i);if(Z.isFunction(n))return n.call(this,i,r);if(Z.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=P5(e),e){let r=Z.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||hw(this,this[r],r,n)))}return!1}delete(e,n){let r=this,i=!1;function l(s){if(s=P5(s),s){let a=Z.findKey(r,s);a&&(!n||hw(r,r[a],a,n))&&(delete r[a],i=!0)}}return Z.isArray(e)?e.forEach(l):l(e),i}clear(e){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let l=n[r];(!e||hw(this,this[l],l,e,!0))&&(delete this[l],i=!0)}return i}normalize(e){let n=this,r={};return Z.forEach(this,(i,l)=>{let s=Z.findKey(r,l);if(s){n[s]=pf(i),delete n[l];return}let a=e?cTe(l):String(l).trim();a!==l&&delete n[l],n[a]=pf(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return Z.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&Z.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){let r=(this[vJ]=this[vJ]={accessors:{}}).accessors,i=this.prototype;function l(s){let a=P5(s);r[a]||(pTe(i,s),r[a]=!0)}return Z.isArray(e)?e.forEach(l):l(e),this}};k0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(k0.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});Z.freezeMethods(k0);var li=k0;function L5(t,e){let n=this||I0,r=e||n,i=li.from(r.headers),l=r.data;return Z.forEach(t,function(a){l=a.call(n,l,i.normalize(),e?e.status:void 0)}),i.normalize(),l}function F5(t){return!!(t&&t.__CANCEL__)}function _J(t,e,n){qe.call(this,t??"canceled",qe.ERR_CANCELED,e,n),this.name="CanceledError"}Z.inherits(_J,qe,{__CANCEL__:!0});var ks=_J;function lo(t,e,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new qe("Request failed with status code "+n.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function mw(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function yw(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function mu(t,e){return t&&!mw(e)?yw(t,e):e}var HJ=Yr(bJ(),1),VJ=Yr(require("http"),1),qJ=Yr(require("https"),1),zJ=Yr(require("util"),1),GJ=Yr(NJ(),1),l2=Yr(require("zlib"),1);var gu="1.6.7";function H5(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var NTe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Cw(t,e,n){let r=n&&n.Blob||ii.classes.Blob,i=H5(t);if(e===void 0&&r&&(e=!0),i==="data"){t=i.length?t.slice(i.length+1):t;let l=NTe.exec(t);if(!l)throw new qe("Invalid URL",qe.ERR_INVALID_URL);let s=l[1],a=l[2],o=l[3],u=Buffer.from(decodeURIComponent(o),a?"base64":"utf8");if(e){if(!r)throw new qe("Blob is not supported",qe.ERR_NOT_SUPPORT);return new r([u],{type:s})}return u}throw new qe("Unsupported protocol "+i,qe.ERR_NOT_SUPPORT)}var vu=Yr(require("stream"),1);var RJ=Yr(require("stream"),1);function CTe(t,e){let n=0,r=1e3/e,i=null;return function(s,a){let o=Date.now();if(s||o-n>r)return i&&(clearTimeout(i),i=null),n=o,t.apply(null,a);i||(i=setTimeout(()=>(i=null,n=Date.now(),t.apply(null,a)),r-(o-n)))}}var CJ=CTe;function RTe(t,e){t=t||10;let n=new Array(t),r=new Array(t),i=0,l=0,s;return e=e!==void 0?e:1e3,function(o){let u=Date.now(),c=r[l];s||(s=u),n[i]=o,r[i]=u;let f=l,m=0;for(;f!==i;)m+=n[f++],f=f%t;if(i=(i+1)%t,i===l&&(l=(l+1)%t),u-s<e)return;let d=c&&u-c;return d?Math.round(m*1e3/d):void 0}}var ff=RTe;var df=Symbol("internals"),Rw=class extends RJ.default.Transform{constructor(e){e=Z.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,o)=>!Z.isUndefined(o[a])),super({readableHighWaterMark:e.chunkSize});let n=this,r=this[df]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},i=ff(r.ticksRate*e.samplesCount,r.timeWindow);this.on("newListener",a=>{a==="progress"&&(r.isCaptured||(r.isCaptured=!0))});let l=0;r.updateProgress=CJ(function(){let o=r.length,u=r.bytesSeen,c=u-l;if(!c||n.destroyed)return;let f=i(c);l=u,process.nextTick(()=>{n.emit("progress",{loaded:u,total:o,progress:o?u/o:void 0,bytes:c,rate:f||void 0,estimated:f&&o&&u<=o?(o-u)/f:void 0})})},r.ticksRate);let s=()=>{r.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[df];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,r){let i=this,l=this[df],s=l.maxRate,a=this.readableHighWaterMark,o=l.timeWindow,u=1e3/o,c=s/u,f=l.minChunkSize!==!1?Math.max(l.minChunkSize,c*.01):0;function m(y,_){let S=Buffer.byteLength(y);l.bytesSeen+=S,l.bytes+=S,l.isCaptured&&l.updateProgress(),i.push(y)?process.nextTick(_):l.onReadCallback=()=>{l.onReadCallback=null,process.nextTick(_)}}let d=(y,_)=>{let S=Buffer.byteLength(y),w=null,E=a,g,v=0;if(s){let x=Date.now();(!l.ts||(v=x-l.ts)>=o)&&(l.ts=x,g=c-l.bytes,l.bytes=g<0?-g:0,v=0),g=c-l.bytes}if(s){if(g<=0)return setTimeout(()=>{_(null,y)},o-v);g<E&&(E=g)}E&&S>E&&S-E>f&&(w=y.subarray(E),y=y.subarray(0,E)),m(y,w?()=>{process.nextTick(_,null,w)}:_)};d(e,function y(_,S){if(_)return r(_);S?d(S,y):r(null)})}setLength(e){return this[df].length=+e,this}},Iw=Rw;var JJ=Yr(require("events"),1);var kJ=require("util"),DJ=require("stream");var{asyncIterator:IJ}=Symbol,ITe=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[IJ]?yield*t[IJ]():yield t},hf=ITe;var kTe=Z.ALPHABET.ALPHA_DIGIT+"-_",V5=new kJ.TextEncoder,so=`\r
`,DTe=V5.encode(so),PTe=2,kw=class{constructor(e,n){let{escapeName:r}=this.constructor,i=Z.isString(n),l=`Content-Disposition: form-data; name="${r(e)}"${!i&&n.name?`; filename="${r(n.name)}"`:""}${so}`;i?n=V5.encode(String(n).replace(/\r?\n|\r\n?/g,so)):l+=`Content-Type: ${n.type||"application/octet-stream"}${so}`,this.headers=V5.encode(l+so),this.contentLength=i?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+PTe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;Z.isTypedArray(e)?yield e:yield*hf(e),yield DTe}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},LTe=(t,e,n)=>{let{tag:r="form-data-boundary",size:i=25,boundary:l=r+"-"+Z.generateString(i,kTe)}=n||{};if(!Z.isFormData(t))throw TypeError("FormData instance required");if(l.length<1||l.length>70)throw Error("boundary must be 10-70 characters long");let s=V5.encode("--"+l+so),a=V5.encode("--"+l+"--"+so+so),o=a.byteLength,u=Array.from(t.entries()).map(([f,m])=>{let d=new kw(f,m);return o+=d.size,d});o+=s.byteLength*u.length,o=Z.toFiniteNumber(o);let c={"Content-Type":`multipart/form-data; boundary=${l}`};return Number.isFinite(o)&&(c["Content-Length"]=o),e&&e(c),DJ.Readable.from(async function*(){for(let f of u)yield s,yield*f.encode();yield a}())},PJ=LTe;var LJ=Yr(require("stream"),1),Dw=class extends LJ.default.Transform{__transform(e,n,r){this.push(e),r()}_transform(e,n,r){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let i=Buffer.alloc(2);i[0]=120,i[1]=156,this.push(i,n)}this.__transform(e,n,r)}},FJ=Dw;var FTe=(t,e)=>Z.isAsyncFn(t)?function(...n){let r=n.pop();t.apply(this,n).then(i=>{try{e?r(null,...e(i)):r(null,i)}catch(l){r(l)}},r)}:t,jJ=FTe;var UJ={flush:l2.default.constants.Z_SYNC_FLUSH,finishFlush:l2.default.constants.Z_SYNC_FLUSH},jTe={flush:l2.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:l2.default.constants.BROTLI_OPERATION_FLUSH},MJ=Z.isFunction(l2.default.createBrotliDecompress),{http:UTe,https:MTe}=GJ.default,$Te=/https:?/,$J=ii.protocols.map(t=>t+":");function BTe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function KJ(t,e,n){let r=e;if(!r&&r!==!1){let i=(0,HJ.getProxyForUrl)(n);i&&(r=new URL(i))}if(r){if(r.username&&(r.auth=(r.username||"")+":"+(r.password||"")),r.auth){(r.auth.username||r.auth.password)&&(r.auth=(r.auth.username||"")+":"+(r.auth.password||""));let l=Buffer.from(r.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+l}t.headers.host=t.hostname+(t.port?":"+t.port:"");let i=r.hostname||r.host;t.hostname=i,t.host=i,t.port=r.port,t.path=n,r.protocol&&(t.protocol=r.protocol.includes(":")?r.protocol:`${r.protocol}:`)}t.beforeRedirects.proxy=function(l){KJ(l,e,l.href)}}var HTe=typeof process<"u"&&Z.kindOf(process)==="process",VTe=t=>new Promise((e,n)=>{let r,i,l=(o,u)=>{i||(i=!0,r&&r(o,u))},s=o=>{l(o),e(o)},a=o=>{l(o,!0),n(o)};t(s,a,o=>r=o).catch(a)}),qTe=({address:t,family:e})=>{if(!Z.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},BJ=(t,e)=>qTe(Z.isObject(t)?t:{address:t,family:e}),XJ=HTe&&function(e){return VTe(async function(r,i,l){let{data:s,lookup:a,family:o}=e,{responseType:u,responseEncoding:c}=e,f=e.method.toUpperCase(),m,d=!1,y;if(a){let ee=jJ(a,me=>Z.isArray(me)?me:[me]);a=(me,P,G)=>{ee(me,P,(V,q,Zn)=>{if(V)return G(V);let Tt=Z.isArray(q)?q.map(Qe=>BJ(Qe)):[BJ(q,Zn)];P.all?G(V,Tt):G(V,Tt[0].address,Tt[0].family)})}}let _=new JJ.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(w),e.signal&&e.signal.removeEventListener("abort",w),_.removeAllListeners()};l((ee,me)=>{m=!0,me&&(d=!0,S())});function w(ee){_.emit("abort",!ee||ee.type?new ks(null,e,y):ee)}_.once("abort",i),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(w),e.signal&&(e.signal.aborted?w():e.signal.addEventListener("abort",w)));let E=mu(e.baseURL,e.url),g=new URL(E,"http://localhost"),v=g.protocol||$J[0];if(v==="data:"){let ee;if(f!=="GET")return lo(r,i,{status:405,statusText:"method not allowed",headers:{},config:e});try{ee=Cw(e.url,u==="blob",{Blob:e.env&&e.env.Blob})}catch(me){throw qe.from(me,qe.ERR_BAD_REQUEST,e)}return u==="text"?(ee=ee.toString(c),(!c||c==="utf8")&&(ee=Z.stripBOM(ee))):u==="stream"&&(ee=vu.default.Readable.from(ee)),lo(r,i,{data:ee,status:200,statusText:"OK",headers:new li,config:e})}if($J.indexOf(v)===-1)return i(new qe("Unsupported protocol "+v,qe.ERR_BAD_REQUEST,e));let x=li.from(e.headers).normalize();x.set("User-Agent","axios/"+gu,!1);let O=e.onDownloadProgress,N=e.onUploadProgress,R=e.maxRate,U,F;if(Z.isSpecCompliantForm(s)){let ee=x.getContentType(/boundary=([-_\w\d]{10,70})/i);s=PJ(s,me=>{x.set(me)},{tag:`axios-${gu}-boundary`,boundary:ee&&ee[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)){if(x.set(s.getHeaders()),!x.hasContentLength())try{let ee=await zJ.default.promisify(s.getLength).call(s);Number.isFini Line truncated
`+l.map(eK).join(`
`):" "+eK(l[0]):"as no adapter specified";throw new qe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Pw};function Lw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ks(null,t)}function yf(t){return Lw(t),t.headers=li.from(t.headers),t.data=L5.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),mf.getAdapter(t.adapter||I0.adapter)(t).then(function(r){return Lw(t),r.data=L5.call(t,t.transformResponse,r),r.headers=li.from(r.headers),r},function(r){return F5(r)||(Lw(t),r&&r.response&&(r.response.data=L5.call(t,t.transformResponse,r.response),r.response.headers=li.from(r.response.headers))),Promise.reject(r)})}var tK=t=>t instanceof li?t.toJSON():t;function s2(t,e){e=e||{};let n={};function r(u,c,f){return Z.isPlainObject(u)&&Z.isPlainObject(c)?Z.merge.call({caseless:f},u,c):Z.isPlainObject(c)?Z.merge({},c):Z.isArray(c)?c.slice():c}function i(u,c,f){if(Z.isUndefined(c)){if(!Z.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function l(u,c){if(!Z.isUndefined(c))return r(void 0,c)}function s(u,c){if(Z.isUndefined(c)){if(!Z.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in e)return r(u,c);if(f in t)return r(void 0,u)}let o={url:l,method:l,data:l,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,c)=>i(tK(u),tK(c),!0)};return Z.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=o[c]||i,m=f(t[c],e[c],c);Z.isUndefined(m)&&f!==a||(n[c]=m)}),n}var Fw={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Fw[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});var nK={};Fw.transitional=function(e,n,r){function i(l,s){return"[Axios v"+gu+"] Transitional option '"+l+"'"+s+(r?". "+r:"")}return(l,s,a)=>{if(e===!1)throw new qe(i(s," has been removed"+(n?" in "+n:"")),qe.ERR_DEPRECATED);return n&&!nK[s]&&(nK[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(l,s,a):!0}};function JTe(t,e,n){if(typeof t!="object")throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);let r=Object.keys(t),i=r.length;for(;i-- >0;){let l=r[i],s=e[l];if(s){let a=t[l],o=a===void 0||s(a,l,t);if(o!==!0)throw new qe("option "+l+" must be "+o,qe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new qe("Unknown option "+l,qe.ERR_BAD_OPTION)}}var gf={assertOptions:JTe,validators:Fw};var ao=gf.validators,P0=class{constructor(e){this.defaults=e,this.interceptors={request:new cw,response:new cw}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let l=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?l&&!String(r.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+l):r.stack=l}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=s2(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:l}=n;r!==void 0&&gf.assertOptions(r,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),i!=null&&(Z.isFunction(i)?n.paramsSerializer={serialize:i}:gf.assertOptions(i,{encode:ao.function,serialize:ao.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=l&&Z.merge(l.common,l[n.method]);l&&Z.forEach(["delete","get","head","post","put","patch","common"],y=>{delete l[y]}),n.headers=li.concat(s,l);let a=[],o=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(o=o&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let u=[];this.interceptors.response.forEach(function(_){u.push(_.fulfilled,_.rejected)});let c,f=0,m;if(!o){let y=[yf.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,u),m=y.length,c=Promise.resolve(n);f<m;)c=c.then(y[f++],y[f++]);return c}m=a.length;let d=n;for(f=0;f<m;){let y=a[f++],_=a[f++];try{d=y(d)}catch(S){_.call(this,S);break}}try{c=yf.call(this,d)}catch(y){return Promise.reject(y)}for(f=0,m=u.length;f<m;)c=c.then(u[f++],u[f++]);return c}getUri(e){e=s2(this.defaults,e);let n=mu(e.baseURL,e.url);return hu(n,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){P0.prototype[e]=function(n,r){return this.request(s2(r||{},{method:e,url:n,data:(r||{}).data}))}});Z.forEach(["post","put","patch"],function(e){function n(r){return function(l,s,a){return this.request(s2(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:l,data:s}))}}P0.prototype[e]=n(),P0.prototype[e+"Form"]=n(!0)});var q5=P0;var jw=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(l){n=l});let r=this;this.promise.then(i=>{if(!r._listeners)return;let l=r._listeners.length;for(;l-- >0;)r._listeners[l](i);r._listeners=null}),this.promise.then=i=>{let l,s=new Promise(a=>{r.subscribe(a),l=a}).then(i);return s.cancel=function(){r.unsubscribe(l)},s},e(function(l,s,a){r.reason||(r.reason=new ks(l,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(i){e=i}),cancel:e}}},rK=jw;function Uw(t){return function(n){return t.apply(null,n)}}function Mw(t){return Z.isObject(t)&&t.isAxiosError===!0}var $w={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($w).forEach(([t,e])=>{$w[e]=t});var iK=$w;function lK(t){let e=new q5(t),n=I5(q5.prototype.request,e);return Z.extend(n,q5.prototype,e,{allOwnKeys:!0}),Z.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return lK(s2(t,i))},n}var Gr=lK(I0);Gr.Axios=q5;Gr.CanceledError=ks;Gr.CancelToken=rK;Gr.isCancel=F5;Gr.VERSION=gu;Gr.toFormData=io;Gr.AxiosError=qe;Gr.Cancel=Gr.CanceledError;Gr.all=function(e){return Promise.all(e)};Gr.spread=Uw;Gr.isAxiosError=Mw;Gr.mergeConfig=s2;Gr.AxiosHeaders=li;Gr.formToJSON=t=>cf(Z.isHTMLForm(t)?new FormData(t):t);Gr.getAdapter=mf.getAdapter;Gr.HttpStatusCode=iK;Gr.default=Gr;var L0=Gr;var{Axios:_Ue,AxiosError:EUe,CanceledError:bUe,isCancel:wUe,CancelToken:SUe,VERSION:TUe,all:xUe,Cancel:AUe,isAxiosError:OUe,spread:NUe,toFormData:sK,AxiosHeaders:CUe,HttpStatusCode:RUe,formToJSON:IUe,getAdapter:kUe,mergeConfig:DUe}=L0;var hK=Yr(require("https"),1),mK=Yr(require("crypto"),1),yK=Yr(fK(),1),Vw={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await txe(t,e)},set:asy Line truncated
`},timeout:.1}),await dataBase.push(r,Vw)}globalThis.localLog={set:async function(t,e,n){ixe(t,e,n)}};function rxe(){_u.default.existsSync("log")||_u.default.mkdirSync("log");let t="log/info.log";return _u.default.existsSync(t)?_u.default.readFileSync(t).toString():(_u.default.writeFileSync(t,""),"")}function ixe(t){_u.default.writeFileSync("log/info.log",rxe()+`
`+t)}globalThis.req=lxe;async function lxe(t,e){try{let n=e&&e.data||null,r=e&&e.postType||null,i=e&&e.buffer||0,l=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,o=e?e.headers||{}:{};r==="form"?(o["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=dK.default.stringify(n,{encode:!1}))):r==="form-data"&&(o["Content-Type"]="multipart/form-data",n=sK(n));let u=i===1||i===2?"arraybuffer":void 0,c;a?c=yK.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=hK.default.Agent({rejectUnauthorized:!1});let f=await L0(t,{responseType:u,method:e&&e.method||"get",headers:o,data:n,timeout:l,maxRedirects:s?null:0,httpsAgent:c});n=f.data;let m={};for(let d of f.headers){let y=d[1];m[d[0]]=Array.isArray(y)&&y.length===1?y[0]:y}if(!i)typeof n=="object"&&(n=JSON.stringify(n));else{if(i===1)return{code:f.status,headers:m,content:n};if(i===2)return{code:f.status,headers:m,content:n.toString("base64")};if(i===3){let d=e.stream;return d.onResp&&await d.onResp({code:f.status,headers:m}),d.onData?(n.on("data",async y=>{await d.onData(y)}),n.on("end",async()=>{d.onDone&&await d.onDone()})):d.onDone&&await d.onDone(),"stream..."}}return{code:f.status,headers:m,content:n}}catch(n){let r=n.response;try{return{code:r.status,headers:r.headers,content:JSON.stringify(r.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=sxe;function sxe(t){return mK.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let r=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+r+"/"};var axe=["DEBUG","INFO","WARNING","ERROR"];var j0=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=axe.indexOf(n)}format(e,n){let r=80;switch(e){case"INFO":r=r+1;break;case"WARNING":r=r-2;break;default:break}return n.length<r&&((r-n.length)%2===0?n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)):n="#".repeat(Math.floor((r-n.length)/2))+n+"#".repeat(Math.floor((r-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,r){return r&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://127.0.0.1:8099/upload",{data:{log:e+`
`},timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var Re=class extends Fe{constructor(){super(),this.jadeLog=new j0(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(r){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+r,!1)}}catch(r){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${r}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return B.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return B.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let r=e.body.id,i=e.body.page,l=!0,s=e.body.filters;if(this.page=parseInt(i),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${r},pg = ${i},extend = ${JSON.stringify(s)}`),r==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(r,i,l,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let i=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new Ue,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${i}`);try{return await this.setDetail(i),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=i,this.result.detail(this.vodDetail)}catch(l){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+l)}}async play(e,n){let r=e.body.flag,i=e.body.id,l=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${r},id:${i},flags:${l}`,!0);try{let s;if(await this.setPlay(r,i,l),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.messageToD Line truncated
}`,(fe=kA(function(){return wt(L,Ae+"return "+pe).apply(n,z)})).source=pe,wd(fe))throw fe;return fe},I.times=function(p,h){if((p=At(p))<1||o<p)return[];var b=f,A=P2(p,f);for(h=ut(h),p-=f,A=l8(A,h);++b<p;)h(b);return A},I.toFinite=ki,I.toInteger=At,I.toLength=wA,I.toLower=function(p){return hn(p).toLowerCase()},I.toNumber=K3,I.toSafeInteger=function(p){return p?pu(At(p),-9007199254740991,o):p===0?p:0},I.toString=hn,I.toUpper=function(p){return hn(p).toUpperCase()},I.trim=function(p,h,b){return(p=hn(p))&&(b||h===n)?Si(p):p&&(h=I3(h))?fs(b=fr(p),r8(b,h=fr(h)),i8(b,h)+1).join(""):p},I.trimEnd=function(p,h,b){return(p=hn(p))&&(b||h===n)?p.slice(0,GT(p)+1):p&&(h=I3(h))?fs(b=fr(p),0,i8(b,fr(h))+1).join(""):p},I.trimStart=function(p,h,b){return(p=hn(p))&&(b||h===n)?p.replace(Sl,""):p&&(h=I3(h))?fs(b=fr(p),r8(b,fr(h))).join(""):p},I.truncate=function(p,C){var b,z=30,A="...",C=(vl(C)&&(b="separator"in C?C.separator:b,z="length"in C?At(C.length):z,A="omission"in C?I3(C.omission):A),(p=hn(p)).length);if((C=su(p)?(L=fr(p)).length:C)<=z)return p;if((C=z-No(A))<1)return A;var L,z=L?fs(L,0,C).join(""):p.slice(0,C);if(b!==n)if(L&&(C+=z.length-C),Sd(b)){if(p.slice(C).search(b)){var K,le=z;for((b=b.global?b:au(b.source,hn(M3.exec(b))+"g")).lastIndex=0;K=b.exec(le);)var pe=K.index;z=z.slice(0,pe===n?C:pe)}}else p.indexOf(I3(b),C)!=C&&-1<(L=z.lastIndexOf(b))&&(z=z.slice(0,L));return z+A},I.unescape=function(p){return(p=hn(p))&&$t.test(p)?p.replace(ze,QZ):p},I.uniqueId=function(p){var h=++eee;return hn(p)+h},I.upperCase=cte,I.upperFirst=Ad,I.each=cA,I.eachRight=pA,I.first=sA,Cd(I,(Dd={},Vr(I,function(p,h){Wn.call(I.prototype,h)||(Dd[h]=p)}),Dd),{chain:!1}),I.VERSION="4.17.21",Xl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(p){I[p].placeholder=I}),Xl(["drop","take"],function(p,h){Xt.prototype[p]=function(b){b=b===n?1:Yl(At(b),0);var A=this.__filtered__&&!h?new Xt(this):this.clone();return A.__filtered__?A.__takeCount__=P2(b,A.__takeCount__):A.__views__.push({size:P2(b,f),type:p+(A.__dir__<0?"Right":"")}),A},Xt.prototype[p+"Right"]=function(b){return this.reverse()[p](b).reverse()}}),Xl(["filter","map","takeWhile"],function(p,h){var b=h+1,A=b==1||b==3;Xt.prototype[p]=function(C){var L=this.clone();return L.__iteratees__.push({iteratee:ut(C,3),type:b}),L.__filtered__=L.__filtered__||A,L}}),Xl(["head","last"],function(p,h){var b="take"+(h?"Right":"");Xt.prototype[p]=function(){return this[b](1).value()[0]}}),Xl(["initial","tail"],function(p,h){var b="drop"+(h?"":"Right");Xt.prototype[p]=function(){return this.__filtered__?new Xt(this):this[b](1)}}),Xt.prototype.compact=function(){return this.filter(d3)},Xt.prototype.find=function(p){return this.filter(p).head()},Xt.prototype.findLast=function(p){return this.reverse().find(p)},Xt.prototype.invokeMap=Rt(function(p,h){return typeof p=="function"?new Xt(this):this.map(function(b){return Z4(b,p,h)})}),Xt.prototype.reject=function(p){return this.filter(j8(ut(p)))},Xt.prototype.slice=function(p,h){p=At(p);var b=this;return b.__filtered__&&(0<p||h<0)?new Xt(b):(p<0?b=b.takeRight(-p):p&&(b=b.drop(p)),h!==n?(h=At(h))<0?b.dropRight(-h):b.take(h-p):b)},Xt.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},Xt.prototype.toArray=function(){return this.take(f)},Vr(Xt.prototype,function(p,h){var b=/^(?:filter|find|map|reject)|While$/.test(h),A=/^(?:head|last)$/.test(h),C=I[A?"take"+(h=="last"?"Right":""):h],L=A||/^find/.test(h);C&&(I.prototype[h]=function(){function z(nt){return nt=C.apply(I,Ur([nt],pe)),A&&Ae?nt[0]:nt}var K,le=this.__wrapped__,pe=A?[1]:arguments,xe=le instanceof Xt,Ee=pe[0],fe=xe||St(le),Ae=(fe&&b&&typeof Ee=="function"&&Ee.length!=1&&(xe=fe=!1),this.__chain__),Ee=!!this.__actions__.length,_e=L&&!Ae,xe=xe&&!Ee;return!L&&fe?(le=xe?le:new Xt(this),(K=p.apply(le,pe)).__actions__.push({func:D8,args:[z],thisArg:n}),new dr(K,Ae)):_e&&xe?p.apply(this,pe):(K=this.thru(z),_e?A?K.value()[0]:K.value():K)})}),Xl(["pop","push","shift","sort","splice","unshift"],function(p){var h=u8[p],b=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",A=/^(?:pop|shift)$/.test(p);I.prototype[p]=function(){var C,L=arguments;return A&&!this.__chain__?(C=this.value(),h.apply(St(C)?C:[],L)):this[b](function(z){return h.apply(St(z)?z:[],L)})}}),Vr(Xt.prototype,function(p,h){var b,A=I[h];A&&(b=A.name+"",Wn.call(Do,b)||(Do[b]=[]),Do[b].push({name:h,func:A}))}),Do[A8(n,2).name]=[{name:"wrapper",func:n}],Xt.prototype.clone=function(){var p=new Xt(this.__wrapped__);return p.__actions__=c3(this.__actions__),p.__dir__=this.__dir__,p.__filtered__=this.__filtered__,p.__iteratees__=c3(this.__iteratees__),p.__takeCount__=this.__takeCount__,p.__views__=c3(this.__views__),p},Xt.prototype.reverse=function(){var p;return this.__filtered__?((p=new Xt(this)).__dir__=-1,p.__filtered__=!0):(p=this.clone()).__dir__*=-1,p},Xt.prototype.value=function(){var p=this.__wrapped__.value(),h=this.__dir__,b=St(p),A=h<0,C=b?p.length:0,L=function(We,rt,ct){for(var ml=-1,Nl=ct.length;++ml< Line truncated
`)){let u=a.trim();if(u)if(u.startsWith("#")){if(u.startsWith("#EXT")){let o=SEe(u,i);o&&s.push(o)}}else s.push(u)}return s.length!==0&&s[0].name==="EXTM3U"||Ve("The EXTM3U tag MUST be the first line."),s}(t,e),l=TEe(n,e);return l.source=t,l}var xEe=["#EXTINF","#EXT-X-BYTERANGE","#EXT-X-DISCONTINUITY","#EXT-X-STREAM-INF","#EXT-X-CUE-OUT","#EXT-X-CUE-IN","#EXT-X-KEY","#EXT-X-MAP"],AEe=["#EXT-X-MEDIA"],bb=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let n of e)if(n.startsWith("#"))if(xEe.some(l=>n.startsWith(l)))super.push(n);else{if(this.includes(n)){if(AEe.some(l=>n.startsWith(l)))continue;Ve(`Redundant item (${n})`)}super.push(n)}else super.push(n);return this.length}};function xb(t,e){let n=1e3;e&&(n=Math.pow(10,e));let l=Math.round(t*n)/n;return e?l.toFixed(e):l}function OEe(t){let e=[`DATA-ID="${t.id}"`];return t.language&&e.push(`LANGUAGE="${t.language}"`),t.value?e.push(`VALUE="${t.value}"`):t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-SESSION-DATA:${e.join(",")}`}function dq(t,e){let n=e?"#EXT-X-SESSION-KEY":"#EXT-X-KEY",l=[`METHOD=${t.method}`];return t.uri&&l.push(`URI="${t.uri}"`),t.iv&&(t.iv.length!==16&&Ve("IV must be a 128-bit unsigned integer"),l.push(`IV=${cq(t.iv)}`)),t.format&&l.push(`KEYFORMAT="${t.format}"`),t.formatVersion&&l.push(`KEYFORMATVERSIONS="${t.formatVersion}"`),`${n}:${l.join(",")}`}function NEe(t,e){let n=e.isIFrameOnly?"#EXT-X-I-FRAME-STREAM-INF":"#EXT-X-STREAM-INF",l=[`BANDWIDTH=${e.bandwidth}`];if(e.averageBandwidth&&l.push(`AVERAGE-BANDWIDTH=${e.averageBandwidth}`),e.isIFrameOnly&&l.push(`URI="${e.uri}"`),e.codecs&&l.push(`CODECS="${e.codecs}"`),e.resolution&&l.push(`RESOLUTION=${e.resolution.width}x${e.resolution.height}`),e.frameRate&&l.push(`FRAME-RATE=${xb(e.frameRate,3)}`),e.hdcpLevel&&l.push(`HDCP-LEVEL=${e.hdcpLevel}`),e.audio.length>0){l.push(`AUDIO="${e.audio[0].groupId}"`);for(let r of e.audio)t.push(Op(r))}if(e.video.length>0){l.push(`VIDEO="${e.video[0].groupId}"`);for(let r of e.video)t.push(Op(r))}if(e.subtitles.length>0){l.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let r of e.subtitles)t.push(Op(r))}if(hEe().allowClosedCaptionsNone&&e.closedCaptions.length===0)l.push("CLOSED-CAPTIONS=NONE");else if(e.closedCaptions.length>0){l.push(`CLOSED-CAPTIONS="${e.closedCaptions[0].groupId}"`);for(let r of e.closedCaptions)t.push(Op(r))}if(e.score&&l.push(`SCORE=${e.score}`),e.allowedCpc){let r=[];for(let{format:i,cpcList:s}of e.allowedCpc)r.push(`${i}:${s.join("/")}`);l.push(`ALLOWED-CPC="${r.join(",")}"`)}e.videoRange&&l.push(`VIDEO-RANGE=${e.videoRange}`),e.stableVariantId&&l.push(`STABLE-VARIANT-ID="${e.stableVariantId}"`),e.programId&&l.push(`PROGRAM-ID=${e.programId}`),t.push(`${n}:${l.join(",")}`),e.isIFrameOnly||t.push(`${e.uri}`)}function Op(t){let e=[`TYPE=${t.type}`,`GROUP-ID="${t.groupId}"`,`NAME="${t.name}"`];return t.isDefault!==void 0&&e.push("DEFAULT="+(t.isDefault?"YES":"NO")),t.autoselect!==void 0&&e.push("AUTOSELECT="+(t.autoselect?"YES":"NO")),t.forced!==void 0&&e.push("FORCED="+(t.forced?"YES":"NO")),t.language&&e.push(`LANGUAGE="${t.language}"`),t.assocLanguage&&e.push(`ASSOC-LANGUAGE="${t.assocLanguage}"`),t.instreamId&&e.push(`INSTREAM-ID="${t.instreamId}"`),t.characteristics&&e.push(`CHARACTERISTICS="${t.characteristics}"`),t.channels&&e.push(`CHANNELS="${t.channels}"`),t.uri&&e.push(`URI="${t.uri}"`),`#EXT-X-MEDIA:${e.join(",")}`}function CEe(t,e,n,l,r=1,i=null){let s=!1,a="";if(e.discontinuity&&t.push("#EXT-X-DISCONTINUITY"),e.key){let o=dq(e.key);o!==n&&(t.push(o),n=o)}if(e.map){let o=function(c){let f=[`URI="${c.uri}"`];return c.byterange&&f.push(`BYTERANGE="${gb(c.byterange)}"`),`#EXT-X-MAP:${f.join(",")}`}(e.map);o!==l&&(t.push(o),l=o)}if(e.programDateTime&&t.push(`#EXT-X-PROGRAM-DATE-TIME:${yb(e.programDateTime)}`),e.dateRange&&t.push(function(o){let c=[`ID="${o.id}"`];o.start&&c.push(`START-DATE="${yb(o.start)}"`),o.end&&c.push(`END-DATE="${yb(o.end)}"`),o.duration&&c.push(`DURATION=${o.duration}`),o.plannedDuration&&c.push(`PLANNED-DURATION=${o.plannedDuration}`),o.classId&&c.push(`CLASS="${o.classId}"`),o.endOnNext&&c.push("END-ON-NEXT=YES");for(let f of Object.keys(o.attributes))f.startsWith("X-")?typeof o.attributes[f]=="number"?c.push(`${f}=${o.attributes[f]}`):c.push(`${f}="${o.attributes[f]}"`):f.startsWith("SCTE35-")&&c.push(`${f}=${cq(o.attributes[f])}`);return`#EXT-X-DATERANGE:${c.join(",")}`}(e.dateRange)),e.markers.length>0&&(a=function(o,c){let f="";for(let m of c)if(m.type==="OUT")f="OUT",o.push(`#EXT-X-CUE-OUT:DURATION=${m.duration}`);else if(m.type==="IN")f="IN",o.push("#EXT-X-CUE-IN");else if(m.type==="RAW"){let d=m.value?`:${m.value}`:"";o.push(`#${m.tagName}${d}`)}return f}(t,e.markers)),e.parts.length>0&&(s=function(o,c){let f=!1;for(let m of c)if(m.hint){let d=[];if(d.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:y,length:_}=m.byterange;d.push(`BYTERANGE-START=${y}`),_&&d.push(`BYTERANGE-LENGTH=${_}`)}o.push(`#EXT-X-PRELOAD-HINT:${d.join(",")}`),f=!0}else{let d=[];d.push( Line truncated
`)}var mq="hls_cache",Bp=[],uo={},S6={},ao={},$p="";function REe(t,e){if(Bp.push(t),uo[t]=e,Bp.length>5){let n=Bp.shift();IEe(n)}}function IEe(t){delete uo[t],delete Bp[t],new JSFile(mq+"/"+t).delete()}function kEe(t,e){if(e.variants)for(let n of e.variants)n.uri.startsWith("http")||(n.uri=Ab(t,n.uri));if(e.segments)for(let n of e.segments)n.uri.startsWith("http")||(n.uri=Ab(t,n.uri)),n.key&&n.key.uri&&!n.key.uri.startsWith("http")&&(n.key.uri=Ab(t,n.key.uri));return e}async function yq(t,e){let n=md5X(t);if(uo[n])return uo[n];let l={},r=t;for(;l=await req(r,{headers:e,redirect:0}),l.headers.location;)r=l.headers.location;if(l.code==200){var i=l.content;let s=kEe(r,fq(i));return REe(n,{code:l.code,plist:s,key:n,headers:l.headers}),uo[n]}return{}}async function gq(t,e,n){if(!uo[t])return{};let r=uo[t].plist.segments,i=!ao[t];if(i){ao[t]={};for(let c of r){let f=md5X(c.uri+c.mediaSequenceNumber.toString());ao[t][f]={file:mq+"/"+t+"/"+f,uri:c.uri,key:f,index:c.mediaSequenceNumber,order:c.mediaSequenceNumber,state:-1,read:!1}}}for(let c in ao[t]){let f=ao[t][c];f.index>=e?f.order=f.index-e:f.order=r.length-e+f.index}i&&DEe(t,5,n);let s=r[e],a=md5X(s.uri+s.mediaSequenceNumber.toString()),u=ao[t][a];if(u.state==1||u.state==-1){let c=new JSFile(u.file);if(await c.exist())return u.state=1,{buffer:3,code:200,headers:{connection:"close","content-type":"video/mp2t"},content:c};u.state=-1}if(u.state==-1&&vq(t,u,n),u.state==0){var o=new JSProxyStream;o.head(200,{connection:"close","content-type":"video/mp2t"});let c=0;return u.read=!0,new Promise(async function(f,m){let d=new JSFile(u.file+".dl");await d.open("r"),async function y(){let _=await d.size();if(_>c){var S=await d.read(_-c,c);await o.write(S),c=_}if(u.state==1||u.state<0){o.done(),await d.close(),await d.delete(),u.read=!1,f();return}setTimeout(y,5)}()}),{buffer:3,content:o}}}async function vq(t,e,n){if(e.state>=0||!S6[t])return;if(e.state=0,await new JSFile(e.file).exist()){e.state=1;return}let l=new JSFile(e.file+".dl");await l.open("w");let r=await req(e.uri,{buffer:3,headers:n,stream:l,timeout:[5e3,1e4]});if(r.error||r.code>=300){await l.close(),e.read||await l.delete(),e.state=-1;return}await l.close(),e.read?await l.copy(e.file):await l.move(e.file),e.state=1}async function DEe(t,e,n){$p&&$p!=t&&delete S6[$p],$p=t,S6[t]=!0;for(let l=0;l<e&&S6[t];l++)new Promise(function(r,i){(async function s(){if(!S6[t]){r();return}let a=B.pickBy(ao[t],function(o){return o.state==-1}),u=B.minBy(Object.values(a),function(o){return o.order});if(!u){r();return}await vq(t,u,n),setTimeout(s,5)})()})}function Ab(t,e){var n=t.split("/"),l=e.split("/");n.pop();for(var r=0;r<l.length;r++)l[r]!="."&&(l[r]==".."?n.pop():n.push(l[r]));return n.join("/")}function _q(t){let e=[];return Array.from(t.danmuku).forEach(n=>{let l=Number(n[0]),r=n[4];e.push(`<d p="${l},1,25,16777215,1659282294,0,8b53b65c,1108899274487246080"><![CDATA[${r}]]></d>`)}),String.raw`<?xml version="1.0" encoding="UTF-8"?><i><chatserver>chat.bilibili.com</chatserver><chatid>52175602</chatid><mission>0</mission><maxlimit>1000</maxlimit><state>0</state><real_name>0</real_name><source>k-v</source>`+e.join("")+"</i>"}var Hp=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new si(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":Gl,Referer:this.siteUrl+"/"}}async reconnnect(e,n,l,r,i,s){return await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u8BF7\u68C0\u67E5url:"+e+",\u4E24\u79D2\u540E\u91CD\u8BD5"),ea(2),this.reconnectTimes<this.maxReconnectTimes?(this.reconnectTimes=this.reconnectTimes+1,await this.fetch(e,n,l,r,i,s)):(await this.jadeLog.error("\u8BF7\u6C42\u5931\u8D25,\u91CD\u8FDE\u5931\u8D25"),null)}async getResponse(e,n,l,r,i,s,a){return a.headers.location!==void 0?r?(await this.jadeLog.debug(`\u8FD4\u56DE\u91CD\u5B9A\u5411\u8FDE\u63A5:${a.headers.location}`),a.headers.location):this.fetch(a.headers.location,n,l,r,i,s):a.content.length>0?(this.reconnectTimes=0,i?{cookie:a.headers["set-cookie"],content:a.content}:a.content):s===1?(this.reconnectTimes=0,a.content):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u8BF7\u6C42url\u4E3A:${e},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(a)}`),await this.reconnnect(e,n,l,r,i,s))}async fetch(e,n,l,r=!1,i=!1,s=0){let a=xp(n),u=e;B.isEmpty(a)||(u=e+"?"+a);let o=new h6(u),c;return c=await req(o.toString(),{method:"get",headers:l,buffer:s,data:null}),c.code===201||c.code===200||c.code===302||c.code===301||i?await this.getResponse(e,n,l,r,i,s,c):(await this.jadeLog.error(`\u8BF7\u6C42\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:\u72B6\u6001\u7801\u51FA\u9519,\u8BF7\u6C42url\u4E3A:${o},\u56DE\u590D\u5185\u5BB9\u4E3A:${JSON.stringify(c)}`),await this.reconnnect(e,n,l,r,i,s))}async getHtml(e=this.siteUrl,n=this.getHeader()){let l=await this.fetch(e,null,n);if(B.isEmpty(l))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return Ue(l)}async paLine truncated
`).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),l=s.substring(r+1).trim(),!(!n||e[n]&&xTe[n])&&(n==="set-cookie"?e[n]?e[n].push(l):e[n]=[l]:e[n]=e[n]?e[n]+", "+l:l)}),e};var CJ=Symbol("internals");function j6(t){return t&&String(t).trim().toLowerCase()}function gf(t){return t===!1||t==null?t:Z.isArray(t)?t.map(gf):String(t)}function ATe(t){let e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,l;for(;l=n.exec(t);)e[l[1]]=l[2];return e}var OTe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Sw(t,e,n,l,r){if(Z.isFunction(l))return l.call(this,e,n);if(r&&(e=n),!!Z.isString(e)){if(Z.isString(l))return e.indexOf(l)!==-1;if(Z.isRegExp(l))return l.test(e)}}function NTe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,l)=>n.toUpperCase()+l)}function CTe(t,e){let n=Z.toCamelCase(" "+e);["get","set","has"].forEach(l=>{Object.defineProperty(t,l+n,{value:function(r,i,s){return this[l].call(this,e,r,i,s)},configurable:!0})})}var L4=class{constructor(e){e&&this.set(e)}set(e,n,l){let r=this;function i(a,u,o){let c=j6(u);if(!c)throw new Error("header name must be a non-empty string");let f=Z.findKey(r,c);(!f||r[f]===void 0||o===!0||o===void 0&&r[f]!==!1)&&(r[f||u]=gf(a))}let s=(a,u)=>Z.forEach(a,(o,c)=>i(o,c,u));return Z.isPlainObject(e)||e instanceof this.constructor?s(e,n):Z.isString(e)&&(e=e.trim())&&!OTe(e)?s(NJ(e),n):e!=null&&i(n,e,l),this}get(e,n){if(e=j6(e),e){let l=Z.findKey(this,e);if(l){let r=this[l];if(!n)return r;if(n===!0)return ATe(r);if(Z.isFunction(n))return n.call(this,r,l);if(Z.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=j6(e),e){let l=Z.findKey(this,e);return!!(l&&this[l]!==void 0&&(!n||Sw(this,this[l],l,n)))}return!1}delete(e,n){let l=this,r=!1;function i(s){if(s=j6(s),s){let a=Z.findKey(l,s);a&&(!n||Sw(l,l[a],a,n))&&(delete l[a],r=!0)}}return Z.isArray(e)?e.forEach(i):i(e),r}clear(e){let n=Object.keys(this),l=n.length,r=!1;for(;l--;){let i=n[l];(!e||Sw(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let n=this,l={};return Z.forEach(this,(r,i)=>{let s=Z.findKey(l,i);if(s){n[s]=gf(r),delete n[i];return}let a=e?NTe(i):String(i).trim();a!==i&&delete n[i],n[a]=gf(r),l[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let n=Object.create(null);return Z.forEach(this,(l,r)=>{l!=null&&l!==!1&&(n[r]=e&&Z.isArray(l)?l.join(", "):l)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){let l=new this(e);return n.forEach(r=>l.set(r)),l}static accessor(e){let l=(this[CJ]=this[CJ]={accessors:{}}).accessors,r=this.prototype;function i(s){let a=j6(s);l[a]||(CTe(r,s),l[a]=!0)}return Z.isArray(e)?e.forEach(i):i(e),this}};L4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(L4.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(l){this[n]=l}}});Z.freezeMethods(L4);var s2=L4;function U6(t,e){let n=this||P4,l=e||n,r=s2.from(l.headers),i=l.data;return Z.forEach(t,function(a){i=a.call(n,i,r.normalize(),e?e.status:void 0)}),r.normalize(),i}function M6(t){return!!(t&&t.__CANCEL__)}function RJ(t,e,n){qe.call(this,t??"canceled",qe.ERR_CANCELED,e,n),this.name="CanceledError"}Z.inherits(RJ,qe,{__CANCEL__:!0});var Dr=RJ;function sa(t,e,n){let l=n.config.validateStatus;!n.status||!l||l(n.status)?t(n):e(new qe("Request failed with status code "+n.status,[qe.ERR_BAD_REQUEST,qe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Tw(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function xw(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function go(t,e){return t&&!Tw(e)?xw(t,e):e}var ZJ=Ql(kJ(),1),eK=Ql(require("http"),1),tK=Ql(require("https"),1),nK=Ql(require("util"),1),lK=Ql(MJ(),1),rs=Ql(require("zlib"),1);var _o="1.6.7";function z6(t){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}var GTe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Uw(t,e,n){let l=n&&n.Blob||i2.classes.Blob,r=z6(t);if(e===void 0&&l&&(e=!0),r==="data"){t=r.length?t.slice(r.length+1):t;let i=GTe.exec(t);if(!i)throw new qe("Invalid URL",qe.ERR_INVALID_URL);let s=i[1],a=i[2],u=i[3],o=Buffer.from(decodeURIComponent(u),a?"base64":"utf8");if(e){if(!l)throw new qe("Blob is not supported",qe.ERR_NOT_SUPPORT);return new l([o],{type:s})}return o}throw new qe("Unsupported protocol "+r,qe.ERR_NOT_SUPPORT)}var Eo=Ql(require("stream"),1);var BJ=Ql(require("stream"),1);function JTe(t,e){let n=0,l=1e3/e,r=null;return function(s,a){let u=Date.now();if(s||u-n>l)return r&&(clearTimeout(r),r=null),n=u,t.apply(null,a);r||(r=setTimeout(()=>(r=null,n=Date.now(),t.apply(null,a)),l-(u-n)))}}var $J=JTe;function KTe(t,e){t=t||10;let n=new Array(t),l=new Array(t),r=0,i=0,s;return e=e!==void 0?e:1e3,function(u){let o=Date.now(),c=l[i];s||(s=o),n[r]=u,l[r]=o;let f=i,m=0;for(;f!==r;)m+=n[f++],f=f%t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),o-s<e)return;let d=c&&o-c;return d?Math.round(m*1e3/d):void 0}}var vf=KTe;var _f=Symbol("internals"),Mw=class extends BJ.default.Transform{constructor(e){e=Z.toFlatObject(e,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(a,u)=>!Z.isUndefined(u[a])),super({readableHighWaterMark:e.chunkSize});let n=this,l=this[_f]={length:e.length,timeWindow:e.timeWindow,ticksRate:e.ticksRate,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},r=vf(l.ticksRate*e.samplesCount,l.timeWindow);this.on("newListener",a=>{a==="progress"&&(l.isCaptured||(l.isCaptured=!0))});let i=0;l.updateProgress=$J(function(){let u=l.length,o=l.bytesSeen,c=o-i;if(!c||n.destroyed)return;let f=r(c);i=o,process.nextTick(()=>{n.emit("progress",{loaded:o,total:u,progress:u?o/u:void 0,bytes:c,rate:f||void 0,estimated:f&&u&&o<=u?(u-o)/f:void 0})})},l.ticksRate);let s=()=>{l.updateProgress(!0)};this.once("end",s),this.once("error",s)}_read(e){let n=this[_f];return n.onReadCallback&&n.onReadCallback(),super._read(e)}_transform(e,n,l){let r=this,i=this[_f],s=i.maxRate,a=this.readableHighWaterMark,u=i.timeWindow,o=1e3/u,c=s/o,f=i.minChunkSize!==!1?Math.max(i.minChunkSize,c*.01):0;function m(y,_){let S=Buffer.byteLength(y);i.bytesSeen+=S,i.bytes+=S,i.isCaptured&&i.updateProgress(),r.push(y)?process.nextTick(_):i.onReadCallback=()=>{i.onReadCallback=null,process.nextTick(_)}}let d=(y,_)=>{let S=Buffer.byteLength(y),w=null,E=a,g,v=0;if(s){let x=Date.now();(!i.ts||(v=x-i.ts)>=u)&&(i.ts=x,g=c-i.bytes,i.bytes=g<0?-g:0,v=0),g=c-i.bytes}if(s){if(g<=0)return setTimeout(()=>{_(null,y)},u-v);g<E&&(E=g)}E&&S>E&&S-E>f&&(w=y.subarray(E),y=y.subarray(0,E)),m(y,w?()=>{process.nextTick(_,null,w)}:_)};d(e,function y(_,S){if(_)return l(_);S?d(S,y):l(null)})}setLength(e){return this[_f].length=+e,this}},$w=Mw;var rK=Ql(require("events"),1);var VJ=require("util"),qJ=require("stream");var{asyncIterator:HJ}=Symbol,XTe=async function*(t){t.stream?yield*t.stream():t.arrayBuffer?yield await t.arrayBuffer():t[HJ]?yield*t[HJ]():yield t},Ef=XTe;var WTe=Z.ALPHABET.ALPHA_DIGIT+"-_",G6=new VJ.TextEncoder,aa=`\r
`,YTe=G6.encode(aa),QTe=2,Bw=class{constructor(e,n){let{escapeName:l}=this.constructor,r=Z.isString(n),i=`Content-Disposition: form-data; name="${l(e)}"${!r&&n.name?`; filename="${l(n.name)}"`:""}${aa}`;r?n=G6.encode(String(n).replace(/\r?\n|\r\n?/g,aa)):i+=`Content-Type: ${n.type||"application/octet-stream"}${aa}`,this.headers=G6.encode(i+aa),this.contentLength=r?n.byteLength:n.size,this.size=this.headers.byteLength+this.contentLength+QTe,this.name=e,this.value=n}async*encode(){yield this.headers;let{value:e}=this;Z.isTypedArray(e)?yield e:yield*Ef(e),yield YTe}static escapeName(e){return String(e).replace(/[\r\n"]/g,n=>({"\r":"%0D","\n":"%0A",'"':"%22"})[n])}},ZTe=(t,e,n)=>{let{tag:l="form-data-boundary",size:r=25,boundary:i=l+"-"+Z.generateString(r,WTe)}=n||{};if(!Z.isFormData(t))throw TypeError("FormData instance required");if(i.length<1||i.length>70)throw Error("boundary must be 10-70 characters long");let s=G6.encode("--"+i+aa),a=G6.encode("--"+i+"--"+aa+aa),u=a.byteLength,o=Array.from(t.entries()).map(([f,m])=>{let d=new Bw(f,m);return u+=d.size,d});u+=s.byteLength*o.length,u=Z.toFiniteNumber(u);let c={"Content-Type":`multipart/form-data; boundary=${i}`};return Number.isFinite(u)&&(c["Content-Length"]=u),e&&e(c),qJ.Readable.from(async function*(){for(let f of o)yield s,yield*f.encode();yield a}())},zJ=ZTe;var GJ=Ql(require("stream"),1),Hw=class extends GJ.default.Transform{__transform(e,n,l){this.push(e),l()}_transform(e,n,l){if(e.length!==0&&(this._transform=this.__transform,e[0]!==120)){let r=Buffer.alloc(2);r[0]=120,r[1]=156,this.push(r,n)}this.__transform(e,n,l)}},JJ=Hw;var exe=(t,e)=>Z.isAsyncFn(t)?function(...n){let l=n.pop();t.apply(this,n).then(r=>{try{e?l(null,...e(r)):l(null,r)}catch(i){l(i)}},l)}:t,KJ=exe;var XJ={flush:rs.default.constants.Z_SYNC_FLUSH,finishFlush:rs.default.constants.Z_SYNC_FLUSH},txe={flush:rs.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:rs.default.constants.BROTLI_OPERATION_FLUSH},WJ=Z.isFunction(rs.default.createBrotliDecompress),{http:nxe,https:lxe}=lK.default,rxe=/https:?/,YJ=i2.protocols.map(t=>t+":");function ixe(t,e){t.beforeRedirects.proxy&&t.beforeRedirects.proxy(t),t.beforeRedirects.config&&t.beforeRedirects.config(t,e)}function iK(t,e,n){let l=e;if(!l&&l!==!1){let r=(0,ZJ.getProxyForUrl)(n);r&&(l=new URL(r))}if(l){if(l.username&&(l.auth=(l.username||"")+":"+(l.password||"")),l.auth){(l.auth.username||l.auth.password)&&(l.auth=(l.auth.username||"")+":"+(l.auth.password||""));let i=Buffer.from(l.auth,"utf8").toString("base64");t.headers["Proxy-Authorization"]="Basic "+i}t.headers.host=t.hostname+(t.port?":"+t.port:"");let r=l.hostname||l.host;t.hostname=r,t.host=r,t.port=l.port,t.path=n,l.protocol&&(t.protocol=l.protocol.includes(":")?l.protocol:`${l.protocol}:`)}t.beforeRedirects.proxy=function(i){iK(i,e,i.href)}}var sxe=typeof process<"u"&&Z.kindOf(process)==="process",axe=t=>new Promise((e,n)=>{let l,r,i=(u,o)=>{r||(r=!0,l&&l(u,o))},s=u=>{i(u),e(u)},a=u=>{i(u,!0),n(u)};t(s,a,u=>l=u).catch(a)}),uxe=({address:t,family:e})=>{if(!Z.isString(t))throw TypeError("address must be a string");return{address:t,family:e||(t.indexOf(".")<0?6:4)}},QJ=(t,e)=>uxe(Z.isObject(t)?t:{address:t,family:e}),sK=sxe&&function(e){return axe(async function(l,r,i){let{data:s,lookup:a,family:u}=e,{responseType:o,responseEncoding:c}=e,f=e.method.toUpperCase(),m,d=!1,y;if(a){let ee=KJ(a,me=>Z.isArray(me)?me:[me]);a=(me,P,G)=>{ee(me,P,(V,q,el)=>{if(V)return G(V);let Tt=Z.isArray(q)?q.map(Qe=>QJ(Qe)):[QJ(q,el)];P.all?G(V,Tt):G(V,Tt[0].address,Tt[0].family)})}}let _=new rK.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(w),e.signal&&e.signal.removeEventListener("abort",w),_.removeAllListeners()};i((ee,me)=>{m=!0,me&&(d=!0,S())});function w(ee){_.emit("abort",!ee||ee.type?new Dr(null,e,y):ee)}_.once("abort",r),(e.cancelToken||e.signal)&&(e.cancelToken&&e.cancelToken.subscribe(w),e.signal&&(e.signal.aborted?w():e.signal.addEventListener("abort",w)));let E=go(e.baseURL,e.url),g=new URL(E,"http://localhost"),v=g.protocol||YJ[0];if(v==="data:"){let ee;if(f!=="GET")return sa(l,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{ee=Uw(e.url,o==="blob",{Blob:e.env&&e.env.Blob})}catch(me){throw qe.from(me,qe.ERR_BAD_REQUEST,e)}return o==="text"?(ee=ee.toString(c),(!c||c==="utf8")&&(ee=Z.stripBOM(ee))):o==="stream"&&(ee=Eo.default.Readable.from(ee)),sa(l,r,{data:ee,status:200,statusText:"OK",headers:new s2,config:e})}if(YJ.indexOf(v)===-1)return r(new qe("Unsupported protocol "+v,qe.ERR_BAD_REQUEST,e));let x=s2.from(e.headers).normalize();x.set("User-Agent","axios/"+_o,!1);let O=e.onDownloadProgress,N=e.onUploadProgress,R=e.maxRate,U,F;if(Z.isSpecCompliantForm(s)){let ee=x.getContentType(/boundary=([-_\w\d]{10,70})/i);s=zJ(s,me=>{x.set(me)},{tag:`axios-${_o}-boundary`,boundary:ee&&ee[1]||void 0})}else if(Z.isFormData(s)&&Z.isFunction(s.getHeaders)){if(x.set(s.getHeaders()),!x.hasContentLength())try{let ee=await nK.default.promisify(s.getLength).call(s);Number.isFini Line truncated
`+i.map(pK).join(`
`):" "+pK(i[0]):"as no adapter specified";throw new qe("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return l},adapters:Vw};function qw(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Dr(null,t)}function wf(t){return qw(t),t.headers=s2.from(t.headers),t.data=U6.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),bf.getAdapter(t.adapter||P4.adapter)(t).then(function(l){return qw(t),l.data=U6.call(t,t.transformResponse,l),l.headers=s2.from(l.headers),l},function(l){return M6(l)||(qw(t),l&&l.response&&(l.response.data=U6.call(t,t.transformResponse,l.response),l.response.headers=s2.from(l.response.headers))),Promise.reject(l)})}var fK=t=>t instanceof s2?t.toJSON():t;function is(t,e){e=e||{};let n={};function l(o,c,f){return Z.isPlainObject(o)&&Z.isPlainObject(c)?Z.merge.call({caseless:f},o,c):Z.isPlainObject(c)?Z.merge({},c):Z.isArray(c)?c.slice():c}function r(o,c,f){if(Z.isUndefined(c)){if(!Z.isUndefined(o))return l(void 0,o,f)}else return l(o,c,f)}function i(o,c){if(!Z.isUndefined(c))return l(void 0,c)}function s(o,c){if(Z.isUndefined(c)){if(!Z.isUndefined(o))return l(void 0,o)}else return l(void 0,c)}function a(o,c,f){if(f in e)return l(o,c);if(f in t)return l(void 0,o)}let u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(o,c)=>r(fK(o),fK(c),!0)};return Z.forEach(Object.keys(Object.assign({},t,e)),function(c){let f=u[c]||r,m=f(t[c],e[c],c);Z.isUndefined(m)&&f!==a||(n[c]=m)}),n}var zw={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{zw[t]=function(l){return typeof l===t||"a"+(e<1?"n ":" ")+t}});var dK={};zw.transitional=function(e,n,l){function r(i,s){return"[Axios v"+_o+"] Transitional option '"+i+"'"+s+(l?". "+l:"")}return(i,s,a)=>{if(e===!1)throw new qe(r(s," has been removed"+(n?" in "+n:"")),qe.ERR_DEPRECATED);return n&&!dK[s]&&(dK[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function pxe(t,e,n){if(typeof t!="object")throw new qe("options must be an object",qe.ERR_BAD_OPTION_VALUE);let l=Object.keys(t),r=l.length;for(;r-- >0;){let i=l[r],s=e[i];if(s){let a=t[i],u=a===void 0||s(a,i,t);if(u!==!0)throw new qe("option "+i+" must be "+u,qe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new qe("Unknown option "+i,qe.ERR_BAD_OPTION)}}var Sf={assertOptions:pxe,validators:zw};var ua=Sf.validators,j4=class{constructor(e){this.defaults=e,this.interceptors={request:new _w,response:new _w}}async request(e,n){try{return await this._request(e,n)}catch(l){if(l instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;let i=r.stack?r.stack.replace(/^.+\n/,""):"";l.stack?i&&!String(l.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(l.stack+=`
`+i):l.stack=i}throw l}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=is(this.defaults,n);let{transitional:l,paramsSerializer:r,headers:i}=n;l!==void 0&&Sf.assertOptions(l,{silentJSONParsing:ua.transitional(ua.boolean),forcedJSONParsing:ua.transitional(ua.boolean),clarifyTimeoutError:ua.transitional(ua.boolean)},!1),r!=null&&(Z.isFunction(r)?n.paramsSerializer={serialize:r}:Sf.assertOptions(r,{encode:ua.function,serialize:ua.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&Z.merge(i.common,i[n.method]);i&&Z.forEach(["delete","get","head","post","put","patch","common"],y=>{delete i[y]}),n.headers=s2.concat(s,i);let a=[],u=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(u=u&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});let o=[];this.interceptors.response.forEach(function(_){o.push(_.fulfilled,_.rejected)});let c,f=0,m;if(!u){let y=[wf.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,o),m=y.length,c=Promise.resolve(n);f<m;)c=c.then(y[f++],y[f++]);return c}m=a.length;let d=n;for(f=0;f<m;){let y=a[f++],_=a[f++];try{d=y(d)}catch(S){_.call(this,S);break}}try{c=wf.call(this,d)}catch(y){return Promise.reject(y)}for(f=0,m=o.length;f<m;)c=c.then(o[f++],o[f++]);return c}getUri(e){e=is(this.defaults,e);let n=go(e.baseURL,e.url);return yo(n,e.params,e.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(e){j4.prototype[e]=function(n,l){return this.request(is(l||{},{method:e,url:n,data:(l||{}).data}))}});Z.forEach(["post","put","patch"],function(e){function n(l){return function(i,s,a){return this.request(is(a||{},{method:e,headers:l?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}j4.prototype[e]=n(),j4.prototype[e+"Form"]=n(!0)});var J6=j4;var Gw=class t{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let l=this;this.promise.then(r=>{if(!l._listeners)return;let i=l._listeners.length;for(;i-- >0;)l._listeners[i](r);l._listeners=null}),this.promise.then=r=>{let i,s=new Promise(a=>{l.subscribe(a),i=a}).then(r);return s.cancel=function(){l.unsubscribe(i)},s},e(function(i,s,a){l.reason||(l.reason=new Dr(i,s,a),n(l.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new t(function(r){e=r}),cancel:e}}},hK=Gw;function Jw(t){return function(n){return t.apply(null,n)}}function Kw(t){return Z.isObject(t)&&t.isAxiosError===!0}var Xw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xw).forEach(([t,e])=>{Xw[e]=t});var mK=Xw;function yK(t){let e=new J6(t),n=P6(J6.prototype.request,e);return Z.extend(n,J6.prototype,e,{allOwnKeys:!0}),Z.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return yK(is(t,r))},n}var Jl=yK(P4);Jl.Axios=J6;Jl.CanceledError=Dr;Jl.CancelToken=hK;Jl.isCancel=M6;Jl.VERSION=_o;Jl.toFormData=ia;Jl.AxiosError=qe;Jl.Cancel=Jl.CanceledError;Jl.all=function(e){return Promise.all(e)};Jl.spread=Jw;Jl.isAxiosError=Kw;Jl.mergeConfig=is;Jl.AxiosHeaders=s2;Jl.formToJSON=t=>yf(Z.isHTMLForm(t)?new FormData(t):t);Jl.getAdapter=bf.getAdapter;Jl.HttpStatusCode=mK;Jl.default=Jl;var U4=Jl;var{Axios:KUe,AxiosError:XUe,CanceledError:WUe,isCancel:YUe,CancelToken:QUe,VERSION:ZUe,all:eMe,Cancel:tMe,isAxiosError:nMe,spread:lMe,toFormData:gK,AxiosHeaders:rMe,HttpStatusCode:iMe,formToJSON:sMe,getAdapter:aMe,mergeConfig:uMe}=U4;var xK=Ql(require("https"),1),AK=Ql(require("crypto"),1),OK=Ql(SK(),1),Qw={};globalThis.dataBase=null;globalThis.local={get:async function(t,e){return await _xe(t,e)},set:asy Line truncated
`},timeout:.1}),await dataBase.push(l,Qw)}globalThis.localLog={set:async function(t,e,n){wxe(t,e,n)}};function bxe(){bo.default.existsSync("log")||bo.default.mkdirSync("log");let t="log/info.log";return bo.default.existsSync(t)?bo.default.readFileSync(t).toString():(bo.default.writeFileSync(t,""),"")}function wxe(t){bo.default.writeFileSync("log/info.log",bxe()+`
`+t)}globalThis.req=Sxe;async function Sxe(t,e){try{let n=e&&e.data||null,l=e&&e.postType||null,r=e&&e.buffer||0,i=e&&e.timeout||5e3,s=(e&&e.redirect||1)===1,a=e.proxy??!1,u=e?e.headers||{}:{};l==="form"?(u["Content-Type"]="application/x-www-form-urlencoded",n!=null&&(n=TK.default.stringify(n,{encode:!1}))):l==="form-data"&&(u["Content-Type"]="multipart/form-data",n=gK(n));let o=r===1||r===2?"arraybuffer":void 0,c;a?c=OK.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):c=xK.default.Agent({rejectUnauthorized:!1});let f=await U4(t,{responseType:o,method:e&&e.method||"get",headers:u,data:n,timeout:i,maxRedirects:s?null:0,httpsAgent:c});n=f.data;let m={};for(let d of f.headers){let y=d[1];m[d[0]]=Array.isArray(y)&&y.length===1?y[0]:y}if(!r)typeof n=="object"&&(n=JSON.stringify(n));else{if(r===1)return{code:f.status,headers:m,content:n};if(r===2)return{code:f.status,headers:m,content:n.toString("base64")};if(r===3){let d=e.stream;return d.onResp&&await d.onResp({code:f.status,headers:m}),d.onData?(n.on("data",async y=>{await d.onData(y)}),n.on("end",async()=>{d.onDone&&await d.onDone()})):d.onDone&&await d.onDone(),"stream..."}}return{code:f.status,headers:m,content:n}}catch(n){let l=n.response;try{return{code:l.status,headers:l.headers,content:JSON.stringify(l.data)}}catch{return{headers:{},content:""}}}}globalThis.md5X=Txe;function Txe(t){return AK.default.createHash("md5").update(Buffer.from(t,"utf8")).digest("hex")}globalThis.js2Proxy=function(t,e,n){let l=Object.keys(n).length===0?" ":encodeURIComponent(JSON.stringify(n));return t.server.address().dynamic+t.server.prefix+"/proxy/"+encodeURIComponent(e)+"/"+l+"/"};var xxe=["DEBUG","INFO","WARNING","ERROR"];var $4=class{constructor(e,n="DEBUG"){this.app_name=e,this.level=n,this.level_index=xxe.indexOf(n)}format(e,n){let l=80;switch(e){case"INFO":l=l+1;break;case"WARNING":l=l-2;break;default:break}return n.length<l&&((l-n.length)%2===0?n="#".repeat(Math.floor((l-n.length)/2))+n+"#".repeat(Math.floor((l-n.length)/2)):n="#".repeat(Math.floor((l-n.length)/2))+n+"#".repeat(Math.floor((l-n.length)/2)+1)),n}getTime(){let e=new Date;return e.toLocaleDateString().replace(/\//g,"-")+" "+e.toTimeString().substr(0,8)+","+e.getMilliseconds().toString()}formatMessage(e,n,l){return l&&(n=this.format(e,n)),`${this.getTime()} - ${this.app_name} - ${e}: ${n}`}async log(e){console.debug(e),await req("http://127.0.0.1:8099/upload",{data:{log:e+`
`},timeout:.1})}async info(e,n){this.level_index<=1&&await this.log(this.formatMessage("INFO",e,n))}async warning(e,n){this.level_index<=2&&await this.log(this.formatMessage("WARNING",e,n))}async error(e,n){this.level_index<=3&&await this.log(this.formatMessage("ERROR",e,n))}async debug(e,n){this.level_index<=0&&await this.log(this.formatMessage("DEBUG",e,n))}};var Ce=class extends Pe{constructor(){super(),this.jadeLog=new $4(this.getAppName(),"DEBUG")}async init(e,n){await this.jadeLog.info("\u521D\u59CB\u5316",!0);try{await await req("http://127.0.0.1:8099/clear",{timeout:.1}),this.siteKey=this.getJSName(),this.siteType=this.getType(),this.cfgObj=e.server.config[this.siteKey],this.deviceKey=e.server.prefix+"/",this.db=e.server.db,this.catOpenStatus=!0,this.danmuStaus=!1;try{await this.loadFilterAndClasses()?await this.jadeLog.debug("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u6210\u529F"):(await this.jadeLog.warning("\u8BFB\u53D6\u7F13\u5B58\u5217\u8868\u548C\u4E8C\u7EA7\u83DC\u5355\u5931\u8D25"),await this.writeFilterAndClasses())}catch(l){await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),await this.jadeLog.error("\u8BFB\u53D6\u7F13\u5B58\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+l,!1)}}catch(l){await this.jadeLog.error(`\u521D\u59CB\u5316\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${l}`)}await this.jadeLog.info("\u521D\u59CB\u5316\u5B8C\u6210",!0)}async loadFilterAndClasses(){return this.classes=await this.getClassesCache(),this.filterObj=await this.getFiletObjCache(),this.classes.length>0?!0:(await this.db.push(this.deviceKey+"classes",{}),await this.db.push(this.deviceKey+"filterObj",{}),!1)}async writeFilterAndClasses(){this.catOpenStatus&&this.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await this.setClasses(),await this.setFilterObj(),await this.db.push(this.deviceKey+"classes",this.classes),await this.db.push(this.deviceKey+"filterObj",this.filterObj)}async getClassesCache(){let e=await this.db.getObjectDefault(this.deviceKey+"classes",{});return B.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return B.isEmpty(e)?this.filterObj:e}async home(e,n){return this.vodList=[],await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u7C7B\u522B",!0),await this.setHome(),await this.jadeLog.debug(`\u9996\u9875\u7C7B\u522B\u5185\u5BB9\u4E3A:${this.result.home(this.classes,[],this.filterObj)}`),await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5B8C\u6210",!0),this.result.home(this.classes,[],this.filterObj)}async homeVod(){await this.jadeLog.info("\u6B63\u5728\u89E3\u6790\u9996\u9875\u5185\u5BB9",!0);try{return await this.setHomeVod(),await this.jadeLog.debug(`\u9996\u9875\u5185\u5BB9\u4E3A:${this.result.homeVod(this.homeVodList)}`),await this.jadeLog.info("\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5B8C\u6210",!0),this.result.homeVod(this.homeVodList)}catch(e){await this.jadeLog.error(`\u9996\u9875\u5185\u5BB9\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${e}`)}}async category(e,n){let l=e.body.id,r=e.body.page,i=!0,s=e.body.filters;if(this.page=parseInt(r),await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u5206\u7C7B\u9875\u9762,tid = ${l},pg = ${r},extend = ${JSON.stringify(s)}`),l==="\u6700\u8FD1\u66F4\u65B0")return this.page=0,await this.homeVod();try{return this.vodList=[],await this.setCategory(l,r,i,s),await this.jadeLog.debug(`\u5206\u7C7B\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}`),await this.jadeLog.info("\u5206\u7C7B\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.result.category(this.vodList,this.page,this.count,this.limit,this.total)}catch(a){await this.jadeLog.error(`\u5206\u7C7B\u9875\u89E3\u6790\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}}async detail(e,n){await this.jadeLog.debug(`\u83B7\u53D6\u8BE6\u60C5\u9875\u9762:${JSON.stringify(e.body)}`);let r=(Array.isArray(e.body.id)?e.body.id:[e.body.id])[0];this.vodDetail=new Me,await this.jadeLog.info(`\u6B63\u5728\u83B7\u53D6\u8BE6\u60C5\u9875\u9762,id\u4E3A:${r}`);try{return await this.setDetail(r),await this.jadeLog.debug(`\u8BE6\u60C5\u9875\u9762\u5185\u5BB9\u4E3A:${this.result.detail(this.vodDetail)}`),await this.jadeLog.info("\u8BE6\u60C5\u9875\u9762\u89E3\u6790\u5B8C\u6210",!0),this.vodDetail.vod_id=r,this.result.detail(this.vodDetail)}catch(i){await this.jadeLog.error("\u8BE6\u60C5\u754C\u9762\u83B7\u53D6\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:"+i)}}async play(e,n){let l=e.body.flag,r=e.body.id,i=[];await this.jadeLog.info(`\u6B63\u5728\u89E3\u6790\u64AD\u653E\u9875\u9762,flag:${l},id:${r},flags:${i}`,!0);try{let s;if(await this.setPlay(l,r,i),this.playUrl.content!==void 0)return this.playUrl;if(await this.jadeLog.debug("\u4E0D\u9700\u8981\u52A0\u8F7D\u5F39\u5E55",!0),this.result.jx===1&&this.playUrl.indexOf(".m3u8")<0){let a=await e.server.messageToD Line truncated
"type": "{{tid}}",
"p": "{{pg}}",
"area": "{{ext.area|default(0)}}",
"year": "{{ext.year|default(0)}}",
"sort": "{{ext.sort|default(0)}}",
"class": "{{ext.class|default(0)}}"}`,{ext:i,tid:e,pg:n}));console.log(s);let a=await this.request(l,s);this.vodList=await this.parseVodShortListFromJson(a.data.data)}async setDetail(e){let n=await this.request(this.siteUrl+"/api.php/Video/getVideoInfo",{video_id:e});this.vodDetail=await this.parseVodDetailfromJson(n.data.video)}async setPlay(e,n,r){this.result.jx=0;try{if(n.indexOf("youku")>=0||n.indexOf("iqiyi")>=0||n.indexOf("v.qq.com")>=0||n.indexOf("pptv")>=0||n.indexOf("le.com")>=0||n.indexOf("1905.com")>=0||n.indexOf("mgtv")>=0){if(this.parse.length>0)for(let i=0;i<this.parse.length;i++)try{let l=this.parse[i],s=await req(l+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(s)}`);let a=QK(n,JSON.parse(s.content).data);a.url&&(this.playUrl=a.url,this.danmuUrl=await this.danmuSpider.getVideoUrl(n,0),this.result.jx=1)}catch{}}else if(n.indexOf("jqq-")>=0){let i=await this.request(this.siteUrl+"/jqqheader.json",null,null,!0),l=n.split("-"),s=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+l[1]+"&episodeSid="+l[2]+"&quality=LD",{headers:i}),a=JSON.parse(s.content);a.data.playInfo.url&&(this.playUrl=a.data.playInfo.url)}else if(n.startsWith("ftp"))this.playUrl=n;else{let i=await this.request(this.siteUrl+"/video.php",{url:n}),l=QK(n,i.data);l.url&&(l.url.indexOf("filename=1.mp4")>-1?this.playUrl=l.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+ti(l.url),{}))}}catch(i){await this.jadeLog.error(i)}}async setSearch(e,n){let r=await this.request(this.siteUrl+"/api.php/Search/getSearch",{key:e,type_id:0,p:1});this.vodList=await this.parseVodShortListFromJson(r.data.data)}async proxy(e,n){let r=e[0],i=vi(e[1]);if(r==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${i}`);let l=await req(i,{}),s=l.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),o=i.substr(0,i.lastIndexOf("/")+1);return await this.jadeLog.debug(s.length),s=s.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(s.length),s=s.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(u,c,f,m){let d=(f.startsWith("http")?"":o)+f;return c+d+m}),s=s.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(u,c,f){let m=(f.startsWith("http")?"":o)+f;return c+a+vi(m)}),s=s.replace(/(#EXTINF:.*\n)(.*)/g,function(u,c,f){let m=(f.startsWith("http")?"":o)+f;return c+m}),JSON.stringify({code:l.code,content:s,headers:l.headers})}return JSON.stringify({code:500,content:""})}},En=new eS;var tS=class extends Re{constructor(){super()}getName(){return En.getName()}getAppName(){return En.getAppName()}getJSName(){return En.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await En.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await En.initCookie(e.server.config.bilicookie),await En.spiderInit(e),En.cfgObj.code=0,En.catOpenStatus=!0,En.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await En.setClasses(),this.classes=En.classes}async setFilterObj(){await En.setFilterObj(),this.filterObj=En.filterObj}async setHomeVod(){await En.setHomeVod(),this.homeVodList=En.homeVodList}async setCategory(e,n,r,i){await En.setCategory(e,n,r,i),this.vodList=En.vodList}async setDetail(e){await En.setDetail(e),this.vodDetail=En.vodDetail}async setPlay(e,n,r){await En.setPlay(e,n,r),this.playUrl=En.playUrl,this.result=En.result}async setSearch(e,n,r){await En.setSearch(e,n,r),this.vodList=En.vodList,this.result=En.result}async setProxy(e,n){return await En.proxy(e,n)}},yo=new tS;async function ZK(t,e){return await yo.init(t,e)}async function eX(t,e){return await yo.home(t,e)}async function bxe(t,e){return await yo.homeVod(t,e)}async function tX(t,e){return await yo.category(t,e)}async function nX(t,e){return await yo.detail(t,e)}async function rX(t,e){return await yo.play(t,e)}async function iX(t,e){return await yo.search(t,e)}async function wxe(t,e){return await yo.proxy(t,e)}var lX={meta:{key:En.getJSName(),name:En.getName(),type:En.getType()},api:async t=>{t.post("/init",ZK),t.post("/home",eX),t.post("/category",tX),t.post("/detail",nX),t.post("/play",rX),t.post("/search",iX),t.get("/proxy/:what/:ids/:end",wxe)},spider:{init:ZK,home:eX,homeVod:bxe,category:tX,detail:nX,play:rX,search:iX}};function Sxe(t){return t==="zd"?"\u6700\u5927":t==="yj"?"\u6C38\u4E45":t==="hn"?"\u725B\u725B":t==="gs"?"\u5149\u6CE2":t==="sn"?"\u65B0\u6717":t==="wl"?"\u6DA1\u8F6E":t==="lz"?"\u826F\u5B50":t==="fs"?"F\u901F":t==="ff"?"\u98DE\u98DE":t==="bd"?"\u767E\u5EA6":t==="uk"?"\u9177U":t==="wj"?"\u65E0\u5929":t==="bj"?"\u516B\u6212":t==="tk"?"\u5929\u7A7A":t==="ss"?"\u901F\u901F":t==="kb"?"\u9177\u64AD":t==="sd"?"\u95EA\u7535":t==="xk"?"\u770B\u770B":t==="tp"?"\u6DD8\u6DD8" Line truncated
`,"").replaceAll("\u5267\u60C5\uFF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let r of e){let i=new Ne;i.vod_id=r.url,i.vod_pic=r.thumb,i.vod_remarks=r.time,i.vod_name=r.title,n.push(i)}return n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Be(e),r=n("[class=index-list-l]");for(let i of r){let l=n(n(i).find('[class="h1 clearfix"]')[0]).find("a"),s=l[0].attribs.href,a=n(l[1]).text();B.isEmpty(a)||this.classes.push({type_id:s,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader()),i=[];if(!B.isEmpty(r)){let l=Be(r),s=l('[class="sy scon clearfix"]').find("dl"),a=0;for(let o of s){let u=l(l(o).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:u,value:[]},f=l(o).find("a"),m=0;u==="\u5267\u60C5"?m=3:u==="\u5E74\u4EE3"?m=2:u==="\u5730\u533A"&&(m=4);for(let d of f){let y=d.attribs.href.split("/");c.value.push({n:l(d).text(),v:y[m]})}i.push(c),a=a+1}}return i}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter(n))}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Be(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=this.siteUrl+e,s=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(s)){let a=e.split("/")[1],o=e.split("/")[2],u=Se(/var _yu_gda_s="(.*?)";/,s),c={action:a,page:parseInt(n),year:i[2]??"0",area:i[3]??"all",class:i[1]??"0",dect:"",id:o},f=await this.fetch(u,c,this.getHeader());if(f!==null){let m=Be(f);this.vodList=await this.parseVodShortListFromDoc(m)}}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Be(r);this.vodDetail=await this.parseVodDetailFromDoc(i);let s="http://test.gqyy8.com:8077/ne2"+/<script type="text\/javascript" src="http:\/\/test.gqyy8.com:8077\/ne2(.*?)"><\/script>/g.exec(r)[1],a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let o=this.paraseUrlObject(a);this.vodDetail.vod_play_url=o.play_url,this.vodDetail.vod_play_from=o.play_format}}}async setSearch(e,n){let r=this.siteUrl+"/search.php",i=await this.fetch(r,null,this.getHeader());if(!B.isEmpty(i)){let l={top:10,q:e},s=Se(/var my_search='(.*?)';/,i),a=await this.fetch(s,l,this.getHeader());if(!B.isEmpty(a)){let o=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(o)}}}},bn=new nS;var rS=class extends Re{constructor(){super()}getName(){return bn.getName()}getAppName(){return bn.getAppName()}getJSName(){return bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await bn.initCookie(e.server.config.bilicookie),await bn.spiderInit(e),bn.cfgObj.code=0,bn.catOpenStatus=!0,bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await bn.setClasses(),this.classes=bn.classes}async setFilterObj(){await bn.setFilterObj(),this.filterObj=bn.filterObj}async setHomeVod(){await bn.setHomeVod(),this.homeVodList=bn.homeVodList}async setCategory(e,n,r,i){await bn.setCategory(e,n,r,i),this.vodList=bn.vodList}async setDetail(e){await bn.setDetail(e),this.vodDetail=bn.vodDetail}async setPlay(e,n,r){await bn.setPlay(e,n,r),this.playUrl=bn.playUrl,this.result=bn.result}async setSearch(e,n,r){await bn.setSearch(e,n,r),this.vodList=bn.vodList,this.result=bn.result}async setProxy(e,n){return await bn.proxy(e,n)}},go=new rS;async function sX(t,e){return await go.init(t,e)}async function aX(t,e){return await go.home(t,e)}async function Txe(t,e){return await go.homeVod(t,e)}async function oX(t,e){return await go.category(t,e)}async function uX(t,e){return await go.detail(t,e)}async function cX(t,e){return await go.play(t,e)}async function pX(t,e){return await go.search(t,e)}async function xxe(t,e){return await go.proxy(t,e)}var fX={meta:{key:bn.getJSName(),name:bn.getName(),type:bn.getType()},api:async t=>{t.post("/init",sX),t.post("/home",aX),t.post("/category",oX),t.post("/detail",uX),t.post("/play",cX),t.post("/search",pX),t.get("/proxy/:what/:ids/:end",xxe)},spider:{init:sX,home:aX,homeVod:Txe,category:oX,detail:uX,play:cX,search:pX}};var iS=class extends uo{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!0}getAppName(){return"\u91CF\u5B50\u8D44\u6E90"}getName(){return"\u{1F41D}\u2503\u91CF\u5B50\u8D44\u6E90\u2503\u{1F41D}"}getJSName(){return"liangzi"}getType(){return 3}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}},wn=new iS;var lS=class extends Re{constructor(){super()}getName(){return wn.getName()}getAppName(){return wn.getAppName()}getJ Line truncated
"class": "{{ext.class|default(0)}}"}`,{ext:r,tid:e,pg:n}));console.log(s);let a=await this.request(i,s);this.vodList=await this.parseVodShortListFromJson(a.data.data)}async setDetail(e){let n=await this.request(this.siteUrl+"/api.php/Video/getVideoInfo",{video_id:e});this.vodDetail=await this.parseVodDetailfromJson(n.data.video)}async setPlay(e,n,l){this.result.jx=0;try{if(n.indexOf("youku")>=0||n.indexOf("iqiyi")>=0||n.indexOf("v.qq.com")>=0||n.indexOf("pptv")>=0||n.indexOf("le.com")>=0||n.indexOf("1905.com")>=0||n.indexOf("mgtv")>=0){if(this.parse.length>0)for(let r=0;r<this.parse.length;r++)try{let i=this.parse[r],s=await req(i+n,{headers:{"user-agent":"okhttp/4.1.0"}});await this.jadeLog.debug(`\u89E3\u6790\u8FDE\u63A5\u7ED3\u679C\u4E3A:${JSON.stringify(s)}`);let a=oX(n,JSON.parse(s.content).data);a.url&&(this.playUrl=a.url,this.danmuUrl=await this.danmuSpider.getVideoUrl(n,0),this.result.jx=1)}catch{}}else if(n.indexOf("jqq-")>=0){let r=await this.request(this.siteUrl+"/jqqheader.json",null,null,!0),i=n.split("-"),s=await req("https://api.juquanquanapp.com/app/drama/detail?dramaId="+i[1]+"&episodeSid="+i[2]+"&quality=LD",{headers:r}),a=JSON.parse(s.content);a.data.playInfo.url&&(this.playUrl=a.data.playInfo.url)}else if(n.startsWith("ftp"))this.playUrl=n;else{let r=await this.request(this.siteUrl+"/video.php",{url:n}),i=oX(n,r.data);i.url&&(i.url.indexOf("filename=1.mp4")>-1?this.playUrl=i.url:this.playUrl=await js2Proxy(!0,this.siteType,this.siteKey,"lzm3u8/"+n2(i.url),{}))}}catch(r){await this.jadeLog.error(r)}}async setSearch(e,n){let l=await this.request(this.siteUrl+"/api.php/Search/getSearch",{key:e,type_id:0,p:1});this.vodList=await this.parseVodShortListFromJson(l.data.data)}async proxy(e,n){let l=e[0],r=_2(e[1]);if(l==="lzm3u8"){await this.jadeLog.debug(`\u4F7F\u7528\u4EE3\u7406\u64AD\u653E,\u64AD\u653E\u8FDE\u63A5\u4E3A:${r}`);let i=await req(r,{}),s=i.content,a=await js2Proxy(!1,this.siteType,this.siteKey,"lzm3u8/",{}),u=r.substr(0,r.lastIndexOf("/")+1);return await this.jadeLog.debug(s.length),s=s.replace(/#EXT-X-DISCONTINUITY\r*\n*#EXTINF:6.433333,[\s\S]*?#EXT-X-DISCONTINUITY/,""),await this.jadeLog.debug(s.length),s=s.replace(/(#EXT-X-KEY\S+URI=")(\S+)("\S+)/g,function(o,c,f,m){let d=(f.startsWith("http")?"":u)+f;return c+d+m}),s=s.replace(/(#EXT-X-STREAM-INF:.*\n)(.*)/g,function(o,c,f){let m=(f.startsWith("http")?"":u)+f;return c+a+_2(m)}),s=s.replace(/(#EXTINF:.*\n)(.*)/g,function(o,c,f){let m=(f.startsWith("http")?"":u)+f;return c+m}),JSON.stringify({code:i.code,content:s,headers:i.headers})}return JSON.stringify({code:500,content:""})}},bn=new oS;var cS=class extends Ce{constructor(){super()}getName(){return bn.getName()}getAppName(){return bn.getAppName()}getJSName(){return bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await bn.initCookie(e.server.config.bilicookie),await bn.spiderInit(e),bn.cfgObj.code=0,bn.catOpenStatus=!0,bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await bn.setClasses(),this.classes=bn.classes}async setFilterObj(){await bn.setFilterObj(),this.filterObj=bn.filterObj}async setHomeVod(){await bn.setHomeVod(),this.homeVodList=bn.homeVodList}async setCategory(e,n,l,r){await bn.setCategory(e,n,l,r),this.vodList=bn.vodList}async setDetail(e){await bn.setDetail(e),this.vodDetail=bn.vodDetail}async setPlay(e,n,l){await bn.setPlay(e,n,l),this.playUrl=bn.playUrl,this.result=bn.result}async setSearch(e,n,l){await bn.setSearch(e,n,l),this.vodList=bn.vodList,this.result=bn.result}async setProxy(e,n){return await bn.proxy(e,n)}},ya=new cS;async function cX(t,e){return await ya.init(t,e)}async function pX(t,e){return await ya.home(t,e)}async function Mxe(t,e){return await ya.homeVod(t,e)}async function fX(t,e){return await ya.category(t,e)}async function dX(t,e){return await ya.detail(t,e)}async function hX(t,e){return await ya.play(t,e)}async function mX(t,e){return await ya.search(t,e)}async function $xe(t,e){return await ya.proxy(t,e)}var yX={meta:{key:bn.getJSName(),name:bn.getName(),type:bn.getType()},api:async t=>{t.post("/init",cX),t.post("/home",pX),t.post("/category",fX),t.post("/detail",dX),t.post("/play",hX),t.post("/search",mX),t.get("/proxy/:what/:ids/:end",$xe)},spider:{init:cX,home:pX,homeVod:Mxe,category:fX,detail:dX,play:hX,search:mX}};function Bxe(t){return t==="zd"?"\u6700\u5927":t==="yj"?"\u6C38\u4E45":t==="hn"?"\u725B\u725B":t==="gs"?"\u5149\u6CE2":t==="sn"?"\u65B0\u6717":t==="wl"?"\u6DA1\u8F6E":t==="lz"?"\u826F\u5B50":t==="fs"?"F\u901F":t==="ff"?"\u98DE\u98DE":t==="bd"?"\u767E\u5EA6":t==="uk"?"\u9177U":t==="wj"?"\u65E0\u5929":t==="bj"?"\u516B\u6212":t==="tk"?"\u5929\u7A7A":t==="ss"?"\u901F\u901F":t==="kb"?"\u9177\u64AD":t==="sd"?"\u95EA\u7535":t==="xk"?"\u770B\u770B":t==="tp"?"\u6DD8\u6DD8" Line truncated
`,"").replaceAll("\u5267\u60C5\uFF1A",""),n.vod_pic=e("img.lazy")[0].attribs["data-original"],n}async parseVodShortListFromJson(e){let n=[];for(let l of e){let r=new Ne;r.vod_id=l.url,r.vod_pic=l.thumb,r.vod_remarks=l.time,r.vod_name=l.title,n.push(r)}return n}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e),l=n("[class=index-list-l]");for(let r of l){let i=n(n(r).find('[class="h1 clearfix"]')[0]).find("a"),s=i[0].attribs.href,a=n(i[1]).text();B.isEmpty(a)||this.classes.push({type_id:s,type_name:a})}}}async getFilter(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader()),r=[];if(!B.isEmpty(l)){let i=Ue(l),s=i('[class="sy scon clearfix"]').find("dl"),a=0;for(let u of s){let o=i(i(u).find("dt")).text().replace("\u6309","").replace("\uFF1A",""),c={key:(a+1).toString(),name:o,value:[]},f=i(u).find("a"),m=0;o==="\u5267\u60C5"?m=3:o==="\u5E74\u4EE3"?m=2:o==="\u5730\u533A"&&(m=4);for(let d of f){let y=d.attribs.href.split("/");c.value.push({n:i(d).text(),v:y[m]})}r.push(c),a=a+1}}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;n!=="\u6700\u8FD1\u66F4\u65B0"&&(this.filterObj[n]=await this.getFilter(n))}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=this.siteUrl+e,s=await this.fetch(i,null,this.getHeader());if(!B.isEmpty(s)){let a=e.split("/")[1],u=e.split("/")[2],o=we(/var _yu_gda_s="(.*?)";/,s),c={action:a,page:parseInt(n),year:r[2]??"0",area:r[3]??"all",class:r[1]??"0",dect:"",id:u},f=await this.fetch(o,c,this.getHeader());if(f!==null){let m=Ue(f);this.vodList=await this.parseVodShortListFromDoc(m)}}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodDetail=await this.parseVodDetailFromDoc(r);let s="http://test.gqyy8.com:8077/ne2"+/<script type="text\/javascript" src="http:\/\/test.gqyy8.com:8077\/ne2(.*?)"><\/script>/g.exec(l)[1],a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let u=this.paraseUrlObject(a);this.vodDetail.vod_play_url=u.play_url,this.vodDetail.vod_play_from=u.play_format}}}async setSearch(e,n){let l=this.siteUrl+"/search.php",r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i={top:10,q:e},s=we(/var my_search='(.*?)';/,r),a=await this.fetch(s,i,this.getHeader());if(!B.isEmpty(a)){let u=JSON.parse(a.replaceAll("\uFEFF",""));this.vodList=await this.parseVodShortListFromJson(u)}}}},wn=new pS;var fS=class extends Ce{constructor(){super()}getName(){return wn.getName()}getAppName(){return wn.getAppName()}getJSName(){return wn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await wn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await wn.initCookie(e.server.config.bilicookie),await wn.spiderInit(e),wn.cfgObj.code=0,wn.catOpenStatus=!0,wn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await wn.setClasses(),this.classes=wn.classes}async setFilterObj(){await wn.setFilterObj(),this.filterObj=wn.filterObj}async setHomeVod(){await wn.setHomeVod(),this.homeVodList=wn.homeVodList}async setCategory(e,n,l,r){await wn.setCategory(e,n,l,r),this.vodList=wn.vodList}async setDetail(e){await wn.setDetail(e),this.vodDetail=wn.vodDetail}async setPlay(e,n,l){await wn.setPlay(e,n,l),this.playUrl=wn.playUrl,this.result=wn.result}async setSearch(e,n,l){await wn.setSearch(e,n,l),this.vodList=wn.vodList,this.result=wn.result}async setProxy(e,n){return await wn.proxy(e,n)}},ga=new fS;async function gX(t,e){return await ga.init(t,e)}async function vX(t,e){return await ga.home(t,e)}async function Hxe(t,e){return await ga.homeVod(t,e)}async function _X(t,e){return await ga.category(t,e)}async function EX(t,e){return await ga.detail(t,e)}async function bX(t,e){return await ga.play(t,e)}async function wX(t,e){return await ga.search(t,e)}async function Vxe(t,e){return await ga.proxy(t,e)}var SX={meta:{key:wn.getJSName(),name:wn.getName(),type:wn.getType()},api:async t=>{t.post("/init",gX),t.post("/home",vX),t.post("/category",_X),t.post("/detail",EX),t.post("/play",bX),t.post("/search",wX),t.get("/proxy/:what/:ids/:end",Vxe)},spider:{init:gX,home:vX,homeVod:Hxe,category:_X,detail:EX,play:bX,search:wX}};var dS=class extends ca{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!0}getAppName(){return"\u91CF\u5B50\u8D44\u6E90"}getName(){return"\u{1F41D}\u2503\u91CF\u5B50\u8D44\u6E90\u2503\u{1F41D}"}getJSName(){return"liangzi"}getType(){return 3}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init(e),await this.spiderInit(null)}},Sn=new dS;var hS=class extends Ce{constructor(){super()}getName(){return Sn.getName()}getAppName(){return Sn.getAppName()}getJ Line truncated
<ContentComponent contentType="${f}"/>
<Representation id="${n}" bandwidth="${l}" codecs="${i}" mimeType="${a}" ${m} startWithSAP="${s}">
<BaseURL>${o}</BaseURL>
<SegmentBase indexRange="${u}">
<Representation id="${n}" bandwidth="${i}" codecs="${r}" mimeType="${a}" ${m} startWithSAP="${s}">
<BaseURL>${u}</BaseURL>
<SegmentBase indexRange="${o}">
<Initialization range="${c}"/>
</SegmentBase>
</Representation>
</AdaptationSet>`}catch{}}getDash(e,n,r){let i=e.data.dash.duration,l=e.data.dash.minBufferTime;return`<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" type="static" mediaPresentationDuration="PT${i}S" minBufferTime="PT${l}S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
<Period duration="PT${i}S" start="PT0S">
</AdaptationSet>`}catch{}}getDash(e,n,l){let r=e.data.dash.duration,i=e.data.dash.minBufferTime;return`<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" type="static" mediaPresentationDuration="PT${r}S" minBufferTime="PT${i}S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011">
<Period duration="PT${r}S" start="PT0S">
${n}
${r}
${l}
</Period>
</MPD>`}async proxy(e,n){let r=e[0],i=vi(e[1]);if(r==="dash"){let l=i.split("+"),s=l[0],a=l[1],o=l[2],u=this.apiUrl+`/x/player/playurl?avid=${s}&cid=${a}&qn=${o}&fnval=4048&fourk=1`,c="",f="",m=await this.fetch(u,null,n),d=JSON.parse(m),y=d.data.dash,_=y.video,S=y.audio;for(let E=0;E<_.length;E++){let g=_[E];g.id.toString()===o&&(c+=this.getDashMedia(g))}for(let E=0;E<S.length;E++){let g=S[E];for(let v in this.vod_audio_id)g.id.toString()===v&&(f+=this.getDashMedia(g))}let w=this.getDash(d,c,f);return JSON.stringify({code:200,content:w,headers:{"Content-Type":"application/dash+xml"}})}return JSON.stringify({code:500,content:""})}},Tn=new cS;var pS=class extends Re{constructor(){super()}getName(){return Tn.getName()}getAppName(){return Tn.getAppName()}getJSName(){return Tn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Tn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Tn.initCookie(e.server.config.bilicookie),await Tn.spiderInit(e),Tn.cfgObj.code=0,Tn.catOpenStatus=!0,Tn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Tn.setClasses(),this.classes=Tn.classes}async setFilterObj(){await Tn.setFilterObj(),this.filterObj=Tn.filterObj}async setHomeVod(){await Tn.setHomeVod(),this.homeVodList=Tn.homeVodList}async setCategory(e,n,r,i){await Tn.setCategory(e,n,r,i),this.vodList=Tn.vodList}async setDetail(e){await Tn.setDetail(e),this.vodDetail=Tn.vodDetail}async setPlay(e,n,r){await Tn.setPlay(e,n,r),this.playUrl=Tn.playUrl,this.result=Tn.result}async setSearch(e,n,r){await Tn.setSearch(e,n,r),this.vodList=Tn.vodList,this.result=Tn.result}async setProxy(e,n){return await Tn.proxy(e,n)}},bo=new pS;async function PX(t,e){return await bo.init(t,e)}async function LX(t,e){return await bo.home(t,e)}async function Bxe(t,e){return await bo.homeVod(t,e)}async function FX(t,e){return await bo.category(t,e)}async function jX(t,e){return await bo.detail(t,e)}async function UX(t,e){return await bo.play(t,e)}async function MX(t,e){return await bo.search(t,e)}async function Hxe(t,e){return await bo.proxy(t,e)}var $X={meta:{key:Tn.getJSName(),name:Tn.getName(),type:Tn.getType()},api:async t=>{t.post("/init",PX),t.post("/home",LX),t.post("/category",FX),t.post("/detail",jX),t.post("/play",UX),t.post("/search",MX),t.get("/proxy/:what/:ids/:end",Hxe)},spider:{init:PX,home:LX,homeVod:Bxe,category:FX,detail:jX,play:UX,search:MX}};var fS=class extends Fe{constructor(){super(),this.siteUrl="https://www.xb6v.com"}getName(){return"\u{1F9F2}\u2503\u78C1\u529B\u65B06V\u2503\u{1F9F2}"}getAppName(){return"\u78C1\u529B\u65B06V"}getJSName(){return"xb6v"}getType(){return 3}async redirect(e){await this.jadeLog.debug(`\u91CD\u5B9A\u5411\u56DE\u590D\u503C\u4E3A:${e.content}`);let n=/<a HREF=(.*?)>/.exec(e.content);if(n.length>1){let r=this.siteUrl+"/e/search/"+n[1].replaceAll("\\","").replaceAll('"',"");return await this.jadeLog.info(`\u91CD\u5B9A\u5411url\u4E3A:${r}`),await this.fetch(r,null,this.getHeader())}}getActorOrDirector(e,n){return Se(e,n).replace(/<br>/g,"").replace(/&nbsp;./g,"").replace(/&amp;/g,"").replace(/middot;/g,"\u30FB").replace(/     /g,",").replace(/      /g,",").replace(/ /g,"")}getDescription(e,n){return Se(e,n).replace(/<\/?[^>]+>/g,"").replace(/\n/g,"").replace(/&amp;/g,"").replace(/middot;/g,"\u30FB").replace(/ldquo;/g,"\u3010").replace(/rdquo;/g,"\u3011").replace(/ /g,"")}async parseVodShortListFromDoc(e){let n=e("#post_container .post_hover"),r=[];for(let i of n){let l=e(i).find("[class=zoom]")[0],s=new Ne;s.vod_id=l.attribs.href,s.vod_name=l.attribs.title.replaceAll(/<\\?[^>]+>/g,""),s.vod_pic=e(l).find("img")[0].attribs.src,s.vod_remarks=e(i).find('[rel="category tag"]').text().replaceAll(`
`,"").replaceAll(" ",""),r.push(s)}return r}async parseVodDetailFromDoc(e){let n=e("#post_content"),r=[],i=[];if(!this.catOpenStatus){let o=0,u="\u78C1\u529B\u7EBF\u8DEF";for(let c of n){let f=e(c).find("table a"),m=[];for(let d of f){let y=d.attribs.href,_=d.children[0].data;y.toLowerCase().startsWith("magnet")&&m.push(_+"$"+y)}m.length>0&&(o++,r.push(u+o),i.push(m.join("#")))}}let l=e(e(".mainleft")).find('[class="widget box row"]');for(let o of l){let u=e(o).find("h3").text(),c=[];if(!B.isEmpty(u)){let f=e(o).find("a");for(let m of f)c.push(m.attribs.title+"$"+m.attribs.href);r.push(u),i.push(c.join("#"))}}let s=e(".context").html(),a=new Ue;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=Se(/◎类  别 (.*?)<br>/,s),B.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=Se(/◎年  代 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_year=Se(/首播:(.*?)<br>"/,s)),a.vod_area=Se(/◎产  地 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_area=Se(/地区:(.*?)<br>"/,s)),a.vod_remarks=Se(/◎上映日期 (.*?)<br>/,s),a.vod_actor=this.getActorOrDirector(/◎演  员 (.*?)<\/p>/,s),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/◎主  演 (.*?)<\/p>/,s)),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/主演:(.*?)<br>/,s)),a.vod_director=this.getActorOrDirector(/◎导  演 (.*?)<br>/,s),B.isEmpty(a.vod_director)&&(a.vod_director=this.getActorOrDirector(/导演:(.*?)<br>/,s)),a.vod_content=this.getDescription(/◎简  介(.*?)<hr>/gi,s),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/简介(.*?)<\/p>/gi,s)),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/◎简  介(.*?)<br>/gi,s)),a.vod_play_from=r.join("$$$"),a.vod_play_url=i.join("$$$"),a}async parseVodPlayFromDoc(e,n){let r="",i=n.html();switch(e){case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u63D2\u4EF6 \u6781\u901F\u64AD\u653E\uFF09":case"\u64AD\u653E\u5730\u5740\u4E09":r=n(n(".video")).find("iframe")[0].attribs.src+"/index.m3u8";break;case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u9700\u5B89\u88C5\u63D2\u4EF6\uFF09":let l=/url: '(.*?)',/gs.exec(i);l.length>1&&(r=l[1]);break;case"\u64AD\u653E\u5730\u5740\u56DB":let s=/source: "(.*?)",/gs.exec(i);s.length>1&&(r=s[1]);break;default:await this.jadeLog.warning(`\u6682\u4E0D\u652F\u6301\u5F53\u524D\u683C\u5F0F,\u5F53\u524D\u683C\u5F0F\u4E3A:${e}`);break}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Be(e),r=n("#menus > li > a");for(let i=0;i<r.length;i++){let l=r[i];if(i<2||i===r.length-1)continue;let s=l.children[0].data,a=l.attribs.href;if(this.classes.push({type_name:s,type_id:a}),s==="\u7535\u89C6\u5267"){let o=[{n:"\u4E0D\u9650",v:""}];for(let u of n(l.next).find("a"))o.push({n:u.children[0].data,v:u.attribs.href.replaceAll(a,"")});this.filterObj[a]=[{key:"cateId",name:"\u7C7B\u578B",value:o}]}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(B.isEmpty(e))await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5931\u8D25",!0);else{let n=Be(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=i.cateId??"",s=this.siteUrl+e+l;this.page=parseInt(n),this.count=0,this.limit=18,this.total=0,this.page!==1&&(s+="index_"+n+".html");let a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let o=Be(a),u=o(".pagination > a");if(u.length>0){let c=u.slice(-1)[0].attribs.href,m=/index_(.*?).html/.exec(c);this.count=parseInt(m[1]);let d=o("#post_container .post_hover");this.total=this.page===this.count?(this.page-1)*this.limit+d.length:this.count*this.limit}this.vodList=await this.parseVodShortListFromDoc(o)}}async setSearch(e,n){let r=this.siteUrl+"/e/search/index.php",i={show:"title",tempid:"1",tbname:"article",mid:"1",dopost:"search",keyboard:e},l=await this.post(r,i,this.getHeader());if(!B.isEmpty(l)){let s=Be(l);this.vodList=await this.parseVodShortListFromDoc(s)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Be(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){if(n.toLowerCase().startsWith("magnet"))this.playUrl=n;else{let i=this.siteUrl+n,l=await this.fetch(i,null,this.getHeader()),s=Be(l);this.playUrl=await this.parseVodPlayFromDoc(e,s)}}},xn=new fS;var dS=class extends Re{constructor(){super()}getName(){return xn.getName()}getAppName(){return xn.getAppName()}getJSName(){return xn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await xn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await xn.initCookie(e.server.config.bilicookie),await xn.spiderInit(e),xn.cfgObj.code=0,xn.catOpenStatus=!0,xn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),awai Line truncated
`,"").replaceAll(" ","");if(a.indexOf("\u65F6\u95F4")>-1&&a.indexOf("\u6587\u4EF6\u5939")>-1){let o=a.split("\u65F6\u95F4"),u=new Ne;u.vod_name=o[0],u.vod_remarks=o[1].split("\u683C\u5F0F")[0].replaceAll(":","").replaceAll(" ","").replaceAll("\uFEFF","").replaceAll("\xA0",""),u.vod_id=JSON.stringify({name:u.vod_name,remarks:u.vod_remarks,id:l}),r.push(u)}}}return r}async setClasses(){await this.parseClassFromDoc(this.content_html)}async setHomeVod(){let e=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.homeVodList=await this.parseVodShortListFromDoc(e[0])}async setDetail(e){if(e.indexOf("search")>-1){let n=this.siteUrl+"/search",r={k:decodeURIComponent(e.split("search?k=").slice(-1)[0])},i=await this.fetch(n,r,this.getHeader());if(!B.isEmpty(i)){let l=Be(i),s=await this.parseVodShortListFromDocBySearch(l);s.length>0?e=s[0].vod_id:e=""}}if(!B.isEmpty(e)){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}}async setCategory(e,n,r,i){let l=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.vodList=await this.parseVodShortListFromDoc(l[parseInt(e)])}async setSearch(e,n){let r=this.siteUrl+"/search",i={k:e},l=await this.fetch(r,i,this.getHeader());if(!B.isEmpty(l)){let s=Be(l);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}async setPlay(e,n,r){let i=await xl(e,n,r);this.playUrl=JSON.parse(i).url}},An=new mS;var yS=class extends Re{constructor(){super()}getName(){return An.getName()}getAppName(){return An.getAppName()}getJSName(){return An.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await An.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await An.initCookie(e.server.config.bilicookie),await An.spiderInit(e),An.cfgObj.code=0,An.catOpenStatus=!0,An.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await An.setClasses(),this.classes=An.classes}async setFilterObj(){await An.setFilterObj(),this.filterObj=An.filterObj}async setHomeVod(){await An.setHomeVod(),this.homeVodList=An.homeVodList}async setCategory(e,n,r,i){await An.setCategory(e,n,r,i),this.vodList=An.vodList}async setDetail(e){await An.setDetail(e),this.vodDetail=An.vodDetail}async setPlay(e,n,r){await An.setPlay(e,n,r),this.playUrl=An.playUrl,this.result=An.result}async setSearch(e,n,r){await An.setSearch(e,n,r),this.vodList=An.vodList,this.result=An.result}async setProxy(e,n){return await An.proxy(e,n)}},So=new yS;async function XX(t,e){return await So.init(t,e)}async function WX(t,e){return await So.home(t,e)}async function Xxe(t,e){return await So.homeVod(t,e)}async function YX(t,e){return await So.category(t,e)}async function QX(t,e){return await So.detail(t,e)}async function ZX(t,e){return await So.play(t,e)}async function eW(t,e){return await So.search(t,e)}async function Wxe(t,e){return await So.proxy(t,e)}var tW={meta:{key:An.getJSName(),name:An.getName(),type:An.getType()},api:async t=>{t.post("/init",XX),t.post("/home",WX),t.post("/category",YX),t.post("/detail",QX),t.post("/play",ZX),t.post("/search",eW),t.get("/proxy/:what/:ids/:end",Wxe)},spider:{init:XX,home:WX,homeVod:Xxe,category:YX,detail:QX,play:ZX,search:eW}};var gS=class extends Fe{constructor(){super(),this.siteUrl="https://api.web.360kan.com"}getName(){return"\u{1F94E}\u2503360\u5F71\u89C6\u2503\u{1F94E}"}getAppName(){return"360"}getJSName(){return"sp360"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}async setClasses(){this.classes=[this.getTypeDic("\u6700\u8FD1\u66F4\u65B0","\u6700\u8FD1\u66F4\u65B0"),this.getTypeDic("\u7535\u5F71","1"),this.getTypeDic("\u5267\u96C6","2"),this.getTypeDic("\u7EFC\u827A","3"),this.getTypeDic("\u52A8\u6F2B","4")]}async setFilterObj(){this.filterObj={1:[{key:"cat",name:"\u7C7B\u578B",value:[{n:"\u5168\u90E8",v:""},{n:"\u559C\u5267",v:"\u559C\u5267"},{n:"\u7231\u60C5",v:"\u7231\u60C5"},{n:"\u52A8\u4F5C",v:"\u52A8\u4F5C"},{n:"\u6050\u6016",v:"\u6050\u6016"},{n:"\u79D1\u5E7B",v:"\u79D1\u5E7B"},{n:"\u5267\u60C5",v:"\u5267\u60C5"},{n:"\u72AF\u7F6A",v:"\u72AF\u7F6A"},{n:"\u5947\u5E7B",v:"\u5947\u5E7B"},{n:"\u6218\u4E89",v:"\u6218\u4E89"},{n:"\u60AC\u7591",v:"\u60AC\u7591"},{n:"\u52A8\u753B",v:"\u52A8\u753B"},{n:"\u6587\u827A",v:"\u6587\u827A"},{n:"\u7EAA\u5F55",v:"\u7EAA\u5F55"},{n:"\u4F20\u8BB0",v:"\u4F20\u8BB0"},{n:"\u6B4C\u821E",v:"\u6B4C\u821E"},{n:"\u53E4\u88C5",v:"\u53E4\u88C5"},{n:"\u5386\u53F2",v:"\u5386\u53F2"},{n:"\u60CA\u609A",v:"\u60CA\u609A"},{n:"\u4F26\u7406",v:"\u4F26\u7406"},{n:"\u5176\u4ED6",v:"\u5176\u4ED6"}]},{key:"year",name:"\u5E74\u4EE3",value:[{n:"\u5168\u90E8",v:""},{n:"2024",v:"2024"},{n:"2023",v:"2023"},{n:"2022",v:"2022"},{n:"2021",v:"2021"},{n:"2020",v:"2020"},{n:"2019",v:"2019"},{n:"2018",v:"2018"},{n:"2017",v:"2017"},{n:"2016",v:"2016"},{n:"2015",v:"2015"},{n:"2014",v:"2014"},{n:"2013",v:"2013"},{n:"2012",v:"2012"},{n:"2010",v Line truncated
`;n.type_name=e(e(e(i).find('[class="post-meta"]')).find("span")[0]).text(),n.vod_pic=e(i).find("img")[0].attribs.src,n.vod_name=Se(/名称:(.*?)\n/,s),n.vod_actor=Se(/主演:(.*?)\n/,s),n.vod_director=Se(/导演:(.*?)\n/,s),n.vod_area=Se(/地区:(.*?)\n/,s),n.vod_year=Se(/年份:(.*?)\n/,s),n.vod_remarks=Se(/更新:(.*?)\n/,s);let a=e('[class="article-related info"]').find("p");n.vod_content=e(a).text();let o=e('[class="article-related download_url"]'),u=[],c=[];for(let f=0;f<o.length;f++){let m=o[f],d=e(e(m).find("h2")).text().replaceAll(n.vod_name,"");u.push(d.replaceAll("\u4E0B\u8F7D","\u64AD\u653E"));let y=[];for(let _ of e(o[f]).find("a")){let S=e(_).text().replaceAll("\u78C1\u529B\u94FE\u4E0B\u8F7D","").replaceAll(".mp4",""),w=_.attribs.href;y.push(S+"$"+w)}c.push(y.join("#"))}return n.vod_play_from=u.join("$$$"),n.vod_play_url=c.join("$$$"),n}async parseVodShortListFromJson(e){let n=[],r=Be(e.ajaxtxt),i=r(r("ul")).find("li");for(let l of i){let s=new Ne;s.vod_pic=r(l).find("img")[0].attribs["data-original"],s.vod_name=Se(/《(.*?)》/,r(l).find("img")[0].attribs.alt),s.vod_id=r(l).find("a")[0].attribs.href,s.vod_remarks="\u8BC4\u5206:"+r(r(l).find('[class="rate badge"]')).text(),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e(e('[id="list_all"]').find("ul")).find("li");for(let i of r){let l=new Ne;l.vod_id=e(i).find("a")[0].attribs.href,l.vod_name=Se(/《(.*?)》/,e(e(e(i).find('[class="text_info"]')).find("a")[0]).text()),l.vod_pic=e(i).find("img")[0].attribs["data-original"],l.vod_remarks=e(e(i).find('[class="update_time"]')).text(),n.push(l)}return n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);return this.vodDetail=await this.parseVodDetailFromDoc(n),this.vodDetail}async setCategory(e,n,r,i){let l=this.siteUrl+`/list/${e}-${n}.html`,s=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setSearch(e,n){let r=this.siteUrl+"/search/",i={wd:e,p:"1",t:"j/tNgwBS2e8O4x9TuIkYuQ=="},l=await this.post(r,i,this.getSearchHeader()),s=Be(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}},Nn=new _S;var ES=class extends Re{constructor(){super()}getName(){return Nn.getName()}getAppName(){return Nn.getAppName()}getJSName(){return Nn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Nn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Nn.initCookie(e.server.config.bilicookie),await Nn.spiderInit(e),Nn.cfgObj.code=0,Nn.catOpenStatus=!0,Nn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Nn.setClasses(),this.classes=Nn.classes}async setFilterObj(){await Nn.setFilterObj(),this.filterObj=Nn.filterObj}async setHomeVod(){await Nn.setHomeVod(),this.homeVodList=Nn.homeVodList}async setCategory(e,n,r,i){await Nn.setCategory(e,n,r,i),this.vodList=Nn.vodList}async setDetail(e){await Nn.setDetail(e),this.vodDetail=Nn.vodDetail}async setPlay(e,n,r){await Nn.setPlay(e,n,r),this.playUrl=Nn.playUrl,this.result=Nn.result}async setSearch(e,n,r){await Nn.setSearch(e,n,r),this.vodList=Nn.vodList,this.result=Nn.result}async setProxy(e,n){return await Nn.proxy(e,n)}},xo=new ES;async function uW(t,e){return await xo.init(t,e)}async function cW(t,e){return await xo.home(t,e)}async function Zxe(t,e){return await xo.homeVod(t,e)}async function pW(t,e){return await xo.category(t,e)}async function fW(t,e){return await xo.detail(t,e)}async function dW(t,e){return await xo.play(t,e)}async function hW(t,e){return await xo.search(t,e)}async function eAe(t,e){return await xo.proxy(t,e)}var mW={meta:{key:Nn.getJSName(),name:Nn.getName(),type:Nn.getType()},api:async t=>{t.post("/init",uW),t.post("/home",cW),t.post("/category",pW),t.post("/detail",fW),t.post("/play",dW),t.post("/search",hW),t.get("/proxy/:what/:ids/:end",eAe)},spider:{init:uW,home:cW,homeVod:Zxe,category:pW,detail:fW,play:dW,search:hW}};var bS=class extends Fe{constructor(){super(),this.siteUrl="https://frodo.douban.com/api/v2",this.apiKey="0ac44ae016490db2204ce0a042db2916",this.UserAgents=["api-client/1 com.douban.frodo/7.22.0.beta9(231) Android/23 product/Mate 40 vendor/HUAWEI model/Mate 40 brand/HUAWEI rom/android network/wifi platform/AndroidPad","api-client/1 com.douban.frodo/7.18.0(230) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.1.0(205) Android/29 product/perseus vendor/Xiaomi model/Mi MIX 3 rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.3.0(207) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1"]}getHeader(){return{Host:"frodo.douban.com",Connection:"Keep-Alive",Referer: Line truncated
`," ").replaceAll(" \u6536\u8D77","");let u=e('[class="module-tab-item tab-item"]'),c=e('[class="scroll-content"]'),f=[],m=[];for(let d=0;d<u.length;d++){let _=u[d].attribs["data-dropdown-value"];if(_.indexOf("\u5938\u514B")===-1){f.push(_);let S=[];for(let w of e(c[d]).find("a")){let E=e(w).text(),g=w.attribs.href;S.push(E+"$"+g)}m.push(S.join("#"))}}return r.vod_play_from=f.join("$$$"),r.vod_play_url=m.join("$$$"),r}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let l=[e.toString(),"","","","","","","",n.toString(),"","",""],s=[3,11,1,2];i.\u5168\u90E8\u5267\u60C5!==void 0&&i.\u5168\u90E8\u5267\u60C5!=="0"&&(l[s[0]]=i.\u5168\u90E8\u5267\u60C5),i.\u5168\u90E8\u65F6\u95F4!==void 0&&i.\u5168\u90E8\u65F6\u95F4!=="0"&&(l[s[1]]=i.\u5168\u90E8\u65F6\u95F4),i.\u5168\u90E8\u5730\u533A!==void 0&&i.\u5168\u90E8\u5730\u533A!=="0"&&(l[s[2]]=i.\u5168\u90E8\u5730\u533A),i.\u65F6\u95F4\u6392\u5E8F!==void 0&&i.\u65F6\u95F4\u6392\u5E8F!=="0"&&(l[s[3]]=i.\u65F6\u95F4\u6392\u5E8F);let a=this.siteUrl+"/index.php/vodshow/"+l.join("-")+".html",o=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(o)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}uic(e,n){let r=Ve.enc.Utf8.parse("2890"+n+"tB959C"),i=Ve.enc.Utf8.parse("2F131BE91247866E"),l=Ve.AES.decrypt(e,r,{iv:i,mode:Ve.mode.CBC,padding:Ve.pad.Pkcs7});return Ve.enc.Utf8.stringify(l)}async setPlay(e,n,r){let l=(await this.getHtml(this.siteUrl+n))('[id="bfurl"]')[0].attribs.href;if(l.indexOf("http")>-1)this.playUrl=l;else{let s="https://jiexi.xn--1lq90i13mxk5bolhm8k.xn--fiqs8s/player/ec.php?code=ak&if=1&url="+l,o=(await this.getHtml(s)).html(),u=JSON.parse(Se(/let ConFig = (.*?),box = /,o));this.playUrl=this.uic(u.url,u.config.uid)}}async setSearch(e,n){let r=`http://123.207.150.253/zxapi/public/?service=App.F.Fetch&req_p=${e}&type=6080`,i=await this.fetch(r,null,this.getHeader());this.vodList=await this.parseVodShortListFromJson(JSON.parse(i))}},Rn=new SS;var TS=class extends Re{constructor(){super()}getName(){return Rn.getName()}getAppName(){return Rn.getAppName()}getJSName(){return Rn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Rn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Rn.initCookie(e.server.config.bilicookie),await Rn.spiderInit(e),Rn.cfgObj.code=0,Rn.catOpenStatus=!0,Rn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Rn.setClasses(),this.classes=Rn.classes}async setFilterObj(){await Rn.setFilterObj(),this.filterObj=Rn.filterObj}async setHomeVod(){await Rn.setHomeVod(),this.homeVodList=Rn.homeVodList}async setCategory(e,n,r,i){await Rn.setCategory(e,n,r,i),this.vodList=Rn.vodList}async setDetail(e){await Rn.setDetail(e),this.vodDetail=Rn.vodDetail}async setPlay(e,n,r){await Rn.setPlay(e,n,r),this.playUrl=Rn.playUrl,this.result=Rn.result}async setSearch(e,n,r){await Rn.setSearch(e,n,r),this.vodList=Rn.vodList,this.result=Rn.result}async setProxy(e,n){return await Rn.proxy(e,n)}},Oo=new TS;async function SW(t,e){return await Oo.init(t,e)}async function TW(t,e){return await Oo.home(t,e)}async function rAe(t,e){return await Oo.homeVod(t,e)}async function xW(t,e){return await Oo.category(t,e)}async function AW(t,e){return await Oo.detail(t,e)}async function OW(t,e){return await Oo.play(t,e)}async function NW(t,e){return await Oo.search(t,e)}async function iAe(t,e){return await Oo.proxy(t,e)}var CW={meta:{key:Rn.getJSName(),name:Rn.getName(),type:Rn.getType()},api:async t=>{t.post("/init",SW),t.post("/home",TW),t.post("/category",xW),t.post("/detail",AW),t.post("/play",OW),t.post("/search",NW),t.get("/proxy/:what/:ids/:end",iAe)},spider:{init:SW,home:TW,homeVod:rAe,category:xW,detail:AW,play:OW,search:NW}};function lAe(t){return t.replace(/<\/?[^>]+(>|$)/g,"").replace(/&.{1,5};/g,"").replace(/\s{2,}/g," ")}function sAe(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}var xS=class extends Fe{constructor(){super(),this.siteUrl="http://ys.changmengyun.com"}getName(){return"\u{1F383}\u2503\u5357\u74DC\u5F71\u89C6\u2503\u{1F383}"}getAppName(){return"\u5357\u74DC\u5F71\u89C6"}getJSName(){return"nangua"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}getHeader(){let e=new Date().getTime().toString();return{version_name:"1.0.6",version_code:"6",package_name:"com.app.nanguatv",sign:Ve.MD5("c431ea542cee9679#uBFszdEM0oL0JRn@"+e).toString().toLowerCase(),imei:"c431ea542cee9679",timeMillis:e,"User-Agent":"okhttp/4.6.0"}}async setClasses(){let e=JSON.parse(await this.fetch(this.siteUrl+"/api.php/provide/home_nav",null,this.getHeader()));for(let n in e)e[n].name!=="\u7CBE\u9009"&&this.classes.push({type_id:e[n].id,type_name:e[n].name})}async set Line truncated
`),i=[];for(let m of r)B.isEmpty(m.replaceAll(" ","").replaceAll("/",""))||i.push(m.replaceAll(" ","").replaceAll("/",""));n.type_name=i.slice(0,2).join("*");let l=e('[class="video-info-items"]');n.vod_director=e(l[0]).find("a")[0].children[0].data;let s=e(l[1]).find("a"),a=[];for(let m of s)a.push(m.children[0].data);n.vod_actor=a.join(" * "),n.vod_year=i[2],n.vod_remarks=e(e(l[3]).find(".video-info-item")).text(),n.vod_content=e(e(l[5]).find(".video-info-item")).text(),n.vod_area=i[3],n.vod_content=n.vod_content.replace("[\u6536\u8D77\u90E8\u5206]","").replace("[\u5C55\u5F00\u5168\u90E8]","").replaceAll(" ","").replaceAll(`
`,"");let o=e(e('[class="module-tab-content"]')[0]).find("span"),u=e('[class="module-list module-player-list tab-list sort-list "]'),c=[];for(let m of o)c.push(e(m).text());let f=[];for(let m of u){let d=e(e(m).find('[class="sort-item"]')).find("a"),y=[];for(let _ of d){let S=e(_).text(),w=_.attribs.href,E=S+"$"+w;y.push(E)}f.push(y.join("#"))}return n.vod_play_from=c.join("$$$"),n.vod_play_url=B.values(f).join("$$$"),n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),r=[];for(let i of n){let l=new Ne;l.vod_id=e(i).find(".video-serial")[0].attribs.href,l.vod_name=e(i).find(".video-serial")[0].attribs.title,l.vod_pic=e(i).find(".module-item-pic > img")[0].attribs["data-src"],l.vod_remarks="",r.push(l)}return r}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Be(e),r=n(n('[class="nav-menu-items"]')[0]).find("li");for(let i of r.slice(0,6)){let l=n(n(i).find("span")).text();if(l!=="\u9996\u9875"){let a={type_id:n(i).find("a")[0].attribs.href.split("/").slice(-1)[0].split(".")[0],type_name:l};this.classes.push(a)}}}}async getFilter(e){let n=e('[class="scroll-content"]').slice(1),r=[];for(let i=0;i<n.length;i++){let l={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){l.name=e(e(n[i]).find("a")[0]).text(),l.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[i]).find("a").slice(1))e(e(n[i]).find("a")[0]).text()==="\u5168\u90E8\u7C7B\u578B"?l.value.push({n:e(s).text(),v:s.attribs.href.split("/").slice(-1)[0].split(".")[0]}):l.value.push({n:e(s).text(),v:e(s).text()});r.push(l)}else l.name=e(e(n[i]).find("a")[0]).text(),l.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[i]).find("a")[1]).text(),v:"hits"},{n:e(e(n[i]).find("a")[2]).text(),v:"score"}],r.push(l)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/vodshow/id/${n}.html`,i=await this.fetch(r,null,this.getHeader());if(i!=null){let l=Be(i);this.filterObj[n]=await this.getFilter(l)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Be(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}getExtend(e,n,r=""){return e!==void 0&&e!=="0"?r+e:n}async getCateUrl(e,n,r){e=this.getExtend(r[1],e);let i=this.getExtend(r[2],"","/area/"),l=this.getExtend(r[3],"","/lang/"),s=this.getExtend(r[4],"","/year/"),a=this.getExtend(r[5],"","/letter/"),o=this.getExtend(r[6],"","/by/");return this.siteUrl+`/vodshow${o}${i}/id/${e}${l}${a}${s}/page/${n}.html`}async setCategory(e,n,r,i){let l=await this.getCateUrl(e,n,i),s=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(s)){let a=Be(s);this.vodList=await this.parseVodShortListFromDoc(a);let o=Se(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,s);this.limit=72,o.length>0&&(this.total=parseInt(o)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Be(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await this.fetch(this.siteUrl+n,null,this.getHeader());if(!B.isEmpty(i)){let l=Se(/<script type="text\/javascript">var player_aaaa=(.*?)<\/script>/,i),s=JSON.parse(l);this.playUrl=s.url}}async setSearch(e,n){let r=this.siteUrl+`/vodsearch/wd/${e}.html`,i=await this.fetch(r,null,this.getHeader());if(!B.isEmpty(i)){let l=Be(i);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}},Pn=new IS;var kS=class extends Re{constructor(){super()}getName(){return Pn.getName()}getAppName(){return Pn.getAppName()}getJSName(){return Pn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Pn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Pn.initCookie(e.server.config.bilicookie),await Pn.spiderInit(e),Pn.cfgObj.code=0,Pn.catOpenStatus=!0,Pn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Pn.setClasses(),this.classes=Pn.classes}async setFilterObj(){await Pn.setFilterObj(),this.filterObj=Pn.filterObj}async setHomeVod(){await Pn.setHomeVod(),this.homeVodList=Pn.homeVodList}async setCategory(e,n,r,i){await Pn.setCategory(e,n,r,i),this.vodList=Pn.vodList}async setDetail(e){await Pn.setDetail(e),this.vodDetail=Pn.vodDetail}async setPlay(e,n,r){await Pn.setPlay(e,n,r),this.playUrl=Pn.playUrl,this.result=Pn.result}async setSearch(e,n,r){await Pn.setSearch(e,n,r),this.vodList=Pn.vodList,this.result=Pn.result}async setProxy(e,n){return await Pn.proxy(e,n)}},Io=new kS;async function YW(t,e){return await Io.init(t,e)}async function QW(t,e){return await Io.home(t,e)}async function dAe(t,e){return await Io.homeVod(t,e)}async function ZW(t,e){return await Io.category(t,e)}async function eY(t,e){return await Io.detail(t,e)}async function tY(t,e){return await Io.play(t,e)} Line truncated
`,""),B.isEmpty(r.vod_pic)&&(r.vod_pic=Q2+"/resources/dygang.jpg"),r}async parseVodShortListFromDoc(e){let n=[],r=e('[class="index-tj-l"]').find("li");for(let i of r){let l=e(i).find("a")[0],s=this.parseVodShortFromElement(e,l);n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e('[class="index-area clearfix"]').find("li");for(let i of r){let l=e(i).find("a")[0],s=this.parseVodShortFromElement(e,l);n.push(s)}return n}async parseVodDetailFromDoc(e){let n=new Ue,r=e('[ class="ct mb clearfix"]');n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=Se(/◎片  名 (.*?)<br>/,e(r).html()),n.vod_area=Se(/◎产  地 (.*?)<br>/,e(r).html()),n.vod_year=Se(/◎年  代 (.*?)<br>/,e(r).html()),n.type_name=Se(/◎类  别 (.*?)<br>/,e(r).html()),n.vod_remarks=Se(/◎集  数 (.*?)<br>/,e(r).html());let i=Se(/◎主  演 (.*?)<\/p>/s,e(r).html());B.isEmpty(i)&&(i=Se(/◎演  员 (.*?)<\/p>/s,e(r).html()));let l=[];for(let f of i.split(`
`))l.push(f.replaceAll("\u3000\u3000\u3000\u3000&nbsp; \u3000","").replaceAll("<br>","").replaceAll("\u3000\u3000\u3000\u3000\u3000",""));n.vod_actor=l.join("/"),n.vod_director=Se(/◎导  演 (.*?)<br>/,e(r).html()),n.vod_content=Se(/◎简  介<\/p>(.*?)<br>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""),B.isEmpty(n.vod_content)&&(n.vod_content=Se(/◎简  介<br>(.*?)<\/p>/s,e(r).html()).replaceAll("<p>","").replaceAll(`
`,""));let s=[],a=[],o=e('[class="playfrom tab8 clearfix"]'),u=e('[class="videourl clearfix"]');for(let f=0;f<o.length;f++){let m=o[f],d=e(e(m).find("li")).html();s.push(d.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let y=[];for(let _ of e(u[f]).find("a")){let S=_.attribs.title,w=_.attribs.href;y.push(S+"$"+w)}a.push(y.join("#"))}let c=e(e(r).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();s.push(Se(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let m=[];for(let d of e(e(e(r).find("tbody")).find("tr")).find("a")){let y=e(d).html().replaceAll(".mp4",""),_=d.attribs.href;m.push(y+"$"+_)}a.push(m.join("#"))}return n.vod_play_from=s.join("$$$"),n.vod_play_url=a.join("$$$"),n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let l=this.siteUrl+e;i.\u6309\u7C7B\u578B!==void 0&&i.\u6309\u7C7B\u578B!=="0"&&(l=l+`${i.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(l=l+`index_${n}.html`);let s=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setSearch(e,n){let r=this.siteUrl+"/e/search/index.php",i={keyboard:e,submit:"\u641C \u7D22",show:"title,zhuyan",tempid:"1"},l=await this.post(r,i,this.getHeader()),s=Be(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setPlay(e,n,r){if(n.indexOf("http")>-1){let i=await this.getHtml(n),l=Se(/url: '(.*?)',/,i.html());if(B.isEmpty(l)){let s=i(i('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(s,null,{"User-Agent":zr});if(this.playUrl=Se(/url: '(.*?)',/,a),B.isEmpty(this.playUrl)){let o=VV(s);this.playUrl=o+Se(/var main = "(.*?)";/,a)}}else this.playUrl=l}else this.playUrl=n}},jn=new US;var MS=class extends Re{constructor(){super()}getName(){return jn.getName()}getAppName(){return jn.getAppName()}getJSName(){return jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await jn.initCookie(e.server.config.bilicookie),await jn.spiderInit(e),jn.cfgObj.code=0,jn.catOpenStatus=!0,jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await jn.setClasses(),this.classes=jn.classes}async setFilterObj(){await jn.setFilterObj(),this.filterObj=jn.filterObj}async setHomeVod(){await jn.setHomeVod(),this.homeVodList=jn.homeVodList}async setCategory(e,n,r,i){await jn.setCategory(e,n,r,i),this.vodList=jn.vodList}async setDetail(e){await jn.setDetail(e),this.vodDetail=jn.vodDetail}async setPlay(e,n,r){await jn.setPlay(e,n,r),this.playUrl=jn.playUrl,this.result=jn.result}async setSearch(e,n,r){await jn.setSearch(e,n,r),this.vodList=jn.vodList,this.result=jn.result}async setProxy(e,n){return await jn.proxy(e,n)}},jo=new MS;async function _Y(t,e){return await jo.init(t,e)}async function EY(t,e){return await jo.home(t,e)}async function wAe(t,e){return await jo.homeVod(t,e)}async function bY(t,e){return await jo.category(t,e)}async function wY(t,e){return await jo.detail(t,e)}async function SY(t,e){return await jo.play(t,e)}async function TY(t,e){return await jo.search(t,e)}async function SAe(t,e){return await jo.proxy(t,e)}var xY={meta:{key:jn.getJSName(),name:jn.getName(),type:jn.getType()},api:async t=>{t.post("/init",_Y),t.post("/home",EY),t.post("/category",bY),t.post("/detail",wY),t.post("/play",SY),t.post("/search",TY),t.get("/proxy/:what/:ids/:end",SAe)},spider:{init:_Y,home:EY,homeVod:wAe,category:bY,detail:wY,play:SY,search:TY}};var $S=class extends Fe{constructor(){super(),this.siteUrl="https://tvfan.xxooo.cf",this.woggTypeObj={\u73A9\u5076\u7535\u5F71:"\u7535\u5F71",\u73A9\u5076\u5267\u96C6:"\u7535\u89C6\u5267"}}async init(e){await super.init(e),await qi(this.cfgObj.token),this.danmuStaus=!0}getName(){return"\u{1F482}\u200D\u2503\u963F\u91CC\u73A9\u5076\u2503\u{1F482}"}getAppName(){return"\u963F\u91CC\u73A9\u5076"}getJSName(){return"wogg"}getType(){return 3}async parseVodShortListFromDoc(e){let n=e(".module-item"),r=[];for(let i of n){let l=new Ne,s=e(i).find(".module-item-cover .module-item-pic a").first();l.vod_id=s.attr("href"),l.vod_name=s.attr("title"),l.vod_pic=e(i).find(".module-item-cover .module-item-pic img").first().attr("data-src"),l.vod_pic.indexOf("img.php?url=")>0&&(l.vod_pic=l.vod_pic.split("img.php?url=")[1]),l.vod_remarks=e(i).find(".module-item-text").first().text(),r.push(l)}return r}async parseVodDetailFromDoc(e){let n=new Ue;n.vod_name=e(".page-title")[0].children[0].data,n.vod_pic=e(e(".mobile-play")).find(".lazyload")[0].attribs["data-src"],n.type_name=this.woggTypeObj[e('[class="video-info-aux"]').find("a")[0].attribs.title];let r=e(".video-info-items");n.vod_director=e(r[0]).find("a")[0].children[0].data;let i=e(r[1 Line truncated
`,"").replace(" ","").replace("\u73A9\u5076",""),a={type_id:l,type_name:s};this.classes.push(a)}}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),r=[];for(let i=0;i<n.length;i++){let l={key:(i+1).toString(),name:"",value:[]};if(i<n.length-1){l.name=e(e(n[i]).find("a")[0]).text(),l.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[i]).find("a").slice(1))l.value.push({n:e(s).text(),v:e(s).text()});r.push(l)}else l.name=e(e(n[i]).find("a")[0]).text(),l.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[i]).find("a")[1]).text(),v:"hits"},{n:e(e(n[i]).find("a")[2]).text(),v:"score"}],r.push(l)}return r}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let r=this.siteUrl+`/index.php/vodshow/${n}--------1---.html`,i=await this.fetch(r,null,this.getHeader());if(i!=null){let l=Be(i);this.filterObj[n]=await this.getFilter(l)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Be(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,r,i){let l=[e.toString(),"","","","","","","",n.toString(),"","",""],s=this.get_extend_sort_dic(parseInt(e));for(let u of Object.keys(s))i[u]==="0"?l[s[u]]="":l[s[u]]=i[u];let a=this.siteUrl+"/index.php/vodshow/"+l.join("-")+".html",o=await this.fetch(a,null,this.getHeader());if(!B.isEmpty(o)){let u=Be(o);this.vodList=await this.parseVodShortListFromDoc(u);let c=Se(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,o);this.limit=72,c.length>0&&(this.total=parseInt(c)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,r=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(r)){let i=Be(r);this.vodDetail=await this.parseVodDetailFromDoc(i)}}async setPlay(e,n,r){let i=await xl(e,n,r);this.playUrl=JSON.parse(i).url}async setSearch(e,n){let r=this.siteUrl+"/index.php/vodsearch/-------------.html?wd="+e,i=await this.fetch(r,null,this.getHeader());if(!B.isEmpty(i)){let l=Be(i);this.vodList=await this.parseVodShortListFromDocBySearch(l)}}},Un=new $S;var BS=class extends Re{constructor(){super()}getName(){return Un.getName()}getAppName(){return Un.getAppName()}getJSName(){return Un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Un.setClasses(),this.classes=Un.classes}async setFilterObj(){await Un.setFilterObj(),this.filterObj=Un.filterObj}async setHomeVod(){await Un.setHomeVod(),this.homeVodList=Un.homeVodList}async setCategory(e,n,r,i){await Un.setCategory(e,n,r,i),this.vodList=Un.vodList}async setDetail(e){await Un.setDetail(e),this.vodDetail=Un.vodDetail}async setPlay(e,n,r){await Un.setPlay(e,n,r),this.playUrl=Un.playUrl,this.result=Un.result}async setSearch(e,n,r){await Un.setSearch(e,n,r),this.vodList=Un.vodList,this.result=Un.result}async setProxy(e,n){return await Un.proxy(e,n)}},Uo=new BS;async function AY(t,e){return await Uo.init(t,e)}async function OY(t,e){return await Uo.home(t,e)}async function TAe(t,e){return await Uo.homeVod(t,e)}async function NY(t,e){return await Uo.category(t,e)}async function CY(t,e){return await Uo.detail(t,e)}async function RY(t,e){return await Uo.play(t,e)}async function IY(t,e){return await Uo.search(t,e)}async function xAe(t,e){return await Uo.proxy(t,e)}var kY={meta:{key:Un.getJSName(),name:Un.getName(),type:Un.getType()},api:async t=>{t.post("/init",AY),t.post("/home",OY),t.post("/category",NY),t.post("/detail",CY),t.post("/play",RY),t.post("/search",IY),t.get("/proxy/:what/:ids/:end",xAe)},spider:{init:AY,home:OY,homeVod:TAe,category:NY,detail:CY,play:RY,search:IY}};var HS=class extends Fe{constructor(){super(),this.siteUrl="https://www.pansearch.me/"}getName(){return"\u{1F5C2}\uFE0F\u2503\u963F\u91CC\u76D8\u641C\u2503\u{1F5C2}\uFE0F"}getAppName(){return"\u963F\u91CC\u76D8\u641C"}getJSName(){return"pan_search"}getType(){return 3}getSearchHeader(){let e=this.getHeader();return e["x-nextjs-data"]="1",e}async init(e){await super.init(e),await qi(this.cfgObj.token)}async parseVodDetailfromJson(e){let n=JSON.parse(e),r=new Ue,i=n.content.split(`
`);r.vod_name=i[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let l=new Date(n.time);r.vod_remarks=l.toLocaleDateString().replace(/\//g,"-")+" "+l.toTimeString().substr(0,8),r.vod_pic=n.image;let s="";for(let a of i)a.indexOf("\u63CF\u8FF0")>-1&&(r.vod_content=a.replace("\u63CF\u8FF0\uFF1A","").replaceAll(/<\\?[^>]+>/g,"")),a.indexOf("\u6807\u7B7E\uFF1A")>-1&&(r.type_name=a.replace("\u{1F3F7} \u6807\u7B7E\uFF1A","")),a.indexOf("\u94FE\u63A5\uFF1A")>-1&&(s=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await Tl([s]);r.vod_play_url=a.vod_play_url,r.vod_play_from=a.vod_play_from}catch(a){await this.jadeLog.error(`\u83B7\u53D6\u963F\u91CC\u89C6\u9891\u64AD\u653E\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}return r}async parseVodShortListFromDocBySearch(e,n){let r=[],i=JSON.parse(e("script[id=__NEXT_DATA__]")[0].children[0].data).buildId,l=this.siteUrl+"_next/data/"+i+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",s=await this.fetch(l,null,this.getSearchHeader());if(B.isEmpty(s))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(s).pageProps.data.data;for(let o of a){let u=new Ne;u.vod_id=JSON.stringify(o);let c=o.content.split(`
`);u.vod_name=c[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let f=new Date(o.time);u.vod_remarks=f.toLocaleDateString().replace(/\//g,"-")+" "+f.toTimeString().substr(0,8),u.vod_pic=o.image,r.push(u)}return r}}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setSearch(e,n){let r=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(r)){let i=Be(r);this.vodList=await this.parseVodShortListFromDocBySearch(i,e)}}async play(e,n,r){return await xl(e,n,r)}},Mn=new HS;var VS=class extends Re{constructor(){super()}getName(){return Mn.getName()}getAppName(){return Mn.getAppName()}getJSName(){return Mn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Mn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Mn.initCookie(e.server.config.bilicookie),await Mn.spiderInit(e),Mn.cfgObj.code=0,Mn.catOpenStatus=!0,Mn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Mn.setClasses(),this.classes=Mn.classes}async setFilterObj(){await Mn.setFilterObj(),this.filterObj=Mn.filterObj}async setHomeVod(){await Mn.setHomeVod(),this.homeVodList=Mn.homeVodList}async setCategory(e,n,r,i){await Mn.setCategory(e,n,r,i),this.vodList=Mn.vodList}async setDetail(e){await Mn.setDetail(e),this.vodDetail=Mn.vodDetail}async setPlay(e,n,r){await Mn.setPlay(e,n,r),this.playUrl=Mn.playUrl,this.result=Mn.result}async setSearch(e,n,r){await Mn.setSearch(e,n,r),this.vodList=Mn.vodList,this.result=Mn.result}async setProxy(e,n){return await Mn.proxy(e,n)}},Mo=new VS;async function DY(t,e){return await Mo.init(t,e)}async function PY(t,e){return await Mo.home(t,e)}async function AAe(t,e){return await Mo.homeVod(t,e)}async function LY(t,e){return await Mo.category(t,e)}async function FY(t,e){return await Mo.detail(t,e)}async function jY(t,e){return await Mo.play(t,e)}async function UY(t,e){return await Mo.search(t,e)}async function OAe(t,e){return await Mo.proxy(t,e)}var MY={meta:{key:Mn.getJSName(),name:Mn.getName(),type:Mn.getType()},api:async t=>{t.post("/init",DY),t.post("/home",PY),t.post("/category",LY),t.post("/detail",FY),t.post("/play",jY),t.post("/search",UY),t.get("/proxy/:what/:ids/:end",OAe)},spider:{init:DY,home:PY,homeVod:AAe,category:LY,detail:FY,play:jY,search:UY}};var NAe=["4k","4K"],qS=class extends Fe{constructor(){super(),this.siteUrl="https://www.alypw.com"}async init(e){await super.init(e),await qi(this.cfgObj.token)}getName(){return"\u{1F94F}\u200D\u2503\u963F\u91CC\u4E91\u76D8\u5206\u4EAB\u2503\u{1F94F}\u200D"}getAppName(){return"\u963F\u91CC\u4E91\u76D8\u5206\u4EAB"}getJSName(){return"aliyunpanshare"}getType(){return 3}getRemarks(e,n){if(B.isEmpty(e)){for(let r of NAe)if(n.indexOf(r)>-1)return r}else return e}parseVodName(e){let n=Se(/\[阿里云盘](.*?) /,e);return e.indexOf("\u5408\u96C6")>-1||(B.isEmpty(n)&&(n=Se(/\[阿里云盘](.*?)(/,e)),n.indexOf("[")>-1&&(n=n.split("[")[0]),n.indexOf("\u3010")>-1&&(n=n.split("\u3010")[0]),n==="4K")?"":n}async parseVodShortListFromDoc(e){let n=[],r=e(e('[class="hometab"]').find('[class="box"]')).find("li");for(let i of r){let l=e(i).find('[class="imgr"]')[0],s=new Ne;s.vod_id=e(l).find("a")[0].attribs.href;let a=e(l).find("a")[0].attribs.title;s.vod_name=this.parseVodName(a),s.vod_pic=e(i).find("img")[0].attribs.src,s.vod_remarks=this.getRemarks(Se(/【(.*?)】/,a),a),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],r=e('[class="main container"]'),i=e(e(r).find('[class="list"]')).find("li");i.length===0&&(i=e(r).find("li"));for(let l of i){let s=e(l).find("img")[0].attribs.alt.replaceAll("<strong>","").replaceAll("</strong>",""),a=new Ne;a.vod_id=e(l).find("a")[0].attribs.href,a.vod_name=this.parseVodName(s),a.vod_pic=e(l).find("img")[0].attribs.src,a.vod_remarks=this.getRemarks(Se(/【(.*?)】/,s),s),B.isEmpty(a.vod_name)||n.push(a)}return n}async parseVodDetailFromDoc(e){let n=e('[class="mainl"]'),r=e(e(n).find('[class="title"]')[0]).text(),i=new Ue;i.vod_name=Se(/\[阿里云盘](.*?) /,r),i.vod_remarks=this.getRemarks(Se(/【(.*?)】/,r),r);let l=e(n).find('[class="article_content"]');i.vod_pic=e(l).find("p>img")[0].attribs.src;let s=e(l).find("p"),a="";for(let f of s)a=a+e(f).text()+`
`;let o=[],u=Se(lu,a).split(`
`);for(let f of u){let m=f.match(lu);B.isEmpty(m)||o.push(m[1])}let c=await Tl(o);return i.vod_play_url=c.vod_play_url,i.vod_play_from=c.vod_play_from,i.type_name=Se(/标签(.*?)\n/,a).replaceAll("\uFF1A",""),i.vod_content=Se(/描述(.*?)\n/,a).replaceAll("\uFF1A",""),i}async setClasses(){let e=await this.getHtml(),n=e("[id^='navbar-category']").find("a"),r=["\u5F71","\u5267","4K","\u89C6","\u97F3","\u6F14","\u52A8\u6F2B"];for(let i of n){let l=e(i).text(),s=i.attribs.href,a=!1;for(let o of r)l.indexOf(o)>-1&&(a=!0);a&&this.classes.push(this.getTypeDic(l,s))}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,r,i){let l=e.split(".html")[0]+"_"+n+".html",s=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setPlay(e,n,r){let i=await xl(e,n,r);this.playUrl=JSON.parse(i).url}async setSearch(e,n){let r=this.siteUrl+`/search.php?q=${e}`,i=await this.getHtml(r);this.vodList=await this.parseVodShortListFromDocByCategory(i)}},$n=new qS;var zS=class extends Re{constructor(){super()}getName(){return $n.getName()}getAppName(){return $n.getAppName()}getJSName(){return $n.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await $n.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await $n.initCookie(e.server.config.bilicookie),await $n.spiderInit(e),$n.cfgObj.code=0,$n.catOpenStatus=!0,$n.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await $n.setClasses(),this.classes=$n.classes}async setFilterObj(){await $n.setFilterObj(),this.filterObj=$n.filterObj}async setHomeVod(){await $n.setHomeVod(),this.homeVodList=$n.homeVodList}async setCategory(e,n,r,i){await $n.setCategory(e,n,r,i),this.vodList=$n.vodList}async setDetail(e){await $n.setDetail(e),this.vodDetail=$n.vodDetail}async setPlay(e,n,r){await $n.setPlay(e,n,r),this.playUrl=$n.playUrl,this.result=$n.result}async setSearch(e,n,r){await $n.setSearch(e,n,r),this.vodList=$n.vodList,this.result=$n.result}async setProxy(e,n){return await $n.proxy(e,n)}},$o=new zS;async function $Y(t,e){return await $o.init(t,e)}async function BY(t,e){return await $o.home(t,e)}async function CAe(t,e){return await $o.homeVod(t,e)}async function HY(t,e){return await $o.category(t,e)}async function VY(t,e){return await $o.detail(t,e)}async function qY(t,e){return await $o.play(t,e)}async function zY(t,e){return await $o.search(t,e)}async function RAe(t,e){return await $o.proxy(t,e)}var GY={meta:{key:$n.getJSName(),name:$n.getName(),type:$n.getType()},api:async t=>{t.post("/init",$Y),t.post("/home",BY),t.post("/category",HY),t.post("/detail",VY),t.post("/play",qY),t.post("/search",zY),t.get("/proxy/:what/:ids/:end",RAe)},spider:{init:$Y,home:BY,homeVod:CAe,category:HY,detail:VY,play:qY,search:zY}};var GS=class extends Fe{constructor(){super(),this.siteUrl="https://www.cilixiong.com",this.cateObj={"/movie/":"1","/drama/":"2"}}getAppName(){return"\u78C1\u529B\u718A"}getName(){return"\u{1F43B}\u2503\u78C1\u529B\u718A\u2503\u{1F43B}"}getJSName(){return"cilixiong"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e('[class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0"]').find("li");for(let r of n){let i=e(r).find("a")[0],l=e(i).text(),s=i.attribs.href;l!=="\u9996\u9875"&&l!=="\u699C\u5355"&&l!=="\u7559\u8A00"&&this.classes.push(this.getTypeDic(l,s))}}async getFilter(e){let n=[],r=e('[class="nav small"]'),i=1;for(let l of r){let s=e(e(l).find("li")[0]).text().replaceAll("\uFF1A",""),a={key:i.toString(),name:s,value:[]};for(let o of e(l).find("li").slice(1)){let u=e(o).find("a")[0],c=u.attribs.href.split("-")[i];a.value.push({n:e(u).text(),v:c})}i=i+1,n.push(a)}return n}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="\u6700\u8FD1\u66F4\u65B0"){let r=await this.getHtml(this.siteUrl+n);this.filterObj[n]=await this.getFilter(r)}}}async parseVodShortListFromDoc(e){let n=[],r=e('[class="col"]');for(let i of r){let l=new Ne;l.vod_id=e(i).find("a")[0].attribs.href,l.vod_pic=Se(/background-image: url\('(.*?)'\)/,e(i).find('[class="card-img"]')[0].attribs.style),l.vod_name=e(e(i).find("h2")).text();let s=e(e(i).find('[class="rank bg-success p-1"]')).text();l.vod_remarks="\u8BC4\u5206:"+s,s!=="AD"&&n.push(l)}return n}async parseVodShortListFromDocBySearch(e){let n=[],r=e('[class="card card-cover h-100 overflow-hidden text-bg-dark rounded-4 shadow-lg position-relative"]');for(let i of r){let l=new Ne;l.vod_id=e(i).find("a")[0].attribs.href,l.vod_name=e(e(i).find('[class="pt-5 lh-1 pb-2 h4"]')).text(),l.vod_pic=Se(/background-image: url\('(.*?)'\)/,e(i).find('[class="card-img"]')[0].attribs.style),l.vod_remarks="\u8BC4\u5206:"+e(e(i).find('[class="rank Line truncated
`,"").replaceAll(" ","").replaceAll(" ","")+"end";if(u.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=Se(/年份:(.*?)end/,u).replaceAll("/","")),u.indexOf("\u5907\u6CE8")>-1){let c=Se(/备注:(.*?)end/,u);e.vod_remarks=Se(/备注:\/(.*?)end/,u)}u.indexOf("\u6807\u7B7E")>-1&&(e.type_name=Se(/标签:(.*?)end/,u)),u.indexOf("\u5267\u60C5")>-1&&(e.vod_content=Se(/剧情:(.*?)end/,u))}let i=t('[class="module-tab-item tab-item"]'),l=t('[class="scroll-content"]'),s=[],a=[];for(let o=0;o<i.length;o++){let u=i[o];s.push(u.attribs["data-dropdown-value"]);let c=[];for(let f of t(l[o]).find("a")){let m=t(f).text(),d=f.attribs.href;c.push(m+"$"+d)}a.push(c.join("#"))}return e.vod_play_from=s.join("$$$"),e.vod_play_url=a.join("$$$"),e}async setHomeVod(){let t=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(t)}getExtendValue(t,e){return t[e]===void 0||t[e]==="0"?"":t[e]}async setCategory(t,e,n,r){await this.jadeLog.debug(`extend:${JSON.stringify(r)}`);let i=this.getExtendValue(r,"1"),l=this.getExtendValue(r,"2"),s=this.getExtendValue(r,"3"),a=this.getExtendValue(r,"4"),o=[t.toString(),"",a,i,"",s,"","",e.toString(),"","",l],u=this.siteUrl+"/show/"+o.join("-")+".html",c=await this.getHtml(u);this.vodList=await this.parseVodShortListFromDocByCategory(c)}async setDetail(t){let e=await this.getHtml(this.siteUrl+t);this.vodDetail=await this.parseVodDetailFromDoc(e)}async setSearch(t,e){let n=this.siteUrl+`/search/${t}-------------.html`,r=await this.getHtml(n);this.vodList=await this.parseVodShortListFromDocBySearch(r)}async setPlay(t,e,n){let r=await this.getHtml(this.siteUrl+e),l="https://danmu.yhdmjx.com/m3u8.php?url="+JSON.parse(Se(/var player_aaaa=(.*?)<\/script>/,r.html())).url,s=await await this.fetch(l,null,this.getHeader()),a=s.match(/"url": getVideoInfo\("(.*?)"\),/)[1],o=s.match(/<script>var bt_token = "(.*?)"/)[1],u=await await this.fetch("https://danmu.yhdmjx.com/js/play.js",null,this.getHeader());u=u.match(/var _token_key=CryptoJS\['enc'\]\['Utf8'\]\[_0x17f1\('67','qETJ'\)\]\((.*?\))/)[1],u=this.decrypt_token_key(u),this.playUrl=await this.getVideoInfo(a,u,o)}decrypt_token_key(toekn_key){var _0xod4="jsjiami.com.v6",_0x175e=[_0xod4,"JMOsw6omwoDCmw==","wp3DkSx5Eg==","HB7CscOJfS3DuUjDv2bDjsOmwr3Cm8KcwoI=","fR/Dqg==","ShRGTcKa","w5Y8VBs=","esKYKQ==","FgIdwrPDnMKOw7k=","HhXCmA==","woNrRsKSwpnDvcKfw4g=","ezBn","w43DkcK5w4MaJiE=","w44Ob8KjwrjCrMKtUA==","HwtswqI=","YsKnwrRawro=","Sm/CpQXCjz4RH8ORSXw=","IsO6w64=","T8OeAQ==","VcK4Hg==","csOmfBJ4","d8OAcA5L","Tn4RL2s=","w7goGizCmw==","w6XDlcOGwpoY","TsK7wpNPwrg=","w7J1CzLCnsO+HA==","w4XDkcK0w5YXPg==","S8KoCcKS","PcKWHcK/Eg==","Z2oMJ3rCiw==","YsKMG8KMwo0=","QsOecgRIwp4=","dFzDkUUxw48Qw7nCmX3CicODCMKnw74IOg==","acO2KU1B","wrAnw6DDrg==","w5MsScKwwoA=","wohZG8KhBg==","b8OieSpZ","w4ZmEsORw6I=","w7jDhxvCh8KY","w7wQa8KFwr0=","IMObw4E3wqU=","JsOjw5Erwrg=","w6MwcsKOwqU=","b8KIwqF0wrs=","XhXDvT52","wrDCmirChSE=","w5t1wpvDuwE=","XA7CtsKeEA==","wonCvVthw78=","U8KPP8KMwq4=","wp7DhCxjGTU=","woPDoBdiEQ==","HjzCrE/Dvg==","SsOQOWHCgg==","w6NdwoXCkMOx","w6shYWQ/","eE/Cgg==","XW/Csj7CmDoA","w680OynCgcK5BA8=","w4PDoMOTwrog","w5R7wqbCpMOPwrMxUcOiM8OuMVLCisKKFsOXAcOWY8O6w5hM","WwjDoht0","PzXCiHHDiA==","QMOFaMKcfQ==","bz9bVsK+","w7Npwp/DsB9ONw==","EcOPBQ3Cig==","woHDnzk=","DsKQLxtd","R8OCJmk=","wp55O8On","bkXCmhTCqg==","w7vDgx3Cg8KU","w6nDo8KdAn8=","O8KwP8KEDw==","wqzCtCHCtCg=","w5nDgmYhw5c=","wp0OZsK+w4A=","wrFxe8KFwp/DvcKew4EbN8K7BMORMx3DuxtOVELChsOEIQ==","BMKWRDc=","IS5dw6nDhQ==","w6geeG8t","SsK/wohywpc=","LBlnw7jDkA==","wodiLsOg","Ig5Ow7/Dlw==","TMOOewRZwoQ=","LjnClV7DvA==","woZsO8KcPQ==","eWvClMKeKQ==","wq1KWsKswr8=","w4p+AGFa","C8O7F8K2CQcKFxxgwo5sfh3DpAFV","w6XDqMKoCw==","w6Z8wqnCpMOe","w6x/CHRhXhV/w7I=","wrvClndGw5Y=","VsKcwo5RwoA=","ZcK2BMKmLQ==","BCcPwofDvQ==","eGEsF20=","eMOcUglq","w4U9XEAMw4/Dm3rCuzpxTg/DvyDDvMONH8OTwpTCtsKbw6k=","VwXDkTxG","CzHCrl3DkQ==","w7PDkVovw4o=","dsONYDdj","w79pwr3Duh4=","w55kwoLCpMOR","w6gbc8KGwpw=","bCnCtMKCCg==","Php5w64=","w7x8wpfDtiQ=","w4TDk2AB","w7lowoHDtgQ=","DB/CsnjDuQ==","woTDl8K3wp4S","wr0Ewq7Dq8Oh","GmHCpGxN","w5/Dm2XDpw==","w5bDpsOCwqoA","YMKowphwwqc=","ahFuVsK9","w57DtEsbw7k=","w6LDo8Kq","UsKzE8KO","w6xlBFl9","WMOgIXbCiw==","DBhjw5fDhQ==","w6pUwoHCnsOs","ZF7CtsKiHg==","wos4w7wCwr0c","JlXCjlpyw5pMw6s=","TcO1N8K4wqE=","SMOzTcKYRw==","w4HDosOzwrUc","wqxdwqE2wrY=","A8OPGQjChw==","wpkxasOxBQ==","wpIZSA==","VsOnEEvChg==","bMOSZy93","c8OwZsKnRQ==","SsK/wpBHwoQ=","ccOsHVFf","w6ZKYMO8w6rDr8OrCHxdwqtdwrDDksOMccKZwobDpQPDgsOrAMKXF8OMPcOySsKuL8KLwq8vwr/DkjbDqsOCbRrCkcOTTFfDlsKkw7PChCM1wqTDisKawpHDt8KCQRY3w6DDgMKVw6M=","w7hYwq3ClsOa","Fic5wqLDiw==","KcKqHCVV","wqvDucKSwrs/","YcOfQcKPSQ==","wpjClmNRw7U=","wpHClSnCizg=","w4PDh8Kw","JsOYGwnCpw==","w5vDksK8w6sl","U8ORCHt+Rw==","woVxO8OSJQ==","b37Chw/Clw==","w6ViBXZlQg==","UwPCucKQCgU=","UMOeZgs=","MTLCtW7Dq2o=","wqAQwr/DqcOi","DiLDtsOOZsKEbsOrGm03EcKEwr/CplQ=","dzPDnRhP","wplgT8KBwow=","XUzCg8KF","K8KTCcKrCQ==","w6ZKJMOw","LxTCmn/DsA==","wooObcKBw6g=","w5djwofDoTQ=","VMOHeAts","Kw96 Line truncated
`).trim(),n=l("a.Readpage_down")[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:i+`
</MPD>`}async proxy(e,n){let l=e[0],r=_2(e[1]);if(l==="dash"){let i=r.split("+"),s=i[0],a=i[1],u=i[2],o=this.apiUrl+`/x/player/playurl?avid=${s}&cid=${a}&qn=${u}&fnval=4048&fourk=1`,c="",f="",m=await this.fetch(o,null,n),d=JSON.parse(m),y=d.data.dash,_=y.video,S=y.audio;for(let E=0;E<_.length;E++){let g=_[E];g.id.toString()===u&&(c+=this.getDashMedia(g))}for(let E=0;E<S.length;E++){let g=S[E];for(let v in this.vod_audio_id)g.id.toString()===v&&(f+=this.getDashMedia(g))}let w=this.getDash(d,c,f);return JSON.stringify({code:200,content:w,headers:{"Content-Type":"application/dash+xml"}})}return JSON.stringify({code:500,content:""})}},xn=new _S;var ES=class extends Ce{constructor(){super()}getName(){return xn.getName()}getAppName(){return xn.getAppName()}getJSName(){return xn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await xn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await xn.initCookie(e.server.config.bilicookie),await xn.spiderInit(e),xn.cfgObj.code=0,xn.catOpenStatus=!0,xn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await xn.setClasses(),this.classes=xn.classes}async setFilterObj(){await xn.setFilterObj(),this.filterObj=xn.filterObj}async setHomeVod(){await xn.setHomeVod(),this.homeVodList=xn.homeVodList}async setCategory(e,n,l,r){await xn.setCategory(e,n,l,r),this.vodList=xn.vodList}async setDetail(e){await xn.setDetail(e),this.vodDetail=xn.vodDetail}async setPlay(e,n,l){await xn.setPlay(e,n,l),this.playUrl=xn.playUrl,this.result=xn.result}async setSearch(e,n,l){await xn.setSearch(e,n,l),this.vodList=xn.vodList,this.result=xn.result}async setProxy(e,n){return await xn.proxy(e,n)}},ba=new ES;async function zX(t,e){return await ba.init(t,e)}async function GX(t,e){return await ba.home(t,e)}async function iAe(t,e){return await ba.homeVod(t,e)}async function JX(t,e){return await ba.category(t,e)}async function KX(t,e){return await ba.detail(t,e)}async function XX(t,e){return await ba.play(t,e)}async function WX(t,e){return await ba.search(t,e)}async function sAe(t,e){return await ba.proxy(t,e)}var YX={meta:{key:xn.getJSName(),name:xn.getName(),type:xn.getType()},api:async t=>{t.post("/init",zX),t.post("/home",GX),t.post("/category",JX),t.post("/detail",KX),t.post("/play",XX),t.post("/search",WX),t.get("/proxy/:what/:ids/:end",sAe)},spider:{init:zX,home:GX,homeVod:iAe,category:JX,detail:KX,play:XX,search:WX}};var bS=class extends Pe{constructor(){super(),this.siteUrl="https://www.xb6v.com"}getName(){return"\u{1F9F2}\u2503\u78C1\u529B\u65B06V\u2503\u{1F9F2}"}getAppName(){return"\u78C1\u529B\u65B06V"}getJSName(){return"xb6v"}getType(){return 3}async redirect(e){await this.jadeLog.debug(`\u91CD\u5B9A\u5411\u56DE\u590D\u503C\u4E3A:${e.content}`);let n=/<a HREF=(.*?)>/.exec(e.content);if(n.length>1){let l=this.siteUrl+"/e/search/"+n[1].replaceAll("\\","").replaceAll('"',"");return await this.jadeLog.info(`\u91CD\u5B9A\u5411url\u4E3A:${l}`),await this.fetch(l,null,this.getHeader())}}getActorOrDirector(e,n){return we(e,n).replace(/<br>/g,"").replace(/&nbsp;./g,"").replace(/&amp;/g,"").replace(/middot;/g,"\u30FB").replace(/     /g,",").replace(/      /g,",").replace(/ /g,"")}getDescription(e,n){return we(e,n).replace(/<\/?[^>]+>/g,"").replace(/\n/g,"").replace(/&amp;/g,"").replace(/middot;/g,"\u30FB").replace(/ldquo;/g,"\u3010").replace(/rdquo;/g,"\u3011").replace(/ /g,"")}async parseVodShortListFromDoc(e){let n=e("#post_container .post_hover"),l=[];for(let r of n){let i=e(r).find("[class=zoom]")[0],s=new Ne;s.vod_id=i.attribs.href,s.vod_name=i.attribs.title.replaceAll(/<\\?[^>]+>/g,""),s.vod_pic=e(i).find("img")[0].attribs.src,s.vod_remarks=e(r).find('[rel="category tag"]').text().replaceAll(`
`,"").replaceAll(" ",""),l.push(s)}return l}async parseVodDetailFromDoc(e){let n=e("#post_content"),l=[],r=[];if(!this.catOpenStatus){let u=0,o="\u78C1\u529B\u7EBF\u8DEF";for(let c of n){let f=e(c).find("table a"),m=[];for(let d of f){let y=d.attribs.href,_=d.children[0].data;y.toLowerCase().startsWith("magnet")&&m.push(_+"$"+y)}m.length>0&&(u++,l.push(o+u),r.push(m.join("#")))}}let i=e(e(".mainleft")).find('[class="widget box row"]');for(let u of i){let o=e(u).find("h3").text(),c=[];if(!B.isEmpty(o)){let f=e(u).find("a");for(let m of f)c.push(m.attribs.title+"$"+m.attribs.href);l.push(o),r.push(c.join("#"))}}let s=e(".context").html(),a=new Me;return a.vod_name=e(".article_container > h1").text(),a.vod_pic=e("#post_content img").attr("src"),a.type_name=we(/◎类  别 (.*?)<br>/,s),B.isEmpty(a.type_name)&&(a.type_name=e('[rel="category tag"]').text()),a.vod_year=we(/◎年  代 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_year=we(/首播:(.*?)<br>"/,s)),a.vod_area=we(/◎产  地 (.*?)<br>/,s),B.isEmpty(a.vod_year)&&(a.vod_area=we(/地区:(.*?)<br>"/,s)),a.vod_remarks=we(/◎上映日期 (.*?)<br>/,s),a.vod_actor=this.getActorOrDirector(/◎演  员 (.*?)<\/p>/,s),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/◎主  演 (.*?)<\/p>/,s)),B.isEmpty(a.vod_actor)&&(a.vod_actor=this.getActorOrDirector(/主演:(.*?)<br>/,s)),a.vod_director=this.getActorOrDirector(/◎导  演 (.*?)<br>/,s),B.isEmpty(a.vod_director)&&(a.vod_director=this.getActorOrDirector(/导演:(.*?)<br>/,s)),a.vod_content=this.getDescription(/◎简  介(.*?)<hr>/gi,s),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/简介(.*?)<\/p>/gi,s)),B.isEmpty(a.vod_content)&&(a.vod_content=this.getDescription(/◎简  介(.*?)<br>/gi,s)),a.vod_play_from=l.join("$$$"),a.vod_play_url=r.join("$$$"),a}async parseVodPlayFromDoc(e,n){let l="",r=n.html();switch(e){case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u63D2\u4EF6 \u6781\u901F\u64AD\u653E\uFF09":case"\u64AD\u653E\u5730\u5740\u4E09":l=n(n(".video")).find("iframe")[0].attribs.src+"/index.m3u8";break;case"\u64AD\u653E\u5730\u5740\uFF08\u65E0\u9700\u5B89\u88C5\u63D2\u4EF6\uFF09":let i=/url: '(.*?)',/gs.exec(r);i.length>1&&(l=i[1]);break;case"\u64AD\u653E\u5730\u5740\u56DB":let s=/source: "(.*?)",/gs.exec(r);s.length>1&&(l=s[1]);break;default:await this.jadeLog.warning(`\u6682\u4E0D\u652F\u6301\u5F53\u524D\u683C\u5F0F,\u5F53\u524D\u683C\u5F0F\u4E3A:${e}`);break}return l}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e),l=n("#menus > li > a");for(let r=0;r<l.length;r++){let i=l[r];if(r<2||r===l.length-1)continue;let s=i.children[0].data,a=i.attribs.href;if(this.classes.push({type_name:s,type_id:a}),s==="\u7535\u89C6\u5267"){let u=[{n:"\u4E0D\u9650",v:""}];for(let o of n(i.next).find("a"))u.push({n:o.children[0].data,v:o.attribs.href.replaceAll(a,"")});this.filterObj[a]=[{key:"cateId",name:"\u7C7B\u578B",value:u}]}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(B.isEmpty(e))await this.jadeLog.info("\u9996\u9875\u7C7B\u522B\u89E3\u6790\u5931\u8D25",!0);else{let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=r.cateId??"",s=this.siteUrl+e+i;this.page=parseInt(n),this.count=0,this.limit=18,this.total=0,this.page!==1&&(s+="index_"+n+".html");let a=await this.fetch(s,null,this.getHeader());if(!B.isEmpty(a)){let u=Ue(a),o=u(".pagination > a");if(o.length>0){let c=o.slice(-1)[0].attribs.href,m=/index_(.*?).html/.exec(c);this.count=parseInt(m[1]);let d=u("#post_container .post_hover");this.total=this.page===this.count?(this.page-1)*this.limit+d.length:this.count*this.limit}this.vodList=await this.parseVodShortListFromDoc(u)}}async setSearch(e,n){let l=this.siteUrl+"/e/search/index.php",r={show:"title",tempid:"1",tbname:"article",mid:"1",dopost:"search",keyboard:e},i=await this.post(l,r,this.getHeader());if(!B.isEmpty(i)){let s=Ue(i);this.vodList=await this.parseVodShortListFromDoc(s)}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){if(n.toLowerCase().startsWith("magnet"))this.playUrl=n;else{let r=this.siteUrl+n,i=await this.fetch(r,null,this.getHeader()),s=Ue(i);this.playUrl=await this.parseVodPlayFromDoc(e,s)}}},An=new bS;var wS=class extends Ce{constructor(){super()}getName(){return An.getName()}getAppName(){return An.getAppName()}getJSName(){return An.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await An.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await An.initCookie(e.server.config.bilicookie),await An.spiderInit(e),An.cfgObj.code=0,An.catOpenStatus=!0,An.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),awai Line truncated
`,"").replaceAll(" ","");if(a.indexOf("\u65F6\u95F4")>-1&&a.indexOf("\u6587\u4EF6\u5939")>-1){let u=a.split("\u65F6\u95F4"),o=new Ne;o.vod_name=u[0],o.vod_remarks=u[1].split("\u683C\u5F0F")[0].replaceAll(":","").replaceAll(" ","").replaceAll("\uFEFF","").replaceAll("\xA0",""),o.vod_id=JSON.stringify({name:o.vod_name,remarks:o.vod_remarks,id:i}),l.push(o)}}}return l}async setClasses(){await this.parseClassFromDoc(this.content_html)}async setHomeVod(){let e=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.homeVodList=await this.parseVodShortListFromDoc(e[0])}async setDetail(e){if(e.indexOf("search")>-1){let n=this.siteUrl+"/search",l={k:decodeURIComponent(e.split("search?k=").slice(-1)[0])},r=await this.fetch(n,l,this.getHeader());if(!B.isEmpty(r)){let i=Ue(r),s=await this.parseVodShortListFromDocBySearch(i);s.length>0?e=s[0].vod_id:e=""}}if(!B.isEmpty(e)){let n=JSON.parse(e);this.vodDetail=await this.parseVodDetailfromJson(n)}}async setCategory(e,n,l,r){let i=this.content_html(this.content_html('[id="app"]')[0]).find("van-tab");this.vodList=await this.parseVodShortListFromDoc(i[parseInt(e)])}async setSearch(e,n){let l=this.siteUrl+"/search",r={k:e},i=await this.fetch(l,r,this.getHeader());if(!B.isEmpty(i)){let s=Ue(i);this.vodList=await this.parseVodShortListFromDocBySearch(s)}}async setPlay(e,n,l){let r=await A3(e,n,l);this.playUrl=JSON.parse(r).url}},On=new TS;var xS=class extends Ce{constructor(){super()}getName(){return On.getName()}getAppName(){return On.getAppName()}getJSName(){return On.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await On.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await On.initCookie(e.server.config.bilicookie),await On.spiderInit(e),On.cfgObj.code=0,On.catOpenStatus=!0,On.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await On.setClasses(),this.classes=On.classes}async setFilterObj(){await On.setFilterObj(),this.filterObj=On.filterObj}async setHomeVod(){await On.setHomeVod(),this.homeVodList=On.homeVodList}async setCategory(e,n,l,r){await On.setCategory(e,n,l,r),this.vodList=On.vodList}async setDetail(e){await On.setDetail(e),this.vodDetail=On.vodDetail}async setPlay(e,n,l){await On.setPlay(e,n,l),this.playUrl=On.playUrl,this.result=On.result}async setSearch(e,n,l){await On.setSearch(e,n,l),this.vodList=On.vodList,this.result=On.result}async setProxy(e,n){return await On.proxy(e,n)}},Sa=new xS;async function sW(t,e){return await Sa.init(t,e)}async function aW(t,e){return await Sa.home(t,e)}async function dAe(t,e){return await Sa.homeVod(t,e)}async function uW(t,e){return await Sa.category(t,e)}async function oW(t,e){return await Sa.detail(t,e)}async function cW(t,e){return await Sa.play(t,e)}async function pW(t,e){return await Sa.search(t,e)}async function hAe(t,e){return await Sa.proxy(t,e)}var fW={meta:{key:On.getJSName(),name:On.getName(),type:On.getType()},api:async t=>{t.post("/init",sW),t.post("/home",aW),t.post("/category",uW),t.post("/detail",oW),t.post("/play",cW),t.post("/search",pW),t.get("/proxy/:what/:ids/:end",hAe)},spider:{init:sW,home:aW,homeVod:dAe,category:uW,detail:oW,play:cW,search:pW}};var AS=class extends Pe{constructor(){super(),this.siteUrl="https://api.web.360kan.com"}getName(){return"\u{1F94E}\u2503360\u5F71\u89C6\u2503\u{1F94E}"}getAppName(){return"360"}getJSName(){return"sp360"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}async setClasses(){this.classes=[this.getTypeDic("\u6700\u8FD1\u66F4\u65B0","\u6700\u8FD1\u66F4\u65B0"),this.getTypeDic("\u7535\u5F71","1"),this.getTypeDic("\u5267\u96C6","2"),this.getTypeDic("\u7EFC\u827A","3"),this.getTypeDic("\u52A8\u6F2B","4")]}async setFilterObj(){this.filterObj={1:[{key:"cat",name:"\u7C7B\u578B",value:[{n:"\u5168\u90E8",v:""},{n:"\u559C\u5267",v:"\u559C\u5267"},{n:"\u7231\u60C5",v:"\u7231\u60C5"},{n:"\u52A8\u4F5C",v:"\u52A8\u4F5C"},{n:"\u6050\u6016",v:"\u6050\u6016"},{n:"\u79D1\u5E7B",v:"\u79D1\u5E7B"},{n:"\u5267\u60C5",v:"\u5267\u60C5"},{n:"\u72AF\u7F6A",v:"\u72AF\u7F6A"},{n:"\u5947\u5E7B",v:"\u5947\u5E7B"},{n:"\u6218\u4E89",v:"\u6218\u4E89"},{n:"\u60AC\u7591",v:"\u60AC\u7591"},{n:"\u52A8\u753B",v:"\u52A8\u753B"},{n:"\u6587\u827A",v:"\u6587\u827A"},{n:"\u7EAA\u5F55",v:"\u7EAA\u5F55"},{n:"\u4F20\u8BB0",v:"\u4F20\u8BB0"},{n:"\u6B4C\u821E",v:"\u6B4C\u821E"},{n:"\u53E4\u88C5",v:"\u53E4\u88C5"},{n:"\u5386\u53F2",v:"\u5386\u53F2"},{n:"\u60CA\u609A",v:"\u60CA\u609A"},{n:"\u4F26\u7406",v:"\u4F26\u7406"},{n:"\u5176\u4ED6",v:"\u5176\u4ED6"}]},{key:"year",name:"\u5E74\u4EE3",value:[{n:"\u5168\u90E8",v:""},{n:"2024",v:"2024"},{n:"2023",v:"2023"},{n:"2022",v:"2022"},{n:"2021",v:"2021"},{n:"2020",v:"2020"},{n:"2019",v:"2019"},{n:"2018",v:"2018"},{n:"2017",v:"2017"},{n:"2016",v:"2016"},{n:"2015",v:"2015"},{n:"2014",v:"2014"},{n:"2013",v:"2013"},{n:"2012",v:"2012"},{n:"2010",v Line truncated
`;n.type_name=e(e(e(r).find('[class="post-meta"]')).find("span")[0]).text(),n.vod_pic=e(r).find("img")[0].attribs.src,n.vod_name=we(/名称:(.*?)\n/,s),n.vod_actor=we(/主演:(.*?)\n/,s),n.vod_director=we(/导演:(.*?)\n/,s),n.vod_area=we(/地区:(.*?)\n/,s),n.vod_year=we(/年份:(.*?)\n/,s),n.vod_remarks=we(/更新:(.*?)\n/,s);let a=e('[class="article-related info"]').find("p");n.vod_content=e(a).text();let u=e('[class="article-related download_url"]'),o=[],c=[];for(let f=0;f<u.length;f++){let m=u[f],d=e(e(m).find("h2")).text().replaceAll(n.vod_name,"");o.push(d.replaceAll("\u4E0B\u8F7D","\u64AD\u653E"));let y=[];for(let _ of e(u[f]).find("a")){let S=e(_).text().replaceAll("\u78C1\u529B\u94FE\u4E0B\u8F7D","").replaceAll(".mp4",""),w=_.attribs.href;y.push(S+"$"+w)}c.push(y.join("#"))}return n.vod_play_from=o.join("$$$"),n.vod_play_url=c.join("$$$"),n}async parseVodShortListFromJson(e){let n=[],l=Ue(e.ajaxtxt),r=l(l("ul")).find("li");for(let i of r){let s=new Ne;s.vod_pic=l(i).find("img")[0].attribs["data-original"],s.vod_name=we(/《(.*?)》/,l(i).find("img")[0].attribs.alt),s.vod_id=l(i).find("a")[0].attribs.href,s.vod_remarks="\u8BC4\u5206:"+l(l(i).find('[class="rate badge"]')).text(),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e(e('[id="list_all"]').find("ul")).find("li");for(let r of l){let i=new Ne;i.vod_id=e(r).find("a")[0].attribs.href,i.vod_name=we(/《(.*?)》/,e(e(e(r).find('[class="text_info"]')).find("a")[0]).text()),i.vod_pic=e(r).find("img")[0].attribs["data-original"],i.vod_remarks=e(e(r).find('[class="update_time"]')).text(),n.push(i)}return n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);return this.vodDetail=await this.parseVodDetailFromDoc(n),this.vodDetail}async setCategory(e,n,l,r){let i=this.siteUrl+`/list/${e}-${n}.html`,s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setSearch(e,n){let l=this.siteUrl+"/search/",r={wd:e,p:"1",t:"j/tNgwBS2e8O4x9TuIkYuQ=="},i=await this.post(l,r,this.getSearchHeader()),s=Ue(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}},Cn=new NS;var CS=class extends Ce{constructor(){super()}getName(){return Cn.getName()}getAppName(){return Cn.getAppName()}getJSName(){return Cn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Cn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Cn.initCookie(e.server.config.bilicookie),await Cn.spiderInit(e),Cn.cfgObj.code=0,Cn.catOpenStatus=!0,Cn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Cn.setClasses(),this.classes=Cn.classes}async setFilterObj(){await Cn.setFilterObj(),this.filterObj=Cn.filterObj}async setHomeVod(){await Cn.setHomeVod(),this.homeVodList=Cn.homeVodList}async setCategory(e,n,l,r){await Cn.setCategory(e,n,l,r),this.vodList=Cn.vodList}async setDetail(e){await Cn.setDetail(e),this.vodDetail=Cn.vodDetail}async setPlay(e,n,l){await Cn.setPlay(e,n,l),this.playUrl=Cn.playUrl,this.result=Cn.result}async setSearch(e,n,l){await Cn.setSearch(e,n,l),this.vodList=Cn.vodList,this.result=Cn.result}async setProxy(e,n){return await Cn.proxy(e,n)}},xa=new CS;async function EW(t,e){return await xa.init(t,e)}async function bW(t,e){return await xa.home(t,e)}async function gAe(t,e){return await xa.homeVod(t,e)}async function wW(t,e){return await xa.category(t,e)}async function SW(t,e){return await xa.detail(t,e)}async function TW(t,e){return await xa.play(t,e)}async function xW(t,e){return await xa.search(t,e)}async function vAe(t,e){return await xa.proxy(t,e)}var AW={meta:{key:Cn.getJSName(),name:Cn.getName(),type:Cn.getType()},api:async t=>{t.post("/init",EW),t.post("/home",bW),t.post("/category",wW),t.post("/detail",SW),t.post("/play",TW),t.post("/search",xW),t.get("/proxy/:what/:ids/:end",vAe)},spider:{init:EW,home:bW,homeVod:gAe,category:wW,detail:SW,play:TW,search:xW}};var RS=class extends Pe{constructor(){super(),this.siteUrl="https://frodo.douban.com/api/v2",this.apiKey="0ac44ae016490db2204ce0a042db2916",this.UserAgents=["api-client/1 com.douban.frodo/7.22.0.beta9(231) Android/23 product/Mate 40 vendor/HUAWEI model/Mate 40 brand/HUAWEI rom/android network/wifi platform/AndroidPad","api-client/1 com.douban.frodo/7.18.0(230) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.1.0(205) Android/29 product/perseus vendor/Xiaomi model/Mi MIX 3 rom/miui6 network/wifi platform/mobile nd/1","api-client/1 com.douban.frodo/7.3.0(207) Android/22 product/MI 9 vendor/Xiaomi model/MI 9 brand/Android rom/miui6 network/wifi platform/mobile nd/1"]}getHeader(){return{Host:"frodo.douban.com",Connection:"Keep-Alive",Referer: Line truncated
`," ").replaceAll(" \u6536\u8D77","");let o=e('[class="module-tab-item tab-item"]'),c=e('[class="scroll-content"]'),f=[],m=[];for(let d=0;d<o.length;d++){let _=o[d].attribs["data-dropdown-value"];if(_.indexOf("\u5938\u514B")===-1){f.push(_);let S=[];for(let w of e(c[d]).find("a")){let E=e(w).text(),g=w.attribs.href;S.push(E+"$"+g)}m.push(S.join("#"))}}return l.vod_play_from=f.join("$$$"),l.vod_play_url=m.join("$$$"),l}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,l,r){let i=[e.toString(),"","","","","","","",n.toString(),"","",""],s=[3,11,1,2];r.\u5168\u90E8\u5267\u60C5!==void 0&&r.\u5168\u90E8\u5267\u60C5!=="0"&&(i[s[0]]=r.\u5168\u90E8\u5267\u60C5),r.\u5168\u90E8\u65F6\u95F4!==void 0&&r.\u5168\u90E8\u65F6\u95F4!=="0"&&(i[s[1]]=r.\u5168\u90E8\u65F6\u95F4),r.\u5168\u90E8\u5730\u533A!==void 0&&r.\u5168\u90E8\u5730\u533A!=="0"&&(i[s[2]]=r.\u5168\u90E8\u5730\u533A),r.\u65F6\u95F4\u6392\u5E8F!==void 0&&r.\u65F6\u95F4\u6392\u5E8F!=="0"&&(i[s[3]]=r.\u65F6\u95F4\u6392\u5E8F);let a=this.siteUrl+"/index.php/vodshow/"+i.join("-")+".html",u=await this.getHtml(a);this.vodList=await this.parseVodShortListFromDoc(u)}async setDetail(e){let n=await this.getHtml(this.siteUrl+e);this.vodDetail=await this.parseVodDetailFromDoc(n)}uic(e,n){let l=He.enc.Utf8.parse("2890"+n+"tB959C"),r=He.enc.Utf8.parse("2F131BE91247866E"),i=He.AES.decrypt(e,l,{iv:r,mode:He.mode.CBC,padding:He.pad.Pkcs7});return He.enc.Utf8.stringify(i)}async setPlay(e,n,l){let i=(await this.getHtml(this.siteUrl+n))('[id="bfurl"]')[0].attribs.href;if(i.indexOf("http")>-1)this.playUrl=i;else{let s="https://jiexi.xn--1lq90i13mxk5bolhm8k.xn--fiqs8s/player/ec.php?code=ak&if=1&url="+i,u=(await this.getHtml(s)).html(),o=JSON.parse(we(/let ConFig = (.*?),box = /,u));this.playUrl=this.uic(o.url,o.config.uid)}}async setSearch(e,n){let l=`http://123.207.150.253/zxapi/public/?service=App.F.Fetch&req_p=${e}&type=6080`,r=await this.fetch(l,null,this.getHeader());this.vodList=await this.parseVodShortListFromJson(JSON.parse(r))}},In=new kS;var DS=class extends Ce{constructor(){super()}getName(){return In.getName()}getAppName(){return In.getAppName()}getJSName(){return In.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await In.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await In.initCookie(e.server.config.bilicookie),await In.spiderInit(e),In.cfgObj.code=0,In.catOpenStatus=!0,In.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await In.setClasses(),this.classes=In.classes}async setFilterObj(){await In.setFilterObj(),this.filterObj=In.filterObj}async setHomeVod(){await In.setHomeVod(),this.homeVodList=In.homeVodList}async setCategory(e,n,l,r){await In.setCategory(e,n,l,r),this.vodList=In.vodList}async setDetail(e){await In.setDetail(e),this.vodDetail=In.vodDetail}async setPlay(e,n,l){await In.setPlay(e,n,l),this.playUrl=In.playUrl,this.result=In.result}async setSearch(e,n,l){await In.setSearch(e,n,l),this.vodList=In.vodList,this.result=In.result}async setProxy(e,n){return await In.proxy(e,n)}},Oa=new DS;async function PW(t,e){return await Oa.init(t,e)}async function LW(t,e){return await Oa.home(t,e)}async function bAe(t,e){return await Oa.homeVod(t,e)}async function FW(t,e){return await Oa.category(t,e)}async function jW(t,e){return await Oa.detail(t,e)}async function UW(t,e){return await Oa.play(t,e)}async function MW(t,e){return await Oa.search(t,e)}async function wAe(t,e){return await Oa.proxy(t,e)}var $W={meta:{key:In.getJSName(),name:In.getName(),type:In.getType()},api:async t=>{t.post("/init",PW),t.post("/home",LW),t.post("/category",FW),t.post("/detail",jW),t.post("/play",UW),t.post("/search",MW),t.get("/proxy/:what/:ids/:end",wAe)},spider:{init:PW,home:LW,homeVod:bAe,category:FW,detail:jW,play:UW,search:MW}};function SAe(t){return t.replace(/<\/?[^>]+(>|$)/g,"").replace(/&.{1,5};/g,"").replace(/\s{2,}/g," ")}function TAe(t,e){return e.trim().replaceAll(t,"").replace(/<|>|《|》/g,"").replace(/\$|#/g," ").trim()}var PS=class extends Pe{constructor(){super(),this.siteUrl="http://ys.changmengyun.com"}getName(){return"\u{1F383}\u2503\u5357\u74DC\u5F71\u89C6\u2503\u{1F383}"}getAppName(){return"\u5357\u74DC\u5F71\u89C6"}getJSName(){return"nangua"}getType(){return 3}async init(e){await super.init(e),this.danmuStaus=!0}getHeader(){let e=new Date().getTime().toString();return{version_name:"1.0.6",version_code:"6",package_name:"com.app.nanguatv",sign:He.MD5("c431ea542cee9679#uBFszdEM0oL0JRn@"+e).toString().toLowerCase(),imei:"c431ea542cee9679",timeMillis:e,"User-Agent":"okhttp/4.6.0"}}async setClasses(){let e=JSON.parse(await this.fetch(this.siteUrl+"/api.php/provide/home_nav",null,this.getHeader()));for(let n in e)e[n].name!=="\u7CBE\u9009"&&this.classes.push({type_id:e[n].id,type_name:e[n].name})}async set Line truncated
`),r=[];for(let m of l)B.isEmpty(m.replaceAll(" ","").replaceAll("/",""))||r.push(m.replaceAll(" ","").replaceAll("/",""));n.type_name=r.slice(0,2).join("*");let i=e('[class="video-info-items"]');n.vod_director=e(i[0]).find("a")[0].children[0].data;let s=e(i[1]).find("a"),a=[];for(let m of s)a.push(m.children[0].data);n.vod_actor=a.join(" * "),n.vod_year=r[2],n.vod_remarks=e(e(i[3]).find(".video-info-item")).text(),n.vod_content=e(e(i[5]).find(".video-info-item")).text(),n.vod_area=r[3],n.vod_content=n.vod_content.replace("[\u6536\u8D77\u90E8\u5206]","").replace("[\u5C55\u5F00\u5168\u90E8]","").replaceAll(" ","").replaceAll(`
`,"");let u=e(e('[class="module-tab-content"]')[0]).find("span"),o=e('[class="module-list module-player-list tab-list sort-list "]'),c=[];for(let m of u)c.push(e(m).text());let f=[];for(let m of o){let d=e(e(m).find('[class="sort-item"]')).find("a"),y=[];for(let _ of d){let S=e(_).text(),w=_.attribs.href,E=S+"$"+w;y.push(E)}f.push(y.join("#"))}return n.vod_play_from=c.join("$$$"),n.vod_play_url=B.values(f).join("$$$"),n}async parseVodShortListFromDocBySearch(e){let n=e(".module-search-item"),l=[];for(let r of n){let i=new Ne;i.vod_id=e(r).find(".video-serial")[0].attribs.href,i.vod_name=e(r).find(".video-serial")[0].attribs.title,i.vod_pic=e(r).find(".module-item-pic > img")[0].attribs["data-src"],i.vod_remarks="",l.push(i)}return l}async setClasses(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e),l=n(n('[class="nav-menu-items"]')[0]).find("li");for(let r of l.slice(0,6)){let i=n(n(r).find("span")).text();if(i!=="\u9996\u9875"){let a={type_id:n(r).find("a")[0].attribs.href.split("/").slice(-1)[0].split(".")[0],type_name:i};this.classes.push(a)}}}}async getFilter(e){let n=e('[class="scroll-content"]').slice(1),l=[];for(let r=0;r<n.length;r++){let i={key:(r+1).toString(),name:"",value:[]};if(r<n.length-1){i.name=e(e(n[r]).find("a")[0]).text(),i.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[r]).find("a").slice(1))e(e(n[r]).find("a")[0]).text()==="\u5168\u90E8\u7C7B\u578B"?i.value.push({n:e(s).text(),v:s.attribs.href.split("/").slice(-1)[0].split(".")[0]}):i.value.push({n:e(s).text(),v:e(s).text()});l.push(i)}else i.name=e(e(n[r]).find("a")[0]).text(),i.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[r]).find("a")[1]).text(),v:"hits"},{n:e(e(n[r]).find("a")[2]).text(),v:"score"}],l.push(i)}return l}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let l=this.siteUrl+`/vodshow/id/${n}.html`,r=await this.fetch(l,null,this.getHeader());if(r!=null){let i=Ue(r);this.filterObj[n]=await this.getFilter(i)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}getExtend(e,n,l=""){return e!==void 0&&e!=="0"?l+e:n}async getCateUrl(e,n,l){e=this.getExtend(l[1],e);let r=this.getExtend(l[2],"","/area/"),i=this.getExtend(l[3],"","/lang/"),s=this.getExtend(l[4],"","/year/"),a=this.getExtend(l[5],"","/letter/"),u=this.getExtend(l[6],"","/by/");return this.siteUrl+`/vodshow${u}${r}/id/${e}${i}${a}${s}/page/${n}.html`}async setCategory(e,n,l,r){let i=await this.getCateUrl(e,n,r),s=await this.fetch(i,null,this.getHeader());if(!B.isEmpty(s)){let a=Ue(s);this.vodList=await this.parseVodShortListFromDoc(a);let u=we(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,s);this.limit=72,u.length>0&&(this.total=parseInt(u)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){let r=await this.fetch(this.siteUrl+n,null,this.getHeader());if(!B.isEmpty(r)){let i=we(/<script type="text\/javascript">var player_aaaa=(.*?)<\/script>/,r),s=JSON.parse(i);this.playUrl=s.url}}async setSearch(e,n){let l=this.siteUrl+`/vodsearch/wd/${e}.html`,r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i=Ue(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}}},Ln=new $S;var BS=class extends Ce{constructor(){super()}getName(){return Ln.getName()}getAppName(){return Ln.getAppName()}getJSName(){return Ln.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Ln.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Ln.initCookie(e.server.config.bilicookie),await Ln.spiderInit(e),Ln.cfgObj.code=0,Ln.catOpenStatus=!0,Ln.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Ln.setClasses(),this.classes=Ln.classes}async setFilterObj(){await Ln.setFilterObj(),this.filterObj=Ln.filterObj}async setHomeVod(){await Ln.setHomeVod(),this.homeVodList=Ln.homeVodList}async setCategory(e,n,l,r){await Ln.setCategory(e,n,l,r),this.vodList=Ln.vodList}async setDetail(e){await Ln.setDetail(e),this.vodDetail=Ln.vodDetail}async setPlay(e,n,l){await Ln.setPlay(e,n,l),this.playUrl=Ln.playUrl,this.result=Ln.result}async setSearch(e,n,l){await Ln.setSearch(e,n,l),this.vodList=Ln.vodList,this.result=Ln.result}async setProxy(e,n){return await Ln.proxy(e,n)}},Ia=new BS;async function uY(t,e){return await Ia.init(t,e)}async function oY(t,e){return await Ia.home(t,e)}async function IAe(t,e){return await Ia.homeVod(t,e)}async function cY(t,e){return await Ia.category(t,e)}async function pY(t,e){return await Ia.detail(t,e)}async function fY(t,e){return await Ia.play(t,e)} Line truncated
`,""),B.isEmpty(l.vod_pic)&&(l.vod_pic=Zs+"/resources/dygang.jpg"),l}async parseVodShortListFromDoc(e){let n=[],l=e('[class="index-tj-l"]').find("li");for(let r of l){let i=e(r).find("a")[0],s=this.parseVodShortFromElement(e,i);n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e('[class="index-area clearfix"]').find("li");for(let r of l){let i=e(r).find("a")[0],s=this.parseVodShortFromElement(e,i);n.push(s)}return n}async parseVodDetailFromDoc(e){let n=new Me,l=e('[ class="ct mb clearfix"]');n.vod_pic=e(l).find("img")[0].attribs.src,n.vod_name=we(/◎片  名 (.*?)<br>/,e(l).html()),n.vod_area=we(/◎产  地 (.*?)<br>/,e(l).html()),n.vod_year=we(/◎年  代 (.*?)<br>/,e(l).html()),n.type_name=we(/◎类  别 (.*?)<br>/,e(l).html()),n.vod_remarks=we(/◎集  数 (.*?)<br>/,e(l).html());let r=we(/◎主  演 (.*?)<\/p>/s,e(l).html());B.isEmpty(r)&&(r=we(/◎演  员 (.*?)<\/p>/s,e(l).html()));let i=[];for(let f of r.split(`
`))i.push(f.replaceAll("\u3000\u3000\u3000\u3000&nbsp; \u3000","").replaceAll("<br>","").replaceAll("\u3000\u3000\u3000\u3000\u3000",""));n.vod_actor=i.join("/"),n.vod_director=we(/◎导  演 (.*?)<br>/,e(l).html()),n.vod_content=we(/◎简  介<\/p>(.*?)<br>/s,e(l).html()).replaceAll("<p>","").replaceAll(`
`,""),B.isEmpty(n.vod_content)&&(n.vod_content=we(/◎简  介<br>(.*?)<\/p>/s,e(l).html()).replaceAll("<p>","").replaceAll(`
`,""));let s=[],a=[],u=e('[class="playfrom tab8 clearfix"]'),o=e('[class="videourl clearfix"]');for(let f=0;f<u.length;f++){let m=u[f],d=e(e(m).find("li")).html();s.push(d.replaceAll('<i class="playerico ico-Azhan"></i> ',""));let y=[];for(let _ of e(o[f]).find("a")){let S=_.attribs.title,w=_.attribs.href;y.push(S+"$"+w)}a.push(y.join("#"))}let c=e(e(l).find("span")[0]).find("span");if(c.length>0){let f=e(c).html();s.push(we(/【(.*?)】/,f.replaceAll("\u4E0B\u8F7D\u5730\u5740","\u78C1\u529B\u94FE\u63A5")));let m=[];for(let d of e(e(e(l).find("tbody")).find("tr")).find("a")){let y=e(d).html().replaceAll(".mp4",""),_=d.attribs.href;m.push(y+"$"+_)}a.push(m.join("#"))}return n.vod_play_from=s.join("$$$"),n.vod_play_url=a.join("$$$"),n}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,l,r){let i=this.siteUrl+e;r.\u6309\u7C7B\u578B!==void 0&&r.\u6309\u7C7B\u578B!=="0"&&(i=i+`${r.\u6309\u7C7B\u578B}/`),parseInt(n)>1&&(i=i+`index_${n}.html`);let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setSearch(e,n){let l=this.siteUrl+"/e/search/index.php",r={keyboard:e,submit:"\u641C \u7D22",show:"title,zhuyan",tempid:"1"},i=await this.post(l,r,this.getHeader()),s=Ue(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setPlay(e,n,l){if(n.indexOf("http")>-1){let r=await this.getHtml(n),i=we(/url: '(.*?)',/,r.html());if(B.isEmpty(i)){let s=r(r('[class="video"]')[0]).find("iframe")[0].attribs.src,a=await this.fetch(s,null,{"User-Agent":Gl});if(this.playUrl=we(/url: '(.*?)',/,a),B.isEmpty(this.playUrl)){let u=eq(s);this.playUrl=u+we(/var main = "(.*?)";/,a)}}else this.playUrl=i}else this.playUrl=n}},Un=new JS;var KS=class extends Ce{constructor(){super()}getName(){return Un.getName()}getAppName(){return Un.getAppName()}getJSName(){return Un.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Un.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Un.initCookie(e.server.config.bilicookie),await Un.spiderInit(e),Un.cfgObj.code=0,Un.catOpenStatus=!0,Un.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Un.setClasses(),this.classes=Un.classes}async setFilterObj(){await Un.setFilterObj(),this.filterObj=Un.filterObj}async setHomeVod(){await Un.setHomeVod(),this.homeVodList=Un.homeVodList}async setCategory(e,n,l,r){await Un.setCategory(e,n,l,r),this.vodList=Un.vodList}async setDetail(e){await Un.setDetail(e),this.vodDetail=Un.vodDetail}async setPlay(e,n,l){await Un.setPlay(e,n,l),this.playUrl=Un.playUrl,this.result=Un.result}async setSearch(e,n,l){await Un.setSearch(e,n,l),this.vodList=Un.vodList,this.result=Un.result}async setProxy(e,n){return await Un.proxy(e,n)}},ja=new KS;async function RY(t,e){return await ja.init(t,e)}async function IY(t,e){return await ja.home(t,e)}async function $Ae(t,e){return await ja.homeVod(t,e)}async function kY(t,e){return await ja.category(t,e)}async function DY(t,e){return await ja.detail(t,e)}async function PY(t,e){return await ja.play(t,e)}async function LY(t,e){return await ja.search(t,e)}async function BAe(t,e){return await ja.proxy(t,e)}var FY={meta:{key:Un.getJSName(),name:Un.getName(),type:Un.getType()},api:async t=>{t.post("/init",RY),t.post("/home",IY),t.post("/category",kY),t.post("/detail",DY),t.post("/play",PY),t.post("/search",LY),t.get("/proxy/:what/:ids/:end",BAe)},spider:{init:RY,home:IY,homeVod:$Ae,category:kY,detail:DY,play:PY,search:LY}};var XS=class extends Pe{constructor(){super(),this.siteUrl="https://tvfan.xxooo.cf",this.woggTypeObj={\u73A9\u5076\u7535\u5F71:"\u7535\u5F71",\u73A9\u5076\u5267\u96C6:"\u7535\u89C6\u5267"}}async init(e){await super.init(e),await z2(this.cfgObj.token),this.danmuStaus=!0}getName(){return"\u{1F482}\u200D\u2503\u963F\u91CC\u73A9\u5076\u2503\u{1F482}"}getAppName(){return"\u963F\u91CC\u73A9\u5076"}getJSName(){return"wogg"}getType(){return 3}async parseVodShortListFromDoc(e){let n=e(".module-item"),l=[];for(let r of n){let i=new Ne,s=e(r).find(".module-item-cover .module-item-pic a").first();i.vod_id=s.attr("href"),i.vod_name=s.attr("title"),i.vod_pic=e(r).find(".module-item-cover .module-item-pic img").first().attr("data-src"),i.vod_pic.indexOf("img.php?url=")>0&&(i.vod_pic=i.vod_pic.split("img.php?url=")[1]),i.vod_remarks=e(r).find(".module-item-text").first().text(),l.push(i)}return l}async parseVodDetailFromDoc(e){let n=new Me;n.vod_name=e(".page-title")[0].children[0].data,n.vod_pic=e(e(".mobile-play")).find(".lazyload")[0].attribs["data-src"],n.type_name=this.woggTypeObj[e('[class="video-info-aux"]').find("a")[0].attribs.title];let l=e(".video-info-items");n.vod_director=e(l[0]).find("a")[0].children[0].data;let r=e(l[1 Line truncated
`,"").replace(" ","").replace("\u73A9\u5076",""),a={type_id:i,type_name:s};this.classes.push(a)}}}async getFilter(e){let n=e("[class='scroll-content']").slice(1),l=[];for(let r=0;r<n.length;r++){let i={key:(r+1).toString(),name:"",value:[]};if(r<n.length-1){i.name=e(e(n[r]).find("a")[0]).text(),i.value.push({n:"\u5168\u90E8",v:"0"});for(let s of e(n[r]).find("a").slice(1))i.value.push({n:e(s).text(),v:e(s).text()});l.push(i)}else i.name=e(e(n[r]).find("a")[0]).text(),i.value=[{n:"\u5168\u90E8",v:"0"},{n:e(e(n[r]).find("a")[1]).text(),v:"hits"},{n:e(e(n[r]).find("a")[2]).text(),v:"score"}],l.push(i)}return l}async setFilterObj(){for(let e of this.classes){let n=e.type_id;if(n!=="/"&&n!=="\u6700\u8FD1\u66F4\u65B0"){let l=this.siteUrl+`/index.php/vodshow/${n}--------1---.html`,r=await this.fetch(l,null,this.getHeader());if(r!=null){let i=Ue(r);this.filterObj[n]=await this.getFilter(i)}}}}async setHomeVod(){let e=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(e)){let n=Ue(e);this.homeVodList=await this.parseVodShortListFromDoc(n)}}async setCategory(e,n,l,r){let i=[e.toString(),"","","","","","","",n.toString(),"","",""],s=this.get_extend_sort_dic(parseInt(e));for(let o of Object.keys(s))r[o]==="0"?i[s[o]]="":i[s[o]]=r[o];let a=this.siteUrl+"/index.php/vodshow/"+i.join("-")+".html",u=await this.fetch(a,null,this.getHeader());if(!B.isEmpty(u)){let o=Ue(u);this.vodList=await this.parseVodShortListFromDoc(o);let c=we(/\$\("\.mac_total"\)\.text\('(\d+)'\)/,u);this.limit=72,c.length>0&&(this.total=parseInt(c)),this.total<=this.limit?this.count=1:this.count=Math.ceil(this.total/this.limit)}}async setDetail(e){let n=this.siteUrl+e,l=await this.fetch(n,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodDetail=await this.parseVodDetailFromDoc(r)}}async setPlay(e,n,l){let r=await A3(e,n,l);this.playUrl=JSON.parse(r).url}async setSearch(e,n){let l=this.siteUrl+"/index.php/vodsearch/-------------.html?wd="+e,r=await this.fetch(l,null,this.getHeader());if(!B.isEmpty(r)){let i=Ue(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}}},Mn=new XS;var WS=class extends Ce{constructor(){super()}getName(){return Mn.getName()}getAppName(){return Mn.getAppName()}getJSName(){return Mn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Mn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Mn.initCookie(e.server.config.bilicookie),await Mn.spiderInit(e),Mn.cfgObj.code=0,Mn.catOpenStatus=!0,Mn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Mn.setClasses(),this.classes=Mn.classes}async setFilterObj(){await Mn.setFilterObj(),this.filterObj=Mn.filterObj}async setHomeVod(){await Mn.setHomeVod(),this.homeVodList=Mn.homeVodList}async setCategory(e,n,l,r){await Mn.setCategory(e,n,l,r),this.vodList=Mn.vodList}async setDetail(e){await Mn.setDetail(e),this.vodDetail=Mn.vodDetail}async setPlay(e,n,l){await Mn.setPlay(e,n,l),this.playUrl=Mn.playUrl,this.result=Mn.result}async setSearch(e,n,l){await Mn.setSearch(e,n,l),this.vodList=Mn.vodList,this.result=Mn.result}async setProxy(e,n){return await Mn.proxy(e,n)}},Ua=new WS;async function jY(t,e){return await Ua.init(t,e)}async function UY(t,e){return await Ua.home(t,e)}async function HAe(t,e){return await Ua.homeVod(t,e)}async function MY(t,e){return await Ua.category(t,e)}async function $Y(t,e){return await Ua.detail(t,e)}async function BY(t,e){return await Ua.play(t,e)}async function HY(t,e){return await Ua.search(t,e)}async function VAe(t,e){return await Ua.proxy(t,e)}var VY={meta:{key:Mn.getJSName(),name:Mn.getName(),type:Mn.getType()},api:async t=>{t.post("/init",jY),t.post("/home",UY),t.post("/category",MY),t.post("/detail",$Y),t.post("/play",BY),t.post("/search",HY),t.get("/proxy/:what/:ids/:end",VAe)},spider:{init:jY,home:UY,homeVod:HAe,category:MY,detail:$Y,play:BY,search:HY}};var YS=class extends Pe{constructor(){super(),this.siteUrl="https://www.pansearch.me/"}getName(){return"\u{1F5C2}\uFE0F\u2503\u963F\u91CC\u76D8\u641C\u2503\u{1F5C2}\uFE0F"}getAppName(){return"\u963F\u91CC\u76D8\u641C"}getJSName(){return"pan_search"}getType(){return 3}getSearchHeader(){let e=this.getHeader();return e["x-nextjs-data"]="1",e}async init(e){await super.init(e),await z2(this.cfgObj.token)}async parseVodDetailfromJson(e){let n=JSON.parse(e),l=new Me,r=n.content.split(`
`);l.vod_name=r[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let i=new Date(n.time);l.vod_remarks=i.toLocaleDateString().replace(/\//g,"-")+" "+i.toTimeString().substr(0,8),l.vod_pic=n.image;let s="";for(let a of r)a.indexOf("\u63CF\u8FF0")>-1&&(l.vod_content=a.replace("\u63CF\u8FF0\uFF1A","").replaceAll(/<\\?[^>]+>/g,"")),a.indexOf("\u6807\u7B7E\uFF1A")>-1&&(l.type_name=a.replace("\u{1F3F7} \u6807\u7B7E\uFF1A","")),a.indexOf("\u94FE\u63A5\uFF1A")>-1&&(s=a.replaceAll(/<\\?[^>]+>/g,"").replace("\u94FE\u63A5\uFF1A",""));try{let a=await x3([s]);l.vod_play_url=a.vod_play_url,l.vod_play_from=a.vod_play_from}catch(a){await this.jadeLog.error(`\u83B7\u53D6\u963F\u91CC\u89C6\u9891\u64AD\u653E\u5931\u8D25,\u5931\u8D25\u539F\u56E0\u4E3A:${a}`)}return l}async parseVodShortListFromDocBySearch(e,n){let l=[],r=JSON.parse(e("script[id=__NEXT_DATA__]")[0].children[0].data).buildId,i=this.siteUrl+"_next/data/"+r+"/search.json?keyword="+encodeURIComponent(n)+"&pan=aliyundrive",s=await this.fetch(i,null,this.getSearchHeader());if(B.isEmpty(s))await this.jadeLog.error("\u641C\u7D22\u9875\u9762\u89E3\u6790\u5931\u8D25",!0);else{let a=JSON.parse(s).pageProps.data.data;for(let u of a){let o=new Ne;o.vod_id=JSON.stringify(u);let c=u.content.split(`
`);o.vod_name=c[0].replaceAll(/<\\?[^>]+>/g,"").replace("\u540D\u79F0\uFF1A","");let f=new Date(u.time);o.vod_remarks=f.toLocaleDateString().replace(/\//g,"-")+" "+f.toTimeString().substr(0,8),o.vod_pic=u.image,l.push(o)}return l}}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setSearch(e,n){let l=await this.fetch(this.siteUrl,null,this.getHeader());if(!B.isEmpty(l)){let r=Ue(l);this.vodList=await this.parseVodShortListFromDocBySearch(r,e)}}async play(e,n,l){return await A3(e,n,l)}},$n=new YS;var QS=class extends Ce{constructor(){super()}getName(){return $n.getName()}getAppName(){return $n.getAppName()}getJSName(){return $n.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await $n.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await $n.initCookie(e.server.config.bilicookie),await $n.spiderInit(e),$n.cfgObj.code=0,$n.catOpenStatus=!0,$n.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await $n.setClasses(),this.classes=$n.classes}async setFilterObj(){await $n.setFilterObj(),this.filterObj=$n.filterObj}async setHomeVod(){await $n.setHomeVod(),this.homeVodList=$n.homeVodList}async setCategory(e,n,l,r){await $n.setCategory(e,n,l,r),this.vodList=$n.vodList}async setDetail(e){await $n.setDetail(e),this.vodDetail=$n.vodDetail}async setPlay(e,n,l){await $n.setPlay(e,n,l),this.playUrl=$n.playUrl,this.result=$n.result}async setSearch(e,n,l){await $n.setSearch(e,n,l),this.vodList=$n.vodList,this.result=$n.result}async setProxy(e,n){return await $n.proxy(e,n)}},Ma=new QS;async function qY(t,e){return await Ma.init(t,e)}async function zY(t,e){return await Ma.home(t,e)}async function qAe(t,e){return await Ma.homeVod(t,e)}async function GY(t,e){return await Ma.category(t,e)}async function JY(t,e){return await Ma.detail(t,e)}async function KY(t,e){return await Ma.play(t,e)}async function XY(t,e){return await Ma.search(t,e)}async function zAe(t,e){return await Ma.proxy(t,e)}var WY={meta:{key:$n.getJSName(),name:$n.getName(),type:$n.getType()},api:async t=>{t.post("/init",qY),t.post("/home",zY),t.post("/category",GY),t.post("/detail",JY),t.post("/play",KY),t.post("/search",XY),t.get("/proxy/:what/:ids/:end",zAe)},spider:{init:qY,home:zY,homeVod:qAe,category:GY,detail:JY,play:KY,search:XY}};var GAe=["4k","4K"],ZS=class extends Pe{constructor(){super(),this.siteUrl="https://www.alypw.com"}async init(e){await super.init(e),await z2(this.cfgObj.token)}getName(){return"\u{1F94F}\u200D\u2503\u963F\u91CC\u4E91\u76D8\u5206\u4EAB\u2503\u{1F94F}\u200D"}getAppName(){return"\u963F\u91CC\u4E91\u76D8\u5206\u4EAB"}getJSName(){return"aliyunpanshare"}getType(){return 3}getRemarks(e,n){if(B.isEmpty(e)){for(let l of GAe)if(n.indexOf(l)>-1)return l}else return e}parseVodName(e){let n=we(/\[阿里云盘](.*?) /,e);return e.indexOf("\u5408\u96C6")>-1||(B.isEmpty(n)&&(n=we(/\[阿里云盘](.*?)(/,e)),n.indexOf("[")>-1&&(n=n.split("[")[0]),n.indexOf("\u3010")>-1&&(n=n.split("\u3010")[0]),n==="4K")?"":n}async parseVodShortListFromDoc(e){let n=[],l=e(e('[class="hometab"]').find('[class="box"]')).find("li");for(let r of l){let i=e(r).find('[class="imgr"]')[0],s=new Ne;s.vod_id=e(i).find("a")[0].attribs.href;let a=e(i).find("a")[0].attribs.title;s.vod_name=this.parseVodName(a),s.vod_pic=e(r).find("img")[0].attribs.src,s.vod_remarks=this.getRemarks(we(/【(.*?)】/,a),a),n.push(s)}return n}async parseVodShortListFromDocByCategory(e){let n=[],l=e('[class="main container"]'),r=e(e(l).find('[class="list"]')).find("li");r.length===0&&(r=e(l).find("li"));for(let i of r){let s=e(i).find("img")[0].attribs.alt.replaceAll("<strong>","").replaceAll("</strong>",""),a=new Ne;a.vod_id=e(i).find("a")[0].attribs.href,a.vod_name=this.parseVodName(s),a.vod_pic=e(i).find("img")[0].attribs.src,a.vod_remarks=this.getRemarks(we(/【(.*?)】/,s),s),B.isEmpty(a.vod_name)||n.push(a)}return n}async parseVodDetailFromDoc(e){let n=e('[class="mainl"]'),l=e(e(n).find('[class="title"]')[0]).text(),r=new Me;r.vod_name=we(/\[阿里云盘](.*?) /,l),r.vod_remarks=this.getRemarks(we(/【(.*?)】/,l),l);let i=e(n).find('[class="article_content"]');r.vod_pic=e(i).find("p>img")[0].attribs.src;let s=e(i).find("p"),a="";for(let f of s)a=a+e(f).text()+`
`;let u=[],o=we(so,a).split(`
`);for(let f of o){let m=f.match(so);B.isEmpty(m)||u.push(m[1])}let c=await x3(u);return r.vod_play_url=c.vod_play_url,r.vod_play_from=c.vod_play_from,r.type_name=we(/标签(.*?)\n/,a).replaceAll("\uFF1A",""),r.vod_content=we(/描述(.*?)\n/,a).replaceAll("\uFF1A",""),r}async setClasses(){let e=await this.getHtml(),n=e("[id^='navbar-category']").find("a"),l=["\u5F71","\u5267","4K","\u89C6","\u97F3","\u6F14","\u52A8\u6F2B"];for(let r of n){let i=e(r).text(),s=r.attribs.href,a=!1;for(let u of l)i.indexOf(u)>-1&&(a=!0);a&&this.classes.push(this.getTypeDic(i,s))}}async setHomeVod(){let e=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(e)}async setCategory(e,n,l,r){let i=e.split(".html")[0]+"_"+n+".html",s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDocByCategory(s)}async setDetail(e){let n=await this.getHtml(e);this.vodDetail=await this.parseVodDetailFromDoc(n)}async setPlay(e,n,l){let r=await A3(e,n,l);this.playUrl=JSON.parse(r).url}async setSearch(e,n){let l=this.siteUrl+`/search.php?q=${e}`,r=await this.getHtml(l);this.vodList=await this.parseVodShortListFromDocByCategory(r)}},Bn=new ZS;var eT=class extends Ce{constructor(){super()}getName(){return Bn.getName()}getAppName(){return Bn.getAppName()}getJSName(){return Bn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Bn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Bn.initCookie(e.server.config.bilicookie),await Bn.spiderInit(e),Bn.cfgObj.code=0,Bn.catOpenStatus=!0,Bn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Bn.setClasses(),this.classes=Bn.classes}async setFilterObj(){await Bn.setFilterObj(),this.filterObj=Bn.filterObj}async setHomeVod(){await Bn.setHomeVod(),this.homeVodList=Bn.homeVodList}async setCategory(e,n,l,r){await Bn.setCategory(e,n,l,r),this.vodList=Bn.vodList}async setDetail(e){await Bn.setDetail(e),this.vodDetail=Bn.vodDetail}async setPlay(e,n,l){await Bn.setPlay(e,n,l),this.playUrl=Bn.playUrl,this.result=Bn.result}async setSearch(e,n,l){await Bn.setSearch(e,n,l),this.vodList=Bn.vodList,this.result=Bn.result}async setProxy(e,n){return await Bn.proxy(e,n)}},$a=new eT;async function YY(t,e){return await $a.init(t,e)}async function QY(t,e){return await $a.home(t,e)}async function JAe(t,e){return await $a.homeVod(t,e)}async function ZY(t,e){return await $a.category(t,e)}async function eQ(t,e){return await $a.detail(t,e)}async function tQ(t,e){return await $a.play(t,e)}async function nQ(t,e){return await $a.search(t,e)}async function KAe(t,e){return await $a.proxy(t,e)}var lQ={meta:{key:Bn.getJSName(),name:Bn.getName(),type:Bn.getType()},api:async t=>{t.post("/init",YY),t.post("/home",QY),t.post("/category",ZY),t.post("/detail",eQ),t.post("/play",tQ),t.post("/search",nQ),t.get("/proxy/:what/:ids/:end",KAe)},spider:{init:YY,home:QY,homeVod:JAe,category:ZY,detail:eQ,play:tQ,search:nQ}};var rQ=[19970,19972,19973,19974,19983,19986,19991,19999,2e4,20001,20003,20006,20009,20014,20015,20017,20019,20021,20023,20028,20032,20033,20034,20036,20038,20042,20049,20053,20055,20058,20059,20066,20067,20068,20069,20071,20072,20074,20075,20076,20077,20078,20079,20082,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20095,20096,20097,20098,20099,20100,20101,20103,20106,null,20112,20118,20119,20121,20124,20125,20126,20131,20138,20143,20144,20145,20148,20150,20151,20152,20153,20156,20157,20158,20168,20172,20175,20176,20178,20186,20187,20188,20192,20194,20198,20199,20201,20205,20206,20207,20209,20212,20216,20217,20218,20220,20222,20224,20226,20227,20228,20229,20230,20231,20232,20235,20236,20242,20243,20244,20245,20246,20252,20253,20257,20259,20264,20265,20268,20269,20270,20273,20275,20277,20279,20281,20283,20286,20287,20288,20289,20290,20292,20293,20295,20296,20297,20298,20299,20300,20306,20308,20310,20321,20322,20326,20328,20330,20331,20333,20334,20337,20338,20341,20343,20344,20345,20346,20349,20352,20353,20354,20357,20358,20359,20362,20364,20366,20368,20370,20371,20373,20374,20376,20377,20378,20380,20382,20383,20385,20386,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,20388,20395,20397,20400,20401,20402,20403,20404,20406,20407,20408,20409,20410,20411,20412,20413,20414,20416,20417,20418,20422,20423,20424,20425,20427,20428,20429,20434,20435,20436,20437,20438,20441,20443,20448,20450,20452,20453,20455,20459,20460,20464,20466,20468,20469,20470,20471,20473,20475,20476,20477,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,null,20491,20494,20496,20497,20499,20501,20502,20503,20507,20509,20510,20512,20514,205 Line truncated
`)),e.push(r)}return e}async parseVodShortListFromDocBySearch(t){let e=t('[class="show-list"]').find("li"),n=[];for(let l of e){let r=new Ne;r.vod_id=t(l).find("a")[0].attribs.href;let i=t(l).find("img")[0];r.vod_pic=i.attribs.src,r.vod_name=i.attribs.alt,r.vod_remarks=t(t(l).find('[class="type fn-left"]')).text().replace("\u7C7B\u578B\uFF1A",""),r.vod_remarks!=="\u793E\u5904\u7247"&&r.vod_remarks!=="\u793E\u4FDD\u7247"&&r.vod_remarks!=="\u64B8\u4E1D\u7247"&&r.vod_remarks!=="\u64B8\u4E1D\u52A8\u6F2B"&&n.push(r)}return n}async parseVodDetailFromDoc(t){let e=new Me,n=t('[class="detail-pic fn-left"]').find("img")[0];e.vod_pic=n.attribs.src,e.vod_name=n.attribs.alt;let l=t('[class="info fn-clear"]');for(let o of t(l).find("dl")){let c=t(o).text();c.indexOf("\u4E3B\u6F14")>-1&&(e.vod_actor=c.replaceAll("\u4E3B\u6F14\uFF1A","").replaceAll(`
`,"")),c.indexOf("\u72B6\u6001")>-1&&(e.vod_remarks=c.replaceAll("\u72B6\u6001\uFF1A","").replaceAll(`
`,"")),c.indexOf("\u7C7B\u578B")>-1&&(e.type_name=c.replaceAll("\u7C7B\u578B\uFF1A","").replaceAll(`
`,"")),c.indexOf("\u5730\u533A")>-1&&(e.vod_area=c.replaceAll("\u5730\u533A\uFF1A","").replaceAll(`
`,"")),c.indexOf("\u5BFC\u6F14")>-1&&(e.vod_director=c.replaceAll("\u5BFC\u6F14\uFF1A","").replaceAll(`
`,"")),c.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=c.replaceAll("\u5E74\u4EFD\uFF1A","").replaceAll(`
`,"")),c.indexOf("\u5267\u60C5")>-1&&(e.vod_content=c.replaceAll("\u5267\u60C5\uFF1A","").replaceAll(`
`,""))}let r={},i=t.html(),s=t('[class="play-list"]'),a=1;for(let o of s){let c=`\u64AD\u653E\u8FDE\u63A5-${a}`,f=[];for(let m of t(o).find("a")){let d=m.attribs.title,y=m.attribs.href;f.push(d+"$"+y)}r[c]=f.join("#"),a=a+1}a=1;let u=t('[class="con4"]');for(let o of u){let c=`\u78C1\u529B\u94FE\u63A5-${a}`,f=[],m=c,d=t(t(o).find("div")).find("a")[0].attribs.href;d!=="javascript:void(0);"&&(f.push(m+"$"+d),r[c]=f.join("#"),a=a+1)}return e.vod_play_url=B.values(r).join("$$$"),e.vod_play_from=B.keys(r).join("$$$"),e}async setHomeVod(){let t=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(t)}async setDetail(t){let e=await this.getHtml(this.siteUrl+t);this.vodDetail=await this.parseVodDetailFromDoc(e)}getExtend(t){if(t.class!==void 0&&t.class!=="\u5168\u90E8")return t.class}async setCategory(t,e,n,l){let r=this.getExtend(l)??t,i;r===t?i=this.siteUrl+r:parseInt(e)===1?i=this.siteUrl+r:i=this.siteUrl+r+`index${e}.html`;let s=await this.getHtml(i);this.vodList=await this.parseVodShortListFromDoc(s)}async setPlay(flag,id,flags){if(flag.indexOf("\u78C1\u529B")>-1)this.playUrl=id;else{let idSplitList=id.split("-"),flag_id=parseInt(idSplitList[1]),episode=parseInt(idSplitList[2].split(".")[0]),$=await this.getHtml(this.siteUrl+id),playJsUrl=we(/<script type="text\/javascript" src="(.*?)">/,$.html()),playJsContent=await this.fetch(this.siteUrl+playJsUrl,null,this.getHeader()),playUrlListStr=we(/var VideoListJson=(.*?),urlinfo=/,playJsContent),playDic=eval(playUrlListStr);if(this.playUrl=playDic[flag_id][1][episode].split("$")[1],this.playUrl.indexOf("m3u8")===-1){let t=await this.fetch(this.playUrl,null,this.getHeader());this.playUrl=we(/url: '(.*?)'/,t)}}}GBKEncode(t){var e=33088;t+="";for(var n=[],l=63,r=0;r<t.length;r++){var i=t.charCodeAt(r);if(i<128)n.push(i);else{var s=rQ.indexOf(i);~s?(s+=e,n.push(255&s>>8,255&s)):n.push(l)}}return n}encode(t){let e="";for(let n of t){let l=this.GBKEncode(n);for(let r=0;r<l.length;r++)l[r]="%"+("0"+l[r].toString(16)).substr(-2).toUpperCase();e=e+l.join("")}return e}async setSearch(t,e){let n={searchword:this.encode(t)},l=await this.post(this.siteUrl+"/search.asp",n,this.getHeader(),"form",1),r=Ue(hb(l,"gb2312"));this.vodList=await this.parseVodShortListFromDocBySearch(r)}},qt=new tT;async function XAe(t){await qt.init(t)}async function WAe(t){return await qt.home(t)}async function YAe(){return await qt.homeVod()}async function QAe(t,e,n,l){return await qt.category(t,e,n,l)}async function ZAe(t){return await qt.detail(t)}async function eOe(t,e,n){return await qt.play(t,e,n)}async function tOe(t,e){return await qt.search(t,e)}function TVe(){return{init:XAe,home:WAe,homeVod:YAe,category:QAe,detail:ZAe,play:eOe,search:tOe}}var nT=class extends Ce{constructor(){super()}getName(){return qt.getName()}getAppName(){return qt.getAppName()}getJSName(){return qt.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await qt.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await qt.initCookie(e.server.config.bilicookie),await qt.spiderInit(e),qt.cfgObj.code=0,qt.catOpenStatus=!0,qt.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await qt.setClasses(),this.classes=qt.classes}async setFilterObj(){await qt.setFilterObj(),this.filterObj=qt.filterObj}async setHomeVod(){await qt.setHomeVod(),this.homeVodList=qt.homeVodList}async setCategory(e,n,l,r){await qt.setCategory(e,n,l,r),this.vodList=qt.vodList}async setDetail(e){await qt.setDetail(e),this.vodDetail=qt.vodDetail}async setPlay(e,n,l){await qt.setPlay(e,n,l),this.playUrl=qt.playUrl,this.result=qt.result}async setSearch(e,n,l){await qt.setSearch(e,n,l),this.vodList=qt.vodList,this.result=qt.result}async setProxy(e,n){return await qt.proxy(e,n)}},Ba=new nT;async function iQ(t,e){return await Ba.init(t,e)}async function sQ(t,e){return await Ba.home(t,e)}async function nOe(t,e){return await Ba.homeVod(t,e)}async function aQ(t,e){return await Ba.category(t,e)}async function uQ(t,e){return await Ba.detail(t,e)}async function oQ(t,e){return await Ba.play(t,e)}async function cQ(t,e){return await Ba.search(t,e)}async function lOe(t,e){return await Ba.proxy(t,e)}var pQ={meta:{key:qt.getJSName(),name:qt.getName(),type:qt.getType()},api:async t=>{t.post("/init",iQ),t.post("/home",sQ),t.post("/category",aQ),t.post("/detail",uQ),t.post("/play",oQ),t.post("/search",cQ),t.get("/proxy/:what/:ids/:end",lOe)},spider:{init:iQ,home:sQ,homeVod:nOe,category:aQ,detail:uQ,play:oQ,search:cQ}};var lT=class extends Pe{constructor(){super(),this.siteUrl="https://www.cilixiong.com",this.cateObj={"/movie/":"1","/drama/":"2"}}getAppName(){return"\u78C1\u529B\u718A"}getName(){return"\u{1F43B}\u2503\u78C1\u529B\u718A\u2503\u{1F43B}"}getJSName(){return"cilixiong"}getType(){return 3}async setClasses(){let e=await this.getHtml(),n=e('[class="nav col-12 col-lg-auto me- Line truncated
`,"").replaceAll(" ","").replaceAll(" ","")+"end";if(o.indexOf("\u5E74\u4EFD")>-1&&(e.vod_year=we(/年份:(.*?)end/,o).replaceAll("/","")),o.indexOf("\u5907\u6CE8")>-1){let c=we(/备注:(.*?)end/,o);e.vod_remarks=we(/备注:\/(.*?)end/,o)}o.indexOf("\u6807\u7B7E")>-1&&(e.type_name=we(/标签:(.*?)end/,o)),o.indexOf("\u5267\u60C5")>-1&&(e.vod_content=we(/剧情:(.*?)end/,o))}let r=t('[class="module-tab-item tab-item"]'),i=t('[class="scroll-content"]'),s=[],a=[];for(let u=0;u<r.length;u++){let o=r[u];s.push(o.attribs["data-dropdown-value"]);let c=[];for(let f of t(i[u]).find("a")){let m=t(f).text(),d=f.attribs.href;c.push(m+"$"+d)}a.push(c.join("#"))}return e.vod_play_from=s.join("$$$"),e.vod_play_url=a.join("$$$"),e}async setHomeVod(){let t=await this.getHtml();this.homeVodList=await this.parseVodShortListFromDoc(t)}getExtendValue(t,e){return t[e]===void 0||t[e]==="0"?"":t[e]}async setCategory(t,e,n,l){await this.jadeLog.debug(`extend:${JSON.stringify(l)}`);let r=this.getExtendValue(l,"1"),i=this.getExtendValue(l,"2"),s=this.getExtendValue(l,"3"),a=this.getExtendValue(l,"4"),u=[t.toString(),"",a,r,"",s,"","",e.toString(),"","",i],o=this.siteUrl+"/show/"+u.join("-")+".html",c=await this.getHtml(o);this.vodList=await this.parseVodShortListFromDocByCategory(c)}async setDetail(t){let e=await this.getHtml(this.siteUrl+t);this.vodDetail=await this.parseVodDetailFromDoc(e)}async setSearch(t,e){let n=this.siteUrl+`/search/${t}-------------.html`,l=await this.getHtml(n);this.vodList=await this.parseVodShortListFromDocBySearch(l)}async setPlay(t,e,n){let l=await this.getHtml(this.siteUrl+e),i="https://danmu.yhdmjx.com/m3u8.php?url="+JSON.parse(we(/var player_aaaa=(.*?)<\/script>/,l.html())).url,s=await await this.fetch(i,null,this.getHeader()),a=s.match(/"url": getVideoInfo\("(.*?)"\),/)[1],u=s.match(/<script>var bt_token = "(.*?)"/)[1],o=await await this.fetch("https://danmu.yhdmjx.com/js/play.js",null,this.getHeader());o=o.match(/var _token_key=CryptoJS\['enc'\]\['Utf8'\]\[_0x17f1\('67','qETJ'\)\]\((.*?\))/)[1],o=this.decrypt_token_key(o),this.playUrl=await this.getVideoInfo(a,o,u)}decrypt_token_key(toekn_key){var _0xod4="jsjiami.com.v6",_0x175e=[_0xod4,"JMOsw6omwoDCmw==","wp3DkSx5Eg==","HB7CscOJfS3DuUjDv2bDjsOmwr3Cm8KcwoI=","fR/Dqg==","ShRGTcKa","w5Y8VBs=","esKYKQ==","FgIdwrPDnMKOw7k=","HhXCmA==","woNrRsKSwpnDvcKfw4g=","ezBn","w43DkcK5w4MaJiE=","w44Ob8KjwrjCrMKtUA==","HwtswqI=","YsKnwrRawro=","Sm/CpQXCjz4RH8ORSXw=","IsO6w64=","T8OeAQ==","VcK4Hg==","csOmfBJ4","d8OAcA5L","Tn4RL2s=","w7goGizCmw==","w6XDlcOGwpoY","TsK7wpNPwrg=","w7J1CzLCnsO+HA==","w4XDkcK0w5YXPg==","S8KoCcKS","PcKWHcK/Eg==","Z2oMJ3rCiw==","YsKMG8KMwo0=","QsOecgRIwp4=","dFzDkUUxw48Qw7nCmX3CicODCMKnw74IOg==","acO2KU1B","wrAnw6DDrg==","w5MsScKwwoA=","wohZG8KhBg==","b8OieSpZ","w4ZmEsORw6I=","w7jDhxvCh8KY","w7wQa8KFwr0=","IMObw4E3wqU=","JsOjw5Erwrg=","w6MwcsKOwqU=","b8KIwqF0wrs=","XhXDvT52","wrDCmirChSE=","w5t1wpvDuwE=","XA7CtsKeEA==","wonCvVthw78=","U8KPP8KMwq4=","wp7DhCxjGTU=","woPDoBdiEQ==","HjzCrE/Dvg==","SsOQOWHCgg==","w6NdwoXCkMOx","w6shYWQ/","eE/Cgg==","XW/Csj7CmDoA","w680OynCgcK5BA8=","w4PDoMOTwrog","w5R7wqbCpMOPwrMxUcOiM8OuMVLCisKKFsOXAcOWY8O6w5hM","WwjDoht0","PzXCiHHDiA==","QMOFaMKcfQ==","bz9bVsK+","w7Npwp/DsB9ONw==","EcOPBQ3Cig==","woHDnzk=","DsKQLxtd","R8OCJmk=","wp55O8On","bkXCmhTCqg==","w7vDgx3Cg8KU","w6nDo8KdAn8=","O8KwP8KEDw==","wqzCtCHCtCg=","w5nDgmYhw5c=","wp0OZsK+w4A=","wrFxe8KFwp/DvcKew4EbN8K7BMORMx3DuxtOVELChsOEIQ==","BMKWRDc=","IS5dw6nDhQ==","w6geeG8t","SsK/wohywpc=","LBlnw7jDkA==","wodiLsOg","Ig5Ow7/Dlw==","TMOOewRZwoQ=","LjnClV7DvA==","woZsO8KcPQ==","eWvClMKeKQ==","wq1KWsKswr8=","w4p+AGFa","C8O7F8K2CQcKFxxgwo5sfh3DpAFV","w6XDqMKoCw==","w6Z8wqnCpMOe","w6x/CHRhXhV/w7I=","wrvClndGw5Y=","VsKcwo5RwoA=","ZcK2BMKmLQ==","BCcPwofDvQ==","eGEsF20=","eMOcUglq","w4U9XEAMw4/Dm3rCuzpxTg/DvyDDvMONH8OTwpTCtsKbw6k=","VwXDkTxG","CzHCrl3DkQ==","w7PDkVovw4o=","dsONYDdj","w79pwr3Duh4=","w55kwoLCpMOR","w6gbc8KGwpw=","bCnCtMKCCg==","Php5w64=","w7x8wpfDtiQ=","w4TDk2AB","w7lowoHDtgQ=","DB/CsnjDuQ==","woTDl8K3wp4S","wr0Ewq7Dq8Oh","GmHCpGxN","w5/Dm2XDpw==","w5bDpsOCwqoA","YMKowphwwqc=","ahFuVsK9","w57DtEsbw7k=","w6LDo8Kq","UsKzE8KO","w6xlBFl9","WMOgIXbCiw==","DBhjw5fDhQ==","w6pUwoHCnsOs","ZF7CtsKiHg==","wos4w7wCwr0c","JlXCjlpyw5pMw6s=","TcO1N8K4wqE=","SMOzTcKYRw==","w4HDosOzwrUc","wqxdwqE2wrY=","A8OPGQjChw==","wpkxasOxBQ==","wpIZSA==","VsOnEEvChg==","bMOSZy93","c8OwZsKnRQ==","SsK/wpBHwoQ=","ccOsHVFf","w6ZKYMO8w6rDr8OrCHxdwqtdwrDDksOMccKZwobDpQPDgsOrAMKXF8OMPcOySsKuL8KLwq8vwr/DkjbDqsOCbRrCkcOTTFfDlsKkw7PChCM1wqTDisKawpHDt8KCQRY3w6DDgMKVw6M=","w7hYwq3ClsOa","Fic5wqLDiw==","KcKqHCVV","wqvDucKSwrs/","YcOfQcKPSQ==","wpjClmNRw7U=","wpHClSnCizg=","w4PDh8Kw","JsOYGwnCpw==","w5vDksK8w6sl","U8ORCHt+Rw==","woVxO8OSJQ==","b37Chw/Clw==","w6ViBXZlQg==","UwPCucKQCgU=","UMOeZgs=","MTLCtW7Dq2o=","wqAQwr/DqcOi","DiLDtsOOZsKEbsOrGm03EcKEwr/CplQ=","dzPDnRhP","wplgT8KBwow=","XUzCg8KF","K8KTCcKrCQ==","w6ZKJMOw","LxTCmn/DsA==","wooObcKBw6g=","w5djwofDoTQ=","VMOHeAts","Kw96 Line truncated
`).trim(),n=i("a.Readpage_down")[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:r+`
`}}catch{this.playUrl={content:""}}}async search(e,n){let r=await req(`${this.siteUrl}/user/hm.html?q=${encodeURIComponent(e)}`,{headers:{accept:"application/json","User-Agent":Y2,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),l=(B.isArray(r.headers["set-cookie"])?r.headers["set-cookie"].join(";;;"):r.headers["set-cookie"]).split(";;;"),s={};for(let c of l){let f=c.trim(),m=f.indexOf("="),d=f.substr(0,m);s[d]=f.substr(m+1,f.indexOf(";")-m-1)}let a=await req(`${this.siteUrl}/user/search.html?q=${encodeURIComponent(e)}&so=undefined`,{headers:{accept:"application/json","User-Agent":Y2,cookie:"hm="+s.hm,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),o=JSON.parse(a.content),u=[];for(let c of o)u.push({book_id:c.url_list,book_name:c.articlename,book_pic:c.url_img,book_remarks:c.author});return{tline:2,list:u}}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let r=e[0],i=vi(e[1]);if(r==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${i}`);let l=await this.getHtml(this.siteUrl+i),s=await this.parseVodDetailFromDoc(l),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:i,"User-Agent":zr}}):a=await req(s.book_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},Gn=new sT;var aT=class extends Re{constructor(){super()}getName(){return Gn.getName()}getAppName(){return Gn.getAppName()}getJSName(){return Gn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Gn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Gn.initCookie(e.server.config.bilicookie),await Gn.spiderInit(e),Gn.cfgObj.code=0,Gn.catOpenStatus=!0,Gn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Gn.setClasses(),this.classes=Gn.classes}async setFilterObj(){await Gn.setFilterObj(),this.filterObj=Gn.filterObj}async setHomeVod(){await Gn.setHomeVod(),this.homeVodList=Gn.homeVodList}async setCategory(e,n,r,i){await Gn.setCategory(e,n,r,i),this.vodList=Gn.vodList}async setDetail(e){await Gn.setDetail(e),this.vodDetail=Gn.vodDetail}async setPlay(e,n,r){await Gn.setPlay(e,n,r),this.playUrl=Gn.playUrl,this.result=Gn.result}async setSearch(e,n,r){await Gn.setSearch(e,n,r),this.vodList=Gn.vodList,this.result=Gn.result}async setProxy(e,n){return await Gn.proxy(e,n)}},Xo=new aT;async function HQ(t,e){return await Xo.init(t,e)}async function VQ(t,e){return await Xo.home(t,e)}async function aOe(t,e){return await Xo.homeVod(t,e)}async function qQ(t,e){return await Xo.category(t,e)}async function zQ(t,e){return await Xo.detail(t,e)}async function GQ(t,e){return await Xo.play(t,e)}async function JQ(t,e){return await Xo.search(t,e)}async function oOe(t,e){return await Xo.proxy(t,e)}var KQ={meta:{key:Gn.getJSName(),name:Gn.getName(),type:Gn.getType()},api:async t=>{t.post("/init",HQ),t.post("/home",VQ),t.post("/category",qQ),t.post("/detail",zQ),t.post("/play",GQ),t.post("/search",JQ),t.get("/proxy/:what/:ids/:end",oOe)},spider:{init:HQ,home:VQ,homeVod:aOe,category:qQ,detail:zQ,play:GQ,search:JQ}};var oT=class extends Fe{constructor(){super(),this.siteUrl="https://www.diyi69.com"}getAppName(){return"\u516D\u4E5D\u4E66\u5427"}getJSName(){return"liujiushu"}getType(){return 10}getName(){return"\u{1F4DA}\uFE0E\u2503\u516D\u4E5D\u4E66\u5427\u2503\u{1F4DA}\uFE0E"}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getHeader()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getHeader())}async init(e){await super.init(e),await this.spiderInit(null)}parseVodShortFromElement(e,n){let r=new Ei,i=e(n).find("a");return r.book_remarks=e(i[2]).text(),r.book_name=e(i[1]).text(),r.book_id=i[0].attribs.href,r.book_pic=e(n).find("img")[0].attribs.src,r}async parseVodShortListFromDoc(e){let n=[],r=e(e('[class="flex"]')[0]).find("li");for(let i of r){let l=this.parseVodShortFromElement(e,i);n.push(l)}return n}async parseVodShortListFromDocByCategory(e){let n=e("ul.flex > li"),r=[];for(let i of n){let l=new Ei;l.book_id=e(i).find("a:first")[0].attribs.href;let s=e(i).find("img:first")[0];l.book_name=s.attribs.title,l.book_pic=s.attribs["data-original"],l.book_remarks=e(e(i).find("em:first")).text(),r.push(l)}return r}async parseVodShortListFromDocBySearch(e){let n=[],r=e("li.searchresult");for(let i of r){let l=new Ei,s=e(i).find("a");l.book_remarks=e(s[2]).text(),l.book_name=e(s[1]).text(),l.book_id=s[0].attribs.href,l.book_pic=e(s[0]).find("img")[0].attribs["data-original"],n.push(l)}return n}async parseVodDetailFromDoc(e,n){let r=e.html(),i=new zo;i.book_name=e("[property$=title]")[0].attribs.content,i.book_year=e("[property$=update_time]")[0].attribs.content,i.book_director=e("[property$=autho Line truncated
`}}catch{this.playUrl={content:""}}}async search(e,n){let l=await req(`${this.siteUrl}/user/hm.html?q=${encodeURIComponent(e)}`,{headers:{accept:"application/json","User-Agent":Qs,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),i=(B.isArray(l.headers["set-cookie"])?l.headers["set-cookie"].join(";;;"):l.headers["set-cookie"]).split(";;;"),s={};for(let c of i){let f=c.trim(),m=f.indexOf("="),d=f.substr(0,m);s[d]=f.substr(m+1,f.indexOf(";")-m-1)}let a=await req(`${this.siteUrl}/user/search.html?q=${encodeURIComponent(e)}&so=undefined`,{headers:{accept:"application/json","User-Agent":Qs,cookie:"hm="+s.hm,Referer:`${this.siteUrl}/s?q=${encodeURIComponent(e)}`}}),u=JSON.parse(a.content),o=[];for(let c of u)o.push({book_id:c.url_list,book_name:c.articlename,book_pic:c.url_img,book_remarks:c.author});return{tline:2,list:o}}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let l=e[0],r=_2(e[1]);if(l==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${r}`);let i=await this.getHtml(this.siteUrl+r),s=await this.parseVodDetailFromDoc(i),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:r,"User-Agent":Gl}}):a=await req(s.book_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},Jn=new gT;var vT=class extends Ce{constructor(){super()}getName(){return Jn.getName()}getAppName(){return Jn.getAppName()}getJSName(){return Jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Jn.initCookie(e.server.config.bilicookie),await Jn.spiderInit(e),Jn.cfgObj.code=0,Jn.catOpenStatus=!0,Jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Jn.setClasses(),this.classes=Jn.classes}async setFilterObj(){await Jn.setFilterObj(),this.filterObj=Jn.filterObj}async setHomeVod(){await Jn.setHomeVod(),this.homeVodList=Jn.homeVodList}async setCategory(e,n,l,r){await Jn.setCategory(e,n,l,r),this.vodList=Jn.vodList}async setDetail(e){await Jn.setDetail(e),this.vodDetail=Jn.vodDetail}async setPlay(e,n,l){await Jn.setPlay(e,n,l),this.playUrl=Jn.playUrl,this.result=Jn.result}async setSearch(e,n,l){await Jn.setSearch(e,n,l),this.vodList=Jn.vodList,this.result=Jn.result}async setProxy(e,n){return await Jn.proxy(e,n)}},Wa=new vT;async function aZ(t,e){return await Wa.init(t,e)}async function uZ(t,e){return await Wa.home(t,e)}async function POe(t,e){return await Wa.homeVod(t,e)}async function oZ(t,e){return await Wa.category(t,e)}async function cZ(t,e){return await Wa.detail(t,e)}async function pZ(t,e){return await Wa.play(t,e)}async function fZ(t,e){return await Wa.search(t,e)}async function LOe(t,e){return await Wa.proxy(t,e)}var dZ={meta:{key:Jn.getJSName(),name:Jn.getName(),type:Jn.getType()},api:async t=>{t.post("/init",aZ),t.post("/home",uZ),t.post("/category",oZ),t.post("/detail",cZ),t.post("/play",pZ),t.post("/search",fZ),t.get("/proxy/:what/:ids/:end",LOe)},spider:{init:aZ,home:uZ,homeVod:POe,category:oZ,detail:cZ,play:pZ,search:fZ}};var _T=class extends Pe{constructor(){super(),this.siteUrl="https://www.diyi69.com"}getAppName(){return"\u516D\u4E5D\u4E66\u5427"}getJSName(){return"liujiushu"}getType(){return 10}getName(){return"\u{1F4DA}\uFE0E\u2503\u516D\u4E5D\u4E66\u5427\u2503\u{1F4DA}\uFE0E"}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"img",this.getHeader()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"img/",this.getHeader())}async init(e){await super.init(e),await this.spiderInit(null)}parseVodShortFromElement(e,n){let l=new b2,r=e(n).find("a");return l.book_remarks=e(r[2]).text(),l.book_name=e(r[1]).text(),l.book_id=r[0].attribs.href,l.book_pic=e(n).find("img")[0].attribs.src,l}async parseVodShortListFromDoc(e){let n=[],l=e(e('[class="flex"]')[0]).find("li");for(let r of l){let i=this.parseVodShortFromElement(e,r);n.push(i)}return n}async parseVodShortListFromDocByCategory(e){let n=e("ul.flex > li"),l=[];for(let r of n){let i=new b2;i.book_id=e(r).find("a:first")[0].attribs.href;let s=e(r).find("img:first")[0];i.book_name=s.attribs.title,i.book_pic=s.attribs["data-original"],i.book_remarks=e(e(r).find("em:first")).text(),l.push(i)}return l}async parseVodShortListFromDocBySearch(e){let n=[],l=e("li.searchresult");for(let r of l){let i=new b2,s=e(r).find("a");i.book_remarks=e(s[2]).text(),i.book_name=e(s[1]).text(),i.book_id=s[0].attribs.href,i.book_pic=e(s[0]).find("img")[0].attribs["data-original"],n.push(i)}return n}async parseVodDetailFromDoc(e,n){let l=e.html(),r=new Ga;r.book_name=e("[property$=title]")[0].attribs.content,r.book_year=e("[property$=update_time]")[0].attribs.content,r.book_director=e("[property$=autho Line truncated
`;for(;;){let s=await this.getHtml(this.siteUrl+n);if(l+=Ep(s('[class="content"]').html().trim().replaceAll("<p>"," ").replaceAll("</p>",`
`)),n=s('[id="next_url"]')[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:l}}async setSearch(e,n){let r={searchkey:e,searchtype:"all",Submit:""},i=await this.fetch(this.siteUrl+"/search/",r,this.getHeader()),l=Be(i);this.vodList=await this.parseVodShortListFromDocBySearch(l)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let r=e[0],i=vi(e[1]);if(r==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${i}`);let l=await this.getHtml(this.siteUrl+i),s=await this.parseVodDetailFromDoc(l),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:i,"User-Agent":zr}}):a=await req(s.book_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},Jn=new oT;var uT=class extends Re{constructor(){super()}getName(){return Jn.getName()}getAppName(){return Jn.getAppName()}getJSName(){return Jn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Jn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Jn.initCookie(e.server.config.bilicookie),await Jn.spiderInit(e),Jn.cfgObj.code=0,Jn.catOpenStatus=!0,Jn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Jn.setClasses(),this.classes=Jn.classes}async setFilterObj(){await Jn.setFilterObj(),this.filterObj=Jn.filterObj}async setHomeVod(){await Jn.setHomeVod(),this.homeVodList=Jn.homeVodList}async setCategory(e,n,r,i){await Jn.setCategory(e,n,r,i),this.vodList=Jn.vodList}async setDetail(e){await Jn.setDetail(e),this.vodDetail=Jn.vodDetail}async setPlay(e,n,r){await Jn.setPlay(e,n,r),this.playUrl=Jn.playUrl,this.result=Jn.result}async setSearch(e,n,r){await Jn.setSearch(e,n,r),this.vodList=Jn.vodList,this.result=Jn.result}async setProxy(e,n){return await Jn.proxy(e,n)}},Wo=new uT;async function XQ(t,e){return await Wo.init(t,e)}async function WQ(t,e){return await Wo.home(t,e)}async function uOe(t,e){return await Wo.homeVod(t,e)}async function YQ(t,e){return await Wo.category(t,e)}async function QQ(t,e){return await Wo.detail(t,e)}async function ZQ(t,e){return await Wo.play(t,e)}async function eZ(t,e){return await Wo.search(t,e)}async function cOe(t,e){return await Wo.proxy(t,e)}var tZ={meta:{key:Jn.getJSName(),name:Jn.getName(),type:Jn.getType()},api:async t=>{t.post("/init",XQ),t.post("/home",WQ),t.post("/category",YQ),t.post("/detail",QQ),t.post("/play",ZQ),t.post("/search",eZ),t.get("/proxy/:what/:ids/:end",cOe)},spider:{init:XQ,home:WQ,homeVod:uOe,category:YQ,detail:QQ,play:ZQ,search:eZ}};function iZ(t){this._parameters={},this._loadParameters(t||{})}iZ.prototype={_loadParameters:function(t){t instanceof Array?this._loadParametersFromArray(t):typeof t=="object"&&this._loadParametersFromObject(t)},_loadParametersFromArray:function(t){var e;for(e=0;e<t.length;e++)this._loadParametersFromObject(t[e])},_loadParametersFromObject:function(t){var e;for(e in t)if(t.hasOwnProperty(e)){var n=this._getStringFromParameter(t[e]);this._loadParameterValue(e,n)}},_loadParameterValue:function(t,e){var n;if(e instanceof Array){for(n=0;n<e.length;n++){var r=this._getStringFromParameter(e[n]);this._addParameter(t,r)}e.length==0&&this._addParameter(t,"")}else this._addParameter(t,e)},_getStringFromParameter:function(t){var e=t||"";try{(typeof t=="number"||typeof t=="boolean")&&(e=t.toString())}catch{}return e},_addParameter:function(t,e){this._parameters[t]||(this._parameters[t]=[]),this._parameters[t].push(e)},get:function(){return this._parameters}};function pOe(t){return t?decodeURIComponent(t):""}function fOe(t){let e=[],n=[];for(let a in t)e.push(G5(a));e.sort();for(let a=0;a<e.length;a++){let o=e[a];var r,i,l=pOe(o),s=t[l];for(s.sort(),r=0;r<s.length;r++)i=G5(s[r]),n.push(o+"="+i)}return n.join("&")}function nZ(t=10){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let r=0;r<t;r++)n+=e.charAt(Math.floor(Math.random()*e.length));return n}function G5(t){return t?encodeURIComponent(t).replace(/[!'()]/g,escape).replace(/\*/g,"%2A"):""}function rZ(t,e,n,r="f3ac5b086f3eab260520d8e3049561e6"){e=e.split("?")[0],e=e.startsWith("http")?e:"https://api.audiomack.com/v1"+e;let i=new iZ(n).get(),l=t.toUpperCase(),s=fOe(i),a=G5(l)+"&"+G5(e)+"&"+G5(s);return Ve.HmacSHA1(a,r+"&").toString(Ve.enc.Base64)}var cT=class extends Fe{constructor(){super(),this.siteUrl="https://api.audiomack.com/v1"}getName(){return"\u{1F3B5}\u2503\u97F3\u58F0\u2503\u{1F3B5}"}getAppName(){return"\u97F3\u58F0"}getJSName(){return"audiomack"}getType(){return 10}async parseVodShortListFromJson(e){let n=[];for(let r of e.results.playlists){let i=new Ei;i.book_id=r.id,i.book_pic=r.image,i.book_name=r.title,i.book_remarks=r.description,n.push(i)}return n}async setClasses(){this. Line truncated
`;for(;;){let s=await this.getHtml(this.siteUrl+n);if(i+=Ap(s('[class="content"]').html().trim().replaceAll("<p>"," ").replaceAll("</p>",`
`)),n=s('[id="next_url"]')[0].attribs.href,n.indexOf("_")<0)break}this.playUrl={content:i}}async setSearch(e,n){let l={searchkey:e,searchtype:"all",Submit:""},r=await this.fetch(this.siteUrl+"/search/",l,this.getHeader()),i=Ue(r);this.vodList=await this.parseVodShortListFromDocBySearch(i)}async proxy(e,n){await this.jadeLog.debug(`\u6B63\u5728\u8BBE\u7F6E\u53CD\u5411\u4EE3\u7406 segments = ${e.join(",")},headers = ${JSON.stringify(n)}`);let l=e[0],r=_2(e[1]);if(l==="img"){await this.jadeLog.debug(`\u53CD\u5411\u4EE3\u7406ID\u4E3A:${r}`);let i=await this.getHtml(this.siteUrl+r),s=await this.parseVodDetailFromDoc(i),a;return B.isEmpty(n)?a=await req(s.book_pic,{buffer:2,headers:{Referer:r,"User-Agent":Gl}}):a=await req(s.book_pic,{buffer:2,headers:n}),JSON.stringify({code:a.code,buffer:2,content:a.content,headers:a.headers})}return JSON.stringify({code:500,content:""})}},Kn=new _T;var ET=class extends Ce{constructor(){super()}getName(){return Kn.getName()}getAppName(){return Kn.getAppName()}getJSName(){return Kn.getJSName()}async init(e,n){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await Kn.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await Kn.initCookie(e.server.config.bilicookie),await Kn.spiderInit(e),Kn.cfgObj.code=0,Kn.catOpenStatus=!0,Kn.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,n)}async setClasses(){await Kn.setClasses(),this.classes=Kn.classes}async setFilterObj(){await Kn.setFilterObj(),this.filterObj=Kn.filterObj}async setHomeVod(){await Kn.setHomeVod(),this.homeVodList=Kn.homeVodList}async setCategory(e,n,l,r){await Kn.setCategory(e,n,l,r),this.vodList=Kn.vodList}async setDetail(e){await Kn.setDetail(e),this.vodDetail=Kn.vodDetail}async setPlay(e,n,l){await Kn.setPlay(e,n,l),this.playUrl=Kn.playUrl,this.result=Kn.result}async setSearch(e,n,l){await Kn.setSearch(e,n,l),this.vodList=Kn.vodList,this.result=Kn.result}async setProxy(e,n){return await Kn.proxy(e,n)}},Ya=new ET;async function hZ(t,e){return await Ya.init(t,e)}async function mZ(t,e){return await Ya.home(t,e)}async function FOe(t,e){return await Ya.homeVod(t,e)}async function yZ(t,e){return await Ya.category(t,e)}async function gZ(t,e){return await Ya.detail(t,e)}async function vZ(t,e){return await Ya.play(t,e)}async function _Z(t,e){return await Ya.search(t,e)}async function jOe(t,e){return await Ya.proxy(t,e)}var EZ={meta:{key:Kn.getJSName(),name:Kn.getName(),type:Kn.getType()},api:async t=>{t.post("/init",hZ),t.post("/home",mZ),t.post("/category",yZ),t.post("/detail",gZ),t.post("/play",vZ),t.post("/search",_Z),t.get("/proxy/:what/:ids/:end",jOe)},spider:{init:hZ,home:mZ,homeVod:FOe,category:yZ,detail:gZ,play:vZ,search:_Z}};function SZ(t){this._parameters={},this._loadParameters(t||{})}SZ.prototype={_loadParameters:function(t){t instanceof Array?this._loadParametersFromArray(t):typeof t=="object"&&this._loadParametersFromObject(t)},_loadParametersFromArray:function(t){var e;for(e=0;e<t.length;e++)this._loadParametersFromObject(t[e])},_loadParametersFromObject:function(t){var e;for(e in t)if(t.hasOwnProperty(e)){var n=this._getStringFromParameter(t[e]);this._loadParameterValue(e,n)}},_loadParameterValue:function(t,e){var n;if(e instanceof Array){for(n=0;n<e.length;n++){var l=this._getStringFromParameter(e[n]);this._addParameter(t,l)}e.length==0&&this._addParameter(t,"")}else this._addParameter(t,e)},_getStringFromParameter:function(t){var e=t||"";try{(typeof t=="number"||typeof t=="boolean")&&(e=t.toString())}catch{}return e},_addParameter:function(t,e){this._parameters[t]||(this._parameters[t]=[]),this._parameters[t].push(e)},get:function(){return this._parameters}};function UOe(t){return t?decodeURIComponent(t):""}function MOe(t){let e=[],n=[];for(let a in t)e.push(X6(a));e.sort();for(let a=0;a<e.length;a++){let u=e[a];var l,r,i=UOe(u),s=t[i];for(s.sort(),l=0;l<s.length;l++)r=X6(s[l]),n.push(u+"="+r)}return n.join("&")}function bZ(t=10){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="";for(let l=0;l<t;l++)n+=e.charAt(Math.floor(Math.random()*e.length));return n}function X6(t){return t?encodeURIComponent(t).replace(/[!'()]/g,escape).replace(/\*/g,"%2A"):""}function wZ(t,e,n,l="f3ac5b086f3eab260520d8e3049561e6"){e=e.split("?")[0],e=e.startsWith("http")?e:"https://api.audiomack.com/v1"+e;let r=new SZ(n).get(),i=t.toUpperCase(),s=MOe(r),a=X6(i)+"&"+X6(e)+"&"+X6(s);return He.HmacSHA1(a,l+"&").toString(He.enc.Base64)}var bT=class extends Pe{constructor(){super(),this.siteUrl="https://api.audiomack.com/v1"}getName(){return"\u{1F3B5}\u2503\u97F3\u58F0\u2503\u{1F3B5}"}getAppName(){return"\u97F3\u58F0"}getJSName(){return"audiomack"}getType(){return 10}async parseVodShortListFromJson(e){let n=[];for(let l of e.results.playlists){let r=new b2;r.book_id=l.id,r.book_pic=l.image,r.book_name=l.title,r.book_remarks=l.description,n.push(r)}return n}async setClasses(){this. Line truncated
/*! Bundled license information:
uri-js/dist/es5/uri.all.js:
+1 -1
View File
@@ -1 +1 @@
7cdb41acf1d6e9f50c551a80c8c60ed5
880995fd4c5d4db2a34315a562333cf8
+11
View File
@@ -78,6 +78,17 @@
"playerType": 0,
"type": 3
},
{
"key": "lovemovie18",
"name": "🔞┃爱情电影网18+┃🔞",
"api": "./js/lovemovie18.js",
"timeout": 30,
"ext": {
"box": "CatOpen"
},
"playerType": 0,
"type": 3
},
{
"key": "asianx",
"name": "🔞┃海外宅┃🔞",
+11
View File
@@ -77,6 +77,17 @@
"playerType": 0,
"type": 3
},
{
"key": "lovemovie18",
"name": "🔞┃爱情电影网18+┃🔞",
"api": "./js/lovemovie18.js",
"timeout": 30,
"ext": {
"box": "TVBox"
},
"playerType": 0,
"type": 3
},
{
"key": "asianx",
"name": "🔞┃海外宅┃🔞",
-3
View File
@@ -10,9 +10,6 @@ import {Spider} from "./spider.js";
import {_} from "../lib/cat.js";
import * as Utils from "../lib/utils.js";
import {VodDetail, VodShort} from "../lib/vod.js";
import * as util from "util";
import {it} from "node:test";
class CNTVSpider extends Spider {
constructor() {
super();
+328
View File
@@ -0,0 +1,328 @@
/*
* @File : lovemovie.js
* @Author : jade
* @Date : 2024/4/29 09:36
* @Email : jadehh@1ive.com
* @Software : Samples
* @Desc : 爱情电影网
*/
import {Spider} from "./spider.js";
import {_, Crypto, load} from "../lib/cat.js";
import {VodDetail, VodShort} from "../lib/vod.js";
import * as Utils from "../lib/utils.js";
import {gbk_us} from "../lib/gbk_us.js";
class LoveMovieSpider extends Spider {
constructor() {
super();
this.siteUrl = "https://b.aqdyje.com"
this.removeKey = "骑兵营"
}
getName() {
return "💕┃爱情电影网┃💕"
}
getAppName() {
return "爱情电影网"
}
getJSName() {
return "lovemovie"
}
getType() {
return 3
}
async init(cfg) {
await super.init(cfg);
}
async getHtml(url = this.siteUrl, proxy = false, headers = this.getHeader()) {
let buffer = await this.fetch(url, null, headers, false, false, 1, proxy)
let html = Utils.decode(buffer, "gb2312")
await this.jadeLog.debug(`html content:${html}`)
if (!_.isEmpty(html)) {
return load(html)
} else {
return load(gbkDecode(buffer))
}
}
async getFilter($, navElements) {
let extend_list = []
let extend_dic = {"key": "class", "name": "类型", "value": [this.getFliterDic("全部", "全部")]}
for (const navElement of $(navElements).find("li")) {
let element = $(navElement).find("a")[0]
let type_name = $(element).text()
let type_id = element.attribs.href
extend_dic["value"].push(this.getFliterDic(type_name, type_id))
}
if (extend_dic["value"].length > 1) {
extend_list.push(extend_dic)
}
return extend_list
}
async setClasses() {
let $ = await this.getHtml()
let navElements = $("[class=\"nav-item drop-down \"]")
for (const navElement of navElements) {
let elemenet = $(navElement).find("a")[0]
let type_name = $(elemenet).text()
let type_id = elemenet.attribs.href
if (type_name !== this.removeKey) {
this.classes.push(this.getTypeDic(type_name, type_id))
this.filterObj[type_id] = await this.getFilter($, navElement)
}
}
}
async parseVodShortListFromDoc($) {
let vod_list = []
let vodElements = $("[class=\"play-img\"]")
if (vodElements.length === 0) {
vodElements = $("[class=\"show-list list-mode fn-clear\"]").find("li")
}
for (const vodElement of vodElements) {
let vodShort = new VodShort()
vodShort.vod_id = vodElement.attribs.href
if (_.isEmpty(vodShort.vod_id)) {
vodShort.vod_id = $(vodElement).find("a")[0].attribs.href
}
let imgElement = $(vodElement).find("img")[0]
vodShort.vod_pic = imgElement.attribs.src
vodShort.vod_name = imgElement.attribs.alt
for (const element of $(vodElement).find("label")) {
let text = $(element).text().trim()
if (!_.isEmpty(text)) {
vodShort.vod_remarks = text
break
}
}
if (_.isEmpty(vodShort.vod_remarks)) {
vodShort.vod_remarks = $($(vodElement).find("p")[0]).text().replace("\n")
}
vod_list.push(vodShort)
}
return vod_list
}
async parseVodShortListFromDocBySearch($) {
let vodElements = $("[class=\"show-list\"]").find("li")
let vod_list = []
for (const vodElement of vodElements) {
let vodShort = new VodShort()
vodShort.vod_id = $(vodElement).find("a")[0].attribs.href
let imgElement = $(vodElement).find("img")[0]
vodShort.vod_pic = imgElement.attribs.src
vodShort.vod_name = imgElement.attribs.alt
vodShort.vod_remarks = $($(vodElement).find("[class=\"type fn-left\"]")).text().replace("类型:", "")
if (vodShort.vod_remarks !== "社处片" && vodShort.vod_remarks !== "社保片" && vodShort.vod_remarks !== "撸丝片" && vodShort.vod_remarks !== "撸丝动漫") {
vod_list.push(vodShort)
}
}
return vod_list
}
async parseVodDetailFromDoc($) {
let vodDetail = new VodDetail()
let imgElement = $("[class=\"detail-pic fn-left\"]").find("img")[0]
vodDetail.vod_pic = imgElement.attribs.src
vodDetail.vod_name = imgElement.attribs.alt
let vodInfoElement = $("[class=\"info fn-clear\"]")
for (const vodDlElement of $(vodInfoElement).find("dl")) {
let text = $(vodDlElement).text()
if (text.indexOf("主演") > -1) {
vodDetail.vod_actor = text.replaceAll("主演:", "").replaceAll("\n", "")
}
if (text.indexOf("状态") > -1) {
vodDetail.vod_remarks = text.replaceAll("状态:", "").replaceAll("\n", "")
}
if (text.indexOf("类型") > -1) {
vodDetail.type_name = text.replaceAll("类型:", "").replaceAll("\n", "")
}
if (text.indexOf("地区") > -1) {
vodDetail.vod_area = text.replaceAll("地区:", "").replaceAll("\n", "")
}
if (text.indexOf("导演") > -1) {
vodDetail.vod_director = text.replaceAll("导演:", "").replaceAll("\n", "")
}
if (text.indexOf("年份") > -1) {
vodDetail.vod_year = text.replaceAll("年份:", "").replaceAll("\n", "")
}
if (text.indexOf("剧情") > -1) {
vodDetail.vod_content = text.replaceAll("剧情:", "").replaceAll("\n", "")
}
}
let playList = {}
let html = $.html()
let playListElements = $("[class=\"play-list\"]")
let index = 1
for (const playListElement of playListElements) {
let playName = `播放连接-${index}`
let vodItems = []
for (const playUrlElement of $(playListElement).find("a")) {
let playUrlName = playUrlElement.attribs.title
let playUrl = playUrlElement.attribs.href
vodItems.push(playUrlName + "$" + playUrl)
}
playList[playName] = vodItems.join("#")
index = index + 1
}
index = 1
let ciliListElements = $("[class=\"con4\"]")
for (const ciliListElement of ciliListElements) {
let playName = `磁力链接-${index}`
let vodItems = []
let playUrlName = playName
let playUrl = $($(ciliListElement).find("div")).find("a")[0].attribs.href
if (playUrl !== "javascript:void(0);") {
vodItems.push(playUrlName + "$" + playUrl)
playList[playName] = vodItems.join("#")
index = index + 1
}
}
vodDetail.vod_play_url = _.values(playList).join('$$$');
vodDetail.vod_play_from = _.keys(playList).join('$$$');
return vodDetail
}
async setHomeVod() {
let $ = await this.getHtml()
this.homeVodList = await this.parseVodShortListFromDoc($)
}
async setDetail(id) {
let $ = await this.getHtml(this.siteUrl + id)
this.vodDetail = await this.parseVodDetailFromDoc($)
}
getExtend(extend) {
if (extend["class"] !== undefined) {
if (extend["class"] !== "全部") {
return extend["class"]
}
}
return undefined
}
async setCategory(tid, pg, filter, extend) {
let classes = this.getExtend(extend) ?? tid
let url
if (classes === tid) {
url = this.siteUrl + classes
} else {
if (parseInt(pg) === 1) {
url = this.siteUrl + classes
} else {
url = this.siteUrl + classes + `index${pg}.html`
}
}
let $ = await this.getHtml(url)
this.vodList = await this.parseVodShortListFromDoc($)
}
async setPlay(flag, id, flags) {
if (flag.indexOf("磁力") > -1) {
this.playUrl = id
} else {
let idSplitList = id.split("-")
let flag_id = parseInt(idSplitList[1])
let episode = parseInt(idSplitList[2].split(".")[0])
let $ = await this.getHtml(this.siteUrl + id)
let playJsUrl = Utils.getStrByRegex(/<script type="text\/javascript" src="(.*?)">/, $.html())
let playJsContent = await this.fetch(this.siteUrl + playJsUrl, null, this.getHeader())
let playUrlListStr = Utils.getStrByRegex(/var VideoListJson=(.*?),urlinfo=/, playJsContent)
let playDic = eval(playUrlListStr)
this.playUrl = playDic[flag_id][1][episode].split("$")[1]
if (this.playUrl.indexOf("m3u8") === -1) {
let html = await this.fetch(this.playUrl, null, this.getHeader())
this.playUrl = Utils.getStrByRegex(/url: '(.*?)'/, html)
}
}
}
GBKEncode(str) {
var arr_index = 0x8140; //33088;
str += '';
var gbk = [];
var wh = '?'.charCodeAt(0); //gbk中没有的字符的替换符
for (var i = 0; i < str.length; i++) {
var charcode = str.charCodeAt(i);
if (charcode < 0x80) gbk.push(charcode);
else {
var gcode = gbk_us.indexOf(charcode);
if (~gcode) {
gcode += arr_index;
gbk.push(0xFF & (gcode >> 8), 0xFF & gcode);
} else {
gbk.push(wh);
}
}
}
return gbk;
}
encode(str) {
let encodeStr = ""
for (const ch of str) {
let bitArr = this.GBKEncode(ch);
for (let i = 0; i < bitArr.length; i++) {
bitArr[i] = '%' + ('0' + bitArr[i].toString(16)).substr(-2).toUpperCase();
}
encodeStr = encodeStr + bitArr.join('');
}
return encodeStr
}
async setSearch(wd, quick) {
let params = {"searchword": this.encode(wd)}
let buffer = await this.post(this.siteUrl + "/search.asp", params, this.getHeader(), "form", 1)
let $ = load(Utils.decode(buffer, "gb2312"))
this.vodList = await this.parseVodShortListFromDocBySearch($)
}
}
let spider = new LoveMovieSpider()
async function init(cfg) {
await spider.init(cfg)
}
async function home(filter) {
return await spider.home(filter)
}
async function homeVod() {
return await spider.homeVod()
}
async function category(tid, pg, filter, extend) {
return await spider.category(tid, pg, filter, extend)
}
async function detail(id) {
return await spider.detail(id)
}
async function play(flag, id, flags) {
return await spider.play(flag, id, flags)
}
async function search(wd, quick) {
return await spider.search(wd, quick)
}
export function __jsEvalReturn() {
return {
init: init, home: home, homeVod: homeVod, category: category, detail: detail, play: play, search: search,
};
}
export {spider, LoveMovieSpider}
+133
View File
@@ -0,0 +1,133 @@
/*
* @File : lovemovie18.js
* @Author : jade
* @Date : 2024/4/29 09:36
* @Email : jadehh@1ive.com
* @Software : Samples
* @Desc : 爱情电影网
*/
import {LoveMovieSpider} from "./lovemovie.js";
import {VodShort} from "../lib/vod.js";
class LoveMovie18Spider extends LoveMovieSpider {
constructor() {
super();
this.siteUrl = "https://b.aqdyje.com"
this.removeKey = "骑兵营"
}
getName() {
return "🔞┃爱情电影网18+┃🔞"
}
getAppName() {
return "爱情电影网18+"
}
getJSName() {
return "lovemovie18"
}
getType() {
return 3
}
async parseVodShortListFromDocBySearch($) {
let vodElements = $("[class=\"show-list\"]").find("li")
let vod_list = []
for (const vodElement of vodElements) {
let vodShort = new VodShort()
vodShort.vod_id = $(vodElement).find("a")[0].attribs.href
let imgElement = $(vodElement).find("img")[0]
vodShort.vod_pic = imgElement.attribs.src
vodShort.vod_name = imgElement.attribs.alt
vodShort.vod_remarks = $($(vodElement).find("[class=\"type fn-left\"]")).text().replace("类型:", "")
if (vodShort.vod_remarks === "社处片" || vodShort.vod_remarks === "社保片" || vodShort.vod_remarks === "撸丝片" || vodShort.vod_remarks === "撸丝动漫") {
vod_list.push(vodShort)
}
}
return vod_list
}
async getFilter(type_id) {
let $ = await this.getHtml(this.siteUrl + type_id)
let extend_list = []
let extend_dic = {"key": "class", "name": "类型", "value": []}
for (const navElement of $("[class=\"subnav-tv fn-left\"]").find("a")) {
let type_name = $(navElement).text()
let type_id = navElement.attribs.href
extend_dic["value"].push(this.getFliterDic(type_name, type_id))
}
if (extend_dic["value"].length > 1) {
extend_list.push(extend_dic)
}
return extend_list
}
async setClasses() {
let $ = await this.getHtml()
let navElements = $("[class=\"nav-item drop-down \"]")
this.classes = []
for (const navElement of navElements) {
let element = $(navElement).find("a")[0]
let type_name = $(element).text()
let type_id = element.attribs.href
if (type_name === this.removeKey) {
this.classes.push(this.getTypeDic(type_name, type_id))
this.filterObj[type_id] = await this.getFilter(type_id)
}
}
}
async setCategory(tid, pg, filter, extend) {
let classes = this.getExtend(extend) ?? tid
let url
if (parseInt(pg) === 1) {
url = this.siteUrl + classes
} else {
url = this.siteUrl + classes + `index${pg}.html`
}
let $ = await this.getHtml(url)
this.vodList = await this.parseVodShortListFromDoc($)
}
}
let spider = new LoveMovie18Spider()
async function init(cfg) {
await spider.init(cfg)
}
async function home(filter) {
return await spider.home(filter)
}
async function homeVod() {
return await spider.homeVod()
}
async function category(tid, pg, filter, extend) {
return await spider.category(tid, pg, filter, extend)
}
async function detail(id) {
return await spider.detail(id)
}
async function play(flag, id, flags) {
return await spider.play(flag, id, flags)
}
async function search(wd, quick) {
return await spider.search(wd, quick)
}
export function __jsEvalReturn() {
return {
init: init, home: home, homeVod: homeVod, category: category, detail: detail, play: play, search: search,
};
}
export {spider}
+10 -6
View File
@@ -246,6 +246,10 @@ class Spider {
getTypeDic(type_name, type_id) {
return {"type_name": type_name, "type_id": type_id}
}
getFliterDic(type_name, type_id) {
return {"n": type_name, "v": type_id}
}
async getHtml(url = this.siteUrl, proxy = false, headers = this.getHeader()) {
let html = await this.fetch(url, null, headers, false, false, 0, proxy)
@@ -264,12 +268,12 @@ class Spider {
return class_name_list
}
async postReconnect(reqUrl, params, headers) {
async postReconnect(reqUrl, params, headers,postType,buffer) {
await this.jadeLog.error("请求失败,请检查url:" + reqUrl + ",两秒后重试")
Utils.sleep(2)
if (this.reconnectTimes < this.maxReconnectTimes) {
this.reconnectTimes = this.reconnectTimes + 1
return await this.post(reqUrl, params, headers)
return await this.post(reqUrl, params, headers,postType,buffer)
} else {
await this.jadeLog.error("请求失败,重连失败")
return null
@@ -335,10 +339,10 @@ class Spider {
}
async post(reqUrl, params, headers, postType = "form") {
async post(reqUrl, params, headers, postType = "form",buffer = 0) {
let uri = new Uri(reqUrl);
let response = await req(uri.toString(), {
method: "post", headers: headers, data: params, postType: postType
method: "post", headers: headers, data: params, postType: postType,buffer: buffer
});
if (response.code === 200 || response.code === undefined || response.code === 302) {
// 重定向
@@ -348,11 +352,11 @@ class Spider {
this.reconnectTimes = 0
return response.content
} else {
return await this.postReconnect(reqUrl, params, headers)
return await this.postReconnect(reqUrl, params, headers,postType,buffer)
}
} else {
await this.jadeLog.error(`请求失败,请求url为:${reqUrl},回复内容为${JSON.stringify(response)}`)
return await this.postReconnect(reqUrl, params, headers)
return await this.postReconnect(reqUrl, params, headers,postType,buffer)
}
}
+21 -13
View File
@@ -1,4 +1,4 @@
import {__jsEvalReturn} from './cntv.js';
import {__jsEvalReturn} from './lovemovie18.js';
import * as Utils from "../lib/utils.js";
@@ -51,14 +51,14 @@ async function testMusicPlay(vodDetail) {
}
async function test() {
let siteKey = 'cntv';
let siteKey = 'lovemovie18';
let siteType = 3;
await spider.init({
skey: siteKey, stype: siteType, ext: {
"token": "6827db23e5474d02a07fd7431d3d5a5a",
"box": "TV",
"code": "1",
"from": "cntv",
"from": "lovemovie18",
"danmu": true,
"cookie": "buvid3=02675249-8ED3-C418-87F5-59E18316459714816infoc; b_nut=1704421014; _uuid=5D435F74-F574-D9AB-62C1-B9294DE465D913102infoc; buvid_fp=e8c5650c749398e9b5cad3f3ddb5081e; buvid4=007E85D1-52C1-7E6E-07CF-837FFBC9349516677-024010502-J5vTDSZDCw4fNnXRejbSVg%3D%3D; rpdid=|()kYJmulRu0J'u~|RRJl)JR; PVID=1; SESSDATA=3be091d3%2C1720332009%2C699ed%2A11CjAcCdwXG5kY1umhCOpQHOn_WP7L9xFBfWO7KKd4BPweodpR6VyIfeNyPiRmkr5jCqsSVjg0R0dZOVVHRUo3RnhPRTZFc3JPbGdiUjFCdHpiRDhiTkticmdKTjVyS1VhbDdvNjFMSDJlbUJydUlRdjFUNGFBNkJlV2ZTa0N1Q1BEVi1QYTQzTUh3IIEC; bili_jct=b0ee7b5d3f27df893545d811d95506d4; DedeUserID=78014638; DedeUserID__ckMd5=4c8c5d65065e468a; enable_web_push=DISABLE; header_theme_version=CLOSE; home_feed_column=5; CURRENT_BLACKGAP=0; CURRENT_FNVAL=4048; b_lsid=75E916AA_18EA1A8D995; bsource=search_baidu; FEED_LIVE_VERSION=V_HEADER_LIVE_NO_POP; browser_resolution=1507-691; bili_ticket=eyJhbGciOiJIUzI1NiIsImtpZCI6InMwMyIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTIzNjk5MTMsImlhdCI6MTcxMjExMDY1MywicGx0IjotMX0.8zQW_fNTCSBlK_JkHnzu3gDw62wuTK1qgKcbGec3swM; bili_ticket_expires=171236985"
}
@@ -69,24 +69,32 @@ async function test() {
let classes = JSON.parse(await spider.home(true));
console.debug(JSON.stringify(classes))
// 测试详情
let detail1 = JSON.parse(await spider.detail("/shechu/HODV21864binv1riSEXyoutiancaiyexiangqibing/"))
await testPlay(detail1)
// 测试搜索
let search_page = JSON.parse(await spider.search("完美世界",false,1))
console.debug(JSON.stringify(search_page))
// 测试分类
let catePage = JSON.parse(await spider.category("/tvb/", "2", undefined, {"class":"/guochan/"}));
console.debug(JSON.stringify(catePage));
//测试首页列表
let homeVod = JSON.parse(await spider.homeVod())
console.debug(JSON.stringify(homeVod));
// 测试分类
let catePage = JSON.parse(await spider.category("72", "1", undefined, {}));
console.debug(JSON.stringify(catePage));
// 测试详情
let detail1 = JSON.parse(await spider.detail("live-cctv2-https://app.cctv.com/special/appchannellogo/rectangle/l/cctv2.png?q=75"))
await testPlay(detail1)
// 测试搜索
let search_page = JSON.parse(await spider.search("万相之王",false,1))
console.debug(JSON.stringify(search_page))
+107
View File
@@ -0,0 +1,107 @@
import Stream, { DEFAULT_ENCODING, getEncoding } from './text_decoder_index.js'
import { end_of_stream, finished, stringToCodePoints } from './text_decoder_utils.js'
import { encoders } from './table.js'
// 8.2 Interface TextEncoder
class TextEncoder {
/**
* @param {string=} label The label of the encoding. NONSTANDARD.
* @param {Object=} [options] NONSTANDARD.
*/
constructor(label, options = {}) {
// A TextEncoder object has an associated encoding and encoder.
/** @private */
this._encoding = null
/** @private @type {?Encoder} */
this._encoder = null
// Non-standard
/** @private @type {boolean} */
this._do_not_flush = false
/** @private @type {string} */
this._fatal = options['fatal'] ? 'fatal' : 'replacement'
// 2. Set enc's encoding to UTF-8's encoder.
if (options['NONSTANDARD_allowLegacyEncoding']) {
// NONSTANDARD behavior.
label = label !== undefined ? String(label) : DEFAULT_ENCODING
var encoding = getEncoding(label)
if (encoding === null || encoding.name === 'replacement')
throw RangeError('Unknown encoding: ' + label)
if (!encoders[encoding.name]) {
throw Error('Encoder not present.' +
' Did you forget to include encoding-indexes.js first?')
}
this._encoding = encoding
} else {
// Standard behavior.
this._encoding = getEncoding('utf-8')
if (label !== undefined && 'console' in global) {
console.warn('TextEncoder constructor called with encoding label, '
+ 'which is ignored.')
}
}
}
get encoding() {
return this._encoding.name.toLowerCase()
}
/**
* @param {string=} opt_string The string to encode.
* @param {Object=} options
*/
encode(opt_string = '', options = {}) {
// NOTE: This option is nonstandard. None of the encodings
// permitted for encoding (i.e. UTF-8, UTF-16) are stateful when
// the input is a USVString so streaming is not necessary.
if (!this._do_not_flush)
this._encoder = encoders[this._encoding.name]({
fatal: this._fatal === 'fatal' })
this._do_not_flush = Boolean(options['stream'])
// 1. Convert input to a stream.
const input = new Stream(stringToCodePoints(opt_string))
// 2. Let output be a new stream
const output = []
/** @type {?(number|!Array.<number>)} */
var result
// 3. While true, run these substeps:
while (true) {
// 1. Let token be the result of reading from input.
var token = input.read()
if (token === end_of_stream)
break
// 2. Let result be the result of processing token for encoder,
// input, output.
result = this._encoder.handler(input, token)
if (result === finished)
break
if (Array.isArray(result))
output.push.apply(output, /**@type {!Array.<number>}*/(result))
else
output.push(result)
}
// TODO: Align with spec algorithm.
if (!this._do_not_flush) {
while (true) {
result = this._encoder.handler(input, input.read())
if (result === finished)
break
if (Array.isArray(result))
output.push.apply(output, /**@type {!Array.<number>}*/(result))
else
output.push(result)
}
this._encoder = null
}
// 3. If result is finished, convert output into a byte sequence,
// and then return a Uint8Array object wrapping an ArrayBuffer
// containing output.
return new Uint8Array(output)
}
}
export {TextEncoder}
+1 -1
View File
@@ -77,7 +77,7 @@ class DanmuSpider {
let uri = new Uri(url);
let response;
response = await req(uri.toString(), {method: "get", headers: headers, buffer: buffer, data: null})
if (response.code === 200 || response.code === 302 || response.code === 301 || return_cookie) {
if (response.code === 201 || response.code === 200 || response.code === 302 || response.code === 301 || return_cookie) {
return await this.getResponse(reqUrl, params, headers, redirect_url, return_cookie, buffer, response)
} else {
await this.jadeLog.error(`请求失败,失败原因为:状态码出错,请求url为:${uri},回复内容为:${JSON.stringify(response)}`)
+32194
View File
File diff suppressed because it is too large. Load diff
+8 -3
View File
@@ -8,8 +8,7 @@
*/
import {Crypto} from "./cat.js";
import {TextDecoder} from "./TextDecoder.js";
;
import {TextEncoder} from "./TextEncoder.js";
// import {TextDecoder} from "text-decoding";
const deviceBrands = ['Huawei', 'Xiaomi'];
const deviceModels = [
@@ -162,6 +161,11 @@ function decode(buffer, encode_type) {
return decoder.decode(buffer)
}
function encode(buffer, encode_type) {
let encoder = new TextEncoder(encode_type)
return encoder.encode(buffer)
}
function getHost(url) {
let url_list = url.split("/")
return url_list[0] + "//" + url_list[2]
@@ -304,5 +308,6 @@ export {
randStr,
randUUID,
formatContent,
formatUrl
formatUrl,
encode
};
+11
View File
@@ -307,6 +307,17 @@
"playerType": 0,
"type": 3
},
{
"key": "lovemovie",
"name": "💕┃爱情电影网┃💕",
"api": "./js/lovemovie.js",
"timeout": 30,
"ext": {
"box": "CatOpen"
},
"playerType": 0,
"type": 3
},
{
"key": "cilixiong",
"name": "🐻┃磁力熊┃🐻",
+11
View File
@@ -306,6 +306,17 @@
"playerType": 0,
"type": 3
},
{
"key": "lovemovie",
"name": "💕┃爱情电影网┃💕",
"api": "./js/lovemovie.js",
"timeout": 30,
"ext": {
"box": "TVBox"
},
"playerType": 0,
"type": 3
},
{
"key": "cilixiong",
"name": "🐻┃磁力熊┃🐻",