mirror of
https://github.com/qist/tvbox.git
synced 2026-11-08 20:53:40 +00:00
update CAT
This commit is contained in:
1 parent
8a7360760f
commit
ab6af24701
32 files changed
+1064
-466
No files matched your search
+128
-128
@@ -1,28 +1,28 @@
|
||||
var mY=Object.create;var j6=Object.defineProperty;var gY=Object.getOwnPropertyDescriptor;var yY=Object.getOwnPropertyNames;var vY=Object.getPrototypeOf,_Y=Object.prototype.hasOwnProperty;var C=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),kx=(n,e)=>{for(var l in e)j6(n,l,{get:e[l],enumerable:!0})},Px=(n,e,l,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of yY(e))!_Y.call(n,r)&&r!==l&&j6(n,r,{get:()=>e[r],enumerable:!(t=gY(e,r))||t.enumerable});return n};var At=(n,e,l)=>(l=n!=null?mY(vY(n)):{},Px(e||!n||!n.__esModule?j6(l,"default",{value:n,enumerable:!0}):l,n)),EY=n=>Px(j6({},"__esModule",{value:!0}),n);var Lx=C((Obe,Dx)=>{"use strict";function bY(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}}Dx.exports=bY});var Rp=C((Nbe,Np)=>{"use strict";var TY=Lx();function Fx(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=TY(SY),r=null,i=null,s=0,u=null,a={push:_,drain:y3,saturated:y3,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:y3,kill:x,killAndDrain:v,error:b};return a;function c(){return s}function f(){a.paused=!0}function p(){for(var w=r,R=0;w;)w=w.next,R++;return R}function m(){for(var w=r,R=[];w;)R.push(w.value),w=w.next;return R}function h(){if(a.paused)for(a.paused=!1;r&&s<l;)s++,T()}function g(){return s===0&&a.length()===0}function _(w,R){var N=t.get();N.context=n,N.release=T,N.value=w,N.callback=R||y3,N.errorHandler=u,s>=l||a.paused?i?(i.next=N,i=N):(r=N,i=N,a.saturated()):(s++,e.call(n,N.value,N.worked))}function S(w,R){var N=t.get();N.context=n,N.release=T,N.value=w,N.callback=R||y3,N.errorHandler=u,s>=l||a.paused?r?(N.next=r,r=N):(r=N,i=N,a.saturated()):(s++,e.call(n,N.value,N.worked))}function T(w){w&&t.release(w);var R=r;R&&s<=l?a.paused?s--:(i===r&&(i=null),r=R.next,R.next=null,e.call(n,R.value,R.worked),i===null&&a.empty()):--s===0&&a.drain()}function x(){r=null,i=null,a.drain=y3}function v(){r=null,i=null,a.drain(),a.drain=y3}function b(w){u=w}}function y3(){}function SY(){this.value=null,this.callback=y3,this.next=null,this.release=y3,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=y3,n.errorHandler&&i(l,s),r.call(n.context,l,t),n.release(n)}}function xY(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=Fx(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(y3),p}function a(f){var p=new Promise(function(m,h){s(f,function(g,_){if(g){h(g);return}m(_)})});return p.catch(y3),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}}Np.exports=Fx;Np.exports.promise=xY});var Cp=C((Rbe,Mx)=>{"use strict";var{inherits:AY,format:Ip}=require("util");function hu(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=Ip(e,r,i,s):r&&i?this.message=Ip(e,r,i):r?this.message=Ip(e,r):this.message=e}return t.prototype[Symbol.toStringTag]="Error",t.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},AY(t,l),t}Mx.exports={createError:hu,AVV_ERR_EXPOSE_ALREADY_DEFINED:hu("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:hu("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:hu("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:hu("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:hu("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:hu("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 jx=C((Ibe,$x)=>{$x.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(`
|
||||
var MY=Object.create;var H6=Object.defineProperty;var $Y=Object.getOwnPropertyDescriptor;var jY=Object.getOwnPropertyNames;var UY=Object.getPrototypeOf,BY=Object.prototype.hasOwnProperty;var C=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),qx=(n,e)=>{for(var l in e)H6(n,l,{get:e[l],enumerable:!0})},Vx=(n,e,l,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of jY(e))!BY.call(n,r)&&r!==l&&H6(n,r,{get:()=>e[r],enumerable:!(t=$Y(e,r))||t.enumerable});return n};var wt=(n,e,l)=>(l=n!=null?MY(UY(n)):{},Vx(e||!n||!n.__esModule?H6(l,"default",{value:n,enumerable:!0}):l,n)),HY=n=>Vx(H6({},"__esModule",{value:!0}),n);var Gx=C((zbe,zx)=>{"use strict";function qY(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}}zx.exports=qY});var jp=C((Gbe,$p)=>{"use strict";var VY=Gx();function Xx(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=VY(zY),r=null,i=null,s=0,u=null,a={push:_,drain:y3,saturated:y3,pause:f,paused:!1,get concurrency(){return l},set concurrency(A){if(!(A>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(l=A,!a.paused)for(;r&&s<l;)s++,T()},running:c,resume:d,idle:g,length:p,getQueue:m,unshift:S,empty:y3,kill:x,killAndDrain:v,error:b};return a;function c(){return s}function f(){a.paused=!0}function p(){for(var A=r,R=0;A;)A=A.next,R++;return R}function m(){for(var A=r,R=[];A;)R.push(A.value),A=A.next;return R}function d(){if(a.paused)for(a.paused=!1;r&&s<l;)s++,T()}function g(){return s===0&&a.length()===0}function _(A,R){var O=t.get();O.context=n,O.release=T,O.value=A,O.callback=R||y3,O.errorHandler=u,s>=l||a.paused?i?(i.next=O,i=O):(r=O,i=O,a.saturated()):(s++,e.call(n,O.value,O.worked))}function S(A,R){var O=t.get();O.context=n,O.release=T,O.value=A,O.callback=R||y3,O.errorHandler=u,s>=l||a.paused?r?(O.next=r,r=O):(r=O,i=O,a.saturated()):(s++,e.call(n,O.value,O.worked))}function T(A){A&&t.release(A);var R=r;R&&s<=l?a.paused?s--:(i===r&&(i=null),r=R.next,R.next=null,e.call(n,R.value,R.worked),i===null&&a.empty()):--s===0&&a.drain()}function x(){r=null,i=null,a.drain=y3}function v(){r=null,i=null,a.drain(),a.drain=y3}function b(A){u=A}}function y3(){}function zY(){this.value=null,this.callback=y3,this.next=null,this.release=y3,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=y3,n.errorHandler&&i(l,s),r.call(n.context,l,t),n.release(n)}}function GY(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=Xx(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,d){i(f,function(g,_){if(g){d(g);return}m(_)})});return p.catch(y3),p}function a(f){var p=new Promise(function(m,d){s(f,function(g,_){if(g){d(g);return}m(_)})});return p.catch(y3),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}}$p.exports=Xx;$p.exports.promise=GY});var Bp=C((Xbe,Wx)=>{"use strict";var{inherits:XY,format:Up}=require("util");function hu(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=Up(e,r,i,s):r&&i?this.message=Up(e,r,i):r?this.message=Up(e,r):this.message=e}return t.prototype[Symbol.toStringTag]="Error",t.prototype.toString=function(){return`${this.name} [${this.code}]: ${this.message}`},XY(t,l),t}Wx.exports={createError:hu,AVV_ERR_EXPOSE_ALREADY_DEFINED:hu("AVV_ERR_EXPOSE_ALREADY_DEFINED","'%s' () is already defined, specify an expose option"),AVV_ERR_CALLBACK_NOT_FN:hu("AVV_ERR_CALLBACK_NOT_FN","Callback for '%s' hook is not a function. Received: '%s'"),AVV_ERR_PLUGIN_NOT_VALID:hu("AVV_ERR_PLUGIN_NOT_VALID","Plugin must be a function or a promise. Received: '%s'"),AVV_ERR_ROOT_PLG_BOOTED:hu("AVV_ERR_PLUGIN_NOT_VALID","Root plugin has already booted"),AVV_ERR_PARENT_PLG_LOADED:hu("AVV_ERR_PARENT_PLG_LOADED","Impossible to load '%s' plugin because the parent '%s' was already loaded"),AVV_ERR_READY_TIMEOUT:hu("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 Yx=C((Wbe,Kx)=>{Kx.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 zx=C((Cbe,Vx)=>{"use strict";var wY=jx(),Ux=Symbol("avvio.TimeTree.untrackNode"),kp=Symbol("avvio.TimeTree.trackNode"),Bx=Symbol("avvio.TimeTree.getParent"),Hx=Symbol("avvio.TimeTree.getNode"),qx=Symbol("avvio.TimeTree.addNode"),Pp=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[kp](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])}[Ux](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)}[Bx](e){if(e===null)return this.root;let l=this.tableLabel.get(e);return l.id?l:l[l.length-1]}[Hx](e){return this.tableId.get(e)}[qx](e,l,t){if(e===null)return this.root={id:"root",label:l,start:t,nodes:[]},this[kp](this.root),this.root.id;let i=this[Bx](e),s=`${l}-${Math.random()}`,u={id:s,parent:e,start:t,label:l,nodes:[]};return i.nodes.push(u),this[kp](u),s}start(e,l,t=Date.now()){return this[qx](e,l,t)}stop(e,l=Date.now()){let t=this[Hx](e);t&&(t.stop=l,t.diff=t.stop-t.start||0,this[Ux](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 wY(l)}};Vx.exports=Pp});var Xx=C((kbe,Gx)=>{var Fa=1e3,Ma=Fa*60,$a=Ma*60,mu=$a*24,OY=mu*7,NY=mu*365.25;Gx.exports=function(n,e){e=e||{};var l=typeof n;if(l==="string"&&n.length>0)return RY(n);if(l==="number"&&isFinite(n))return e.long?CY(n):IY(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function RY(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*NY;case"weeks":case"week":case"w":return l*OY;case"days":case"day":case"d":return l*mu;case"hours":case"hour":case"hrs":case"hr":case"h":return l*$a;case"minutes":case"minute":case"mins":case"min":case"m":return l*Ma;case"seconds":case"second":case"secs":case"sec":case"s":return l*Fa;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function IY(n){var e=Math.abs(n);return e>=mu?Math.round(n/mu)+"d":e>=$a?Math.round(n/$a)+"h":e>=Ma?Math.round(n/Ma)+"m":e>=Fa?Math.round(n/Fa)+"s":n+"ms"}function CY(n){var e=Math.abs(n);return e>=mu?U6(n,e,mu,"day"):e>=$a?U6(n,e,$a,"hour"):e>=Ma?U6(n,e,Ma,"minute"):e>=Fa?U6(n,e,Fa,"second"):n+" ms"}function U6(n,e,l,t){var r=e>=l*1.5;return Math.round(n/l)+" "+t+(r?"s":"")}});var Dp=C((Pbe,Wx)=>{function kY(n){l.debug=l,l.default=l,l.coerce=a,l.disable=i,l.enable=r,l.enabled=s,l.humanize=Xx(),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,(R,N)=>{if(R==="%%")return"%";b++;let k=l.formatters[N];if(typeof k=="function"){let j=S[b];R=k.call(T,j),S.splice(b,1),b--}return R}),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}Wx.exports=
Line truncated
|
||||
`+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 lw=C((Kbe,nw)=>{"use strict";var WY=Yx(),Jx=Symbol("avvio.TimeTree.untrackNode"),Hp=Symbol("avvio.TimeTree.trackNode"),Qx=Symbol("avvio.TimeTree.getParent"),Zx=Symbol("avvio.TimeTree.getNode"),ew=Symbol("avvio.TimeTree.addNode"),qp=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Hp](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])}[Jx](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)}[Qx](e){if(e===null)return this.root;let l=this.tableLabel.get(e);return l.id?l:l[l.length-1]}[Zx](e){return this.tableId.get(e)}[ew](e,l,t){if(e===null)return this.root={id:"root",label:l,start:t,nodes:[]},this[Hp](this.root),this.root.id;let i=this[Qx](e),s=`${l}-${Math.random()}`,u={id:s,parent:e,start:t,label:l,nodes:[]};return i.nodes.push(u),this[Hp](u),s}start(e,l,t=Date.now()){return this[ew](e,l,t)}stop(e,l=Date.now()){let t=this[Zx](e);t&&(t.stop=l,t.diff=t.stop-t.start||0,this[Jx](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 WY(l)}};nw.exports=qp});var rw=C((Ybe,tw)=>{var Fa=1e3,Ma=Fa*60,$a=Ma*60,mu=$a*24,KY=mu*7,YY=mu*365.25;tw.exports=function(n,e){e=e||{};var l=typeof n;if(l==="string"&&n.length>0)return JY(n);if(l==="number"&&isFinite(n))return e.long?ZY(n):QY(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function JY(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*YY;case"weeks":case"week":case"w":return l*KY;case"days":case"day":case"d":return l*mu;case"hours":case"hour":case"hrs":case"hr":case"h":return l*$a;case"minutes":case"minute":case"mins":case"min":case"m":return l*Ma;case"seconds":case"second":case"secs":case"sec":case"s":return l*Fa;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:return}}}}function QY(n){var e=Math.abs(n);return e>=mu?Math.round(n/mu)+"d":e>=$a?Math.round(n/$a)+"h":e>=Ma?Math.round(n/Ma)+"m":e>=Fa?Math.round(n/Fa)+"s":n+"ms"}function ZY(n){var e=Math.abs(n);return e>=mu?q6(n,e,mu,"day"):e>=$a?q6(n,e,$a,"hour"):e>=Ma?q6(n,e,Ma,"minute"):e>=Fa?q6(n,e,Fa,"second"):n+" ms"}function q6(n,e,l,t){var r=e>=l*1.5;return Math.round(n/l)+" "+t+(r?"s":"")}});var Vp=C((Jbe,iw)=>{function eJ(n){l.debug=l,l.default=l,l.coerce=a,l.disable=i,l.enable=r,l.enabled=s,l.humanize=rw(),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,d,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,(R,O)=>{if(R==="%%")return"%";b++;let k=l.formatters[O];if(typeof k=="function"){let j=S[b];R=k.call(T,j),S.splice(b,1),b--}return R}),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:(d!==l.namespaces&&(d=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,]+/),d=m.length;for(p=0;p<d;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}iw.exports=
Line truncated
|
||||
`).join(`
|
||||
`+i),n.push(r+"m+"+q6.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=zY()+e+" "+n[0]}function zY(){return Wt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function GY(...n){return process.stderr.write(H6.format(...n)+`
|
||||
`)}function XY(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function WY(){return process.env.DEBUG}function KY(n){n.inspectOpts={};let e=Object.keys(Wt.inspectOpts);for(let l=0;l<e.length;l++)n.inspectOpts[e[l]]=Wt.inspectOpts[e[l]]}q6.exports=Dp()(Wt);var{formatters:eA}=q6.exports;eA.o=function(n){return this.inspectOpts.colors=this.useColors,H6.inspect(n,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};eA.O=function(n){return this.inspectOpts.colors=this.useColors,H6.inspect(n,this.inspectOpts)}});var V6=C((Fbe,Fp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Fp.exports=Kx():Fp.exports=nA()});var lA=C((Mbe,jp)=>{"use strict";var YY=Rp(),JY=require("events").EventEmitter,QY=require("util").inherits,$t=V6()("avvio"),{AVV_ERR_READY_TIMEOUT:ZY}=Cp(),Mp=Symbol.for("plugin-meta");function eJ(n,e){return n[Mp]&&n[Mp].name?n[Mp].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 nJ(){let n={};return n.promise=new Promise((e,l)=>{n.resolve=e,n.reject=l}),n}function Ua(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=eJ(e,l),this.isAfter=t,this.q=YY(n,lJ,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}QY(Ua,JY);Ua.prototype.exec=function(n,e){let l=this.func,t=!1,r=this.name;if(this.parent._error&&!this.isAfter){$t("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 $t("override errored",r),e(a)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,$t("exec",r);let i,s=a=>{if(t){$t("loading complete",r);return}this._error=a,$t(a?"exec errored":"exec completed",r),t=!0,i&&clearTimeout(i),e(a)};this.timeout>0&&($t("setting up timeout",r,this.timeout),i=setTimeout(function(){$t("timed out",r),i=null;let a=new ZY(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"&&($t("exec: resolving promise",r),u.then(()=>process.nextTick(s),a=>process.nextTick(s,a)))};Ua.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let n=()=>{this.server.after((l,t)=>{this._error=l,this.q.pause(),l?($t("rejecting promise",this.name,l),this._promise.reject(l)):($t("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=nJ(),e=this._promise.promise,this.server?n():this.on("start",n)),e};Ua.prototype.enqueue=function(n,e){$t("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,e)};Ua.prototype.finish=function(n,e){$t("finish",this.name,n);let l=()=>{this.loaded||($t("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($t("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let r=()=>{$t("wrap"),queueMicrotask(t)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else l();else $t("delayed",this.name),this.q.drain=()=>{$t("drain",this.name),this.q.drain=tJ,queueMicrotask(t)}};queueMicrotask(t),this.q.resume()};function lJ(n,e){let l=this;process.nextTick($p.bind(l),n,e)}function $p(n,e){if(typeof n.func.then=="function"){n.func.then(t=>{typeof t.default=="function"&&(t=t.default),n.func=t,$p.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 tJ(){}jp.exports=Ua;jp.exports.loadPlugin=$p});var uA=C(($be,Vp)=>{"use strict";var tA=Rp(),rJ=require("events").EventEmitter,iJ=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Up,AVV_ERR_CALLBACK_NOT_FN:l0,AVV_ERR_PLUGIN_NOT_VALID:sJ,AVV_ERR_ROOT_PLG_BOOTED:uJ,AVV_ERR_READY_TIMEOUT:aJ}=Cp(),oJ=zx(),qp=lA(),Ba=V6()("avvio"),z6=Symbol("kAvvio"),Bp=Symbol("kThenifyDoNotWrap");function cJ(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 Up(r);if(n[i])throw new Up(i);if(n[s])throw new Up(s);n[r]=function(c,f){return l.use(c,f),this},Object.defineProperty(n,"then",{get:iA.bind(l)}),n[z6]=!0,n[i]=function(c){return typeof c!="function"?l._loadRegistered():(l.after(Hp(c,this)),this)},n[s]=function(c){if(c&&typeof c!="function")throw new l0(s,typeof c);return l.ready(c?Hp(c,this):void 0)},n[u]=function(c){if(typeof c!="function")throw new l0(u,typeof c);return l.onClose(mJ(c,this)),this},n[a]=function(c){if(c&&typeof c!="function")throw new l0(a,typeof c);return c?(l.close(Hp(c,this)),this):l.close()}}function jt(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 jt)){let t=new jt(n,e,l);return n&&cJ(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 oJ,this._readyQ=tA(this,sA,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=rA},this._closeQ=tA(this,hJ,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=rA},this._doStart=null,this._root=new qp(this,fJ.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=sd(n);return t?(e.add(n),l+`
|
||||
caused by: `+UA(t,e)):l},IQ=n=>UA(n,new Set),BA=(n,e,l)=>{if(!s0(n))return"";let t=l?"":n.message||"";if(e.has(n))return t+": ...";let r=sd(n);if(r){e.add(n);let i=typeof n.cause=="function";return t+(i?"":": ")+BA(r,e,i)}else return t},CQ=n=>BA(n,new Set);HA.exports={isErrorLike:s0,getErrorCause:sd,stackWithCauses:IQ,messageWithCauses:CQ}});var ad=C((Jbe,VA)=>{"use strict";var kQ=Symbol("circular-ref-tag"),l8=Symbol("pino-raw-err-ref"),qA=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[l8]},set:function(n){this[l8]=n}}});Object.defineProperty(qA,l8,{writable:!0,value:{}});VA.exports={pinoErrProto:qA,pinoErrorSymbols:{seen:kQ,rawSymbol:l8}}});var XA=C((Qbe,GA)=>{"use strict";GA.exports=cd;var{messageWithCauses:PQ,stackWithCauses:DQ,isErrorLike:zA}=ud(),{pinoErrProto:LQ,pinoErrorSymbols:FQ}=ad(),{seen:od}=FQ,{toString:MQ}=Object.prototype;function cd(n){if(!zA(n))return n;n[od]=void 0;let e=Object.create(LQ);e.type=MQ.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,e.message=PQ(n),e.stack=DQ(n),Array.isArray(n.errors)&&(e.aggregateErrors=n.errors.map(l=>cd(l)));for(let l in n)if(e[l]===void 0){let t=n[l];zA(t)?l!=="cause"&&!Object.prototype.hasOwnProperty.call(t,od)&&(e[l]=cd(t)):e[l]=t}return delete n[od],e.raw=n,e}});var KA=C((Zbe,WA)=>{"use strict";WA.exports=r8;var{isErrorLike:fd}=ud(),{pinoErrProto:$Q,pinoErrorSymbols:jQ}=ad(),{seen:t8}=jQ,{toString:UQ}=Object.prototype;function r8(n){if(!fd(n))return n;n[t8]=void 0;let e=Object.create($Q);e.type=UQ.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=>r8(l))),fd(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,t8)&&(e.cause=r8(n.cause));for(let l in n)if(e[l]===void 0){let t=n[l];fd(t)?Object.prototype.hasOwnProperty.call(t,t8)||(e[l]=r8(t)):e[l]=t}return delete n[t8],e.raw=n,e}});var ZA=C((eTe,QA)=>{"use strict";QA.exports={mapHttpRequest:BQ,reqSerializer:JA};var pd=Symbol("pino-raw-req-ref"),YA=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[pd]},set:function(n){this[pd]=n}}});Object.defineProperty(YA,pd,{writable:!0,value:{}});function JA(n){let e=n.info||n.socket,l=Object.create(YA);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 BQ(n){return{req:JA(n)}}});var tw=C((nTe,lw)=>{"use strict";lw.exports={mapHttpResponse:HQ,resSerializer:nw};var dd=Symbol("pino-raw-res-ref"),ew=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[dd]},set:function(n){this[dd]=n}}});Object.defineProperty(ew,dd,{writable:!0,value:{}});function nw(n){let e=Object.create(ew);return e.statusCode=n.headersSent?n.statusCode:null,e.headers=n.getHeaders?n.getHeaders():n._headers,e.raw=n,e}function HQ(n){return{res:nw(n)}}});var md=C((lTe,rw)=>{"use strict";var hd=XA(),qQ=KA(),i8=ZA(),s8=tw();rw.exports={err:hd,errWithCause:qQ,mapHttpRequest:i8.mapHttpRequest,mapHttpResponse:s8.mapHttpResponse,req:i8.reqSerializer,res:s8.resSerializer,wrapErrorSerializer:function(e){return e===hd?e:function(t){return e(hd(t))}},wrapRequestSerializer:function(e){return e===i8.reqSerializer?e:function(t){return e(i8.reqSerializer(t))}},wrapResponseSerializer:function(e){return e===s8.resSerializer?e:function(t){return e(s8.resSerializer(t))}}}});var gd=C((tTe,iw)=>{"use strict";function VQ(n,e){return e}iw.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=VQ;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 uw=C((rTe,sw)=>{"use strict";sw.exports=zQ;function zQ(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
|
||||
`+i),n.push(r+"m+"+G6.exports.humanize(this.diff)+"\x1B[0m")}else n[0]=dJ()+e+" "+n[0]}function dJ(){return Kt.inspectOpts.hideDate?"":new Date().toISOString()+" "}function hJ(...n){return process.stderr.write(z6.format(...n)+`
|
||||
`)}function mJ(n){n?process.env.DEBUG=n:delete process.env.DEBUG}function gJ(){return process.env.DEBUG}function yJ(n){n.inspectOpts={};let e=Object.keys(Kt.inspectOpts);for(let l=0;l<e.length;l++)n.inspectOpts[e[l]]=Kt.inspectOpts[e[l]]}G6.exports=Vp()(Kt);var{formatters:fw}=G6.exports;fw.o=function(n){return this.inspectOpts.colors=this.useColors,z6.inspect(n,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};fw.O=function(n){return this.inspectOpts.colors=this.useColors,z6.inspect(n,this.inspectOpts)}});var X6=C((eTe,Gp)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Gp.exports=sw():Gp.exports=pw()});var dw=C((nTe,Kp)=>{"use strict";var vJ=jp(),_J=require("events").EventEmitter,EJ=require("util").inherits,$t=X6()("avvio"),{AVV_ERR_READY_TIMEOUT:bJ}=Bp(),Xp=Symbol.for("plugin-meta");function TJ(n,e){return n[Xp]&&n[Xp].name?n[Xp].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 SJ(){let n={};return n.promise=new Promise((e,l)=>{n.resolve=e,n.reject=l}),n}function Ua(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=TJ(e,l),this.isAfter=t,this.q=vJ(n,xJ,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}EJ(Ua,_J);Ua.prototype.exec=function(n,e){let l=this.func,t=!1,r=this.name;if(this.parent._error&&!this.isAfter){$t("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 $t("override errored",r),e(a)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,$t("exec",r);let i,s=a=>{if(t){$t("loading complete",r);return}this._error=a,$t(a?"exec errored":"exec completed",r),t=!0,i&&clearTimeout(i),e(a)};this.timeout>0&&($t("setting up timeout",r,this.timeout),i=setTimeout(function(){$t("timed out",r),i=null;let a=new bJ(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"&&($t("exec: resolving promise",r),u.then(()=>process.nextTick(s),a=>process.nextTick(s,a)))};Ua.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();let n=()=>{this.server.after((l,t)=>{this._error=l,this.q.pause(),l?($t("rejecting promise",this.name,l),this._promise.reject(l)):($t("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=SJ(),e=this._promise.promise,this.server?n():this.on("start",n)),e};Ua.prototype.enqueue=function(n,e){$t("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,e)};Ua.prototype.finish=function(n,e){$t("finish",this.name,n);let l=()=>{this.loaded||($t("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($t("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){let r=()=>{$t("wrap"),queueMicrotask(t)};this._promise.resolve(),this._promise.promise.then(r,r),this._promise=null}else l();else $t("delayed",this.name),this.q.drain=()=>{$t("drain",this.name),this.q.drain=wJ,queueMicrotask(t)}};queueMicrotask(t),this.q.resume()};function xJ(n,e){let l=this;process.nextTick(Wp.bind(l),n,e)}function Wp(n,e){if(typeof n.func.then=="function"){n.func.then(t=>{typeof t.default=="function"&&(t=t.default),n.func=t,Wp.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 wJ(){}Kp.exports=Ua;Kp.exports.loadPlugin=Wp});var vw=C((lTe,ed)=>{"use strict";var hw=jp(),AJ=require("events").EventEmitter,NJ=require("util").inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Yp,AVV_ERR_CALLBACK_NOT_FN:n0,AVV_ERR_PLUGIN_NOT_VALID:OJ,AVV_ERR_ROOT_PLG_BOOTED:RJ,AVV_ERR_READY_TIMEOUT:IJ}=Bp(),CJ=lw(),Zp=dw(),Ba=X6()("avvio"),W6=Symbol("kAvvio"),Jp=Symbol("kThenifyDoNotWrap");function kJ(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 Yp(r);if(n[i])throw new Yp(i);if(n[s])throw new Yp(s);n[r]=function(c,f){return l.use(c,f),this},Object.defineProperty(n,"then",{get:gw.bind(l)}),n[W6]=!0,n[i]=function(c){return typeof c!="function"?l._loadRegistered():(l.after(Qp(c,this)),this)},n[s]=function(c){if(c&&typeof c!="function")throw new n0(s,typeof c);return l.ready(c?Qp(c,this):void 0)},n[u]=function(c){if(typeof c!="function")throw new n0(u,typeof c);return l.onClose(MJ(c,this)),this},n[a]=function(c){if(c&&typeof c!="function")throw new n0(a,typeof c);return c?(l.close(Qp(c,this)),this):l.close()}}function jt(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 jt)){let t=new jt(n,e,l);return n&&kJ(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 CJ,this._readyQ=hw(this,yw,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=mw},this._closeQ=hw(this,FJ,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=mw},this._doStart=null,this._root=new Zp(this,PJ.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=gd(n);return t?(e.add(n),l+`
|
||||
caused by: `+Jw(t,e)):l},QQ=n=>Jw(n,new Set),Qw=(n,e,l)=>{if(!i0(n))return"";let t=l?"":n.message||"";if(e.has(n))return t+": ...";let r=gd(n);if(r){e.add(n);let i=typeof n.cause=="function";return t+(i?"":": ")+Qw(r,e,i)}else return t},ZQ=n=>Qw(n,new Set);Zw.exports={isErrorLike:i0,getErrorCause:gd,stackWithCauses:QQ,messageWithCauses:ZQ}});var vd=C((mTe,nA)=>{"use strict";var eZ=Symbol("circular-ref-tag"),i8=Symbol("pino-raw-err-ref"),eA=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(n){this[i8]=n}}});Object.defineProperty(eA,i8,{writable:!0,value:{}});nA.exports={pinoErrProto:eA,pinoErrorSymbols:{seen:eZ,rawSymbol:i8}}});var rA=C((gTe,tA)=>{"use strict";tA.exports=Ed;var{messageWithCauses:nZ,stackWithCauses:lZ,isErrorLike:lA}=yd(),{pinoErrProto:tZ,pinoErrorSymbols:rZ}=vd(),{seen:_d}=rZ,{toString:iZ}=Object.prototype;function Ed(n){if(!lA(n))return n;n[_d]=void 0;let e=Object.create(tZ);e.type=iZ.call(n.constructor)==="[object Function]"?n.constructor.name:n.name,e.message=nZ(n),e.stack=lZ(n),Array.isArray(n.errors)&&(e.aggregateErrors=n.errors.map(l=>Ed(l)));for(let l in n)if(e[l]===void 0){let t=n[l];lA(t)?l!=="cause"&&!Object.prototype.hasOwnProperty.call(t,_d)&&(e[l]=Ed(t)):e[l]=t}return delete n[_d],e.raw=n,e}});var sA=C((yTe,iA)=>{"use strict";iA.exports=u8;var{isErrorLike:bd}=yd(),{pinoErrProto:sZ,pinoErrorSymbols:uZ}=vd(),{seen:s8}=uZ,{toString:aZ}=Object.prototype;function u8(n){if(!bd(n))return n;n[s8]=void 0;let e=Object.create(sZ);e.type=aZ.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=>u8(l))),bd(n.cause)&&!Object.prototype.hasOwnProperty.call(n.cause,s8)&&(e.cause=u8(n.cause));for(let l in n)if(e[l]===void 0){let t=n[l];bd(t)?Object.prototype.hasOwnProperty.call(t,s8)||(e[l]=u8(t)):e[l]=t}return delete n[s8],e.raw=n,e}});var cA=C((vTe,oA)=>{"use strict";oA.exports={mapHttpRequest:oZ,reqSerializer:aA};var Td=Symbol("pino-raw-req-ref"),uA=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(n){this[Td]=n}}});Object.defineProperty(uA,Td,{writable:!0,value:{}});function aA(n){let e=n.info||n.socket,l=Object.create(uA);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 oZ(n){return{req:aA(n)}}});var hA=C((_Te,dA)=>{"use strict";dA.exports={mapHttpResponse:cZ,resSerializer:pA};var Sd=Symbol("pino-raw-res-ref"),fA=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[Sd]},set:function(n){this[Sd]=n}}});Object.defineProperty(fA,Sd,{writable:!0,value:{}});function pA(n){let e=Object.create(fA);return e.statusCode=n.headersSent?n.statusCode:null,e.headers=n.getHeaders?n.getHeaders():n._headers,e.raw=n,e}function cZ(n){return{res:pA(n)}}});var wd=C((ETe,mA)=>{"use strict";var xd=rA(),fZ=sA(),a8=cA(),o8=hA();mA.exports={err:xd,errWithCause:fZ,mapHttpRequest:a8.mapHttpRequest,mapHttpResponse:o8.mapHttpResponse,req:a8.reqSerializer,res:o8.resSerializer,wrapErrorSerializer:function(e){return e===xd?e:function(t){return e(xd(t))}},wrapRequestSerializer:function(e){return e===a8.reqSerializer?e:function(t){return e(a8.reqSerializer(t))}},wrapResponseSerializer:function(e){return e===o8.resSerializer?e:function(t){return e(o8.resSerializer(t))}}}});var Ad=C((bTe,gA)=>{"use strict";function pZ(n,e){return e}gA.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=pZ;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 vA=C((TTe,yA)=>{"use strict";yA.exports=dZ;function dZ(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(l(i))}})}}});var u8=C((iTe,aw)=>{"use strict";aw.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var cw=C((sTe,ow)=>{"use strict";var GQ=u8();ow.exports=XQ;function XQ({paths:n}){let e=[];var l=0;let t=n.reduce(function(r,i,s){var u=i.match(GQ).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 pw=C((uTe,fw)=>{"use strict";var WQ=u8();fw.exports=KQ;function KQ({secret:n,serialize:e,wcLen:l,strict:t,isCensorFct:r,censorFctTakesPath:i},s){let u=Function("o",`
|
||||
if ([o${s}].length !== 1) throw Error()`)()}catch{throw Error(l(i))}})}}});var c8=C((STe,_A)=>{"use strict";_A.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var bA=C((xTe,EA)=>{"use strict";var hZ=c8();EA.exports=mZ;function mZ({paths:n}){let e=[];var l=0;let t=n.reduce(function(r,i,s){var u=i.match(hZ).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),d=m.length>0;l++,e.push({before:f,beforeStr:p,after:m,nested:d})}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 SA=C((wTe,TA)=>{"use strict";var gZ=c8();TA.exports=yZ;function yZ({secret:n,serialize:e,wcLen:l,strict:t,isCensorFct:r,censorFctTakesPath:i},s){let u=Function("o",`
|
||||
if (typeof o !== 'object' || o == null) {
|
||||
${ZQ(t,e)}
|
||||
${bZ(t,e)}
|
||||
}
|
||||
const { censor, secret } = this
|
||||
${YQ(n,r,i)}
|
||||
${vZ(n,r,i)}
|
||||
this.compileRestore()
|
||||
${JQ(l>0,r,i)}
|
||||
${QQ(e)}
|
||||
`).bind(s);return e===!1&&(u.restore=a=>s.restore(a)),u}function YQ(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=WQ.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=`
|
||||
${_Z(l>0,r,i)}
|
||||
${EZ(e)}
|
||||
`).bind(s);return e===!1&&(u.restore=a=>s.restore(a)),u}function vZ(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=gZ.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${a}${g} === censor:
|
||||
@@ -31,19 +31,19 @@ caused by: `+UA(t,e)):l},IQ=n=>UA(n,new Set),BA=(n,e,l)=>{if(!s0(n))return"";let
|
||||
`).join(`
|
||||
`)}
|
||||
}
|
||||
`,h=l?`val, ${JSON.stringify(s)}`:"val";return`
|
||||
`,d=l?`val, ${JSON.stringify(s)}`:"val";return`
|
||||
if (${p}) {
|
||||
const val = o${a}${t}
|
||||
if (val === censor) {
|
||||
secret[${r}].precensored = true
|
||||
} else {
|
||||
secret[${r}].val = val
|
||||
o${a}${t} = ${e?`censor(${h})`:"censor"}
|
||||
o${a}${t} = ${e?`censor(${d})`:"censor"}
|
||||
${m}
|
||||
}
|
||||
}
|
||||
`}).join(`
|
||||
`)}function JQ(n,e,l){return n===!0?`
|
||||
`)}function _Z(n,e,l){return n===!0?`
|
||||
{
|
||||
const { wildcards, wcLen, groupRedact, nestedRedact } = this
|
||||
for (var i = 0; i < wcLen; i++) {
|
||||
@@ -54,16 +54,16 @@ caused by: `+UA(t,e)):l},IQ=n=>UA(n,new Set),BA=(n,e,l)=>{if(!s0(n))return"";let
|
||||
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${l})
|
||||
}
|
||||
}
|
||||
`:""}function QQ(n){return n===!1?"return o":`
|
||||
`:""}function EZ(n){return n===!1?"return o":`
|
||||
var s = this.serialize(o)
|
||||
this.restore(o)
|
||||
return s
|
||||
`}function ZQ(n,e){return n===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var vd=C((aTe,mw)=>{"use strict";mw.exports={groupRedact:nZ,groupRestore:eZ,nestedRedact:tZ,nestedRestore:lZ};function eZ({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 nZ(n,e,l,t,r){let i=dw(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 lZ(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 tZ(n,e,l,t,r,i,s){let u=dw(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];rZ(n,u,p,l,t,r,i,s)}return n}function yd(n,e){return n!=null?"hasOwn"in Object?Object.hasOwn(n,e):Object.prototype.hasOwnProperty.call(n,e):!1}function rZ(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,R=iZ();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 N=0;N<k.length;N++){let j=k[N];if(x=m[j],T=l==="*",v)R=ui(R,j,w),b=p,g=hw(x,b-1,l,t,r,i,s,u,f,m,h,g,T,j,p,c,R,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=u0(ui(R,j,w),g,e[f]);n.push(L),m[j]=h}else if(x[l]!==h)if(h===void 0&&i!==void 0||yd(x,l)&&h===g)R=ui(R,j,w);else{R=ui(R,j,w);let L=u0(ui(R,l,w+1),g,e[f]);n.push(L),x[l]=h}}}S=null}else{if(g=m[l],R=ui(R,l,w),h=p!==c?g:s?u?i(g,[...t,f,...r]):i(g):i,!(yd(m,l)&&h===g||h===void 0&&i!==void 0)){let k=u0(R,g,e[f]);n.push(k),m[l]=h}m=m[l]}if(typeof m!="object")break}}}function dw(n,e){for(var l=-1,t=e.length,r=n;r!=null&&++l<t;)r=r[e[l]];return r}function hw(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=u0(S,p,x);T.push(b),c[h]=f}else if(n[l]!==f){if(!(f===void 0&&i!==void 0||yd(n,l)&&f===p)){let b=u0(ui(S,l,v+1),p,x);T.push(b),n[l]=f}}}for(let b in n)typeof n[b]=="object"&&(S=ui(S,b,v),hw(n[b],e-1,l,t,r,i,s,u,a,c,f,p,m,h,g,_,S,T,x,v+1))}function iZ(){return{parent:null,key:null,children:[],depth:0}}function ui(n,e,l){if(n.depth===l)return ui(n.parent,e,l);var t={parent:n,key:e,depth:l,children:[]};return n.children.push(t),t}function u0(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 yw=C((oTe,gw)=>{"use strict";var{groupRestore:sZ,nestedRestore:uZ}=vd();gw.exports=aZ;function aZ({secret:n,wcLen:e}){return function(){if(this.restore)return;let t=Object.keys(n),r=oZ(n,t),i=e>0,s=i?{secret:n,groupRestore:sZ,nestedRestore:uZ}:{secret:n};this.restore=Function("o",cZ(r,t,i)).bind(s)}}function oZ(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`
|
||||
`}function bZ(n,e){return n===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var Od=C((ATe,AA)=>{"use strict";AA.exports={groupRedact:SZ,groupRestore:TZ,nestedRedact:wZ,nestedRestore:xZ};function TZ({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 SZ(n,e,l,t,r){let i=xA(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 xZ(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 wZ(n,e,l,t,r,i,s){let u=xA(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];AZ(n,u,p,l,t,r,i,s)}return n}function Nd(n,e){return n!=null?"hasOwn"in Object?Object.hasOwn(n,e):Object.prototype.hasOwnProperty.call(n,e):!1}function AZ(n,e,l,t,r,i,s,u){let a=r.length,c=a-1,f=l;var p=-1,m,d,g,_=null,S=null,T,x,v=!1,b=0,A=0,R=NZ();if(g=m=e[l],typeof m=="object"){for(;m!=null&&++p<a&&(A+=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 O=0;O<k.length;O++){let j=k[O];if(x=m[j],T=l==="*",v)R=ai(R,j,A),b=p,g=wA(x,b-1,l,t,r,i,s,u,f,m,d,g,T,j,p,c,R,n,e[f],A+1);else if(T||typeof x=="object"&&x!==null&&l in x){if(T?g=x:g=x[l],d=p!==c?g:s?u?i(g,[...t,f,...r]):i(g):i,T){let L=s0(ai(R,j,A),g,e[f]);n.push(L),m[j]=d}else if(x[l]!==d)if(d===void 0&&i!==void 0||Nd(x,l)&&d===g)R=ai(R,j,A);else{R=ai(R,j,A);let L=s0(ai(R,l,A+1),g,e[f]);n.push(L),x[l]=d}}}S=null}else{if(g=m[l],R=ai(R,l,A),d=p!==c?g:s?u?i(g,[...t,f,...r]):i(g):i,!(Nd(m,l)&&d===g||d===void 0&&i!==void 0)){let k=s0(R,g,e[f]);n.push(k),m[l]=d}m=m[l]}if(typeof m!="object")break}}}function xA(n,e){for(var l=-1,t=e.length,r=n;r!=null&&++l<t;)r=r[e[l]];return r}function wA(n,e,l,t,r,i,s,u,a,c,f,p,m,d,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=s0(S,p,x);T.push(b),c[d]=f}else if(n[l]!==f){if(!(f===void 0&&i!==void 0||Nd(n,l)&&f===p)){let b=s0(ai(S,l,v+1),p,x);T.push(b),n[l]=f}}}for(let b in n)typeof n[b]=="object"&&(S=ai(S,b,v),wA(n[b],e-1,l,t,r,i,s,u,a,c,f,p,m,d,g,_,S,T,x,v+1))}function NZ(){return{parent:null,key:null,children:[],depth:0}}function ai(n,e,l){if(n.depth===l)return ai(n.parent,e,l);var t={parent:n,key:e,depth:l,children:[]};return n.children.push(t),t}function s0(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 OA=C((NTe,NA)=>{"use strict";var{groupRestore:OZ,nestedRestore:RZ}=Od();NA.exports=IZ;function IZ({secret:n,wcLen:e}){return function(){if(this.restore)return;let t=Object.keys(n),r=CZ(n,t),i=e>0,s=i?{secret:n,groupRestore:OZ,nestedRestore:RZ}:{secret:n};this.restore=Function("o",kZ(r,t,i)).bind(s)}}function CZ(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 cZ(n,e,l){return`
|
||||
`}).join("")}function kZ(n,e,l){return`
|
||||
const secret = this.secret
|
||||
${l===!0?`
|
||||
const keys = Object.keys(secret)
|
||||
@@ -78,34 +78,34 @@ caused by: `+UA(t,e)):l},IQ=n=>UA(n,new Set),BA=(n,e,l)=>{if(!s0(n))return"";let
|
||||
`:""}
|
||||
${n}
|
||||
return o
|
||||
`}});var _w=C((cTe,vw)=>{"use strict";vw.exports=fZ;function fZ(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 Tw=C((fTe,bw)=>{"use strict";var Ew=uw(),pZ=cw(),dZ=pw(),hZ=yw(),{groupRedact:mZ,nestedRedact:gZ}=vd(),yZ=_w(),vZ=u8(),_Z=Ew(),_d=n=>n;_d.restore=_d;var EZ="[REDACTED]";Ed.rx=vZ;Ed.validator=Ew;bw.exports=Ed;function Ed(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:EZ,i=typeof r=="function",s=i&&r.length>1;if(e.length===0)return l||_d;_Z({paths:e,serialize:l,censor:r});let{wildcards:u,wcLen:a,secret:c}=pZ({paths:e,censor:r}),f=hZ({secret:c,wcLen:a}),p="strict"in n?n.strict:!0;return dZ({secret:c,wcLen:a,serialize:l,strict:p,isCensorFct:i,censorFctTakesPath:s},yZ({secret:c,censor:r,compileRestore:f,serialize:l,groupRedact:mZ,nestedRedact:gZ,wildcards:u,wcLen:a}))}});var za=C((pTe,Sw)=>{"use strict";var bZ=Symbol("pino.setLevel"),TZ=Symbol("pino.getLevel"),SZ=Symbol("pino.levelVal"),xZ=Symbol("pino.levelComp"),AZ=Symbol("pino.useLevelLabels"),wZ=Symbol("pino.useOnlyCustomLevels"),OZ=Symbol("pino.mixin"),NZ=Symbol("pino.lsCache"),RZ=Symbol("pino.chindings"),IZ=Symbol("pino.asJson"),CZ=Symbol("pino.write"),kZ=Symbol("pino.redactFmt"),PZ=Symbol("pino.time"),DZ=Symbol("pino.timeSliceIndex"),LZ=Symbol("pino.stream"),FZ=Symbol("pino.stringify"),MZ=Symbol("pino.stringifySafe"),$Z=Symbol("pino.stringifiers"),jZ=Symbol("pino.end"),UZ=Symbol("pino.formatOpts"),BZ=Symbol("pino.messageKey"),HZ=Symbol("pino.errorKey"),qZ=Symbol("pino.nestedKey"),VZ=Symbol("pino.nestedKeyStr"),zZ=Symbol("pino.mixinMergeStrategy"),GZ=Symbol("pino.msgPrefix"),XZ=Symbol("pino.wildcardFirst"),WZ=Symbol.for("pino.serializers"),KZ=Symbol.for("pino.formatters"),YZ=Symbol.for("pino.hooks"),JZ=Symbol.for("pino.metadata");Sw.exports={setLevelSym:bZ,getLevelSym:TZ,levelValSym:SZ,levelCompSym:xZ,useLevelLabelsSym:AZ,mixinSym:OZ,lsCacheSym:NZ,chindingsSym:RZ,asJsonSym:IZ,writeSym:CZ,serializersSym:WZ,redactFmtSym:kZ,timeSym:PZ,timeSliceIndexSym:DZ,streamSym:LZ,stringifySym:FZ,stringifySafeSym:MZ,stringifiersSym:$Z,endSym:jZ,formatOptsSym:UZ,messageKeySym:BZ,errorKeySym:HZ,nestedKeySym:qZ,wildcardFirstSym:XZ,needsMetadataGsym:JZ,useOnlyCustomLevelsSym:wZ,formattersSym:KZ,hooksSym:YZ,nestedKeyStrSym:VZ,mixinMergeStrategySym:zZ,msgPrefixSym:GZ}});var Sd=C((dTe,Ow)=>{"use strict";var Td=Tw(),{redactFmtSym:QZ,wildcardFirstSym:a8}=za(),{rx:bd,validator:ZZ}=Td,xw=ZZ({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})`}),Aw="[Redacted]",ww=!1;function eee(n,e){let{paths:l,censor:t}=nee(n),r=l.reduce((u,a)=>{bd.lastIndex=0;let c=bd.exec(a),f=bd.exec(a),p=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(p==="*"&&(p=a8),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!==a8&&u[p].length===0&&u[p].push(...u[a8]||[]),p===a8&&Object.keys(u).forEach(function(g){u[g]&&u[g].push(h)}),u[p].push(h),u},{}),i={[QZ]:Td({paths:l,censor:t,serialize:e,strict:ww})},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]=Td({paths:r[a],censor:c,serialize:e,strict:ww})}return u},i)}function nee(n){if(Array.isArray(n))return n={paths:n,censor:Aw},xw(n),n;let{paths:e,censor:l=Aw,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),xw({paths:e,censor:l}),{paths:e,censor:l}}Ow.exports=eee});var Rw=C((hTe,Nw)=>{"use strict";var lee=()=>"",tee=()=>`,"time":${Date.now()}`,ree=()=>`,"time":${Math.round(Date.now()/1e3)}`,iee=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Nw.exports={nullTime:lee,epochTime:tee,unixTime:ree,isoTime:iee}});var Cw=C((mTe,Iw)=>{"use strict";function see(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}Iw.exports=uee;function uee(n,e,l){var t=l&&l.stringify||see,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]==nLine truncated
|
||||
`}});var IA=C((OTe,RA)=>{"use strict";RA.exports=PZ;function PZ(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 PA=C((RTe,kA)=>{"use strict";var CA=vA(),DZ=bA(),LZ=SA(),FZ=OA(),{groupRedact:MZ,nestedRedact:$Z}=Od(),jZ=IA(),UZ=c8(),BZ=CA(),Rd=n=>n;Rd.restore=Rd;var HZ="[REDACTED]";Id.rx=UZ;Id.validator=CA;kA.exports=Id;function Id(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:HZ,i=typeof r=="function",s=i&&r.length>1;if(e.length===0)return l||Rd;BZ({paths:e,serialize:l,censor:r});let{wildcards:u,wcLen:a,secret:c}=DZ({paths:e,censor:r}),f=FZ({secret:c,wcLen:a}),p="strict"in n?n.strict:!0;return LZ({secret:c,wcLen:a,serialize:l,strict:p,isCensorFct:i,censorFctTakesPath:s},jZ({secret:c,censor:r,compileRestore:f,serialize:l,groupRedact:MZ,nestedRedact:$Z,wildcards:u,wcLen:a}))}});var za=C((ITe,DA)=>{"use strict";var qZ=Symbol("pino.setLevel"),VZ=Symbol("pino.getLevel"),zZ=Symbol("pino.levelVal"),GZ=Symbol("pino.levelComp"),XZ=Symbol("pino.useLevelLabels"),WZ=Symbol("pino.useOnlyCustomLevels"),KZ=Symbol("pino.mixin"),YZ=Symbol("pino.lsCache"),JZ=Symbol("pino.chindings"),QZ=Symbol("pino.asJson"),ZZ=Symbol("pino.write"),eee=Symbol("pino.redactFmt"),nee=Symbol("pino.time"),lee=Symbol("pino.timeSliceIndex"),tee=Symbol("pino.stream"),ree=Symbol("pino.stringify"),iee=Symbol("pino.stringifySafe"),see=Symbol("pino.stringifiers"),uee=Symbol("pino.end"),aee=Symbol("pino.formatOpts"),oee=Symbol("pino.messageKey"),cee=Symbol("pino.errorKey"),fee=Symbol("pino.nestedKey"),pee=Symbol("pino.nestedKeyStr"),dee=Symbol("pino.mixinMergeStrategy"),hee=Symbol("pino.msgPrefix"),mee=Symbol("pino.wildcardFirst"),gee=Symbol.for("pino.serializers"),yee=Symbol.for("pino.formatters"),vee=Symbol.for("pino.hooks"),_ee=Symbol.for("pino.metadata");DA.exports={setLevelSym:qZ,getLevelSym:VZ,levelValSym:zZ,levelCompSym:GZ,useLevelLabelsSym:XZ,mixinSym:KZ,lsCacheSym:YZ,chindingsSym:JZ,asJsonSym:QZ,writeSym:ZZ,serializersSym:gee,redactFmtSym:eee,timeSym:nee,timeSliceIndexSym:lee,streamSym:tee,stringifySym:ree,stringifySafeSym:iee,stringifiersSym:see,endSym:uee,formatOptsSym:aee,messageKeySym:oee,errorKeySym:cee,nestedKeySym:fee,wildcardFirstSym:mee,needsMetadataGsym:_ee,useOnlyCustomLevelsSym:WZ,formattersSym:yee,hooksSym:vee,nestedKeyStrSym:pee,mixinMergeStrategySym:dee,msgPrefixSym:hee}});var Pd=C((CTe,$A)=>{"use strict";var kd=PA(),{redactFmtSym:Eee,wildcardFirstSym:f8}=za(),{rx:Cd,validator:bee}=kd,LA=bee({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})`}),FA="[Redacted]",MA=!1;function Tee(n,e){let{paths:l,censor:t}=See(n),r=l.reduce((u,a)=>{Cd.lastIndex=0;let c=Cd.exec(a),f=Cd.exec(a),p=c[1]!==void 0?c[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):c[0];if(p==="*"&&(p=f8),f===null)return u[p]=null,u;if(u[p]===null)return u;let{index:m}=f,d=`${a.substr(m,a.length-1)}`;return u[p]=u[p]||[],p!==f8&&u[p].length===0&&u[p].push(...u[f8]||[]),p===f8&&Object.keys(u).forEach(function(g){u[g]&&u[g].push(d)}),u[p].push(d),u},{}),i={[Eee]:kd({paths:l,censor:t,serialize:e,strict:MA})},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]=kd({paths:r[a],censor:c,serialize:e,strict:MA})}return u},i)}function See(n){if(Array.isArray(n))return n={paths:n,censor:FA},LA(n),n;let{paths:e,censor:l=FA,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),LA({paths:e,censor:l}),{paths:e,censor:l}}$A.exports=Tee});var UA=C((kTe,jA)=>{"use strict";var xee=()=>"",wee=()=>`,"time":${Date.now()}`,Aee=()=>`,"time":${Math.round(Date.now()/1e3)}`,Nee=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;jA.exports={nullTime:xee,epochTime:wee,unixTime:Aee,isoTime:Nee}});var HA=C((PTe,BA)=>{"use strict";function Oee(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}BA.exports=Ree;function Ree(n,e,l){var t=l&&l.stringify||Oee,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,d=0;d<m;){if(n.charCodeAt(d)===37&&d+1<m){switch(p=p>-1?p:0,n.charCodeAt(d+1)){case 100:case 102:if(f>=a||e[f]==null)break;p<d&&(c+=n.slice(p,d)),c+=Number(e[fLine truncated
|
||||
${T}`,b=`,
|
||||
${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}"... ${vu(ve)} not stringified"`}return S!==""&&(v+=`
|
||||
${w}`),g.pop(),`[${v}]`}let R=Object.keys(x),N=R.length;if(N===0)return"{}";if(i<g.length+1)return'"[Object]"';let k="",j="";S!==""&&(T+=S,b=`,
|
||||
${T}`,k=" ");let L=Math.min(N,s);r&&!Wd(x)&&(R=Xd(R)),g.push(x);for(let Q=0;Q<L;Q++){let Y=R[Q],Z=u(Y,x,g,_,S,T);Z!==void 0&&(v+=`${j}${Vi(Y)}:${k}${Z}`,j=b)}if(N>s){let Q=N-s;v+=`${j}"...":${k}"${vu(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 _e=u(String(Y),x,g,_,S,T);v+=_e!==void 0?_e:"null",v+=b}let Z=u(String(Y),x,g,_,S,T);if(v+=Z!==void 0?Z:"null",x.length-1>s){let _e=x.length-s-1;v+=`${b}"... ${vu(_e)} not stringified"`}return S!==""&&(v+=`
|
||||
${A}`),g.pop(),`[${v}]`}let R=Object.keys(x),O=R.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);r&&!rh(x)&&(R=th(R)),g.push(x);for(let Q=0;Q<L;Q++){let Y=R[Q],Z=u(Y,x,g,_,S,T);Z!==void 0&&(v+=`${j}${zi(Y)}:${k}${Z}`,j=b)}if(O>s){let Q=O-s;v+=`${j}"...":${k}"${vu(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(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 Vi(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+=`
|
||||
${A}`),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,d,g,_,S,T){switch(typeof d=="object"&&d!==null&&typeof d.toJSON=="function"&&(d=d.toJSON(m)),typeof d){case"string":return zi(d);case"object":{if(d===null)return"null";if(g.indexOf(d)!==-1)return l;let x=T,v="",b=",";if(Array.isArray(d)){if(d.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(d),S!==""&&(T+=S,v+=`
|
||||
${T}`,b=`,
|
||||
${T}`);let N=Math.min(h.length,s),k=0;for(;k<N-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}"... ${vu(L)} not stringified"`}return S!==""&&(v+=`
|
||||
${x}`),g.pop(),`[${v}]`}g.push(h);let w="";S!==""&&(T+=S,b=`,
|
||||
${T}`,w=" ");let R="";for(let N of _){let k=a(N,h[N],g,_,S,T);k!==void 0&&(v+=`${R}${Vi(N)}:${w}${k}`,R=b)}return S!==""&&R.length>1&&(v=`
|
||||
${T}`);let O=Math.min(d.length,s),k=0;for(;k<O-1;k++){let L=a(String(k),d[k],g,_,S,T);v+=L!==void 0?L:"null",v+=b}let j=a(String(k),d[k],g,_,S,T);if(v+=j!==void 0?j:"null",d.length-1>s){let L=d.length-s-1;v+=`${b}"... ${vu(L)} not stringified"`}return S!==""&&(v+=`
|
||||
${x}`),g.pop(),`[${v}]`}g.push(d);let A="";S!==""&&(T+=S,b=`,
|
||||
${T}`,A=" ");let R="";for(let O of _){let k=a(O,d[O],g,_,S,T);k!==void 0&&(v+=`${R}${zi(O)}:${A}${k}`,R=b)}return S!==""&&R.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(t)return String(h);default:return e?e(h):void 0}}function c(m,h,g,_,S){switch(typeof h){case"string":return Vi(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=`
|
||||
${x}`),g.pop(),`{${v}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(t)return String(d);default:return e?e(d):void 0}}function c(m,d,g,_,S){switch(typeof d){case"string":return zi(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,g,_,S);if(d===null)return"null"}if(g.indexOf(d)!==-1)return l;let T=S;if(Array.isArray(d)){if(d.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(d),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}"... ${vu(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="",R="",N=Math.min(v,s);Wd(h)&&(w+=RO(h,b,s),x=x.slice(h.length),N-=h.length,R=b),r&&(x=Xd(x)),g.push(h);for(let k=0;k<N;k++){let j=x[k],L=c(j,h[j],g,_,S);L!==void 0&&(w+=`${R}${Vi(j)}: ${L}`,R=b)}if(v>s){let k=v-s;w+=`${R}"...": "${vu(k)} not stringified"`,R=b}return R!==""&&(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(t)return String(h);default:return e?e(h):void 0}}function f(m,h,g){switch(typeof h){case"string":return Vi(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 N=f(String(w),h[w],g);_+=N!==void 0?N:"null",_+=","}let R=f(String(w),h[w],g);if(_+=R!==void 0?R:"null",h.length-1>s){let N=h.length-s-1;_+=`,"... ${vu(N)} 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);Wd(h)&&(_+=RO(h,",",s),S=S.slice(h.length),v-=h.length,x=","),r&&(S=Xd(S)),g.push(h);for(let b=0;b<v;b++){let w=S[b],R=f(w,h[w],g);R!==void 0&&(_+=`${x}${Vi(w)}:${R}`,x=",")}if(T>s){let b=T-s;_+=`${x}"...":"${vu(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,[],wle(h),_,"")}if(_.length!==0)return c("",m,[],_,"")}return f("",m,[])}return p}});var FO=C((ITe,LO)=>{"use strict";var Jd=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:DO}=v8(),Nle=DO.info;function Rle(n,e){let l=0;n=n||[],e=e||{dedupe:!1};let t=Object.create(DO);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,[Jd]:!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=Cle(h.length,e.dedupe);Ple(S,h.length,e.dedupe);S=kle(S,e.dedupe))if(p=h[S],p.level<=m){if(g!==0&&g!==p.level)break;if(_=p.stream,_[Jd]){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:_=Nle;let S={stream:m,level:_,levelVal:void 0,id:l++};return h.unshift(S),h.sort(Ile),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,[Jd]:!0}}}function Ile(n,e){return n.level-e.level}function Cle(n,e){return e?n-1:0}function kle(n,e){return e?n-1:n+1}function Ple(n,e,l){return l?n>=0:n<e}LO.exports=Rle});var KO=C((CTe,v3)=>{"use strict";var Dle=require("os"),VO=md(),Lle=gd(),Fle=Sd(),zO=Rw(),Mle=NO(),GO=za(),{configure:$le}=PO(),{assertDefaultLevelFound:jle,mappings:XO,genLsCache:Ule,genLevelComparison:Ble,assertLevelComparison:Hle}=Hd(),{DEFAULT_LEVELS:qle,SORTING_ORDER:Vle}=v8(),{createArgsNormalizer:zle,asChindings:Gle,buildSafeSonicBoom:MO,buildFormatters:Xle,stringify:Qd,normalizeDestFileDescriptor:$O,noop:Wle}=y8(),{version:Kle}=qd(),{chindingsSym:jO,redactFmtSym:Yle,serializersSym:UO,timeSym:Jle,timeSliceIndexSym:Qle,streamSym:Zle,stringifySym:BO,stringifySafeSym:Zd,stringifiersSym:HO,setLevelSym:ete,endSym:nte,formatOptsSym:lte,messageKeySym:tte,errorKeySym:rte,nestedKeySym:ite,mixinSym:ste,levelCompSym:ute,useOnlyCustomLevelsSym:ate,formattersSym:qO,hooksSym:ote,nestedKeyStrSym:cte,mixinMergeStrategySym:fte,msgPrefixSym:pte}=GO,{epochTime:WO,nullTime:dte}=zO,{pid:hte}=process,mte=Dle.hostname(),gte=VO.err,yte={level:"info",levelComparison:Vle.ASC,levels:qle,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:hte,hostname:mte},serializers:Object.assign(Object.create(null),{err:gte}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:WO,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},vte=zle(yte),_te=Object.assign(Object.create(null),VO);function eh(...n){let e={},{opts:l,stream:t}=vte(e,Lle(),...n),{redact:r,crlf:i,s
Line truncated
|
||||
${S}`,L=Math.min(d.length,s),Q=0;for(;Q<L-1;Q++){let Z=c(String(Q),d[Q],g,_,S);k+=Z!==void 0?Z:"null",k+=j}let Y=c(String(Q),d[Q],g,_,S);if(k+=Y!==void 0?Y:"null",d.length-1>s){let Z=d.length-s-1;k+=`${j}"... ${vu(Z)} not stringified"`}return k+=`
|
||||
${T}`,g.pop(),`[${k}]`}let x=Object.keys(d),v=x.length;if(v===0)return"{}";if(i<g.length+1)return'"[Object]"';S+=_;let b=`,
|
||||
${S}`,A="",R="",O=Math.min(v,s);rh(d)&&(A+=UN(d,b,s),x=x.slice(d.length),O-=d.length,R=b),r&&(x=th(x)),g.push(d);for(let k=0;k<O;k++){let j=x[k],L=c(j,d[j],g,_,S);L!==void 0&&(A+=`${R}${zi(j)}: ${L}`,R=b)}if(v>s){let k=v-s;A+=`${R}"...": "${vu(k)} not stringified"`,R=b}return R!==""&&(A=`
|
||||
${S}${A}
|
||||
${T}`),g.pop(),`{${A}}`}case"number":return isFinite(d)?String(d):e?e(d):"null";case"boolean":return d===!0?"true":"false";case"undefined":return;case"bigint":if(t)return String(d);default:return e?e(d):void 0}}function f(m,d,g){switch(typeof d){case"string":return zi(d);case"object":{if(d===null)return"null";if(typeof d.toJSON=="function"){if(d=d.toJSON(m),typeof d!="object")return f(m,d,g);if(d===null)return"null"}if(g.indexOf(d)!==-1)return l;let _="";if(Array.isArray(d)){if(d.length===0)return"[]";if(i<g.length+1)return'"[Array]"';g.push(d);let b=Math.min(d.length,s),A=0;for(;A<b-1;A++){let O=f(String(A),d[A],g);_+=O!==void 0?O:"null",_+=","}let R=f(String(A),d[A],g);if(_+=R!==void 0?R:"null",d.length-1>s){let O=d.length-s-1;_+=`,"... ${vu(O)} not stringified"`}return g.pop(),`[${_}]`}let S=Object.keys(d),T=S.length;if(T===0)return"{}";if(i<g.length+1)return'"[Object]"';let x="",v=Math.min(T,s);rh(d)&&(_+=UN(d,",",s),S=S.slice(d.length),v-=d.length,x=","),r&&(S=th(S)),g.push(d);for(let b=0;b<v;b++){let A=S[b],R=f(A,d[A],g);R!==void 0&&(_+=`${x}${zi(A)}:${R}`,x=",")}if(T>s){let b=T-s;_+=`${x}"...":"${vu(b)} not stringified"`}return g.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(t)return String(d);default:return e?e(d):void 0}}function p(m,d,g){if(arguments.length>1){let _="";if(typeof g=="number"?_=" ".repeat(Math.min(g,10)):typeof g=="string"&&(_=g.slice(0,10)),d!=null){if(typeof d=="function")return u("",{"":m},[],d,_,"");if(Array.isArray(d))return a("",m,[],Wle(d),_,"")}if(_.length!==0)return c("",m,[],_,"")}return f("",m,[])}return p}});var XN=C((WTe,GN)=>{"use strict";var uh=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:zN}=b8(),Yle=zN.info;function Jle(n,e){let l=0;n=n||[],e=e||{dedupe:!1};let t=Object.create(zN);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,[uh]:!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:d}=this,g=0,_;for(let S=Zle(d.length,e.dedupe);nte(S,d.length,e.dedupe);S=ete(S,e.dedupe))if(p=d[S],p.level<=m){if(g!==0&&g!==p.level)break;if(_=p.stream,_[uh]){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:d,streamLevels:g}=this,_;typeof f.levelVal=="number"?_=f.levelVal:typeof f.level=="string"?_=g[f.level]:typeof f.level=="number"?_=f.level:_=Yle;let S={stream:m,level:_,levelVal:void 0,id:l++};return d.unshift(S),d.sort(Qle),this.minLevel=d[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,[uh]:!0}}}function Qle(n,e){return n.level-e.level}function Zle(n,e){return e?n-1:0}function ete(n,e){return e?n-1:n+1}function nte(n,e,l){return l?n>=0:n<e}GN.exports=Jle});var sO=C((KTe,v3)=>{"use strict";var lte=require("os"),nO=wd(),tte=Ad(),rte=Pd(),lO=UA(),ite=jN(),tO=za(),{configure:ste}=VN(),{assertDefaultLevelFound:ute,mappings:rO,genLsCache:ate,genLevelComparison:ote,assertLevelComparison:cte}=Qd(),{DEFAULT_LEVELS:fte,SORTING_ORDER:pte}=b8(),{createArgsNormalizer:dte,asChindings:hte,buildSafeSonicBoom:WN,buildFormatters:mte,stringify:ah,normalizeDestFileDescriptor:KN,noop:gte}=E8(),{version:yte}=Zd(),{chindingsSym:YN,redactFmtSym:vte,serializersSym:JN,timeSym:_te,timeSliceIndexSym:Ete,streamSym:bte,stringifySym:QN,stringifySafeSym:oh,stringifiersSym:ZN,setLevelSym:Tte,endSym:Ste,formatOptsSym:xte,messageKeySym:wte,errorKeySym:Ate,nestedKeySym:Nte,mixinSym:Ote,levelCompSym:Rte,useOnlyCustomLevelsSym:Ite,formattersSym:eO,hooksSym:Cte,nestedKeyStrSym:kte,mixinMergeStrategySym:Pte,msgPrefixSym:Dte}=tO,{epochTime:iO,nullTime:Lte}=lO,{pid:Fte}=process,Mte=lte.hostname(),$te=nO.err,jte={level:"info",levelComparison:pte.ASC,levels:fte,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:Fte,hostname:Mte},serializers:Object.assign(Object.create(null),{err:$te}),formatters:Object.assign(Object.create(null),{bindings(n){return n},level(n,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:iO,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Ute=dte(jte),Bte=Object.assign(Object.create(null),nO);function ch(...n){let e={},{opts:l,stream:t}=Ute(e,tte(),...n),{redact:r,crlf:i,s
Line truncated
|
||||
`:`
|
||||
`),Re=Gle.bind(null,{[jO]:"",[UO]:s,[HO]:Y,[BO]:Qd,[Zd]:j,[qO]:L}),pe="";p!==null&&(m===void 0?pe=Re(p):pe=Re(Object.assign({},p,{name:m})));let ue=u instanceof Function?u:u?WO:dte,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"`);jle(h,g,x);let q=XO(g,x);Hle(_);let re=Ble(_);return Object.assign(e,{levels:q,[ute]:re,[ate]:x,[Zle]:t,[Jle]:ue,[Qle]:ye,[BO]:Qd,[Zd]:j,[HO]:Y,[nte]:ve,[lte]:Z,[tte]:a,[rte]:c,[ite]:f,[cte]:f?`,${JSON.stringify(f)}:{`:"",[UO]:s,[ste]:S,[fte]:T,[jO]:pe,[qO]:L,[ote]:b,silent:Wle,onChild:N,[pte]:k}),Object.setPrototypeOf(e,Mle()),Ule(e),e[ete](h),e}v3.exports=eh;v3.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=$O(n.dest||process.stdout.fd),MO(n)):MO({dest:$O(n),minLength:0});v3.exports.transport=Fd();v3.exports.multistream=FO();v3.exports.levels=XO();v3.exports.stdSerializers=_te;v3.exports.stdTimeFunctions=Object.assign({},zO);v3.exports.symbols=GO;v3.exports.version=Kle;v3.exports.default=eh;v3.exports.pino=eh});var o0=C((kTe,eN)=>{"use strict";var Ete=jA(),E8=KO(),{serializersSym:YO}=E8.symbols,{FST_ERR_LOG_INVALID_DESTINATION:bte,FST_ERR_LOG_INVALID_LOGGER:Tte}=o2();function JO(n){if(n.stream&&n.file)throw new bte;n.file&&(n.stream=E8.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[YO]&&(n.serializers=Object.assign({},n.serializers,e[YO])),t=e.child({},n),n.logger=e,n.genReqId=l):t=E8(n,n.stream),t}var nh={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:E8.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function Ste(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}function xte(n){if(!n.logger){let t=Ete;return t.child=()=>t,{logger:t,hasLogger:!1}}if(QO(n.logger))return{logger:JO({logger:n.logger,serializers:Object.assign({},nh,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({},nh,e.serializers),n.logger=e,{logger:JO(n.logger),hasLogger:!0}}function QO(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 Tte(t.join(","))}else return!0}function Ate(n,e,l,t,r){let i={[n.requestIdLogLabel]:t},s=n.childLoggerFactory.call(n.server,e,i,r||{},l);return n.childLoggerFactory!==ZO&&QO(s,!0),s}function ZO(n,e,l){return n.child(e,l)}eN.exports={createLogger:xte,createChildLogger:Ate,defaultChildLoggerFactory:ZO,serializers:nh,now:Ste}});var c0=C((PTe,nN)=>{"use strict";nN.exports=wte;function Wa(n){return n instanceof Buffer?Buffer.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function wte(n){if(n=n||{},n.circles)return Ote(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]=Wa(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]=Wa(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]=Wa(u):i[s]=t(u)}return i}}function Ote(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]=Wa(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 q3.Scope({parent:e}),this._nodes=[new gh]}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 ch(e,i,t)),i}const(e,l,t){return this._def(q3.varKinds.const,e,l,t)}let(e,l,t){return this._def(q3.varKinds.let,e,l,t)}var(e,l,t){return this._def(q3.varKinds.var,e,l,t)}assign(e,l,t){return this._leafNode(new A8(e,l,t))}add(e,l){return this._leafNode(new fh(e,Sn.operators.ADD,l))}code(e){return typeof e=="function"?e():e!==Un.nil&&this._leafNode(new mh(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,Un.addCodeArg)(l,r));return l.push("}"),new Un._Code(l)}if(e,l,t){if(this._blockNode(new bu(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 bu(e))}else(){return this._elseNode(new Ya)}endIf(){return this._endBlockNode(bu,Ya)}_for(e,l){return this._blockNode(e),l&&this.code(l).endFor(),this}for(e,l){return this._for(new yh(e),l)}forRange(e,l,t,r,i=this.opts.es5?q3.varKinds.var:q3.varKinds.let){let s=this._scope.toName(e);return this._for(new vh(i,s,l,t),()=>r(s))}forOf(e,l,t,r=q3.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=l instanceof Un.Name?l:this.var("_arr",l);return this.forRange("_i",0,(0,Un._)`${s}.length`,u=>{this.var(i,(0,Un._)`${s}[${u}]`),t(i)})}return this._for(new w8("of",r,i,l),()=>t(i))}forIn(e,l,t,r=this.opts.es5?q3.varKinds.var:q3.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Un._)`Object.keys(${l})`,t);let i=this._scope.toName(e);return this._for(new w8("in",r,i,l),()=>t(i))}endFor(){return this._endBlockNode(Tu)}label(e){return this._leafNode(new ph(e))}break(e){return this._leafNode(new dh(e))}return(e){let l=new g0;if(this._blockNode(l),this.code(e),l.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(g0)}try(e,l,t){if(!l&&!t)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new _h;if(this._blockNode(r),this.code(e),l){let i=this.name("e");this._currNode=r.catch=new y0(i),l(i)}return t&&(this._currNode=r.finally=new v0,this.code(t)),this._endBlockNode(y0,v0)}throw(e){return this._leafNode(new hh(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=Un.nil,t,r){return this._blockNode(new m0(e,l,t)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(m0)}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 bu))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=Eh;function Su(n,e){for(let l in e)n[l]=(n[l]||0)+(e[l]||0);return n}function O8(n,e){return e instanceof Un._CodeOrName?Su(n,e.names):n}function Ja(n,e,l){if(n instanceof Un.Name)return t(n);if(!r(n))return n;return new Un._Code(n._items.reduce((i,s)=>(s instanceof Un.Name&&(s=t(s)),s instanceof Un._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 Un._Code&&i._items.some(s=>s instanceof Un.Name&&e[s.str]===1&&l[s.str]!==void 0)}}function Xte(n,e){for(let l in e)n[l]=(n[l]||0)-(e[l]||0)}function cN(n){return typeof n=="boolean"||typeof n=="number"||n===null?!n:(0,Un._)`!${bh(n)}`}Sn.not=cN;var Wte=fN(Sn.operators.AND);function Kte(...n){return n.reduce(Wte)}Sn.and=Kte;var Yte=fN(Sn.operators.OR);function Jte(...n){return n.reduce(Yte)}Sn.or=Jte;function fN(n){return(e,l)=>e===Un.nil?l:l===Un.nil?e:(0,Un._)`${bh(e)} ${n} ${bh(l)}`}function bh(n){return n instanceof Un.Name?n:(0,
Line truncated
|
||||
`),Re=hte.bind(null,{[YN]:"",[JN]:s,[ZN]:Y,[QN]:ah,[oh]:j,[eO]:L}),de="";p!==null&&(m===void 0?de=Re(p):de=Re(Object.assign({},p,{name:m})));let ue=u instanceof Function?u:u?iO:Lte,ve=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"`);ute(d,g,x);let q=rO(g,x);cte(_);let re=ote(_);return Object.assign(e,{levels:q,[Rte]:re,[Ite]:x,[bte]:t,[_te]:ue,[Ete]:ve,[QN]:ah,[oh]:j,[ZN]:Y,[Ste]:_e,[xte]:Z,[wte]:a,[Ate]:c,[Nte]:f,[kte]:f?`,${JSON.stringify(f)}:{`:"",[JN]:s,[Ote]:S,[Pte]:T,[YN]:de,[eO]:L,[Cte]:b,silent:gte,onChild:O,[Dte]:k}),Object.setPrototypeOf(e,ite()),ate(e),e[Tte](d),e}v3.exports=ch;v3.exports.destination=(n=process.stdout.fd)=>typeof n=="object"?(n.dest=KN(n.dest||process.stdout.fd),WN(n)):WN({dest:KN(n),minLength:0});v3.exports.transport=Gd();v3.exports.multistream=XN();v3.exports.levels=rO();v3.exports.stdSerializers=Bte;v3.exports.stdTimeFunctions=Object.assign({},lO);v3.exports.symbols=tO;v3.exports.version=yte;v3.exports.default=ch;v3.exports.pino=ch});var a0=C((YTe,fO)=>{"use strict";var Hte=Yw(),S8=sO(),{serializersSym:uO}=S8.symbols,{FST_ERR_LOG_INVALID_DESTINATION:qte,FST_ERR_LOG_INVALID_LOGGER:Vte}=c2();function aO(n){if(n.stream&&n.file)throw new qte;n.file&&(n.stream=S8.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[uO]&&(n.serializers=Object.assign({},n.serializers,e[uO])),t=e.child({},n),n.logger=e,n.genReqId=l):t=S8(n,n.stream),t}var fh={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:S8.stdSerializers.err,res:function(e){return{statusCode:e.statusCode}}};function zte(){let n=process.hrtime();return n[0]*1e3+n[1]/1e6}function Gte(n){if(!n.logger){let t=Hte;return t.child=()=>t,{logger:t,hasLogger:!1}}if(oO(n.logger))return{logger:aO({logger:n.logger,serializers:Object.assign({},fh,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({},fh,e.serializers),n.logger=e,{logger:aO(n.logger),hasLogger:!0}}function oO(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 Vte(t.join(","))}else return!0}function Xte(n,e,l,t,r){let i={[n.requestIdLogLabel]:t},s=n.childLoggerFactory.call(n.server,e,i,r||{},l);return n.childLoggerFactory!==cO&&oO(s,!0),s}function cO(n,e,l){return n.child(e,l)}fO.exports={createLogger:Gte,createChildLogger:Xte,defaultChildLoggerFactory:cO,serializers:fh,now:zte}});var o0=C((JTe,pO)=>{"use strict";pO.exports=Wte;function Wa(n){return n instanceof Buffer?Buffer.from(n):new n.constructor(n.buffer.slice(),n.byteOffset,n.length)}function Wte(n){if(n=n||{},n.circles)return Kte(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]=Wa(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]=Wa(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]=Wa(u):i[s]=t(u)}return i}}function Kte(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]=Wa(m);else{var d=e.indexOf(m);d!==-1?c[p]=l[d]: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 V3.Scope({parent:e}),this._nodes=[new Ah]}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 Eh(e,i,t)),i}const(e,l,t){return this._def(V3.varKinds.const,e,l,t)}let(e,l,t){return this._def(V3.varKinds.let,e,l,t)}var(e,l,t){return this._def(V3.varKinds.var,e,l,t)}assign(e,l,t){return this._leafNode(new O8(e,l,t))}add(e,l){return this._leafNode(new bh(e,Sn.operators.ADD,l))}code(e){return typeof e=="function"?e():e!==Bn.nil&&this._leafNode(new wh(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,Bn.addCodeArg)(l,r));return l.push("}"),new Bn._Code(l)}if(e,l,t){if(this._blockNode(new bu(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 bu(e))}else(){return this._elseNode(new Ya)}endIf(){return this._endBlockNode(bu,Ya)}_for(e,l){return this._blockNode(e),l&&this.code(l).endFor(),this}for(e,l){return this._for(new Nh(e),l)}forRange(e,l,t,r,i=this.opts.es5?V3.varKinds.var:V3.varKinds.let){let s=this._scope.toName(e);return this._for(new Oh(i,s,l,t),()=>r(s))}forOf(e,l,t,r=V3.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let s=l instanceof Bn.Name?l:this.var("_arr",l);return this.forRange("_i",0,(0,Bn._)`${s}.length`,u=>{this.var(i,(0,Bn._)`${s}[${u}]`),t(i)})}return this._for(new R8("of",r,i,l),()=>t(i))}forIn(e,l,t,r=this.opts.es5?V3.varKinds.var:V3.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Bn._)`Object.keys(${l})`,t);let i=this._scope.toName(e);return this._for(new R8("in",r,i,l),()=>t(i))}endFor(){return this._endBlockNode(Tu)}label(e){return this._leafNode(new Th(e))}break(e){return this._leafNode(new Sh(e))}return(e){let l=new m0;if(this._blockNode(l),this.code(e),l.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(m0)}try(e,l,t){if(!l&&!t)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new Rh;if(this._blockNode(r),this.code(e),l){let i=this.name("e");this._currNode=r.catch=new g0(i),l(i)}return t&&(this._currNode=r.finally=new y0,this.code(t)),this._endBlockNode(g0,y0)}throw(e){return this._leafNode(new xh(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=Bn.nil,t,r){return this._blockNode(new h0(e,l,t)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(h0)}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 bu))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=Ih;function Su(n,e){for(let l in e)n[l]=(n[l]||0)+(e[l]||0);return n}function I8(n,e){return e instanceof Bn._CodeOrName?Su(n,e.names):n}function Ja(n,e,l){if(n instanceof Bn.Name)return t(n);if(!r(n))return n;return new Bn._Code(n._items.reduce((i,s)=>(s instanceof Bn.Name&&(s=t(s)),s instanceof Bn._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 Bn._Code&&i._items.some(s=>s instanceof Bn.Name&&e[s.str]===1&&l[s.str]!==void 0)}}function m2e(n,e){for(let l in e)n[l]=(n[l]||0)-(e[l]||0)}function bO(n){return typeof n=="boolean"||typeof n=="number"||n===null?!n:(0,Bn._)`!${Ch(n)}`}Sn.not=bO;var g2e=TO(Sn.operators.AND);function y2e(...n){return n.reduce(g2e)}Sn.and=y2e;var v2e=TO(Sn.operators.OR);function _2e(...n){return n.reduce(v2e)}Sn.or=_2e;function TO(n){return(e,l)=>e===Bn.nil?l:l===Bn.nil?e:(0,Bn._)`${Ch(e)} ${n} ${Ch(l)}`}function Ch(n){return n instanceof Bn.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 L2e({gen:n,parentData:e,parentDataProperty:l},t){n.if((0,_n._)`${e} !== undefined`,()=>n.assign((0,_n._)`${e}[${l}]`,t))}function Oh(n,e,l,t=E0.Correct){let r=t===E0.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===E0.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)}}Kt.checkDataType=Oh;function Nh(n,e,l,t){if(n.length===1)return Oh(n[0],e,l,t);let r,i=(0,ON.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,Oh(s,e,l,t));return r}Kt.checkDataTypes=Nh;var F2e={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:e})=>typeof n=="string"?(0,_n._)`{type: ${n}}`:(0,_n._)`{type: ${e}}`};function Rh(n){let e=M2e(n);(0,I2e.reportError)(e,F2e)}Kt.reportTypeError=Rh;function M2e(n){let{gen:e,data:l,schema:t}=n,r=(0,ON.schemaRefOrVal)(n,t,"type");return{gen:e,keyword:"type",data:l,schema:t.type,schemaCode:r,schemaValue:r,parentSchema:t,params:{},it:n}}});var CN=C(I8=>{"use strict";Object.defineProperty(I8,"__esModule",{value:!0});I8.assignDefaults=void 0;var eo=Ze(),$2e=En();function j2e(n,e){let{properties:l,items:t}=n.schema;if(e==="object"&&l)for(let r in l)IN(n,r,l[r].default);else e==="array"&&Array.isArray(t)&&t.forEach((r,i)=>IN(n,i,r.default))}I8.assignDefaults=j2e;function IN(n,e,l){let{gen:t,compositeRule:r,data:i,opts:s}=n;if(l===void 0)return;let u=(0,eo._)`${i}${(0,eo.getProperty)(e)}`;if(r){(0,$2e.checkStrictMode)(n,`default is ignored for: ${u}`);return}let a=(0,eo._)`${u} === undefined`;s.useDefaults==="empty"&&(a=(0,eo._)`${a} || ${u} === null || ${u} === ""`),t.if(a,(0,eo._)`${u} = ${(0,eo.stringify)(l)}`)}});var Yt=C(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.validateUnion=Sl.validateArray=Sl.usePattern=Sl.callValidateCode=Sl.schemaProperties=Sl.allSchemaProperties=Sl.noPropertyInData=Sl.propertyInData=Sl.isOwnProperty=Sl.hasPropFunc=Sl.reportMissingProp=Sl.checkMissingProp=Sl.checkReportMissingProp=void 0;var jl=Ze(),Ih=En(),Xi=E3(),U2e=En();function B2e(n,e){let{gen:l,data:t,it:r}=n;l.if(kh(l,t,e,r.opts.ownProperties),()=>{n.setParams({missingProperty:(0,jl._)`${e}`},!0),n.error()})}Sl.checkReportMissingProp=B2e;function H2e({gen:n,data:e,it:{opts:l}},t,r){return(0,jl.or)(...t.map(i=>(0,jl.and)(kh(n,e,i,l.ownProperties),(0,jl._)`${r} = ${i}`)))}Sl.checkMissingProp=H2e;function q2e(n,e){n.setParams({missingProperty:e},!0),n.error()}Sl.reportMissingProp=q2e;function kN(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,jl._)`Object.prototype.hasOwnProperty`})}Sl.hasPropFunc=kN;function Ch(n,e,l){return(0,jl._)`${kN(n)}.call(${e}, ${l})`}Sl.isOwnProperty=Ch;function V2e(n,e,l,t){let r=(0,jl._)`${e}${(0,jl.getProperty)(l)} !== undefined`;return t?(0,jl._)`${r} && ${Ch(n,e,l)}`:r}Sl.propertyInData=V2e;function kh(n,e,l,t){let r=(0,jl._)`${e}${(0,jl.getProperty)(l)} === undefined`;return t?(0,jl.or)(r,(0,jl.not)(Ch(n,e,l))):r}Sl.noPropertyInData=kh;function PN(n){return n?Object.keys(n).filter(e=>e!=="__proto__"):[]}Sl.allSchemaProperties=PN;function z2e(n,e){return PN(e).filter(l=>!(0,Ih.alwaysValidSchema)(n,e[l]))}Sl.schemaProperties=z2e;function G2e({schemaCode:n,data:e,it:{gen:l,topSchemaRef:t,schemaPath:r,errorPath:i},it:s},u,a,c){let f=c?(0,jl._)`${n}, ${e}, ${t}${r}`:e,p=[[Xi.default.instancePath,(0,jl.strConcat)(Xi.default.instancePath,i)],[Xi.default.parentData,s.parentData],[Xi.default.parentDataProperty,s.parentDataProperty],[Xi.default.rootData,Xi.default.rootData]];s.opts.dynamicRef&&p.push([Xi.default.dynamicAnchors,Xi.default.dynamicAnchors]);let m=(0,jl._)`${f}, ${l.object(...p)}`;return a!==jl.nil?(0,jl._)`${u}.call(${a}, ${m})`:(0,jl._)`${u}(${m})`}Sl.callValidateCode=G2e;var X2e=(0,jl._)`new RegExp`;function W2e({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,jl._)`${r.code==="new RegExp"?X2e:(0,U2e.useFunc)(n,r)}(${l}, ${t})`})}Sl.usePattern=W2e;function K2e(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,jl._)`${l}.length`);e.forRange("i",0,a,c=>{n.subschema({keyword:t,dataProp:c,dataPropType:Ih.Type.Num},i),e.if((0,jl.not)(i),u)})}}Sl.validateArray=K2e;function Y2e(n){let{gen:e,schema:l,keyword:t,it:r}=n;if(!
Line truncated
|
||||
|| ${s} === "boolean" || ${r} === null`).assign(u,(0,_n._)`[${r}]`)}}}function t3e({gen:n,parentData:e,parentDataProperty:l},t){n.if((0,_n._)`${e} !== undefined`,()=>n.assign((0,_n._)`${e}[${l}]`,t))}function Mh(n,e,l,t=_0.Correct){let r=t===_0.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===_0.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)}}Yt.checkDataType=Mh;function $h(n,e,l,t){if(n.length===1)return Mh(n[0],e,l,t);let r,i=(0,$O.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,Mh(s,e,l,t));return r}Yt.checkDataTypes=$h;var r3e={message:({schema:n})=>`must be ${n}`,params:({schema:n,schemaValue:e})=>typeof n=="string"?(0,_n._)`{type: ${n}}`:(0,_n._)`{type: ${e}}`};function jh(n){let e=i3e(n);(0,Q2e.reportError)(e,r3e)}Yt.reportTypeError=jh;function i3e(n){let{gen:e,data:l,schema:t}=n,r=(0,$O.schemaRefOrVal)(n,t,"type");return{gen:e,keyword:"type",data:l,schema:t.type,schemaCode:r,schemaValue:r,parentSchema:t,params:{},it:n}}});var HO=C(P8=>{"use strict";Object.defineProperty(P8,"__esModule",{value:!0});P8.assignDefaults=void 0;var eo=Ze(),s3e=En();function u3e(n,e){let{properties:l,items:t}=n.schema;if(e==="object"&&l)for(let r in l)BO(n,r,l[r].default);else e==="array"&&Array.isArray(t)&&t.forEach((r,i)=>BO(n,i,r.default))}P8.assignDefaults=u3e;function BO(n,e,l){let{gen:t,compositeRule:r,data:i,opts:s}=n;if(l===void 0)return;let u=(0,eo._)`${i}${(0,eo.getProperty)(e)}`;if(r){(0,s3e.checkStrictMode)(n,`default is ignored for: ${u}`);return}let a=(0,eo._)`${u} === undefined`;s.useDefaults==="empty"&&(a=(0,eo._)`${a} || ${u} === null || ${u} === ""`),t.if(a,(0,eo._)`${u} = ${(0,eo.stringify)(l)}`)}});var Jt=C(Sl=>{"use strict";Object.defineProperty(Sl,"__esModule",{value:!0});Sl.validateUnion=Sl.validateArray=Sl.usePattern=Sl.callValidateCode=Sl.schemaProperties=Sl.allSchemaProperties=Sl.noPropertyInData=Sl.propertyInData=Sl.isOwnProperty=Sl.hasPropFunc=Sl.reportMissingProp=Sl.checkMissingProp=Sl.checkReportMissingProp=void 0;var jl=Ze(),Uh=En(),Wi=E3(),a3e=En();function o3e(n,e){let{gen:l,data:t,it:r}=n;l.if(Hh(l,t,e,r.opts.ownProperties),()=>{n.setParams({missingProperty:(0,jl._)`${e}`},!0),n.error()})}Sl.checkReportMissingProp=o3e;function c3e({gen:n,data:e,it:{opts:l}},t,r){return(0,jl.or)(...t.map(i=>(0,jl.and)(Hh(n,e,i,l.ownProperties),(0,jl._)`${r} = ${i}`)))}Sl.checkMissingProp=c3e;function f3e(n,e){n.setParams({missingProperty:e},!0),n.error()}Sl.reportMissingProp=f3e;function qO(n){return n.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,jl._)`Object.prototype.hasOwnProperty`})}Sl.hasPropFunc=qO;function Bh(n,e,l){return(0,jl._)`${qO(n)}.call(${e}, ${l})`}Sl.isOwnProperty=Bh;function p3e(n,e,l,t){let r=(0,jl._)`${e}${(0,jl.getProperty)(l)} !== undefined`;return t?(0,jl._)`${r} && ${Bh(n,e,l)}`:r}Sl.propertyInData=p3e;function Hh(n,e,l,t){let r=(0,jl._)`${e}${(0,jl.getProperty)(l)} === undefined`;return t?(0,jl.or)(r,(0,jl.not)(Bh(n,e,l))):r}Sl.noPropertyInData=Hh;function VO(n){return n?Object.keys(n).filter(e=>e!=="__proto__"):[]}Sl.allSchemaProperties=VO;function d3e(n,e){return VO(e).filter(l=>!(0,Uh.alwaysValidSchema)(n,e[l]))}Sl.schemaProperties=d3e;function h3e({schemaCode:n,data:e,it:{gen:l,topSchemaRef:t,schemaPath:r,errorPath:i},it:s},u,a,c){let f=c?(0,jl._)`${n}, ${e}, ${t}${r}`:e,p=[[Wi.default.instancePath,(0,jl.strConcat)(Wi.default.instancePath,i)],[Wi.default.parentData,s.parentData],[Wi.default.parentDataProperty,s.parentDataProperty],[Wi.default.rootData,Wi.default.rootData]];s.opts.dynamicRef&&p.push([Wi.default.dynamicAnchors,Wi.default.dynamicAnchors]);let m=(0,jl._)`${f}, ${l.object(...p)}`;return a!==jl.nil?(0,jl._)`${u}.call(${a}, ${m})`:(0,jl._)`${u}(${m})`}Sl.callValidateCode=h3e;var m3e=(0,jl._)`new RegExp`;function g3e({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,jl._)`${r.code==="new RegExp"?m3e:(0,a3e.useFunc)(n,r)}(${l}, ${t})`})}Sl.usePattern=g3e;function y3e(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,jl._)`${l}.length`);e.forRange("i",0,a,c=>{n.subschema({keyword:t,dataProp:c,dataPropType:Uh.Type.Num},i),e.if((0,jl.not)(i),u)})}}Sl.validateArray=y3e;function v3e(n){let{gen:e,schema:l,keyword:t,it:r}=n;if(!
Line truncated
|
||||
missingProperty: ${t},
|
||||
depsCount: ${e},
|
||||
deps: ${l}}`};var xie={keyword:"dependencies",type:"object",schemaType:"object",error:Er.error,code(n){let[e,l]=Aie(n);zR(n,e),GR(n,l)}};function Aie({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 zR(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,$0.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,$0.checkReportMissingProp)(n,c)}):(l.if((0,vm._)`${a} && (${(0,$0.checkMissingProp)(n,u,i)})`),(0,$0.reportMissingProp)(n,i),l.else())}}Er.validatePropertyDeps=zR;function GR(n,e=n.schema){let{gen:l,data:t,keyword:r,it:i}=n,s=l.name("valid");for(let u in e)(0,Sie.alwaysValidSchema)(i,e[u])||(l.if((0,$0.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))}Er.validateSchemaDeps=GR;Er.default=xie});var KR=C(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});var WR=Ze(),wie=En(),Oie={message:"property name must be valid",params:({params:n})=>(0,WR._)`{propertyName: ${n.propertyName}}`},Nie={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Oie,code(n){let{gen:e,schema:l,data:t,it:r}=n;if((0,wie.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,WR.not)(i),()=>{n.error(!0),r.allErrors||e.break()})}),n.ok(i)}};_m.default=Nie});var bm=C(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});var V8=Yt(),G3=Ze(),Rie=E3(),z8=En(),Iie={message:"must NOT have additional properties",params:({params:n})=>(0,G3._)`{additionalProperty: ${n.additionalProperty}}`},Cie={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Iie,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,z8.alwaysValidSchema)(s,l))return;let c=(0,V8.allSchemaProperties)(t.properties),f=(0,V8.allSchemaProperties)(t.patternProperties);p(),n.ok((0,G3._)`${i} === ${Rie.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,z8.schemaRefOrVal)(s,t.properties,"properties");T=(0,V8.isOwnProperty)(e,x,S)}else c.length?T=(0,G3.or)(...c.map(x=>(0,G3._)`${S} === ${x}`)):T=G3.nil;return f.length&&(T=(0,G3.or)(T,...f.map(x=>(0,G3._)`${(0,V8.usePattern)(n,x)}.test(${S})`))),(0,G3.not)(T)}function h(S){e.code((0,G3._)`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,z8.alwaysValidSchema)(s,l)){let T=e.name("valid");a.removeAdditional==="failing"?(_(S,T,!1),e.if((0,G3.not)(T),()=>{n.reset(),h(S)})):(_(S,T),u||e.if((0,G3.not)(T),()=>e.break()))}}function _(S,T,x){let v={keyword:"additionalProperties",dataProp:S,dataPropType:z8.Type.Str};x===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(v,T)}}};Em.default=Cie});var QR=C(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});var kie=to(),YR=Yt(),Tm=En(),JR=bm(),Pie={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&&JR.default.code(new kie.KeywordCxt(i,JR.default,"additionalProperties"));let s=(0,YR.allSchemaProperties)(l);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=Tm.mergeEvaluated.props(e,(0,Tm.toHash)(s),i.props));let u=s.filter(p=>!(0,Tm.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,YR.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)}}};Sm.default=Pie});var lI=C(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});var ZR=Yt(),G8=Ze(),eI=En(),nI=En(),Die={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,ZR.allSchemaProperties)(l),a=u.filter(_=>(0,eI.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
|
||||
deps: ${l}}`};var Gie={keyword:"dependencies",type:"object",schemaType:"object",error:Tr.error,code(n){let[e,l]=Xie(n);lI(n,e),tI(n,l)}};function Xie({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 lI(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,M0.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,M0.checkReportMissingProp)(n,c)}):(l.if((0,Om._)`${a} && (${(0,M0.checkMissingProp)(n,u,i)})`),(0,M0.reportMissingProp)(n,i),l.else())}}Tr.validatePropertyDeps=lI;function tI(n,e=n.schema){let{gen:l,data:t,keyword:r,it:i}=n,s=l.name("valid");for(let u in e)(0,zie.alwaysValidSchema)(i,e[u])||(l.if((0,M0.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))}Tr.validateSchemaDeps=tI;Tr.default=Gie});var sI=C(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});var iI=Ze(),Wie=En(),Kie={message:"property name must be valid",params:({params:n})=>(0,iI._)`{propertyName: ${n.propertyName}}`},Yie={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Kie,code(n){let{gen:e,schema:l,data:t,it:r}=n;if((0,Wie.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,iI.not)(i),()=>{n.error(!0),r.allErrors||e.break()})}),n.ok(i)}};Rm.default=Yie});var Cm=C(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});var X8=Jt(),X3=Ze(),Jie=E3(),W8=En(),Qie={message:"must NOT have additional properties",params:({params:n})=>(0,X3._)`{additionalProperty: ${n.additionalProperty}}`},Zie={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Qie,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,W8.alwaysValidSchema)(s,l))return;let c=(0,X8.allSchemaProperties)(t.properties),f=(0,X8.allSchemaProperties)(t.patternProperties);p(),n.ok((0,X3._)`${i} === ${Jie.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,W8.schemaRefOrVal)(s,t.properties,"properties");T=(0,X8.isOwnProperty)(e,x,S)}else c.length?T=(0,X3.or)(...c.map(x=>(0,X3._)`${S} === ${x}`)):T=X3.nil;return f.length&&(T=(0,X3.or)(T,...f.map(x=>(0,X3._)`${(0,X8.usePattern)(n,x)}.test(${S})`))),(0,X3.not)(T)}function d(S){e.code((0,X3._)`delete ${r}[${S}]`)}function g(S){if(a.removeAdditional==="all"||a.removeAdditional&&l===!1){d(S);return}if(l===!1){n.setParams({additionalProperty:S}),n.error(),u||e.break();return}if(typeof l=="object"&&!(0,W8.alwaysValidSchema)(s,l)){let T=e.name("valid");a.removeAdditional==="failing"?(_(S,T,!1),e.if((0,X3.not)(T),()=>{n.reset(),d(S)})):(_(S,T),u||e.if((0,X3.not)(T),()=>e.break()))}}function _(S,T,x){let v={keyword:"additionalProperties",dataProp:S,dataPropType:W8.Type.Str};x===!1&&Object.assign(v,{compositeRule:!0,createErrors:!1,allErrors:!1}),n.subschema(v,T)}}};Im.default=Zie});var oI=C(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});var ese=to(),uI=Jt(),km=En(),aI=Cm(),nse={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&&aI.default.code(new ese.KeywordCxt(i,aI.default,"additionalProperties"));let s=(0,uI.allSchemaProperties)(l);for(let p of s)i.definedProperties.add(p);i.opts.unevaluated&&s.length&&i.props!==!0&&(i.props=km.mergeEvaluated.props(e,(0,km.toHash)(s),i.props));let u=s.filter(p=>!(0,km.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,uI.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)}}};Pm.default=nse});var dI=C(Dm=>{"use strict";Object.defineProperty(Dm,"__esModule",{value:!0});var cI=Jt(),K8=Ze(),fI=En(),pI=En(),lse={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,cI.allSchemaProperties)(l),a=u.filter(_=>(0,fI.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
|
||||
`,`
|
||||
@@ -119,7 +119,7 @@ ${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
|
||||
|
||||
${r}
|
||||
|
||||
module.exports = ${n.toString()}(validator, serializer)`}Jm.exports=Cue;Jm.exports.dependencies={Serializer:rh(),Validator:Ym()}});var JI=C((nxe,YI)=>{"use strict";var{dependencies:kue}=Qm(),{Serializer:Pue,Validator:exe}=kue,Due={mode:"standalone"},Lue=Pue.restoreFromState(Due),Fue=null;YI.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}(Fue,Lue)});var H0=C((lxe,nC)=>{"use strict";var QI=require("node:http").STATUS_CODES,Mue=ed(),{kReplyHeaders:Cu,kReplyNextErrorHandler:t9,kReplyIsRunningOnErrorHook:$ue,kReplyHasStatusCode:jue,kRouteContext:eC}=Ut(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:Uue,FST_ERR_FAILED_ERROR_SERIALIZATION:Bue}=o2(),{getSchemaSerializer:Hue}=f0(),Zm=JI(),que={func:zue,toJSON(){return this.func.name.toString()+"()"}};function Vue(n,e,l){n[$ue]=!1;let t=n[eC];if(n[t9]===!1){ZI(e,n,function(u,a){try{u.raw.writeHead(u.raw.statusCode,u[Cu])}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[t9]||t.errorHandler;n[t9]=Object.getPrototypeOf(r),delete n[Cu]["content-type"],delete n[Cu]["content-length"];let i=r.func;if(!i){n[t9]=!1,ZI(e,n,l);return}let s=i(e,n.request,n);s!==void 0&&(s!==null&&typeof s.then=="function"?Mue(s,n):n.send(s))}function zue(n,e,l){if(Xue(n,l),!l[jue]||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 ZI(n,e,l){let t=e.raw,r=e.statusCode;e[Cu]["content-type"]=e[Cu]["content-type"]??"application/json; charset=utf-8";let i;try{let s=Hue(e[eC],r,e[Cu]["content-type"]);i=s===!1?Zm({error:QI[r+""],code:n.code,message:n.message,statusCode:r}):s(Object.create(n,{error:{value:QI[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=Zm(new Bue(s.message,n.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=Zm(new Uue(typeof i))),e[Cu]["content-length"]=""+Buffer.byteLength(i),l(e,i)}function Gue(n=que,e){if(!e)return n;let l=Object.create(n);return l.func=e,l}function Xue(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}nC.exports={buildErrorHandler:Gue,handleError:Vue}});var o9=C((txe,a9)=>{"use strict";var tg=require("node:stream").finished,Wue=require("node:stream").Readable,{kFourOhFourContext:lC,kPublicRouteContext:tC,kReplyErrorHandlerCalled:fC,kReplyHijacked:q0,kReplyStartTime:V0,kReplyEndTime:ig,kReplySerializer:pi,kReplySerializerDefault:i9,kReplyIsError:s9,kReplyHeaders:Ll,kReplyTrailers:Bt,kReplyHasStatusCode:sg,kReplyIsRunningOnErrorHook:ug,kReplyNextErrorHandler:Kue,kDisableRequestLogging:pC,kSchemaResponse:u9,kReplyCacheSerializeFns:es,kSchemaController:eg,kOptions:Yue,kRouteContext:In}=Ut(),{onSendHookRunner:dC,onResponseHookRunner:Jue,preHandlerHookRunner:Que,preSerializationHookRunner:Zue}=Ui(),rC=rd()[Symbol.for("internals")],eae=o0(),rg=eae.now,{handleError:iC}=H0(),{getSchemaSerializer:nae}=f0(),ng={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:lae,FST_ERR_REP_RESPONSE_BODY_CONSUMED:tae,FST_ERR_REP_ALREADY_SENT:hC,FST_ERR_REP_SENT_VALUE:rae,FST_ERR_SEND_INSIDE_ONERR:iae,FST_ERR_BAD_STATUS_CODE:sae,FST_ERR_BAD_TRAILER_NAME:uae,FST_ERR_BAD_TRAILER_VALUE:aae,FST_ERR_MISSING_SERIALIZATION_FN:oae,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:cae}=o2(),{FSTDEP010:fae,FSTDEP013:pae,FSTDEP019:dae,FSTDEP020:hae}=si(),mC=Object.prototype.toString;function Il(n,e,l){this.raw=n,this[pi]=null,this[fC]=!1,this[s9]=!1,this[ug]=!1,this.request=e,this[Ll]={},this[Bt]=null,this[sg]=!1,this[V0]=void 0,this.log=l}Il.props=[];Object.defineProperties(Il.prototype,{[In]:{get(){return this.request[In]}},context:{get(){return dae(),this.request[In]}},elapsedTime:{get(){return this[V0]===void 0?0:(this[ig]||rg())-this[V0]}},server:{get(){return this.request[In].server}},sent:{enumerable:!0,get(){return(this[q0]||this.raw.writableEnded)===!0},set(n){if(fae(),n!==!0)throw new rae;if(this.sent&&this[q0])throw new hC(this.request.url,this.request.method);this[q0]=!0}},statusCode:{get(){return this.raw.statusCode},set(n){this.code(n)}},[tC]:{get(){return this.request[tC]}}});Il.prototype.hijack=function(){return this[q0]=!0,this};Il.prototype.send=function(n){if(this[ug]===!0)throw new iae;if(this.sent)return this.log.warn
Line truncated
|
||||
module.exports = ${n.toString()}(validator, serializer)`}ug.exports=Zue;ug.exports.dependencies={Serializer:hh(),Validator:sg()}});var aC=C((_xe,uC)=>{"use strict";var{dependencies:eae}=ag(),{Serializer:nae,Validator:vxe}=eae,lae={mode:"standalone"},tae=nae.restoreFromState(lae),rae=null;uC.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}(rae,tae)});var B0=C((Exe,pC)=>{"use strict";var oC=require("node:http").STATUS_CODES,iae=fd(),{kReplyHeaders:Cu,kReplyNextErrorHandler:s9,kReplyIsRunningOnErrorHook:sae,kReplyHasStatusCode:uae,kRouteContext:fC}=Ut(),{FST_ERR_REP_INVALID_PAYLOAD_TYPE:aae,FST_ERR_FAILED_ERROR_SERIALIZATION:oae}=c2(),{getSchemaSerializer:cae}=c0(),og=aC(),fae={func:dae,toJSON(){return this.func.name.toString()+"()"}};function pae(n,e,l){n[sae]=!1;let t=n[fC];if(n[s9]===!1){cC(e,n,function(u,a){try{u.raw.writeHead(u.raw.statusCode,u[Cu])}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[s9]||t.errorHandler;n[s9]=Object.getPrototypeOf(r),delete n[Cu]["content-type"],delete n[Cu]["content-length"];let i=r.func;if(!i){n[s9]=!1,cC(e,n,l);return}let s=i(e,n.request,n);s!==void 0&&(s!==null&&typeof s.then=="function"?iae(s,n):n.send(s))}function dae(n,e,l){if(mae(n,l),!l[uae]||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 cC(n,e,l){let t=e.raw,r=e.statusCode;e[Cu]["content-type"]=e[Cu]["content-type"]??"application/json; charset=utf-8";let i;try{let s=cae(e[fC],r,e[Cu]["content-type"]);i=s===!1?og({error:oC[r+""],code:n.code,message:n.message,statusCode:r}):s(Object.create(n,{error:{value:oC[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=og(new oae(s.message,n.message))}typeof i!="string"&&!Buffer.isBuffer(i)&&(i=og(new aae(typeof i))),e[Cu]["content-length"]=""+Buffer.byteLength(i),l(e,i)}function hae(n=fae,e){if(!e)return n;let l=Object.create(n);return l.func=e,l}function mae(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}pC.exports={buildErrorHandler:hae,handleError:pae}});var p9=C((bxe,f9)=>{"use strict";var dg=require("node:stream").finished,gae=require("node:stream").Readable,{kFourOhFourContext:dC,kPublicRouteContext:hC,kReplyErrorHandlerCalled:TC,kReplyHijacked:H0,kReplyStartTime:q0,kReplyEndTime:mg,kReplySerializer:di,kReplySerializerDefault:a9,kReplyIsError:o9,kReplyHeaders:Ll,kReplyTrailers:Bt,kReplyHasStatusCode:gg,kReplyIsRunningOnErrorHook:yg,kReplyNextErrorHandler:yae,kDisableRequestLogging:SC,kSchemaResponse:c9,kReplyCacheSerializeFns:ns,kSchemaController:cg,kOptions:vae,kRouteContext:In}=Ut(),{onSendHookRunner:xC,onResponseHookRunner:_ae,preHandlerHookRunner:Eae,preSerializationHookRunner:bae}=Bi(),mC=md()[Symbol.for("internals")],Tae=a0(),hg=Tae.now,{handleError:gC}=B0(),{getSchemaSerializer:Sae}=c0(),fg={JSON:"application/json; charset=utf-8",PLAIN:"text/plain; charset=utf-8",OCTET:"application/octet-stream"},{FST_ERR_REP_INVALID_PAYLOAD_TYPE:xae,FST_ERR_REP_RESPONSE_BODY_CONSUMED:wae,FST_ERR_REP_ALREADY_SENT:wC,FST_ERR_REP_SENT_VALUE:Aae,FST_ERR_SEND_INSIDE_ONERR:Nae,FST_ERR_BAD_STATUS_CODE:Oae,FST_ERR_BAD_TRAILER_NAME:Rae,FST_ERR_BAD_TRAILER_VALUE:Iae,FST_ERR_MISSING_SERIALIZATION_FN:Cae,FST_ERR_MISSING_CONTENTTYPE_SERIALIZATION_FN:kae}=c2(),{FSTDEP010:Pae,FSTDEP013:Dae,FSTDEP019:Lae,FSTDEP020:Fae}=ui(),AC=Object.prototype.toString;function Il(n,e,l){this.raw=n,this[di]=null,this[TC]=!1,this[o9]=!1,this[yg]=!1,this.request=e,this[Ll]={},this[Bt]=null,this[gg]=!1,this[q0]=void 0,this.log=l}Il.props=[];Object.defineProperties(Il.prototype,{[In]:{get(){return this.request[In]}},context:{get(){return Lae(),this.request[In]}},elapsedTime:{get(){return this[q0]===void 0?0:(this[mg]||hg())-this[q0]}},server:{get(){return this.request[In].server}},sent:{enumerable:!0,get(){return(this[H0]||this.raw.writableEnded)===!0},set(n){if(Pae(),n!==!0)throw new Aae;if(this.sent&&this[H0])throw new wC(this.request.url,this.request.method);this[H0]=!0}},statusCode:{get(){return this.raw.statusCode},set(n){this.code(n)}},[hC]:{get(){return this.request[hC]}}});Il.prototype.hijack=function(){return this[H0]=!0,this};Il.prototype.send=function(n){if(this[yg]===!0)throw new Nae;if(this.sent)return this.log.warn
Line truncated
|
||||
${l.functions.join(`
|
||||
`)}
|
||||
const main = anonymous0
|
||||
@@ -133,9 +133,9 @@ ${T}`),g.pop(),`{${w}}`}case"number":return isFinite(h)?String(h):e?e(h):"null";
|
||||
${l.functions.join(`
|
||||
`)}
|
||||
return main
|
||||
`;let u=new Q1e(e),a=new Z1e(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
|
||||
`;let u=new E5e(e),a=new b5e(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[d,g]of Object.entries(m))a.addSchema(g,d)}if(e.debugMode&&(e.mode="debug"),e.mode==="debug")return{validator:a,serializer:u,code:`validator
|
||||
serializer
|
||||
${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode==="standalone"?Qm()(c,l,u,a):c(a,u)}var l5e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],t5e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],r5e=["maxLength","minLength","pattern"],i5e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function ED(n){for(var e of l5e)if(e in n)return"object";for(var e of t5e)if(e in n)return"array";for(var e of r5e)if(e in n)return"string";for(var e of i5e)if(e in n)return"number";return n.type}function s5e(n,e){let l=e.schema,t=Object.keys(l.properties||{}),r=`
|
||||
${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode==="standalone"?ag()(c,l,u,a):c(a,u)}var x5e=["properties","required","additionalProperties","patternProperties","maxProperties","minProperties","dependencies"],w5e=["items","additionalItems","maxItems","minItems","uniqueItems","contains"],A5e=["maxLength","minLength","pattern"],N5e=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum"];function CD(n){for(var e of x5e)if(e in n)return"object";for(var e of w5e)if(e in n)return"array";for(var e of A5e)if(e in n)return"string";for(var e of N5e)if(e in n)return"number";return n.type}function O5e(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 (
|
||||
@@ -148,7 +148,7 @@ ${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode===
|
||||
if (/${c.replace(/\\*\//g,"\\/")}/.test(key)) {
|
||||
${Eo}
|
||||
json += serializer.asString(key) + ':'
|
||||
${xr(n,f,"value")}
|
||||
${Ar(n,f,"value")}
|
||||
continue
|
||||
}
|
||||
`}let a=e.getPropertyLocation("additionalProperties").schema;if(a!==void 0)if(a===!0)r+=`
|
||||
@@ -157,10 +157,10 @@ ${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode===
|
||||
`;else{let c=e.getPropertyLocation("additionalProperties");r+=`
|
||||
${Eo}
|
||||
json += serializer.asString(key) + ':'
|
||||
${xr(n,c,"value")}
|
||||
${Ar(n,c,"value")}
|
||||
`}return r+=`
|
||||
}
|
||||
`,r}function u5e(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=bo(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!')
|
||||
`,r}function R5e(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=bo(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
|
||||
@@ -168,39 +168,39 @@ ${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode===
|
||||
`;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=bo(n,e,f.schema.$ref));let p=JSON.stringify(c);if(u.indexOf(c)!==-1)l+=`
|
||||
${Eo}
|
||||
json += ${JSON.stringify(p+":")}
|
||||
${xr(n,f,`obj[${p}]`)}
|
||||
${Ar(n,f,`obj[${p}]`)}
|
||||
`;else{l+=`
|
||||
if (obj[${p}] !== undefined) {
|
||||
${Eo}
|
||||
json += ${JSON.stringify(p+":")}
|
||||
${xr(n,f,`obj[${p}]`)}
|
||||
${Ar(n,f,`obj[${p}]`)}
|
||||
}
|
||||
`;let m=f.schema.default;m!==void 0&&(l+=`
|
||||
else {
|
||||
${Eo}
|
||||
json += ${JSON.stringify(p+":"+JSON.stringify(m))}
|
||||
}
|
||||
`)}}return(t.patternProperties||t.additionalProperties)&&(l+=s5e(n,e)),n.wrapObjects=a,l+=`
|
||||
`)}}return(t.patternProperties||t.additionalProperties)&&(l+=O5e(n,e)),n.wrapObjects=a,l+=`
|
||||
return json${n.wrapObjects?" + '}'":""}
|
||||
`,l}function bD(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=bo(n,a,s.$ref).schema}let u=s.type;if(u===void 0&&(u=ED(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&&bD(n,e,s,t)}delete t.allOf,t.$id=`__fjs_merged_${_D++}`,n.refResolver.addSchema(t),e.addMergedSchema(t,t.$id)}function a5e(n,e,l){n.validatorSchemasIds.add(e.getSchemaId());let t=ey({},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=ey(t,r);let c=e.getPropertyLocation("else");return c.schema=ey(t,i),`
|
||||
`,l}function kD(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=bo(n,a,s.$ref).schema}let u=s.type;if(u===void 0&&(u=CD(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&&kD(n,e,s,t)}delete t.allOf,t.$id=`__fjs_merged_${ID++}`,n.refResolver.addSchema(t),e.addMergedSchema(t,t.$id)}function I5e(n,e,l){n.validatorSchemasIds.add(e.getSchemaId());let t=cy({},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=cy(t,r);let c=e.getPropertyLocation("else");return c.schema=cy(t,i),`
|
||||
if (validator.validate("${u}", ${l})) {
|
||||
${xr(n,a,l)}
|
||||
${Ar(n,a,l)}
|
||||
} else {
|
||||
${xr(n,c,l)}
|
||||
${Ar(n,c,l)}
|
||||
}
|
||||
`}function o5e(n){return`(${n} && typeof ${n}.toJSON === 'function')
|
||||
`}function C5e(n){return`(${n} && typeof ${n}.toJSON === 'function')
|
||||
? ${n}.toJSON()
|
||||
: ${n}
|
||||
`}function TD(n,e){let l=e.schema;if(n.functionsNamesBySchema.has(l))return n.functionsNamesBySchema.get(l);let t=xD(n);n.functionsNamesBySchema.set(l,t);let r=e.getSchemaRef();r.startsWith(n.rootSchemaId)&&(r=r.replace(n.rootSchemaId,""));let i=`
|
||||
`}function PD(n,e){let l=e.schema;if(n.functionsNamesBySchema.has(l))return n.functionsNamesBySchema.get(l);let t=LD(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 = ${o5e("input")}
|
||||
const obj = ${C5e("input")}
|
||||
${s?"":"if (obj === null) return '{}'"}
|
||||
|
||||
${u5e(n,e)}
|
||||
${R5e(n,e)}
|
||||
}
|
||||
`,n.functions.push(i),t}function c5e(n,e){let l=e.schema,t=e.getPropertyLocation("items");t.schema=t.schema||{},t.schema.$ref&&(t=bo(n,t,t.schema.$ref));let r=t.schema;if(n.functionsNamesBySchema.has(l))return n.functionsNamesBySchema.get(l);let i=xD(n);n.functionsNamesBySchema.set(l,i);let s=e.getSchemaRef();s.startsWith(n.rootSchemaId)&&(s=s.replace(n.rootSchemaId,""));let u=`
|
||||
`,n.functions.push(i),t}function k5e(n,e){let l=e.schema,t=e.getPropertyLocation("items");t.schema=t.schema||{},t.schema.$ref&&(t=bo(n,t,t.schema.$ref));let r=t.schema;if(n.functionsNamesBySchema.has(l))return n.functionsNamesBySchema.get(l);let i=LD(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}
|
||||
`,a=l.nullable===!0;if(u+=`
|
||||
@@ -213,12 +213,12 @@ ${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode===
|
||||
if (arrayLength > ${r.length}) {
|
||||
throw new Error(\`Item at ${r.length} does not match schema definition.\`)
|
||||
}
|
||||
`),yD==="json-stringify"&&(u+=`if (arrayLength && arrayLength >= ${M9}) return JSON.stringify(obj)
|
||||
`),OD==="json-stringify"&&(u+=`if (arrayLength && arrayLength >= ${U9}) return JSON.stringify(obj)
|
||||
`),u+=`
|
||||
let jsonOutput = ''
|
||||
`,Array.isArray(r)){for(let c=0;c<r.length;c++){let f=r[c],p=xr(n,t.getPropertyLocation(c),`obj[${c}]`);u+=`
|
||||
`,Array.isArray(r)){for(let c=0;c<r.length;c++){let f=r[c],p=Ar(n,t.getPropertyLocation(c),`obj[${c}]`);u+=`
|
||||
if (${c} < arrayLength) {
|
||||
if (${SD(f.type,`[${c}]`)}) {
|
||||
if (${DD(f.type,`[${c}]`)}) {
|
||||
let json = ''
|
||||
${p}
|
||||
jsonOutput += json
|
||||
@@ -235,7 +235,7 @@ ${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode===
|
||||
if (i < arrayLength - 1) {
|
||||
jsonOutput += ','
|
||||
}
|
||||
}`)}else{let c=xr(n,t,"obj[i]");u+=`
|
||||
}`)}else{let c=Ar(n,t,"obj[i]");u+=`
|
||||
for (let i = 0; i < arrayLength; i++) {
|
||||
let json = ''
|
||||
${c}
|
||||
@@ -243,7 +243,7 @@ ${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode===
|
||||
if (i < arrayLength - 1) {
|
||||
jsonOutput += ','
|
||||
}
|
||||
}`}return u+="\n return `[${jsonOutput}]`\n }",n.functions.push(u),i}function SD(n,e){let l;switch(n){case"null":l=`obj${e} === null`;break;case"string":l=`typeof obj${e} === 'string' ||
|
||||
}`}return u+="\n return `[${jsonOutput}]`\n }",n.functions.push(u),i}function DD(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,7 +251,7 @@ ${s}`,ajv:a.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":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=>SD(r,e)).join(" || ")})`)}return l}function xD(n){return"anonymous"+n.functionsCounter++}function f5e(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=AD(n,e,l),f=a===0?"if":"else if";switch(u){case"null":i+=`
|
||||
)`;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=>DD(r,e)).join(" || ")})`)}return l}function LD(n){return"anonymous"+n.functionsCounter++}function P5e(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=FD(n,e,l),f=a===0?"if":"else if";switch(u){case"null":i+=`
|
||||
${f} (${l} === null)
|
||||
${c}
|
||||
`;break;case"string":{i+=`
|
||||
@@ -278,19 +278,19 @@ ${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode===
|
||||
${c}
|
||||
`;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 AD(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 += ${TD(n,e)}(${l})`;case"array":return`json += ${c5e(n,e)}(${l})`;case void 0:return`json += JSON.stringify(${l})`;default:throw new Error(`${t.type} unsupported`)}}function p5e(n,e){let l=n.schema,t=l.type,r=Array.isArray(t)&&t.includes("null"),i="";return r&&(i+=`
|
||||
`,i}function FD(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 += ${PD(n,e)}(${l})`;case"array":return`json += ${k5e(n,e)}(${l})`;case void 0:return`json += JSON.stringify(${l})`;default:throw new Error(`${t.type} unsupported`)}}function D5e(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(l.const).replace(e5e,"\\'")}'`,r&&(i+=`
|
||||
`),i+=`json += '${JSON.stringify(l.const).replace(T5e,"\\'")}'`,r&&(i+=`
|
||||
}
|
||||
`),i}function xr(n,e,l){let t=e.schema;if(typeof t=="boolean")return`json += JSON.stringify(${l})`;if(t.$ref&&(e=bo(n,e,t.$ref),t=e.schema),t.type===void 0){let u=ED(t);u&&(t.type=u)}if(t.if&&t.then)return a5e(n,e,l);t.allOf&&(bD(n,e,t,Y1e(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=TD(n,e);i+=`
|
||||
`),i}function Ar(n,e,l){let t=e.schema;if(typeof t=="boolean")return`json += JSON.stringify(${l})`;if(t.$ref&&(e=bo(n,e,t.$ref),t=e.schema),t.type===void 0){let u=CD(t);u&&(t.type=u)}if(t.if&&t.then)return I5e(n,e,l);t.allOf&&(kD(n,e,t,v5e(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=PD(n,e);i+=`
|
||||
json += '{'
|
||||
json += ${f}(${l})
|
||||
json += ','
|
||||
`}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=xr(n,p,l);i+=`
|
||||
`}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(),d=Ar(n,p,l);i+=`
|
||||
${f===0?"if":"else if"}(validator.validate("${m}", ${l}))
|
||||
${h}
|
||||
${d}
|
||||
`}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.\`)
|
||||
`,t.type==="object"&&(i+=`
|
||||
@@ -299,16 +299,16 @@ ${s}`,ajv:a.ajv};let c=new Function("validator","serializer",s);return e.mode===
|
||||
if (${l} === null) {
|
||||
json += 'null'
|
||||
} else {
|
||||
`),t.const!==void 0?i+=p5e(e,l):Array.isArray(r)?i+=f5e(n,e,l):i+=AD(n,e,l),s&&(i+=`
|
||||
`),t.const!==void 0?i+=D5e(e,l):Array.isArray(r)?i+=P5e(n,e,l):i+=FD(n,e,l),s&&(i+=`
|
||||
}
|
||||
`),i}To.exports=ly;To.exports.default=ly;To.exports.build=ly;To.exports.validLargeArrayMechanisms=vD;To.exports.restore=function({code:n,validator:e,serializer:l}){return Function.apply(null,["validator","serializer",n]).apply(null,[e,l])}});var ND=C((fAe,ty)=>{"use strict";var d5e=ry();function OD(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=d5e();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)}}}ty.exports=OD;ty.exports.default=OD});var ry=C((pAe,s1)=>{"use strict";var h5e=wD();function iy(){return function(e,l){let t=Object.assign({},l,{schema:e});return m5e.bind(null,t)}}function m5e(n,{schema:e}){return n.schema&&e.$id&&n.schema[e.$id]&&(n.schema={...n.schema},delete n.schema[e.$id]),h5e(e,n)}s1.exports=iy;s1.exports.default=iy;s1.exports.SerializerSelector=iy;s1.exports.StandaloneSerializer=ND()});var yi=C(u1=>{"use strict";Object.defineProperty(u1,"__esModule",{value:!0});u1.checkMetadata=void 0;var g5e=En(),y5e={keyword:"metadata",schemaType:"object",code(n){RD(n);let{gen:e,schema:l,it:t}=n;if((0,g5e.alwaysValidSchema)(t,l))return;let r=e.name("valid");n.subschema({keyword:"metadata",jtdMetadata:!0},r),n.ok(r)}};function RD({it:n,keyword:e},l){if(n.jtdMetadata!==l)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}u1.checkMetadata=RD;u1.default=y5e});var $9=C(o1=>{"use strict";Object.defineProperty(o1,"__esModule",{value:!0});o1.hasRef=void 0;var ID=Ou(),a1=Ze(),v5e=Ji(),CD=E3(),kD=Kh(),_5e=yi(),E5e={keyword:"ref",schemaType:"string",code(n){(0,_5e.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,a1._)`${l} === null`),e.if((0,a1.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 v5e.default(i.opts.uriResolver,"",t,`No definition ${t}`);sy(m)||!i.opts.inlineRefs?c(m):f(m)}function c(p){let m=ID.compileSchema.call(i.self,new ID.SchemaEnv({schema:p,root:s,schemaPath:`/definitions/${t}`})),h=(0,kD.getValidate)(n,m),g=e.const("_errs",CD.default.errors);(0,kD.callRef)(n,h,m,m.$async),e.assign(u,(0,a1._)`${g} === ${CD.default.errors}`)}function f(p){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:p,code:(0,a1.stringify)(p)}:{ref:p});n.subschema({schema:p,dataTypes:[],schemaPath:a1.nil,topSchemaRef:m,errSchemaPath:`/definitions/${t}`},u)}}};function sy(n){for(let e in n){let l;if(e==="ref"||typeof(l=n[e])=="object"&&sy(l))return!0}return!1}o1.hasRef=sy;o1.default=E5e});var ay=C(uy=>{"use strict";Object.defineProperty(uy,"__esModule",{value:!0});var b5e=/t|\s/i,T5e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,S5e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,x5e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function DD(n,e){let l=n.split(b5e);return l.length===2&&PD(l[0])&&A5e(l[1])||e&&l.length===1&&PD(l[0])}uy.default=DD;function PD(n){let e=T5e.exec(n);if(!e)return!1;let l=+e[1],t=+e[2],r=+e[3];return t>=1&&t<=12&&r>=1&&(r<=x5e[t]||t===2&&r===29&&(l%100===0?l%400===0:l%4===0))}function A5e(n){let e=S5e.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}DD.code='require("ajv/dist/runtime/timestamp").default'});var So=C(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.typeErrorParams=ls.typeErrorMessage=ls.typeError=void 0;var w5e=Ze();function O5e(n){return{message:e=>LD(e,n),params:e=>FD(e,n)}}ls.typeError=O5e;function LD({parentSchema:n},e){return n?.nullable?`must be ${e} or null`:`must be ${e}`}ls.typeErrorMessage=LD;function FD({parentSchema:n},e){return(0,w5e._)`{type: ${e}, nullable: ${!!n?.nullable}}`}ls.typeErrorParams=FD});var oy=C(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.intRange=void 0;var l3=Ze(),N5e=ay(),R5e=En(),I5e=yi(),MD=So();xo.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 C5e={message:n=>(0,MD.typeErrorMessage)(n,n.schema),params:n=>(0,MD.typeErrorParams)(n,n.schema)};function k5e(n){let{gen:e,data:l,it:t}=n,{timestamp:r,allowDate:i}=t.opts;if(r==="date")return(0,l3._)`${l} instanceof Date `;let s=(0,R5e.useFunc)(e,N5e.default),u=i?(0,l3._)`, true`:l3.nil,a=(0,l3._)`typeof ${l} == "string" && ${s}(${l}${u})`;return r==="string"?a:(0,l3.or)((0,l3._)`${l} instanceof Date`,a)}var P5e={keyword:"type",schemaType:"string",error:C5e,code(n){(0,I5e.checkMetadata)(n);let{data:e,schema:l,parentSchema:t,it:r}=n,i;switch(l){case"boole
Line truncated
|
||||
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},H6e=97,q6e=48;function is(n,e){let l="",t;for(is.message=void 0;t=n[e++],t!=='"';)if(t==="\\")if(t=n[e],t in fL)l+=fL[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)-H6e+10;else if(t>="0"&&t<="9")s+=t.charCodeAt(0)-q6e;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 is.position=e,l;function r(i){is.position=e,is.message=i}}ss.parseJsonString=is;is.message=void 0;is.position=0;is.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var SL=C(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});var V6e=Ey(),gL=Ou(),ze=Ze(),z6e=Ji(),Pn=E3(),G6e=Yt(),X6e=$9(),W6e=oy(),Oy=pL(),yL=En(),K6e=ay(),Y6e={elements:e8e,values:n8e,discriminator:t8e,properties:dL,optionalProperties:dL,enum:i8e,type:r8e,ref:s8e};function vL(n,e){let l=gL.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:Pn.default.data,parseName:u,char:s.name("c")},c;try{this._compilations.add(n),n.parseName=u,J6e(a),s.optimize(this.opts.code.optimize);let f=s.toString();c=`${s.scopeRefs(Pn.default.scope)}return ${f}`;let m=new Function(`${Pn.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}ky.default=vL;var wy=(0,ze._)`undefined`;function J6e(n){let{gen:e,parseName:l,char:t}=n;e.func(l,(0,ze._)`${Pn.default.json}, ${Pn.default.jsonPos}, ${Pn.default.jsonPart}`,!1,()=>{e.let(Pn.default.data),e.let(t),e.assign((0,ze._)`${l}.message`,wy),e.assign((0,ze._)`${l}.position`,wy),e.assign(Pn.default.jsonPos,(0,ze._)`${Pn.default.jsonPos} || 0`),e.const(Pn.default.jsonLen,(0,ze._)`${Pn.default.json}.length`),q9(n),Cy(n),e.if(Pn.default.jsonPart,()=>{e.assign((0,ze._)`${l}.position`,Pn.default.jsonPos),e.return(Pn.default.data)}),e.if((0,ze._)`${Pn.default.jsonPos} === ${Pn.default.jsonLen}`,()=>e.return(Pn.default.data)),No(n)})}function q9(n){let e;for(let l of V6e.jtdForms)if(l in n.schema){e=l;break}e?Z6e(n,Y6e[e]):Ry(n)}var Q6e=mL(!0,mL(!1,No));function Z6e(n,e){let{gen:l,schema:t,data:r}=n;if(!t.nullable)return e(n);p1(n,"null",e,()=>l.assign(r,null))}function e8e(n){let{gen:e,schema:l,data:t}=n;Ar(n,"[");let r=e.let("i",0);e.assign(t,(0,ze._)`[]`),Ny(n,"]",()=>{let i=e.let("el");q9({...n,schema:l.elements,data:i}),e.assign((0,ze._)`${t}[${r}++]`,i)})}function n8e(n){let{gen:e,schema:l,data:t}=n;Ar(n,"{"),e.assign(t,(0,ze._)`{}`),Ny(n,"}",()=>l8e(n,l.values))}function Ny(n,e,l){_L(n,e,l),Ar(n,e)}function _L(n,e,l){let{gen:t}=n;t.for((0,ze._)`;${Pn.default.jsonPos}<${Pn.default.jsonLen} && ${V9(1)}!==${e};`,()=>{l(),p1(n,",",()=>t.break(),r)});function r(){p1(n,e,()=>{},No)}}function l8e(n,e){let{gen:l}=n,t=l.let("key");ju({...n,data:t}),Ar(n,":"),bL(n,t,e)}function t8e(n){let{gen:e,data:l,schema:t}=n,{discriminator:r,mapping:i}=t;Ar(n,"{"),e.assign(l,(0,ze._)`{}`);let s=e.const("pos",Pn.default.jsonPos),u=e.let("value"),a=e.let("tag");_L(n,"}",()=>{let c=e.let("key");ju({...n,data:c}),Ar(n,":"),e.if((0,ze._)`${c} === ${r}`,()=>{ju({...n,data:a}),e.assign((0,ze._)`${l}[${c}]`,a),e.break()},()=>Ry({...n,data:u}))}),e.assign(Pn.default.jsonPos,s),e.if((0,ze._)`${a} === undefined`),Ti(n,(0,ze.str)`discriminator tag not found`);for(let c in i)e.elseIf((0,ze._)`${a} === ${c}`),EL({...n,schema:i[c]},r);e.else(),Ti(n,(0,ze.str)`discriminator value not in schema`),e.endIf()}function dL(n){let{gen:e,data:l}=n;Ar(n,"{"),e.assign(l,(0,ze._)`{}`),EL(n)}function EL(n,e){let{gen:l,schema:t,data:r}=n,{properties:i,optionalProperties:s,additionalProperties:u}=t;if(Ny(n,"}",()=>{let a=l.let("key");if(ju({...n,data:a}),Ar(n,":"),l.if(!1),hL(n,a,i),hL(n,a,s),e){l.elseIf((0,ze._)`${a} === ${e}`);let c=l.let("tag");ju({...n,data:c})}l.else(),u?Ry({...n,data:(0,ze._)`${r}[${a}]`}):Ti(n,(0,ze.str)`property ${a} not allowed`),l.endIf()}),i){let a=(0,G6e.hasPropFunc)(l),c=(0,ze.and)(...Object.keys(i).map(f=>(0,ze._)`${a}.call(${r}, ${f})`));l.if((0,ze.not)(c),()=>Ti(n,(0,ze.str)`missing required properties`))}}function hL(n,e,l={}){let{gen:t}=n;for(let r in l)t.elseIf((0,ze._)`${e} === ${r}`),bL(n,e,l[r])}function bL(n,e,l){q9({...n,schema:l,data:(0,ze._)`${n.data}[${e}]`})}function r8e(n){let{gen:e,schema:l,data:t,self:r}=n;switch(l.type){case"boolean":Q6e(n);break;case"string":ju(n);break;case"timestamp":{ju(n);let i=(0,yL.useFunc)(e,K6e.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 BL(n){return n[Symbol.for("fastify.display-name")]}function HL(n){return!!n[Symbol.for("skip-override")]}function qL(n){let e=m1(n);if(!e)return;let l=e.dependencies;l&&(qy(Array.isArray(l),"The dependencies should be an array of strings"),l.forEach(t=>{qy(this[Vy].indexOf(t)>-1,`The dependency '${t}' of plugin '${e.name}' is not registered`)}))}function VL(n){let e=m1(n);if(!e)return;let{decorators:l,name:t}=e;l&&(l.fastify&&Hy(this,"Fastify",l.fastify,t),l.reply&&Hy(this,"Reply",l.reply,t),l.request&&Hy(this,"Request",l.request,t))}var M8e={Fastify:I8e,Request:k8e,Reply:C8e};function Hy(n,e,l,t){qy(Array.isArray(l),"The decorators should be an array of strings"),l.forEach(r=>{let i=typeof t=="string"?` required by '${t}'`:"";if(!M8e[e].call(n,r))throw new D8e(r,i,e)})}function $8e(n){let e=m1(n);if(!e)return;let l=e.fastify,t=/-rc.+$/.test(this.version);if(!(t===!0&&By.gt(this.version,By.coerce(l))===!0)&&l&&By.satisfies(this.version,l,{includePrerelease:t})===!1)throw new P8e(e.name,l,this.version)}function j8e(n){let e=m1(n);if(!e)return;let l=e.name;if(l)return this[Vy].push(l),l}function U8e(n,e){n.constructor.name==="AsyncFunction"&&n.length===3&&L8e(e||"anonymous")}function B8e(n){let e=j8e.call(this,n)||UL(n);return U8e.call(this,n,e),$8e.call(this,n),VL.call(this,n),qL.call(this,n),HL(n)}zy.exports={getPluginName:UL,getFuncPreview:F8e,kRegisteredPlugins:Vy,getDisplayName:BL,registerPlugin:B8e};zy.exports[R8e]={shouldSkipOverride:HL,getMeta:m1,checkDecorators:VL,checkDependencies:qL}});var G9=C((UAe,zL)=>{"use strict";function H8e(n,e){let l=e||V8e();return n?z8e(n,l):l}function q8e(n,e){return n.genReqId(e)}function V8e(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function z8e(n,e){return function(l){return l.headers[n]||e(l)}}zL.exports={getGenReqId:q8e,reqIdGenFactory:H8e}});var KL=C((BAe,WL)=>{"use strict";var GL=12,G8e=0,Xy=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 X8e(n){var e=n.indexOf("%");if(e===-1)return n;for(var l=n.length,t="",r=0,i=0,s=e,u=GL;e>-1&&e<l;){var a=XL(n[e+1],4),c=XL(n[e+2],0),f=a|c,p=Xy[f];if(u=Xy[256+u+p],i=i<<6|f&Xy[364+p],u===GL)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===G8e)return null;if(e+=3,e<l&&n.charCodeAt(e)===37)continue;return null}}return t+n.slice(r)}var W8e={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 XL(n,e){var l=W8e[n];return l===void 0?255:l<<e}WL.exports=X8e});var eF=C((HAe,ZL)=>{"use strict";var YL=KL(),JL=/\+/g,QL=function(){};QL.prototype=Object.create(null);function K8e(n){let e=new QL;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(JL," ")),u&&(t=YL(t)||t),p&&(r=n.slice(s+1,h),f&&(r=r.replace(JL," ")),a&&(r=YL(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}ZL.exports=K8e});var lF=C((qAe,nF)=>{var wr=Array.from({length:256},(n,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),Y8e=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 J8e(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(Y8e[i]!==1&&(t<r&&(l+=n.slice(t,r)),t=r+1,l+=wr[i]),++r===e)break e;i=n.charCodeAt(r)}if(t<r&&(l+=n.slice(t,r)),i<2048){t=r+1,l+=wr[192|i>>6]+wr[128|i&63];continue}if(i<55296||i>=57344){t=r+1,l+=wr[224|i>>12]+wr[128|i>>6&63]+wr[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+=wr[240|i>>18]+wr[128|i>>12&63]+wr[128|i>>6&63]+wr[128|i&63]}return t===0?n:t<e?l+n.slice(t):l}nF.exports={encodeString:J8e}});var iF=C((VAe,rF)=>{"use
Line truncated
|
||||
`),i}To.exports=py;To.exports.default=py;To.exports.build=py;To.exports.validLargeArrayMechanisms=RD;To.exports.restore=function({code:n,validator:e,serializer:l}){return Function.apply(null,["validator","serializer",n]).apply(null,[e,l])}});var jD=C((Rwe,dy)=>{"use strict";var L5e=hy();function $D(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=L5e();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)}}}dy.exports=$D;dy.exports.default=$D});var hy=C((Iwe,i1)=>{"use strict";var F5e=MD();function my(){return function(e,l){let t=Object.assign({},l,{schema:e});return M5e.bind(null,t)}}function M5e(n,{schema:e}){return n.schema&&e.$id&&n.schema[e.$id]&&(n.schema={...n.schema},delete n.schema[e.$id]),F5e(e,n)}i1.exports=my;i1.exports.default=my;i1.exports.SerializerSelector=my;i1.exports.StandaloneSerializer=jD()});var vi=C(s1=>{"use strict";Object.defineProperty(s1,"__esModule",{value:!0});s1.checkMetadata=void 0;var $5e=En(),j5e={keyword:"metadata",schemaType:"object",code(n){UD(n);let{gen:e,schema:l,it:t}=n;if((0,$5e.alwaysValidSchema)(t,l))return;let r=e.name("valid");n.subschema({keyword:"metadata",jtdMetadata:!0},r),n.ok(r)}};function UD({it:n,keyword:e},l){if(n.jtdMetadata!==l)throw new Error(`JTD: "${e}" cannot be used in this schema location`)}s1.checkMetadata=UD;s1.default=j5e});var B9=C(a1=>{"use strict";Object.defineProperty(a1,"__esModule",{value:!0});a1.hasRef=void 0;var BD=Nu(),u1=Ze(),U5e=Qi(),HD=E3(),qD=im(),B5e=vi(),H5e={keyword:"ref",schemaType:"string",code(n){(0,B5e.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,u1._)`${l} === null`),e.if((0,u1.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 U5e.default(i.opts.uriResolver,"",t,`No definition ${t}`);gy(m)||!i.opts.inlineRefs?c(m):f(m)}function c(p){let m=BD.compileSchema.call(i.self,new BD.SchemaEnv({schema:p,root:s,schemaPath:`/definitions/${t}`})),d=(0,qD.getValidate)(n,m),g=e.const("_errs",HD.default.errors);(0,qD.callRef)(n,d,m,m.$async),e.assign(u,(0,u1._)`${g} === ${HD.default.errors}`)}function f(p){let m=e.scopeValue("schema",i.opts.code.source===!0?{ref:p,code:(0,u1.stringify)(p)}:{ref:p});n.subschema({schema:p,dataTypes:[],schemaPath:u1.nil,topSchemaRef:m,errSchemaPath:`/definitions/${t}`},u)}}};function gy(n){for(let e in n){let l;if(e==="ref"||typeof(l=n[e])=="object"&&gy(l))return!0}return!1}a1.hasRef=gy;a1.default=H5e});var vy=C(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});var q5e=/t|\s/i,V5e=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,z5e=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:z|([+-]\d\d)(?::?(\d\d))?)$/i,G5e=[0,31,28,31,30,31,30,31,31,30,31,30,31];function zD(n,e){let l=n.split(q5e);return l.length===2&&VD(l[0])&&X5e(l[1])||e&&l.length===1&&VD(l[0])}yy.default=zD;function VD(n){let e=V5e.exec(n);if(!e)return!1;let l=+e[1],t=+e[2],r=+e[3];return t>=1&&t<=12&&r>=1&&(r<=G5e[t]||t===2&&r===29&&(l%100===0?l%400===0:l%4===0))}function X5e(n){let e=z5e.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}zD.code='require("ajv/dist/runtime/timestamp").default'});var So=C(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.typeErrorParams=ts.typeErrorMessage=ts.typeError=void 0;var W5e=Ze();function K5e(n){return{message:e=>GD(e,n),params:e=>XD(e,n)}}ts.typeError=K5e;function GD({parentSchema:n},e){return n?.nullable?`must be ${e} or null`:`must be ${e}`}ts.typeErrorMessage=GD;function XD({parentSchema:n},e){return(0,W5e._)`{type: ${e}, nullable: ${!!n?.nullable}}`}ts.typeErrorParams=XD});var _y=C(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.intRange=void 0;var l3=Ze(),Y5e=vy(),J5e=En(),Q5e=vi(),WD=So();xo.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 Z5e={message:n=>(0,WD.typeErrorMessage)(n,n.schema),params:n=>(0,WD.typeErrorParams)(n,n.schema)};function e6e(n){let{gen:e,data:l,it:t}=n,{timestamp:r,allowDate:i}=t.opts;if(r==="date")return(0,l3._)`${l} instanceof Date `;let s=(0,J5e.useFunc)(e,Y5e.default),u=i?(0,l3._)`, true`:l3.nil,a=(0,l3._)`typeof ${l} == "string" && ${s}(${l}${u})`;return r==="string"?a:(0,l3.or)((0,l3._)`${l} instanceof Date`,a)}var n6e={keyword:"type",schemaType:"string",error:Z5e,code(n){(0,Q5e.checkMetadata)(n);let{data:e,schema:l,parentSchema:t,it:r}=n,i;switch(l){case"boole
Line truncated
|
||||
`,r:"\r",t:" ",'"':'"',"/":"/","\\":"\\"},c8e=97,f8e=48;function ss(n,e){let l="",t;for(ss.message=void 0;t=n[e++],t!=='"';)if(t==="\\")if(t=n[e],t in TL)l+=TL[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)-c8e+10;else if(t>="0"&&t<="9")s+=t.charCodeAt(0)-f8e;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 ss.position=e,l;function r(i){ss.position=e,ss.message=i}}us.parseJsonString=ss;ss.message=void 0;ss.position=0;ss.code='require("ajv/dist/runtime/parseJson").parseJsonString'});var DL=C(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});var p8e=Iy(),NL=Nu(),ze=Ze(),d8e=Qi(),Dn=E3(),h8e=Jt(),m8e=B9(),g8e=_y(),My=SL(),OL=En(),y8e=vy(),v8e={elements:T8e,values:S8e,discriminator:w8e,properties:xL,optionalProperties:xL,enum:N8e,type:A8e,ref:O8e};function RL(n,e){let l=NL.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:Dn.default.data,parseName:u,char:s.name("c")},c;try{this._compilations.add(n),n.parseName=u,_8e(a),s.optimize(this.opts.code.optimize);let f=s.toString();c=`${s.scopeRefs(Dn.default.scope)}return ${f}`;let m=new Function(`${Dn.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}Hy.default=RL;var Fy=(0,ze._)`undefined`;function _8e(n){let{gen:e,parseName:l,char:t}=n;e.func(l,(0,ze._)`${Dn.default.json}, ${Dn.default.jsonPos}, ${Dn.default.jsonPart}`,!1,()=>{e.let(Dn.default.data),e.let(t),e.assign((0,ze._)`${l}.message`,Fy),e.assign((0,ze._)`${l}.position`,Fy),e.assign(Dn.default.jsonPos,(0,ze._)`${Dn.default.jsonPos} || 0`),e.const(Dn.default.jsonLen,(0,ze._)`${Dn.default.json}.length`),G9(n),By(n),e.if(Dn.default.jsonPart,()=>{e.assign((0,ze._)`${l}.position`,Dn.default.jsonPos),e.return(Dn.default.data)}),e.if((0,ze._)`${Dn.default.jsonPos} === ${Dn.default.jsonLen}`,()=>e.return(Dn.default.data)),Oo(n)})}function G9(n){let e;for(let l of p8e.jtdForms)if(l in n.schema){e=l;break}e?b8e(n,v8e[e]):jy(n)}var E8e=AL(!0,AL(!1,Oo));function b8e(n,e){let{gen:l,schema:t,data:r}=n;if(!t.nullable)return e(n);f1(n,"null",e,()=>l.assign(r,null))}function T8e(n){let{gen:e,schema:l,data:t}=n;Nr(n,"[");let r=e.let("i",0);e.assign(t,(0,ze._)`[]`),$y(n,"]",()=>{let i=e.let("el");G9({...n,schema:l.elements,data:i}),e.assign((0,ze._)`${t}[${r}++]`,i)})}function S8e(n){let{gen:e,schema:l,data:t}=n;Nr(n,"{"),e.assign(t,(0,ze._)`{}`),$y(n,"}",()=>x8e(n,l.values))}function $y(n,e,l){IL(n,e,l),Nr(n,e)}function IL(n,e,l){let{gen:t}=n;t.for((0,ze._)`;${Dn.default.jsonPos}<${Dn.default.jsonLen} && ${X9(1)}!==${e};`,()=>{l(),f1(n,",",()=>t.break(),r)});function r(){f1(n,e,()=>{},Oo)}}function x8e(n,e){let{gen:l}=n,t=l.let("key");ju({...n,data:t}),Nr(n,":"),kL(n,t,e)}function w8e(n){let{gen:e,data:l,schema:t}=n,{discriminator:r,mapping:i}=t;Nr(n,"{"),e.assign(l,(0,ze._)`{}`);let s=e.const("pos",Dn.default.jsonPos),u=e.let("value"),a=e.let("tag");IL(n,"}",()=>{let c=e.let("key");ju({...n,data:c}),Nr(n,":"),e.if((0,ze._)`${c} === ${r}`,()=>{ju({...n,data:a}),e.assign((0,ze._)`${l}[${c}]`,a),e.break()},()=>jy({...n,data:u}))}),e.assign(Dn.default.jsonPos,s),e.if((0,ze._)`${a} === undefined`),Si(n,(0,ze.str)`discriminator tag not found`);for(let c in i)e.elseIf((0,ze._)`${a} === ${c}`),CL({...n,schema:i[c]},r);e.else(),Si(n,(0,ze.str)`discriminator value not in schema`),e.endIf()}function xL(n){let{gen:e,data:l}=n;Nr(n,"{"),e.assign(l,(0,ze._)`{}`),CL(n)}function CL(n,e){let{gen:l,schema:t,data:r}=n,{properties:i,optionalProperties:s,additionalProperties:u}=t;if($y(n,"}",()=>{let a=l.let("key");if(ju({...n,data:a}),Nr(n,":"),l.if(!1),wL(n,a,i),wL(n,a,s),e){l.elseIf((0,ze._)`${a} === ${e}`);let c=l.let("tag");ju({...n,data:c})}l.else(),u?jy({...n,data:(0,ze._)`${r}[${a}]`}):Si(n,(0,ze.str)`property ${a} not allowed`),l.endIf()}),i){let a=(0,h8e.hasPropFunc)(l),c=(0,ze.and)(...Object.keys(i).map(f=>(0,ze._)`${a}.call(${r}, ${f})`));l.if((0,ze.not)(c),()=>Si(n,(0,ze.str)`missing required properties`))}}function wL(n,e,l={}){let{gen:t}=n;for(let r in l)t.elseIf((0,ze._)`${e} === ${r}`),kL(n,e,l[r])}function kL(n,e,l){G9({...n,schema:l,data:(0,ze._)`${n.data}[${e}]`})}function A8e(n){let{gen:e,schema:l,data:t,self:r}=n;switch(l.type){case"boolean":E8e(n);break;case"string":ju(n);break;case"timestamp":{ju(n);let i=(0,OL.useFunc)(e,y8e.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 QL(n){return n[Symbol.for("fastify.display-name")]}function ZL(n){return!!n[Symbol.for("skip-override")]}function eF(n){let e=h1(n);if(!e)return;let l=e.dependencies;l&&(Zy(Array.isArray(l),"The dependencies should be an array of strings"),l.forEach(t=>{Zy(this[ev].indexOf(t)>-1,`The dependency '${t}' of plugin '${e.name}' is not registered`)}))}function nF(n){let e=h1(n);if(!e)return;let{decorators:l,name:t}=e;l&&(l.fastify&&Qy(this,"Fastify",l.fastify,t),l.reply&&Qy(this,"Reply",l.reply,t),l.request&&Qy(this,"Request",l.request,t))}var i9e={Fastify:Q8e,Request:e9e,Reply:Z8e};function Qy(n,e,l,t){Zy(Array.isArray(l),"The decorators should be an array of strings"),l.forEach(r=>{let i=typeof t=="string"?` required by '${t}'`:"";if(!i9e[e].call(n,r))throw new l9e(r,i,e)})}function s9e(n){let e=h1(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 n9e(e.name,l,this.version)}function u9e(n){let e=h1(n);if(!e)return;let l=e.name;if(l)return this[ev].push(l),l}function a9e(n,e){n.constructor.name==="AsyncFunction"&&n.length===3&&t9e(e||"anonymous")}function o9e(n){let e=u9e.call(this,n)||JL(n);return a9e.call(this,n,e),s9e.call(this,n),nF.call(this,n),eF.call(this,n),ZL(n)}nv.exports={getPluginName:JL,getFuncPreview:r9e,kRegisteredPlugins:ev,getDisplayName:QL,registerPlugin:o9e};nv.exports[J8e]={shouldSkipOverride:ZL,getMeta:h1,checkDecorators:nF,checkDependencies:eF}});var K9=C((rAe,lF)=>{"use strict";function c9e(n,e){let l=e||p9e();return n?d9e(n,l):l}function f9e(n,e){return n.genReqId(e)}function p9e(){let e=0;return function(){return e=e+1&2147483647,`req-${e.toString(36)}`}}function d9e(n,e){return function(l){return l.headers[n]||e(l)}}lF.exports={getGenReqId:f9e,reqIdGenFactory:c9e}});var sF=C((iAe,iF)=>{"use strict";var tF=12,h9e=0,tv=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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 m9e(n){var e=n.indexOf("%");if(e===-1)return n;for(var l=n.length,t="",r=0,i=0,s=e,u=tF;e>-1&&e<l;){var a=rF(n[e+1],4),c=rF(n[e+2],0),f=a|c,p=tv[f];if(u=tv[256+u+p],i=i<<6|f&tv[364+p],u===tF)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===h9e)return null;if(e+=3,e<l&&n.charCodeAt(e)===37)continue;return null}}return t+n.slice(r)}var g9e={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 rF(n,e){var l=g9e[n];return l===void 0?255:l<<e}iF.exports=m9e});var fF=C((sAe,cF)=>{"use strict";var uF=sF(),aF=/\+/g,oF=function(){};oF.prototype=Object.create(null);function y9e(n){let e=new oF;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 d=0;d<l+1;d++)if(m=d!==l?n.charCodeAt(d):38,m===38){if(p=s>i,p||(s=d),t=n.slice(i+1,s),p||t.length>0){c&&(t=t.replace(aF," ")),u&&(t=uF(t)||t),p&&(r=n.slice(s+1,d),f&&(r=r.replace(aF," ")),a&&(r=uF(r)||r));let g=e[t];g===void 0?e[t]=r:g.pop?g.push(r):e[t]=[g,r]}r="",i=d,s=d,u=!1,a=!1,c=!1,f=!1}else m===61?s<=i?s=d:a=!0:m===43?s>i?f=!0:c=!0:m===37&&(s>i?a=!0:u=!0);return e}cF.exports=y9e});var dF=C((uAe,pF)=>{var Or=Array.from({length:256},(n,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase()),v9e=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 _9e(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(v9e[i]!==1&&(t<r&&(l+=n.slice(t,r)),t=r+1,l+=Or[i]),++r===e)break e;i=n.charCodeAt(r)}if(t<r&&(l+=n.slice(t,r)),i<2048){t=r+1,l+=Or[192|i>>6]+Or[128|i&63];continue}if(i<55296||i>=57344){t=r+1,l+=Or[224|i>>12]+Or[128|i>>6&63]+Or[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+=Or[240|i>>18]+Or[128|i>>12&63]+Or[128|i>>6&63]+Or[128|i&63]}return t===0?n:t<e?l+n.slice(t):l}pF.exports={encodeString:_9e}});var gF=C((aAe,mF)=>{"use
Line truncated
|
||||
`).join(`
|
||||
`+e+c);l+=e+a+i+p+`
|
||||
`,l+=xF(s,e+c)}return l}function r9e(n){let e=n.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function AF(n){return Array.isArray(n)?n.map(e=>AF(e)):typeof n=="symbol"?n.toString():typeof n=="function"?r9e(n):n}function i9e(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(AF(u));t[s]=a}}return t}function s9e(n){let e="";for(let[l,t]of Object.entries(n))e+=`
|
||||
\u2022 (${l}) ${t}`;return e}function u9e(n){let e={...n.opts.constraints},l=e[TF.name];return delete e[TF.name],{...n,method:l,opts:{constraints:e}}}function a9e(n){let e=` (${n.method})`,l=n.opts.constraints||{};return Object.keys(l).length!==0&&(e+=" "+JSON.stringify(l)),e+=s9e(n.metaData),e}function o9e(n){return n.reduce((e,l)=>{for(let t of e)if(bF(l.opts.constraints,t.opts.constraints)&&bF(l.metaData,t.metaData))return t.method+=", "+l.method,e;return e.push(l),e},[])}function c9e(n,e,l){let t=n.routes;return l.method===void 0&&(t=t.map(u9e)),t=t.map(r=>(r.metaData=i9e(r,l),r)),l.method===void 0&&(t=o9e(t)),t.map(a9e).join(`
|
||||
${e}`)}function Y9(n,e,l,t){if((n.isLeafNode||t.commonPrefix!==!1)&&(l=l||"(empty root node)",e=e[l]={},n.isLeafNode&&(e[SF]=c9e(n,l,t)),l=""),n.staticChildren)for(let r of Object.values(n.staticChildren))Y9(r,e,l+r.prefix,t);if(n.parametricChildren)for(let r of Object.values(n.parametricChildren)){let i=Array.from(r.nodePaths).join("|");Y9(r,e,l+i,t)}n.wildcardChild&&Y9(n.wildcardChild,e,"*",t)}function f9e(n,e){let l={};return Y9(n,l,n.prefix,e),xF(l)}wF.exports={prettyPrintTree:f9e}});var RF=C((ewe,NF)=>{"use strict";var p9e=K9(),Qy=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(p9e.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(`
|
||||
`,l+=LF(s,e+c)}return l}function A9e(n){let e=n.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function FF(n){return Array.isArray(n)?n.map(e=>FF(e)):typeof n=="symbol"?n.toString():typeof n=="function"?A9e(n):n}function N9e(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(FF(u));t[s]=a}}return t}function O9e(n){let e="";for(let[l,t]of Object.entries(n))e+=`
|
||||
\u2022 (${l}) ${t}`;return e}function R9e(n){let e={...n.opts.constraints},l=e[PF.name];return delete e[PF.name],{...n,method:l,opts:{constraints:e}}}function I9e(n){let e=` (${n.method})`,l=n.opts.constraints||{};return Object.keys(l).length!==0&&(e+=" "+JSON.stringify(l)),e+=O9e(n.metaData),e}function C9e(n){return n.reduce((e,l)=>{for(let t of e)if(kF(l.opts.constraints,t.opts.constraints)&&kF(l.metaData,t.metaData))return t.method+=", "+l.method,e;return e.push(l),e},[])}function k9e(n,e,l){let t=n.routes;return l.method===void 0&&(t=t.map(R9e)),t=t.map(r=>(r.metaData=N9e(r,l),r)),l.method===void 0&&(t=C9e(t)),t.map(I9e).join(`
|
||||
${e}`)}function Z9(n,e,l,t){if((n.isLeafNode||t.commonPrefix!==!1)&&(l=l||"(empty root node)",e=e[l]={},n.isLeafNode&&(e[DF]=k9e(n,l,t)),l=""),n.staticChildren)for(let r of Object.values(n.staticChildren))Z9(r,e,l+r.prefix,t);if(n.parametricChildren)for(let r of Object.values(n.parametricChildren)){let i=Array.from(r.nodePaths).join("|");Z9(r,e,l+i,t)}n.wildcardChild&&Z9(n.wildcardChild,e,"*",t)}function P9e(n,e){let l={};return Z9(n,l,n.prefix,e),LF(l)}MF.exports={prettyPrintTree:P9e}});var UF=C((vAe,jF)=>{"use strict";var D9e=Q9(),av=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(D9e.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 t of this.constraints){l.push(`
|
||||
@@ -323,98 +323,98 @@ ${e}`)}function Y9(n,e,l,t){if((n.isLeafNode||t.commonPrefix!==!1)&&(l=l||"(empt
|
||||
}
|
||||
if (candidates === 0) return null;
|
||||
`)}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(`
|
||||
`))}};NF.exports=Qy});var CF=C((nwe,IF)=>{"use strict";var d9e=RF(),l7={STATIC:0,PARAMETRIC:1,WILDCARD:2},J9=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 d9e),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(l,e)}},Q9=class extends J9{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 Z9(e),this.staticChildren[t]}},Z9=class n extends Q9{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=l7.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 e7(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 n7,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(" && ")}`)}},e7=class extends Q9{constructor(e,l,t){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=l||null,this.kind=l7.PARAMETRIC,this.nodePaths=new Set([t])}getNextNode(e,l){return this.findStaticMatchingChild(e,l)}},n7=class extends J9{constructor(){super(),this.kind=l7.WILDCARD}getNextNode(){return null}};IF.exports={StaticNode:Z9,ParametricNode:e7,WildcardNode:n7,NODE_TYPES:l7}});var PF=C((lwe,kF)=>{"use strict";var h9e=require("assert");function E1(){if(!(this instanceof E1))return new E1;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}E1.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};E1.prototype.get=function(n){return this.store[n]};kF.exports={name:"version",mustMatchWhenDerived:!0,storage:E1,validate(n){h9e(typeof n=="string","Version should be a string")}}});var LF=C((twe,DF)=>{"use strict";var m9e=require("assert");function g9e(){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}}}DF.exports={name:"host",mustMatchWhenDerived:!1,storage:g9e,validate(n){m9e(typeof n=="string"||Object.prototype.toString.call(n)==="[object RegExp]","Host should be a string or a RegExp")}}});var MF=C((rwe,FF)=>{"use strict";var y9e=PF(),v9e=LF(),Zy=require("assert"),ev=class{constructor(e){if(this.strategies={version:y9e,host:v9e},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(Zy(typeof e.name=="string"&&e.name!=="","strategy.name is required."),Zy(e.storage&&typeof e.storage=="function
Line truncated
|
||||
`)).bind(this)}};FF.exports=ev});var jF=C((iwe,$F)=>{"use strict";var _9e=["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=_9e});var HF=C((swe,BF)=>{"use strict";function UF(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 E9e(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);UF(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 b9e(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=UF(i,s);l+=n.slice(t,r)+u,t=r+3}return n.slice(0,e)+l+n.slice(t)}BF.exports={safeDecodeURI:E9e,safeDecodeURIComponent:b9e}});var sv=C((uwe,KF)=>{"use strict";var dt=require("assert"),T9e=oF(),t7=_F(),tv=no(),{prettyPrintTree:S9e}=OF(),{StaticNode:qF,NODE_TYPES:nv}=CF(),x9e=MF(),Do=jF(),lv=K9(),{safeDecodeURI:A9e,safeDecodeURIComponent:VF}=HF(),zF=/^https?:\/\/.*?\//,Bu=/(\/:[^/()]*?)\?(\/?)/;if(!t7(zF))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!t7(Bu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Kl(n){if(!(this instanceof Kl))return new Kl(n);n=n||{},this._opts=n,n.defaultRoute?(dt(typeof n.defaultRoute=="function","The default route must be a function"),this.defaultRoute=n.defaultRoute):this.defaultRoute=null,n.onBadUrl?(dt(typeof n.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=n.onBadUrl):this.onBadUrl=null,n.buildPrettyMeta?(dt(typeof n.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=n.buildPrettyMeta):this.buildPrettyMeta=w9e,n.querystringParser?(dt(typeof n.querystringParser=="function","querystringParser must be a function"),this.querystringParser=n.querystringParser):this.querystringParser=e=>e===""?{}:T9e.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 x9e(n.constraints),this.useSemicolonDelimiter=n.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Kl.prototype.on=function(e,l,t,r,i){typeof t=="function"&&(r!==void 0&&(i=r),r=t,t={}),dt(typeof l=="string","Path should be a string"),dt(l.length>0,"The path could not be empty"),dt(l[0]==="/"||l[0]==="*","The first character of a path should be `/` or `*`"),dt(typeof r=="function","Handler should be a function");let s=l.match(Bu);if(s){dt(l.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let c=l.replace(Bu,"$1$2"),f=l.replace(Bu,"$2");this.on(e,c,t,r,i),this.on(e,f,t,r,i);return}let u=l;this.ignoreDuplicateSlashes&&(l=rv(l)),this.ignoreTrailingSlash&&(l=iv(l));let a=Array.isArray(e)?e:[e];for(let c of a)dt(typeof c=="string","Method should be a string"),dt(Do.includes(c),`Method '${c}' is not an http method.`),this._on(c,l,t,r,i,u)};Kl.prototype._on=function(e,l,t,r,i){let s={};t.constraints!==void 0&&(dt(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 qF("/"));let u=l;if(u==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new qF(""),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,R=v===47||x===u.length;if(b||w||R){let N=u.slice(T,x);if(f.push(N),_=_||b||w,b){let L=WF(u,x),Q=u.slice(x,L+1);this.allowUnsafeRegex||dt(t7(new RegExp(Q)),`The regex '${Q}' is not safe!`),S.push(XF(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
|
||||
`))}};jF.exports=av});var HF=C((_Ae,BF)=>{"use strict";var L9e=UF(),i7={STATIC:0,PARAMETRIC:1,WILDCARD:2},e7=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 L9e),this.isLeafNode=!0,this.routes.push(e),this.handlerStorage.addHandler(l,e)}},n7=class extends e7{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 l7(e),this.staticChildren[t]}},l7=class n extends n7{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=i7.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 t7(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 r7,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(" && ")}`)}},t7=class extends n7{constructor(e,l,t){super(),this.isRegex=!!e,this.regex=e||null,this.staticSuffix=l||null,this.kind=i7.PARAMETRIC,this.nodePaths=new Set([t])}getNextNode(e,l){return this.findStaticMatchingChild(e,l)}},r7=class extends e7{constructor(){super(),this.kind=i7.WILDCARD}getNextNode(){return null}};BF.exports={StaticNode:l7,ParametricNode:t7,WildcardNode:r7,NODE_TYPES:i7}});var VF=C((EAe,qF)=>{"use strict";var F9e=require("assert");function _1(){if(!(this instanceof _1))return new _1;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}_1.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};_1.prototype.get=function(n){return this.store[n]};qF.exports={name:"version",mustMatchWhenDerived:!0,storage:_1,validate(n){F9e(typeof n=="string","Version should be a string")}}});var GF=C((bAe,zF)=>{"use strict";var M9e=require("assert");function $9e(){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}}}zF.exports={name:"host",mustMatchWhenDerived:!1,storage:$9e,validate(n){M9e(typeof n=="string"||Object.prototype.toString.call(n)==="[object RegExp]","Host should be a string or a RegExp")}}});var WF=C((TAe,XF)=>{"use strict";var j9e=VF(),U9e=GF(),ov=require("assert"),cv=class{constructor(e){if(this.strategies={version:j9e,host:U9e},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(ov(typeof e.name=="string"&&e.name!=="","strategy.name is required."),ov(e.storage&&typeof e.storage=="function
Line truncated
|
||||
`)).bind(this)}};XF.exports=cv});var YF=C((SAe,KF)=>{"use strict";var B9e=["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"];KF.exports=B9e});var ZF=C((xAe,QF)=>{"use strict";function JF(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 H9e(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);JF(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 q9e(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=JF(i,s);l+=n.slice(t,r)+u,t=r+3}return n.slice(0,e)+l+n.slice(t)}QF.exports={safeDecodeURI:H9e,safeDecodeURIComponent:q9e}});var gv=C((wAe,sM)=>{"use strict";var dt=require("assert"),V9e=EF(),s7=IF(),dv=no(),{prettyPrintTree:z9e}=$F(),{StaticNode:eM,NODE_TYPES:fv}=HF(),G9e=WF(),Do=YF(),pv=Q9(),{safeDecodeURI:X9e,safeDecodeURIComponent:nM}=ZF(),lM=/^https?:\/\/.*?\//,Bu=/(\/:[^/()]*?)\?(\/?)/;if(!s7(lM))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!s7(Bu))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function Kl(n){if(!(this instanceof Kl))return new Kl(n);n=n||{},this._opts=n,n.defaultRoute?(dt(typeof n.defaultRoute=="function","The default route must be a function"),this.defaultRoute=n.defaultRoute):this.defaultRoute=null,n.onBadUrl?(dt(typeof n.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=n.onBadUrl):this.onBadUrl=null,n.buildPrettyMeta?(dt(typeof n.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=n.buildPrettyMeta):this.buildPrettyMeta=W9e,n.querystringParser?(dt(typeof n.querystringParser=="function","querystringParser must be a function"),this.querystringParser=n.querystringParser):this.querystringParser=e=>e===""?{}:V9e.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 G9e(n.constraints),this.useSemicolonDelimiter=n.useSemicolonDelimiter||!1,this.routes=[],this.trees={}}Kl.prototype.on=function(e,l,t,r,i){typeof t=="function"&&(r!==void 0&&(i=r),r=t,t={}),dt(typeof l=="string","Path should be a string"),dt(l.length>0,"The path could not be empty"),dt(l[0]==="/"||l[0]==="*","The first character of a path should be `/` or `*`"),dt(typeof r=="function","Handler should be a function");let s=l.match(Bu);if(s){dt(l.length===s.index+s[0].length,"Optional Parameter needs to be the last parameter of the path");let c=l.replace(Bu,"$1$2"),f=l.replace(Bu,"$2");this.on(e,c,t,r,i),this.on(e,f,t,r,i);return}let u=l;this.ignoreDuplicateSlashes&&(l=hv(l)),this.ignoreTrailingSlash&&(l=mv(l));let a=Array.isArray(e)?e:[e];for(let c of a)dt(typeof c=="string","Method should be a string"),dt(Do.includes(c),`Method '${c}' is not an http method.`),this._on(c,l,t,r,i,u)};Kl.prototype._on=function(e,l,t,r,i){let s={};t.constraints!==void 0&&(dt(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 eM("/"));let u=l;if(u==="*"&&this.trees[e].prefix.length!==0){let m=this.trees[e];this.trees[e]=new eM(""),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 d=u.charCodeAt(m)===58&&u.charCodeAt(m+1)!==58,g=u.charCodeAt(m)===42;if(d||g||m===u.length&&m!==c){let _=u.slice(c,m);this.caseSensitive||(_=_.toLowerCase()),_=_.split("::").join(":"),_=_.split("%").join("%25"),a=a.createStaticChild(_)}if(d){let _=!1,S=[],T=m+1;for(let x=T;;x++){let v=u.charCodeAt(x),b=v===40,A=v===45||v===46,R=v===47||x===u.length;if(b||A||R){let O=u.slice(T,x);if(f.push(O),_=_||b||A,b){let L=iM(u,x),Q=u.slice(x,L+1);this.allowUnsafeRegex||dt(s7(new RegExp(Q)),`The regex '${Q}' is not safe!`),S.push(rM(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[pce]=J.headers["accept-version"],J.headers["accept-version"]=void 0),h.router.lookup(J,me)}function q(J,me,Te){if(u){let sn=u$(L.server,me),Ce=i$(L,a,me,sn),Nn=new h7(sn,null,me,null,Ce,L),Jl=new C1(Te,Nn,Ce);return i===!1&&Ce.info({req:Nn},"incoming request"),u(new kce(J),Nn,Jl)}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 Nn=u$(L.server,me),Jl=i$(L,a,me,Nn),Rn=new h7(Nn,null,me,null,Jl,L),Gn=new C1(Te,Rn,Jl);return i===!1&&Jl.info({req:Rn},"incoming request"),u(new Cce,Rn,Gn)}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[os].setValidatorCompiler(J),this}function Vl(J){return Q('Cannot call "setSchemaErrorFormatter"!'),p$(J),this[Iv]=J.bind(this),this}function On(J){return Q('Cannot call "setSerializerCompiler"!'),this[os].setSerializerCompiler(J),this}function Ge(J){Q('Cannot call "setSchemaController"!');let me=this[os],Te=t$.buildSchemaController(me,Object.assign({},me.opts,J));return this[os]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function Hn(J){return Q('Cannot call "setReplySerializer"!'),this[l$]=J,this}function Ke(J){return Q('Cannot call "setErrorHandler"!'),this[d7]=f$(this[d7],J.bind(this)),this}function Xe(J){return Q('Cannot call "setChildLoggerFactory"!'),this[kv]=J,this}function Ol(J={}){return J.includeMeta=J.includeHooks?J.includeMeta?Dv.concat(J.includeMeta):Dv:J.includeMeta,m.printRoutes(J)}function fn(J,{rewriteUrl:me,logger:Te}){let Ue;return function(Ce,Nn){if(Ue===void 0&&(Ue=J.isAsyncConstraint()),me){Ce.originalUrl=Ce.url;let Jl=me.call(N,Ce);if(typeof Jl=="string")Ce.url=Jl;else{let Rn=new Hce(Ce.url,typeof Jl);Ce.destroy(Rn)}}J.routing(Ce,Nn,re(Ue,Ce,Nn))}}function dn(J){return Q('Cannot call "setGenReqId"!'),this[Pv]=a$(this[Rv].requestIdHeader,J),this}}m7.errorCodes=qu;function p$(n){if(typeof n!="function")throw new c$(typeof n);if(n.constructor.name==="AsyncFunction")throw new c$("AsyncFunction")}g7.exports=m7;g7.exports.fastify=m7;g7.exports.default=m7});var UH=C((cNe,jH)=>{"use strict";jH.exports=Error});var HH=C((fNe,BH)=>{"use strict";BH.exports=EvalError});var VH=C((pNe,qH)=>{"use strict";qH.exports=RangeError});var GH=C((dNe,zH)=>{"use strict";zH.exports=ReferenceError});var AE=C((hNe,XH)=>{"use strict";XH.exports=SyntaxError});var y4=C((mNe,WH)=>{"use strict";WH.exports=TypeError});var YH=C((gNe,KH)=>{"use strict";KH.exports=URIError});var QH=C((yNe,JH)=>{"use strict";JH.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 nq=C((vNe,eq)=>{"use strict";var ZH=typeof Symbol<"u"&&Symbol,Bme=QH();eq.exports=function(){return typeof ZH!="function"||typeof Symbol!="function"||typeof ZH("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Bme()}});var tq=C((_Ne,lq)=>{"use strict";var wE={__proto__:null,foo:{}},Hme=Object;lq.exports=function(){return{__proto__:wE}.foo===wE.foo&&!(wE instanceof Hme)}});var sq=C((ENe,iq)=>{"use strict";var qme="Function.prototype.bind called on incompatible ",Vme=Object.prototype.toString,zme=Math.max,Gme="[object Function]",rq=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},Xme=function(e,l){for(var t=[],r=l||0,i=0;r<e.length;r+=1,i+=1)t[i]=e[r];return t},Wme=function(n,e){for(var l="",t=0;t<n.length;t+=1)l+=n[t],t+1<n.length&&(l+=e);return l};iq.exports=function(e){var l=this;if(typeof l!="function"||Vme.apply(l)!==Gme)throw new TypeError(qme+l);for(var t=Xme(arguments,1),r,i=function(){if(this instanceof r){var f=l.apply(this,rq(t,arguments));return Object(f)===f?f:this}return l.apply(e,rq(t,arguments))},s=zme(0,l.length-t.length),u
Line truncated
|
||||
`)>=0)return!1;return!0}function Jge(n,e){var l;if(n.indent===" ")l=" ";else if(typeof n.indent=="number"&&n.indent>0)l=Ur.call(Array(n.indent+1)," ");else return null;return{base:l,prev:Ur.call(Array(e+1),l)}}function UE(n,e){if(n.length===0)return"";var l=`
|
||||
`+e.prev+e.base;return l+Ur.call(n,","+l)+`
|
||||
`+e.prev}function Yc(n,e){var l=jE(n),t=[];if(l){t.length=n.length;for(var r=0;r<n.length;r++)t[r]=xs(n,r)?e(n[r],n):""}var i=typeof DE=="function"?DE(n):[],s;if(S4){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var a in n)xs(n,a)&&(l&&String(Number(a))===a&&a<n.length||S4&&s["$"+a]instanceof Symbol||(Zq.call(/[^\w$]/,a)?t.push(e(a,n)+": "+e(n[a],n)):t.push(a+": "+e(n[a],n))));if(typeof DE=="function")for(var c=0;c<i.length;c++)eV.call(n,i[c])&&t.push("["+e(i[c])+"]: "+e(n[i[c]],n));return t}});var oV=C((PNe,aV)=>{"use strict";var uV=oa(),x4=$q(),Qge=sV(),Zge=y4(),Zc=uV("%WeakMap%",!0),ef=uV("%Map%",!0),eye=x4("WeakMap.prototype.get",!0),nye=x4("WeakMap.prototype.set",!0),lye=x4("WeakMap.prototype.has",!0),tye=x4("Map.prototype.get",!0),rye=x4("Map.prototype.set",!0),iye=x4("Map.prototype.has",!0),VE=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},sye=function(n,e){var l=VE(n,e);return l&&l.value},uye=function(n,e,l){var t=VE(n,e);t?t.value=l:n.next={key:e,next:n.next,value:l}},aye=function(n,e){return!!VE(n,e)};aV.exports=function(){var e,l,t,r={assert:function(i){if(!r.has(i))throw new Zge("Side channel does not contain "+Qge(i))},get:function(i){if(Zc&&i&&(typeof i=="object"||typeof i=="function")){if(e)return eye(e,i)}else if(ef){if(l)return tye(l,i)}else if(t)return sye(t,i)},has:function(i){if(Zc&&i&&(typeof i=="object"||typeof i=="function")){if(e)return lye(e,i)}else if(ef){if(l)return iye(l,i)}else if(t)return aye(t,i);return!1},set:function(i,s){Zc&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Zc),nye(e,i,s)):ef?(l||(l=new ef),rye(l,i,s)):(t||(t={key:{},next:null}),uye(t,i,s))}};return r}});var nf=C((DNe,cV)=>{"use strict";var oye=String.prototype.replace,cye=/%20/g,zE={RFC1738:"RFC1738",RFC3986:"RFC3986"};cV.exports={default:zE.RFC3986,formatters:{RFC1738:function(n){return oye.call(n,cye,"+")},RFC3986:function(n){return String(n)}},RFC1738:zE.RFC1738,RFC3986:zE.RFC3986}});var WE=C((LNe,pV)=>{"use strict";var fye=nf(),GE=Object.prototype.hasOwnProperty,ca=Array.isArray,Br=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),pye=function(e){for(;e.length>1;){var l=e.pop(),t=l.obj[l.prop];if(ca(t)){for(var r=[],i=0;i<t.length;++i)typeof t[i]<"u"&&r.push(t[i]);l.obj[l.prop]=r}}},fV=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},dye=function n(e,l,t){if(!l)return e;if(typeof l!="object"){if(ca(e))e.push(l);else if(e&&typeof e=="object")(t&&(t.plainObjects||t.allowPrototypes)||!GE.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 ca(e)&&!ca(l)&&(r=fV(e,t)),ca(e)&&ca(l)?(l.forEach(function(i,s){if(GE.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 GE.call(i,s)?i[s]=n(i[s],u,t):i[s]=u,i},r)},hye=function(e,l){return Object.keys(l).reduce(function(t,r){return t[r]=l[r],t},e)},mye=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}},XE=1024,gye=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+=XE){for(var c=s.length>=XE?s.slice(a,a+XE):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===fye.RFC1738&&(m===40||m===41)){f[f.length]=c.charAt(p);continue}if(m<128){f[f.length]=Br[m];continue}if(m<2048){f[f.length]=Br[192|m>>6]+Br[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=Br[224|m>>12]+Br[128|m>>6&63]+Br[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|c.charCodeAt(p)&1023),f[f.length]=Br[240|m>>18]+Br[128|m>>12&63]+Br[128|m>>6&63]+Br[128|m&63]}u+=f.join("")}return u},yye=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 pye(l),e},vye=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},_ye=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Eye=function(e,l){return[].concat(e,l)},bye=function(e,l){if(ca(e)){for(var t=[],r=0;r<e.length;r+=1)t.push(l(e[r]));return t}return l(e)};pV.exports={arrayToObject:fV,assign:hye,combine:Eye,compact:yye,decode:mye,encode:gye,isBuffer:_ye,isRegExp:vye,maybeMap:bye,merge:dye}});var vV=C((FNe,yV)=>{"use strict";var hV=oV(),lf=WE(),R5=nf(),Tye=Object.prototype.hasOwnProperty,mV={brack
Line truncated
|
||||
`;Qn.DEFAULT_CONTENT_TYPE="application/octet-stream";Qn.prototype.append=function(n,e,l){l=l||{},typeof l=="string"&&(l={filename:l});var t=ob.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),dz.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)};Qn.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)+Qn.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof Zve))&&(l.knownLength||this._valuesToMeasure.push(e))};Qn.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)):Qve.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")};Qn.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"&&ab(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("; ")+Qn.LINE_BREAK)));return"--"+this.getBoundary()+Qn.LINE_BREAK+i+Qn.LINE_BREAK};Qn.prototype._getContentDisposition=function(n,e){var l,t;return typeof e.filepath=="string"?l=sb.normalize(e.filepath).replace(/\\/g,"/"):e.filename||n.name||n.path?l=sb.basename(e.filename||n.name||n.path):n.readable&&n.hasOwnProperty("httpVersion")&&(l=sb.basename(n.client._httpMessage.path||"")),l&&(t='filename="'+l+'"'),t};Qn.prototype._getContentType=function(n,e){var l=e.contentType;return!l&&n.name&&(l=ub.lookup(n.name)),!l&&n.path&&(l=ub.lookup(n.path)),!l&&n.readable&&n.hasOwnProperty("httpVersion")&&(l=n.headers["content-type"]),!l&&(e.filepath||e.filename)&&(l=ub.lookup(e.filepath||e.filename)),!l&&typeof n=="object"&&(l=Qn.DEFAULT_CONTENT_TYPE),l};Qn.prototype._multiPartFooter=function(){return function(n){var e=Qn.LINE_BREAK,l=this._streams.length===0;l&&(e+=this._lastBoundary()),n(e)}.bind(this)};Qn.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Qn.LINE_BREAK};Qn.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};Qn.prototype.setBoundary=function(n){this._boundary=n};Qn.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Qn.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(Qn.LINE_BREAK)])));return Buffer.concat([n,Buffer.from(this._lastBoundary())])};Qn.prototype._generateBoundary=function(){for(var n="--------------------------",e=0;e<24;e++)n+=Math.floor(Math.random()*10).toString(16);this._boundary=n};Qn.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};Qn.prototype.hasKnownLength=function(){var n=!0;return this._valuesToMeasure.length&&(n=!1),n};Qn.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}e_e.parallel(this._valuesToMeasure,this._lengthRetriever,function(l,t){if(l){n(l);return}t.forEach(function(r){e+=r}),n(null,e)})};Qn.prototype.submit=function(n,e){var l,t,r={method:"post"};return typeof n=="string"?(n=Jve(n),t=ab({port:n.port,path:n.pathname,host:n.hostname,protocol:n.protocol},r)):(t=ab(n,r),t.port||(t.port=t.protocol=="https:"?443:80)),t.headers=this.getHeaders(n.headers),t.protocol=="https:"?l=Yve.request(t):l=Kve.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};Qn.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)}};ki.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 vG(n,e){var l=this;ki.prototype.createSocket.call(l,n,function(t){var r=n.request.getHeader("host"),i=Vb({},l.options,{socket:t,servername:r?r.replace(/:.*$/,""):n.host}),s=Q_e.connect(0,i);l.sockets[l.sockets.indexOf(t)]=s,e(s)})}function _G(n,e,l){return typeof n=="string"?{host:n,port:e,localAddress:l}:n}function Vb(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 Cs;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Cs=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)}:Cs=function(){};D4.debug=Cs});var TG=C((Nke,bG)=>{bG.exports=EG()});var bW=C(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.removeTrailingChar=va.merge=void 0;var abe=(...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,va.merge)(e[t],l[t]):e[t]=l[t]}),e};va.merge=abe;var obe=(n,e)=>n.length>1&&n.endsWith(e)?n.substring(0,n.length-1):n;va.removeTrailingChar=obe});var M4=C(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.DataError=Js.DatabaseError=Js.NestedError=void 0;var X5=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}};Js.NestedError=X5;var ST=class extends X5{};Js.DatabaseError=ST;var xT=class extends X5{};Js.DataError=xT});var RT=C(k2=>{"use strict";Object.defineProperty(k2,"__esModule",{value:!0});k2.getArrayIndicies=k2.validateArrayIndex=k2.validateArrayIndicies=k2.isInt=k2.ArrayInfo=k2.arrayRegex=void 0;var Tf=M4(),cbe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;k2.arrayRegex=cbe;var AT={},wT=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,OT(t))this.index=parseInt(t);else if(!this.append)throw new Tf.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(AT[e])return AT[e];let t=(0,k2.arrayRegex)().exec(e.trim());if(t!=null){let r=t[1],i="["+t[2].toString()+"]",s=NT(i);return TW(s),AT[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 Tf.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 Tf.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}};k2.ArrayInfo=wT;function OT(n){return!isNaN(n)&&Number(n)==n&&!isNaN(parseInt(n,10))}k2.isInt=OT;function TW(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")}k2.validateArrayIndicies=TW;function SW(n){if(n.length!==0&&!OT(n))throw new Tf.DataError("Only numerical values accepted for array index",200)}k2.validateArrayIndex=SW;function NT(n){if(n.length===0)return[];if(n.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=n.substring(1,n.indexOf("]"));SW(e);let l=e.length+2;return[e,...NT(n.substring(l))]}k2.getArrayIndicies=NT});var wW=C(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.DBParentData=void 0;var xW=RT(),AW=M4(),IT=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=xW.ArrayInfo.processArray(this.parent);if(l&&(!l.append||e)&&!l.isValid(this.data))throw new AW.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=xW.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 AW.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]}};Sf.DBParentData=IT});var NW=C((sLe,OW)=>{OW.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):L7(e)?n(e.children):Lr(e)?e.data:""},textContent:l4,innerText:$7,getChildren:K7,getParent:$j,getSiblings:jj,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:P_,prevElementSibling:D_,removeElement:Gu,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){Gu(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){Gu(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){Gu(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){Gu(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:A7,find:L_,findOneChild:function(n,e){return e.find(n)},findOne:i_,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=b$(n))||n(e)},getElements:function(n,e,l,t=1/0){return(n=b$(n))?A7(n,e,l,t):[]},getElementById:function(n,e,l=!0){return Array.isArray(e)||(e=[e]),i_(Uj("id",n),e,l)},getElementsByTagName:Yo,getElementsByTagType:function(n,e,l=!0,t=1/0){return A7(j7.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 O3},compareDocumentPosition:Bj,uniqueSort:t4,getFeed:function(n){return(n=y7(mfe,n))?(n.name==="feed"?function(e){var l={type:"atom",items:Yo("entry",e=e.children).map(r=>{var i={media:T$(r=r.children)},s=(V2(i,"id","id",r),V2(i,"title","title",r),(s=y7("link",r))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=cs("summary",r)||cs("content",r))&&(i.description=s),(s=cs("updated",r))&&(i.pubDate=new Date(s)),i})},t=(V2(l,"id","id",e),V2(l,"title","title",e),(t=y7("link",e))==null?void 0:t.attribs.href);return t&&(l.link=t),V2(l,"description","subtitle",e),(t=cs("updated",e))&&(l.updated=new Date(t)),V2(l,"author","email",e,!0),l}:function(t){var l=(l=(l=y7("channel",t.children))==null?void 0:l.children)!=null?l:[],t={type:t.name.substr(0,3),id:"",items:Yo("item",t.children).map(i=>{var s={media:T$(i=i.children)};return V2(s,"id","guid",i),V2(s,"title","title",i),V2(s,"link","link",i),V2(s,"description","description",i),(i=cs("pubDate",i)||cs("dc:date",i))&&(s.pubDate=new Date(i)),s})},r=(V2(t,"title","title",l),V2(t,"link","link",l),V2(t,"description","description",l),cs("lastBuildDate",l));return r&&(t.updated=new Date(r)),V2(t,"author","managingEditor",l,!0),t})(n):null}}),Jo=function(){return(Jo=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 Hj(n,e,l){return n?n(e??n._root.children,null,void 0,l).toString():""}function gfe(n,e){return Hj(this,function(l){return!(typeof l!="object"||l==null||"length"in l||"type"in l)}(n)?void(e=n):n,Jo(Jo(Jo({},k_),this==null?void 0:this._options),l_(e??{})))}function yfe(n){return Hj(this,n,Jo(Jo({},this._options),{xmlMode:!0}))}function r5(n){for(var e=n||(this?this.root():[]),l="",t=0;t<e.length;t++)l+=l4(e[t]);return l}function vfe(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,k_,!1),l||e("script").remove(),e.root()[0].children.slice()):null}function _fe(){return this(this._root)}function qj(n,e){if(e!==n){for(var l=e;l&&l!==l.parent;)if((l=l.parent)===n)return!0}return!1}function Efe(n,e){if(S$(n)&&S$(e)){for(var l=n.length,t=+e.length,r=0;r<t;r++)n[l++]=e[r];return n.length=l,n}}function S$(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 Xu,bfe=Object.freeze({__proto__:null,html:gfe,xml:yfe,text:r5,parseHTML:vfe,root:_fe,contains:qj,merge:Efe});function Dr(n){return n.cheerio!=null}function tt(n,e){for(var l=n.length,t=0;t<l;t++)e(n[t],t);return n}function Fv(e){var e="length"in e?Array.prototype.map.call(e,function(t){return F7(t,!0)}):[F7(e,!0)],l=new Ni(e);return e.forEach(function(t){t.parent=l}),e}function s_(n){var e,
Line truncated
|
||||
${Te}`),ge.destroy(J)}function ve(J,ge){J.headers["accept-version"]!==void 0&&(J.headers[Dce]=J.headers["accept-version"],J.headers["accept-version"]=void 0),d.router.lookup(J,ge)}function q(J,ge,Te){if(u){let sn=v$(L.server,ge),Ce=g$(L,a,ge,sn),On=new y7(sn,null,ge,null,Ce,L),Jl=new I1(Te,On,Ce);return i===!1&&Ce.info({req:On},"incoming request"),u(new efe(J),On,Jl)}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,ge,Te){if(J!==!1)return function(sn){if(sn){if(u){let On=v$(L.server,ge),Jl=g$(L,a,ge,On),Rn=new y7(On,null,ge,null,Jl,L),Gn=new I1(Te,Rn,Jl);return i===!1&&Jl.info({req:Rn},"incoming request"),u(new Zce,Rn,Gn)}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,ge){return Q('Cannot call "setNotFoundHandler"!'),d.setNotFoundHandler.call(this,J,ge,j,m.routeHandler),this}function ne(J){return Q('Cannot call "setValidatorCompiler"!'),this[cs].setValidatorCompiler(J),this}function Vl(J){return Q('Cannot call "setSchemaErrorFormatter"!'),S$(J),this[Uv]=J.bind(this),this}function Nn(J){return Q('Cannot call "setSerializerCompiler"!'),this[cs].setSerializerCompiler(J),this}function Ge(J){Q('Cannot call "setSchemaController"!');let ge=this[cs],Te=h$.buildSchemaController(ge,Object.assign({},ge.opts,J));return this[cs]=Te,this.getSchema=Te.getSchema.bind(Te),this.getSchemas=Te.getSchemas.bind(Te),this}function Hn(J){return Q('Cannot call "setReplySerializer"!'),this[d$]=J,this}function Ke(J){return Q('Cannot call "setErrorHandler"!'),this[g7]=T$(this[g7],J.bind(this)),this}function Xe(J){return Q('Cannot call "setChildLoggerFactory"!'),this[Hv]=J,this}function Nl(J={}){return J.includeMeta=J.includeHooks?J.includeMeta?Vv.concat(J.includeMeta):Vv:J.includeMeta,m.printRoutes(J)}function fn(J,{rewriteUrl:ge,logger:Te}){let Ue;return function(Ce,On){if(Ue===void 0&&(Ue=J.isAsyncConstraint()),ge){Ce.originalUrl=Ce.url;let Jl=ge.call(O,Ce);if(typeof Jl=="string")Ce.url=Jl;else{let Rn=new cfe(Ce.url,typeof Jl);Ce.destroy(Rn)}}J.routing(Ce,On,re(Ue,Ce,On))}}function dn(J){return Q('Cannot call "setGenReqId"!'),this[qv]=_$(this[jv].requestIdHeader,J),this}}v7.errorCodes=qu;function S$(n){if(typeof n!="function")throw new b$(typeof n);if(n.constructor.name==="AsyncFunction")throw new b$("AsyncFunction")}_7.exports=v7;_7.exports.fastify=v7;_7.exports.default=v7});var rq=C((UOe,tq)=>{"use strict";tq.exports=Error});var sq=C((BOe,iq)=>{"use strict";iq.exports=EvalError});var aq=C((HOe,uq)=>{"use strict";uq.exports=RangeError});var cq=C((qOe,oq)=>{"use strict";oq.exports=ReferenceError});var FE=C((VOe,fq)=>{"use strict";fq.exports=SyntaxError});var g4=C((zOe,pq)=>{"use strict";pq.exports=TypeError});var hq=C((GOe,dq)=>{"use strict";dq.exports=URIError});var gq=C((XOe,mq)=>{"use strict";mq.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 _q=C((WOe,vq)=>{"use strict";var yq=typeof Symbol<"u"&&Symbol,oge=gq();vq.exports=function(){return typeof yq!="function"||typeof Symbol!="function"||typeof yq("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:oge()}});var bq=C((KOe,Eq)=>{"use strict";var ME={__proto__:null,foo:{}},cge=Object;Eq.exports=function(){return{__proto__:ME}.foo===ME.foo&&!(ME instanceof cge)}});var xq=C((YOe,Sq)=>{"use strict";var fge="Function.prototype.bind called on incompatible ",pge=Object.prototype.toString,dge=Math.max,hge="[object Function]",Tq=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},mge=function(e,l){for(var t=[],r=l||0,i=0;r<e.length;r+=1,i+=1)t[i]=e[r];return t},gge=function(n,e){for(var l="",t=0;t<n.length;t+=1)l+=n[t],t+1<n.length&&(l+=e);return l};Sq.exports=function(e){var l=this;if(typeof l!="function"||pge.apply(l)!==hge)throw new TypeError(fge+l);for(var t=mge(arguments,1),r,i=function(){if(this instanceof r){var f=l.apply(this,Tq(t,arguments));return Object(f)===f?f:this}return l.apply(e,Tq(t,arguments))},s=dge(0,l.length-t.length),u
Line truncated
|
||||
`)>=0)return!1;return!0}function _ye(n,e){var l;if(n.indent===" ")l=" ";else if(typeof n.indent=="number"&&n.indent>0)l=Br.call(Array(n.indent+1)," ");else return null;return{base:l,prev:Br.call(Array(e+1),l)}}function JE(n,e){if(n.length===0)return"";var l=`
|
||||
`+e.prev+e.base;return l+Br.call(n,","+l)+`
|
||||
`+e.prev}function uf(n,e){var l=YE(n),t=[];if(l){t.length=n.length;for(var r=0;r<n.length;r++)t[r]=xs(n,r)?e(n[r],n):""}var i=typeof zE=="function"?zE(n):[],s;if(T4){s={};for(var u=0;u<i.length;u++)s["$"+i[u]]=i[u]}for(var a in n)xs(n,a)&&(l&&String(Number(a))===a&&a<n.length||T4&&s["$"+a]instanceof Symbol||(yV.call(/[^\w$]/,a)?t.push(e(a,n)+": "+e(n[a],n)):t.push(a+": "+e(n[a],n))));if(typeof zE=="function")for(var c=0;c<i.length;c++)vV.call(n,i[c])&&t.push("["+e(i[c])+"]: "+e(n[i[c]],n));return t}});var NV=C((oRe,AV)=>{"use strict";var wV=oa(),S4=lV(),Eye=xV(),bye=g4(),cf=wV("%WeakMap%",!0),ff=wV("%Map%",!0),Tye=S4("WeakMap.prototype.get",!0),Sye=S4("WeakMap.prototype.set",!0),xye=S4("WeakMap.prototype.has",!0),wye=S4("Map.prototype.get",!0),Aye=S4("Map.prototype.set",!0),Nye=S4("Map.prototype.has",!0),nb=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},Oye=function(n,e){var l=nb(n,e);return l&&l.value},Rye=function(n,e,l){var t=nb(n,e);t?t.value=l:n.next={key:e,next:n.next,value:l}},Iye=function(n,e){return!!nb(n,e)};AV.exports=function(){var e,l,t,r={assert:function(i){if(!r.has(i))throw new bye("Side channel does not contain "+Eye(i))},get:function(i){if(cf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Tye(e,i)}else if(ff){if(l)return wye(l,i)}else if(t)return Oye(t,i)},has:function(i){if(cf&&i&&(typeof i=="object"||typeof i=="function")){if(e)return xye(e,i)}else if(ff){if(l)return Nye(l,i)}else if(t)return Iye(t,i);return!1},set:function(i,s){cf&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new cf),Sye(e,i,s)):ff?(l||(l=new ff),Aye(l,i,s)):(t||(t={key:{},next:null}),Rye(t,i,s))}};return r}});var pf=C((cRe,OV)=>{"use strict";var Cye=String.prototype.replace,kye=/%20/g,lb={RFC1738:"RFC1738",RFC3986:"RFC3986"};OV.exports={default:lb.RFC3986,formatters:{RFC1738:function(n){return Cye.call(n,kye,"+")},RFC3986:function(n){return String(n)}},RFC1738:lb.RFC1738,RFC3986:lb.RFC3986}});var ib=C((fRe,IV)=>{"use strict";var Pye=pf(),tb=Object.prototype.hasOwnProperty,ca=Array.isArray,Hr=function(){for(var n=[],e=0;e<256;++e)n.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return n}(),Dye=function(e){for(;e.length>1;){var l=e.pop(),t=l.obj[l.prop];if(ca(t)){for(var r=[],i=0;i<t.length;++i)typeof t[i]<"u"&&r.push(t[i]);l.obj[l.prop]=r}}},RV=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},Lye=function n(e,l,t){if(!l)return e;if(typeof l!="object"){if(ca(e))e.push(l);else if(e&&typeof e=="object")(t&&(t.plainObjects||t.allowPrototypes)||!tb.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 ca(e)&&!ca(l)&&(r=RV(e,t)),ca(e)&&ca(l)?(l.forEach(function(i,s){if(tb.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 tb.call(i,s)?i[s]=n(i[s],u,t):i[s]=u,i},r)},Fye=function(e,l){return Object.keys(l).reduce(function(t,r){return t[r]=l[r],t},e)},Mye=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}},rb=1024,$ye=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(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var u="",a=0;a<s.length;a+=rb){for(var c=s.length>=rb?s.slice(a,a+rb):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===Pye.RFC1738&&(m===40||m===41)){f[f.length]=c.charAt(p);continue}if(m<128){f[f.length]=Hr[m];continue}if(m<2048){f[f.length]=Hr[192|m>>6]+Hr[128|m&63];continue}if(m<55296||m>=57344){f[f.length]=Hr[224|m>>12]+Hr[128|m>>6&63]+Hr[128|m&63];continue}p+=1,m=65536+((m&1023)<<10|c.charCodeAt(p)&1023),f[f.length]=Hr[240|m>>18]+Hr[128|m>>12&63]+Hr[128|m>>6&63]+Hr[128|m&63]}u+=f.join("")}return u},jye=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 Dye(l),e},Uye=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Bye=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Hye=function(e,l){return[].concat(e,l)},qye=function(e,l){if(ca(e)){for(var t=[],r=0;r<e.length;r+=1)t.push(l(e[r]));return t}return l(e)};IV.exports={arrayToObject:RV,assign:Fye,combine:Hye,compact:jye,decode:Mye,encode:$ye,isBuffer:Bye,isRegExp:Uye,maybeMap:qye,merge:Lye}});var FV=C((pRe,LV)=>{"use strict";var kV=NV(),df=ib(),k5=pf(),Vye=Object.prototype.hasOwnProperty,PV={brack
Line truncated
|
||||
`;Qn.DEFAULT_CONTENT_TYPE="application/octet-stream";Qn.prototype.append=function(n,e,l){l=l||{},typeof l=="string"&&(l={filename:l});var t=Eb.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),Cz.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)};Qn.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)+Qn.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof b_e))&&(l.knownLength||this._valuesToMeasure.push(e))};Qn.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)):E_e.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")};Qn.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"&&_b(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("; ")+Qn.LINE_BREAK)));return"--"+this.getBoundary()+Qn.LINE_BREAK+i+Qn.LINE_BREAK};Qn.prototype._getContentDisposition=function(n,e){var l,t;return typeof e.filepath=="string"?l=yb.normalize(e.filepath).replace(/\\/g,"/"):e.filename||n.name||n.path?l=yb.basename(e.filename||n.name||n.path):n.readable&&n.hasOwnProperty("httpVersion")&&(l=yb.basename(n.client._httpMessage.path||"")),l&&(t='filename="'+l+'"'),t};Qn.prototype._getContentType=function(n,e){var l=e.contentType;return!l&&n.name&&(l=vb.lookup(n.name)),!l&&n.path&&(l=vb.lookup(n.path)),!l&&n.readable&&n.hasOwnProperty("httpVersion")&&(l=n.headers["content-type"]),!l&&(e.filepath||e.filename)&&(l=vb.lookup(e.filepath||e.filename)),!l&&typeof n=="object"&&(l=Qn.DEFAULT_CONTENT_TYPE),l};Qn.prototype._multiPartFooter=function(){return function(n){var e=Qn.LINE_BREAK,l=this._streams.length===0;l&&(e+=this._lastBoundary()),n(e)}.bind(this)};Qn.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Qn.LINE_BREAK};Qn.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};Qn.prototype.setBoundary=function(n){this._boundary=n};Qn.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};Qn.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(Qn.LINE_BREAK)])));return Buffer.concat([n,Buffer.from(this._lastBoundary())])};Qn.prototype._generateBoundary=function(){for(var n="--------------------------",e=0;e<24;e++)n+=Math.floor(Math.random()*10).toString(16);this._boundary=n};Qn.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};Qn.prototype.hasKnownLength=function(){var n=!0;return this._valuesToMeasure.length&&(n=!1),n};Qn.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}T_e.parallel(this._valuesToMeasure,this._lengthRetriever,function(l,t){if(l){n(l);return}t.forEach(function(r){e+=r}),n(null,e)})};Qn.prototype.submit=function(n,e){var l,t,r={method:"post"};return typeof n=="string"?(n=__e(n),t=_b({port:n.port,path:n.pathname,host:n.hostname,protocol:n.protocol},r)):(t=_b(n,r),t.port||(t.port=t.protocol=="https:"?443:80)),t.headers=this.getHeaders(n.headers),t.protocol=="https:"?l=v_e.request(t):l=y_e.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};Qn.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)}};Pi.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 FG(n,e){var l=this;Pi.prototype.createSocket.call(l,n,function(t){var r=n.request.getHeader("host"),i=nT({},l.options,{socket:t,servername:r?r.replace(/:.*$/,""):n.host}),s=EEe.connect(0,i);l.sockets[l.sockets.indexOf(t)]=s,e(s)})}function MG(n,e,l){return typeof n=="string"?{host:n,port:e,localAddress:l}:n}function nT(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 Cs;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Cs=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)}:Cs=function(){};P4.debug=Cs});var UG=C((rPe,jG)=>{jG.exports=$G()});var qW=C(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.removeTrailingChar=va.merge=void 0;var Abe=(...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,va.merge)(e[t],l[t]):e[t]=l[t]}),e};va.merge=Abe;var Nbe=(n,e)=>n.length>1&&n.endsWith(e)?n.substring(0,n.length-1):n;va.removeTrailingChar=Nbe});var F4=C(Js=>{"use strict";Object.defineProperty(Js,"__esModule",{value:!0});Js.DataError=Js.DatabaseError=Js.NestedError=void 0;var Y5=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}};Js.NestedError=Y5;var DT=class extends Y5{};Js.DatabaseError=DT;var LT=class extends Y5{};Js.DataError=LT});var UT=C(k2=>{"use strict";Object.defineProperty(k2,"__esModule",{value:!0});k2.getArrayIndicies=k2.validateArrayIndex=k2.validateArrayIndicies=k2.isInt=k2.ArrayInfo=k2.arrayRegex=void 0;var kf=F4(),Obe=()=>/^([\.0-9a-zA-Z_$\-][0-9a-zA-Z_\-$\.]*)\[((?!(\]|\[)).*|)\]$/gm;k2.arrayRegex=Obe;var FT={},MT=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,$T(t))this.index=parseInt(t);else if(!this.append)throw new kf.DataError("Only numerical values accepted for array index",200)}static processArray(e){if(typeof e>"u")return null;if(FT[e])return FT[e];let t=(0,k2.arrayRegex)().exec(e.trim());if(t!=null){let r=t[1],i="["+t[2].toString()+"]",s=jT(i);return VW(s),FT[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 kf.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 kf.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}};k2.ArrayInfo=MT;function $T(n){return!isNaN(n)&&Number(n)==n&&!isNaN(parseInt(n,10))}k2.isInt=$T;function VW(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")}k2.validateArrayIndicies=VW;function zW(n){if(n.length!==0&&!$T(n))throw new kf.DataError("Only numerical values accepted for array index",200)}k2.validateArrayIndex=zW;function jT(n){if(n.length===0)return[];if(n.charAt(0)!=="[")throw new Error("Invalid array syntax detected");let e=n.substring(1,n.indexOf("]"));zW(e);let l=e.length+2;return[e,...jT(n.substring(l))]}k2.getArrayIndicies=jT});var WW=C(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.DBParentData=void 0;var GW=UT(),XW=F4(),BT=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=GW.ArrayInfo.processArray(this.parent);if(l&&(!l.append||e)&&!l.isValid(this.data))throw new XW.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=GW.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 XW.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]}};Pf.DBParentData=BT});var YW=C((MLe,KW)=>{KW.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 d=!1;return function(){d||(d=!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 d=!1;return function(){d||(d=!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):$7(e)?n(e.children):Fr(e)?e.data:""},textContent:l4,innerText:B7,getChildren:Q7,getParent:Kj,getSiblings:Yj,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:q_,prevElementSibling:V_,removeElement:Gu,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){Gu(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){Gu(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){Gu(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){Gu(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:O7,find:z_,findOneChild:function(n,e){return e.find(n)},findOne:m_,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=k$(n))||n(e)},getElements:function(n,e,l,t=1/0){return(n=k$(n))?O7(n,e,l,t):[]},getElementById:function(n,e,l=!0){return Array.isArray(e)||(e=[e]),m_(Jj("id",n),e,l)},getElementsByTagName:Yo,getElementsByTagType:function(n,e,l=!0,t=1/0){return O7(H7.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 O3},compareDocumentPosition:Qj,uniqueSort:t4,getFeed:function(n){return(n=E7(Mfe,n))?(n.name==="feed"?function(e){var l={type:"atom",items:Yo("entry",e=e.children).map(r=>{var i={media:P$(r=r.children)},s=(V2(i,"id","id",r),V2(i,"title","title",r),(s=E7("link",r))==null?void 0:s.attribs.href);return s&&(i.link=s),(s=fs("summary",r)||fs("content",r))&&(i.description=s),(s=fs("updated",r))&&(i.pubDate=new Date(s)),i})},t=(V2(l,"id","id",e),V2(l,"title","title",e),(t=E7("link",e))==null?void 0:t.attribs.href);return t&&(l.link=t),V2(l,"description","subtitle",e),(t=fs("updated",e))&&(l.updated=new Date(t)),V2(l,"author","email",e,!0),l}:function(t){var l=(l=(l=E7("channel",t.children))==null?void 0:l.children)!=null?l:[],t={type:t.name.substr(0,3),id:"",items:Yo("item",t.children).map(i=>{var s={media:P$(i=i.children)};return V2(s,"id","guid",i),V2(s,"title","title",i),V2(s,"link","link",i),V2(s,"description","description",i),(i=fs("pubDate",i)||fs("dc:date",i))&&(s.pubDate=new Date(i)),s})},r=(V2(t,"title","title",l),V2(t,"link","link",l),V2(t,"description","description",l),fs("lastBuildDate",l));return r&&(t.updated=new Date(r)),V2(t,"author","managingEditor",l,!0),t})(n):null}}),Jo=function(){return(Jo=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 Zj(n,e,l){return n?n(e??n._root.children,null,void 0,l).toString():""}function $fe(n,e){return Zj(this,function(l){return!(typeof l!="object"||l==null||"length"in l||"type"in l)}(n)?void(e=n):n,Jo(Jo(Jo({},H_),this==null?void 0:this._options),p_(e??{})))}function jfe(n){return Zj(this,n,Jo(Jo({},this._options),{xmlMode:!0}))}function t5(n){for(var e=n||(this?this.root():[]),l="",t=0;t<e.length;t++)l+=l4(e[t]);return l}function Ufe(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,H_,!1),l||e("script").remove(),e.root()[0].children.slice()):null}function Bfe(){return this(this._root)}function eU(n,e){if(e!==n){for(var l=e;l&&l!==l.parent;)if((l=l.parent)===n)return!0}return!1}function Hfe(n,e){if(D$(n)&&D$(e)){for(var l=n.length,t=+e.length,r=0;r<t;r++)n[l++]=e[r];return n.length=l,n}}function D$(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 Xu,qfe=Object.freeze({__proto__:null,html:$fe,xml:jfe,text:t5,parseHTML:Ufe,root:Bfe,contains:eU,merge:Hfe});function Lr(n){return n.cheerio!=null}function tt(n,e){for(var l=n.length,t=0;t<l;t++)e(n[t],t);return n}function Gv(e){var e="length"in e?Array.prototype.map.call(e,function(t){return j7(t,!0)}):[j7(e,!0)],l=new Ri(e);return e.forEach(function(t){t.parent=l}),e}function g_(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])"},Wj={};function Kj(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 c_(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 Bv=(n,e,l,t,r)=>{let i=r(e,c_(l),t);return i===wn.trueFunc?n:i===wn.falseFunc?wn.falseFunc:s=>i(s)&&n(s)},Hv={is:Bv,matches:Bv,where:Bv,not(n,e,l,t,r){let i=r(e,c_(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=c_(l),u=(s.relativeSelector=!0,e.some(f=>f.some(a_))?[Wj]: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,...Kj(h,i)]:m;return i.existsOne(c,h)}}return f=>n(f)&&i.existsOne(c,i.getChildren(f))}};function qv(n,e){return(n=e.getParent(n))&&e.isTag(n)?n:null}function Mfe(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()),Pfe[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 Hv)return Hv[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:Ffe[m];if(typeof _=="string"){if(h!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=J7(_);return Hv.is(u,S,c,f,p)}if(typeof g=="function")return D$(g,m,h,1),S=>g(S,h)&&u(S);if(m in o_)return o_[m](u,h,c,f);if(m in P$){let S=P$[m];return D$(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=qv(c,i);)if(n(c))return!0;return!1};let u=new WeakSet;return function(a){let c=a;for(;c=qv(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=qv(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 Yj(n){return n.type===en.Pseudo&&(n.name==="scope"||Array.isArray(n.data)&&n.data.some(e=>e.some(Yj)))}var $fe={type:en.Descendant},jfe={type:"_flexibleDescendant"},Ufe={type:en.Pseudo,name:"scope",data:null};function Jj(n,e,l){n.forEach(Ife),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===Wj||m&&a.isTag(m)}));for(let p of u){if(!(0<p.length&&a_(p[0])&&p[0].type!==en.Descendant)){if(!f||p.some(Yj))continue;p.unshift($fe)}p.unshift(Ufe)}})(n,e,r);else if(n.some(u=>0<u.length&&a_(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(F$,`\r
|
||||
`)}}).toArray()}}),H1=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}},H_=(H1.prototype.cheerio="[cheerio object]",H1.prototype.splice=Array.prototype.splice,H1.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(H1.prototype,Sfe,rpe,cpe,fpe,dpe),function(n,e){return(H_=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)}),hpe=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}H_(n,e),n.prototype=e===null?Object.create(e):(l.prototype=e.prototype,new l)},q1=function(){return(q1=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)},mpe=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]),ql="\uFFFD",M$=(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||{}),"--"),$$="[CDATA[",j$="doctype",$o="script",gpe="public",ype="system";function cU(n){return 55296<=n&&n<=57343}function fU(n){return n!==32&&n!==10&&n!==13&&n!==9&&n!==12&&1<=n&&n<=31||127<=n&&n<=159}function pU(n){return 64976<=n&&n<=65007||mpe.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 R=x[w];if(!s(b,R))return;b=b[R]}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),R=0;R<T.length;R++){var N=T[R],k=w(N,R);if(k===void 0&&v===!0)throw new TypeError('groupby: attribute "'+x+'" resolved to undefined');(b[k]||(b[k]=[])).push(N)}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,R=-1;(function N(){var k=b[++R];R<w?x(k,T[k],R,w,N):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 MU(){throw new Error("setTimeout has not been defined")}function $U(){throw new Error("clearTimeout has not been defined")}var ds=MU,hs=$U;function jU(n){if(ds===setTimeout)return setTimeout(n,0);if((ds===MU||!ds)&&setTimeout)return(ds=setTimeout)(n,0);try{return ds(n,0)}catch{try{return ds.call(null,n,0)}catch{return ds.call(this,n,0)}}}typeof Ai.setTimeout=="function"&&(ds=setTimeout),typeof Ai.clearTimeout=="function"&&(hs=clearTimeout);var Yu,Oi=[],e4=!1,C7=-1;function hde(){e4&&Yu&&(e4=!1,Yu.length?Oi=Yu.concat(Oi):C7=-1,Oi.length)&&UU()}function UU(){if(!e4){var n=jU(hde);e4=!0;for(var e=Oi.length;e;){for(Yu=Oi,Oi=[];++C7<e;)Yu&&Yu[C7].run();C7=-1,e=Oi.length}Yu=null,e4=!1,function(l){if(hs===clearTimeout)return clearTimeout(l);if((hs===$U||!hs)&&clearTimeout)return(hs=clearTimeout)(l);try{hs(l)}catch{try{return hs.call(null,l)}catch{return hs.call(this,l)}}}(n)}}function BU(n,e){this.fun=n,this.array=e}function la(){}BU.prototype.run=function(){this.fun.apply(null,this.array)};var mde=la,gde=la,yde=la,vde=la,_de=la,Ede=la,bde=la,Vo=Ai.performance||{},Tde=Vo.now||Vo.mozNow||Vo.msNow||Vo.oNow||Vo.webkitNow||function(){return new Date().getTime()},Sde=new Date,Es={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];Oi.push(new BU(n,e)),Oi.length!==1||e4||jU(UU)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:mde,addListener:gde,once:yde,off:vde,removeListener:_de,removeAllListeners:Ede,emit:bde,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*Tde.call(Vo),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-Sde)/1e3}};function ms(){}function Al(){Al.init.call(this)}function HU(n){return n._maxListeners===void 0?Al.defaultMaxListeners:n._maxListeners}function mj(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 ms,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=HU(n))&&0<t&&i.length>t&&(i.warned=!0,(t=new Error("Possible EventEm
Line truncated
|
||||
\r\xA0`,bj="()[]{}%*-+~/#,:|.<>=!",XU="string",WU="whitespace",KU="data",YU="block-start",JU="block-end",QU="variable-start",ZU="variable-end",eB="comment",nB="left-paren",lB="right-paren",tB="left-bracket",rB="right-bracket",iB="left-curly",sB="right-curly",uB="operator",aB="comma",oB="colon",cB="tilde",fB="pipe",pB="float",dB="boolean",N_="none",hB="symbol",mB="regex";function R2(n,e,l,t){return{type:n,value:e,lineno:l,colno:t}}var Rde=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(XU,this._parseString(r),l,t);if(h=this._extract(Ej))return R2(WU,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())===`
|
||||
)`,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])"},iU={};function sU(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 E_(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,E_(l),t);return i===An.trueFunc?n:i===An.falseFunc?An.falseFunc:s=>i(s)&&n(s)},Qv={is:Jv,matches:Jv,where:Jv,not(n,e,l,t,r){let i=r(e,E_(l),t);return i===An.falseFunc?n:i===An.trueFunc?An.falseFunc:s=>!i(s)&&n(s)},has(n,e,l,t,r){let i=l.adapter,s=E_(l),u=(s.relativeSelector=!0,e.some(f=>f.some(v_))?[iU]:void 0),a=r(e,s,u);if(a===An.falseFunc)return An.falseFunc;let c=function(f,p){return f===An.falseFunc?An.falseFunc:m=>p.isTag(m)&&f(m)}(a,i);if(u&&a!==An.trueFunc){let{shouldTestNextSiblings:f=!1}=a;return d=>{if(!n(d))return!1;u[0]=d;var m=i.getChildren(d),d=f?[...m,...sU(d,i)]:m;return i.existsOne(c,d)}}return f=>n(f)&&i.existsOne(c,i.getChildren(f))}};function Zv(n,e){return(n=e.getParent(n))&&e.isTag(n)?n:null}function ipe(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()),npe[e.action](n,e,l);case en.Pseudo:return function(u,a,c,f,p){let{name:m,data:d}=a;if(Array.isArray(d)){if(m in Qv)return Qv[m](u,d,c,f,p);throw new Error(`Unknown pseudo-class :${m}(${d})`)}let g=(a=c.pseudos)==null?void 0:a[m],_=typeof g=="string"?g:rpe[m];if(typeof _=="string"){if(d!=null)throw new Error(`Pseudo ${m} doesn't have any arguments`);let S=ec(_);return Qv.is(u,S,c,f,p)}if(typeof g=="function")return z$(g,m,d,1),S=>g(S,d)&&u(S);if(m in __)return __[m](u,d,c,f);if(m in V$){let S=V$[m];return z$(S,m,d,2),T=>S(T,c,d)&&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=Zv(c,i);)if(n(c))return!0;return!1};let u=new WeakSet;return function(a){let c=a;for(;c=Zv(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=Zv(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 uU(n){return n.type===en.Pseudo&&(n.name==="scope"||Array.isArray(n.data)&&n.data.some(e=>e.some(uU)))}var spe={type:en.Descendant},upe={type:"_flexibleDescendant"},ape={type:en.Pseudo,name:"scope",data:null};function aU(n,e,l){n.forEach(Qfe),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===iU||m&&a.isTag(m)}));for(let p of u){if(!(0<p.length&&v_(p[0])&&p[0].type!==en.Descendant)){if(!f||p.some(uU))continue;p.unshift(spe)}p.unshift(ape)}})(n,e,r);else if(n.some(u=>0<u.length&&v_(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(X$,`\r
|
||||
`)}}).toArray()}}),B1=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}},Q_=(B1.prototype.cheerio="[cheerio object]",B1.prototype.splice=Array.prototype.splice,B1.prototype[Symbol.iterator]=Array.prototype[Symbol.iterator],Object.assign(B1.prototype,zfe,Ape,kpe,Ppe,Lpe),function(n,e){return(Q_=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)}),Fpe=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}Q_(n,e),n.prototype=e===null?Object.create(e):(l.prototype=e.prototype,new l)},H1=function(){return(H1=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)},Mpe=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]),ql="\uFFFD",W$=(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||{}),"--"),K$="[CDATA[",Y$="doctype",$o="script",$pe="public",jpe="system";function bU(n){return 55296<=n&&n<=57343}function TU(n){return n!==32&&n!==10&&n!==13&&n!==9&&n!==12&&1<=n&&n<=31||127<=n&&n<=159}function SU(n){return 64976<=n&&n<=65007||Mpe.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 d(T){var x=function(v){return v?typeof v=="string"?v.split("."):[v]:[]}(T);return function(v){for(var b=v,A=0;A<x.length;A++){var R=x[A];if(!s(b,R))return;b=b[R]}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=d,i.groupBy=function(T,x,v){for(var b={},A=c(x)?x:d(x),R=0;R<T.length;R++){var O=T[R],k=A(O,R);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),A=-1;++A<v;)_(b,T[A])===-1&&x.push(T[A]);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,A=T.length;b<A;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 A(){++b<T.length?x(T[b],b,A,v):v()})()},i.asyncFor=function(T,x,v){var b=S(T||{}),A=b.length,R=-1;(function O(){var k=b[++R];R<A?x(k,T[k],R,A,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 WU(){throw new Error("setTimeout has not been defined")}function KU(){throw new Error("clearTimeout has not been defined")}var hs=WU,ms=KU;function YU(n){if(hs===setTimeout)return setTimeout(n,0);if((hs===WU||!hs)&&setTimeout)return(hs=setTimeout)(n,0);try{return hs(n,0)}catch{try{return hs.call(null,n,0)}catch{return hs.call(this,n,0)}}}typeof Ai.setTimeout=="function"&&(hs=setTimeout),typeof Ai.clearTimeout=="function"&&(ms=clearTimeout);var Yu,Oi=[],e4=!1,D7=-1;function Fde(){e4&&Yu&&(e4=!1,Yu.length?Oi=Yu.concat(Oi):D7=-1,Oi.length)&&JU()}function JU(){if(!e4){var n=YU(Fde);e4=!0;for(var e=Oi.length;e;){for(Yu=Oi,Oi=[];++D7<e;)Yu&&Yu[D7].run();D7=-1,e=Oi.length}Yu=null,e4=!1,function(l){if(ms===clearTimeout)return clearTimeout(l);if((ms===KU||!ms)&&clearTimeout)return(ms=clearTimeout)(l);try{ms(l)}catch{try{return ms.call(null,l)}catch{return ms.call(this,l)}}}(n)}}function QU(n,e){this.fun=n,this.array=e}function la(){}QU.prototype.run=function(){this.fun.apply(null,this.array)};var Mde=la,$de=la,jde=la,Ude=la,Bde=la,Hde=la,qde=la,Vo=Ai.performance||{},Vde=Vo.now||Vo.mozNow||Vo.msNow||Vo.oNow||Vo.webkitNow||function(){return new Date().getTime()},zde=new Date,bs={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];Oi.push(new QU(n,e)),Oi.length!==1||e4||YU(JU)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:Mde,addListener:$de,once:jde,off:Ude,removeListener:Bde,removeAllListeners:Hde,emit:qde,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*Vde.call(Vo),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-zde)/1e3}};function gs(){}function wl(){wl.init.call(this)}function ZU(n){return n._maxListeners===void 0?wl.defaultMaxListeners:n._maxListeners}function Aj(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 gs,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=ZU(n))&&0<t&&i.length>t&&(i.warned=!0,(t=new Error("Possible EventEm
Line truncated
|
||||
\r\xA0`,kj="()[]{}%*-+~/#,:|.<>=!",rB="string",iB="whitespace",sB="data",uB="block-start",aB="block-end",oB="variable-start",cB="variable-end",fB="comment",pB="left-paren",dB="right-paren",hB="left-bracket",mB="right-bracket",gB="left-curly",yB="right-curly",vB="operator",_B="comma",EB="colon",bB="tilde",TB="pipe",SB="float",xB="boolean",$_="none",wB="symbol",AB="regex";function I2(n,e,l,t){return{type:n,value:e,lineno:l,colno:t}}var Jde=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 I2(rB,this._parseString(r),l,t);if(d=this._extract(Cj))return I2(iB,d,l,t);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())),R2(JU,h,l,t);if(h=(h=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,R2(ZU,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(mB,{body:i,flags:u},l,t)}if(bj.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=nB;break;case")":a=lB;break;case"[":a=tB;break;case"]":a=rB;break;case"{":a=iB;break;case"}":a=sB;break;case",":a=aB;break;case":":a=oB;break;case"~":a=cB;break;case"|":a=fB;break;default:a=uB}return R2(a,r,l,t)}if((h=this._extractUntil(Ej+bj)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),c=this._extract("0123456789"),R2(pB,h+"."+c,l,t)):R2("int",h,l,t);if(h.match(/^(true|false)$/))return R2(dB,h,l,t);if(h==="none"||h==="null")return R2(N_,h,l,t);if(h)return R2(hB,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(YU,h,l,t);if(h=(h=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,R2(QU,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?eB:KU,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+=`
|
||||
`?this.forward():this.back())),I2(aB,d,l,t);if(d=(d=this._extractString(this.tags.VARIABLE_END))||this._extractString("-"+this.tags.VARIABLE_END))return this.in_code=!1,I2(cB,d,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 I2(AB,{body:i,flags:u},l,t)}if(kj.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=pB;break;case")":a=dB;break;case"[":a=hB;break;case"]":a=mB;break;case"{":a=gB;break;case"}":a=yB;break;case",":a=_B;break;case":":a=EB;break;case"~":a=bB;break;case"|":a=TB;break;default:a=vB}return I2(a,r,l,t)}if((d=this._extractUntil(Cj+kj)).match(/^[-+]?[0-9]+$/))return this.current()==="."?(this.forward(),c=this._extract("0123456789"),I2(SB,d+"."+c,l,t)):I2("int",d,l,t);if(d.match(/^(true|false)$/))return I2(xB,d,l,t);if(d==="none"||d==="null")return I2($_,d,l,t);if(d)return I2(wB,d,l,t);throw new Error("Unexpected value while parsing: "+d)}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(d=(d=this._extractString(this.tags.BLOCK_START+"-"))||this._extractString(this.tags.BLOCK_START))return this.in_code=!0,I2(uB,d,l,t);if(d=(d=this._extractString(this.tags.VARIABLE_START+"-"))||this._extractString(this.tags.VARIABLE_START))return this.in_code=!0,I2(oB,d,l,t);var d="",g=!1;for(this._matches(this.tags.COMMENT_START)&&(g=!0,d=this._extractString(this.tags.COMMENT_START));(p=this._extractUntil(m))!==null;){if(d+=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<=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(!g)throw new Error("unexpected end of comment");d+=this._extractString(this.tags.COMMENT_END);break}d+=this.current(),this.forward()}if(p===null&&g)throw new Error("expected end of comment, got end of file");return I2(g?fB:sB,d,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 Rde(n,e)},TOKEN_STRING:XU,TOKEN_WHITESPACE:WU,TOKEN_DATA:KU,TOKEN_BLOCK_START:YU,TOKEN_BLOCK_END:JU,TOKEN_VARIABLE_START:QU,TOKEN_VARIABLE_END:ZU,TOKEN_COMMENT:eB,TOKEN_LEFT_PAREN:nB,TOKEN_RIGHT_PAREN:lB,TOKEN_LEFT_BRACKET:tB,TOKEN_RIGHT_BRACKET:rB,TOKEN_LEFT_CURLY:iB,TOKEN_RIGHT_CURLY:sB,TOKEN_OPERATOR:uB,TOKEN_COMMA:aB,TOKEN_COLON:oB,TOKEN_TILDE:cB,TOKEN_PIPE:fB,TOKEN_INT:"int",TOKEN_FLOAT:pB,TOKEN_BOOLEAN:dB,TOKEN_NONE:N_,TOKEN_SYMBOL:hB,TOKEN_SPECIAL:"special",TOKEN_REGEX:mB};function Tj(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 z_(n,e,l){return e&&Tj(n.prototype,e),l&&Tj(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n}function gB(n,e){n.prototype=Object.create(e.prototype),yB(n.prototype.constructor=n,e)}function yB(n,e){return(yB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}function vB(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 gB(i,r),z_(i,[{key:"typename",get:function(){return e}}]),i}(n);return ke._assign(t.prototype,l),t}var Ide=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"),vB(this,e,l)},z_(n,[{key:"typename",get:function(){return this.constructor.name}}]),n}(),Cde=function(n){function e(){var l;return(l=n.call(this)||this).init.apply(l,arguments),l}return gB(e,n),e.prototype.init=function(){},e.extend=function(l,t){return typeof l=="object"&&(t=l,l="anonymous"),vB(this,l,t)},z_(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(Al),s4={Obj:Ide,EmitterObj:Cde};function Sj(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 G_(n,e,l){return e&&Sj(n.prototype,e),l&&Sj(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n}function Z7(n,e){n.prototype=Object.create(e.prototype),_B(n.prototype.constructor=n,e)}function _B(n,e){return(_B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}function xj(n,e,l){n instanceof e&&l.push(n),n instanceof Pl&&n.findAll(e,l)}var Pl=function(n){function e(){return n.apply(this,arguments)||this}Z7(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 Fr?this.children.forEach(function(s){return xj(s,t,r)}):this.fields.forEach(function(s){return xj(i[s],t,r)}),r},l.iterFields=function(t){var r=this;this.fields.forEach(function(i){t(r[i],i)})},e}(s4.Obj),X_=function(n){function e(){return n.apply(this,arguments)||this}return Z7(e,n),G_(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(Pl),Fr=function(n){function e(){return n.apply(this,arguments)||this}Z7(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)},G_(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(Pl),kde=Fr.extend("Root"),EB=X_.extend("Literal"),Pde=X_.extend("Symbol"),Dde=Fr.extend("Group"),Lde=Fr.extend("Array"),Fde=Pl.extend("Pair",{fields:["key","value"]}),bB=Fr.extend("Dict"),Mde=Pl.extend("LookupVal",{fields:["target","val"]}),TB=Pl.extend("If",{fields:["cond","body","else_"]}),$de=TB.extend("IfAsync"),jde=Pl.extend("InlineIf",{fields:["cond","body","else_"]}),W_=Pl.extend("For",{fields:["arr","name","body","else_"]}),Ude=W_.extend("AsyncEach"),Bde=W_.extend("AsyncAll"),SB=
Line truncated
|
||||
`,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 Jde(n,e)},TOKEN_STRING:rB,TOKEN_WHITESPACE:iB,TOKEN_DATA:sB,TOKEN_BLOCK_START:uB,TOKEN_BLOCK_END:aB,TOKEN_VARIABLE_START:oB,TOKEN_VARIABLE_END:cB,TOKEN_COMMENT:fB,TOKEN_LEFT_PAREN:pB,TOKEN_RIGHT_PAREN:dB,TOKEN_LEFT_BRACKET:hB,TOKEN_RIGHT_BRACKET:mB,TOKEN_LEFT_CURLY:gB,TOKEN_RIGHT_CURLY:yB,TOKEN_OPERATOR:vB,TOKEN_COMMA:_B,TOKEN_COLON:EB,TOKEN_TILDE:bB,TOKEN_PIPE:TB,TOKEN_INT:"int",TOKEN_FLOAT:SB,TOKEN_BOOLEAN:xB,TOKEN_NONE:$_,TOKEN_SYMBOL:wB,TOKEN_SPECIAL:"special",TOKEN_REGEX:AB};function Pj(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 nE(n,e,l){return e&&Pj(n.prototype,e),l&&Pj(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n}function NB(n,e){n.prototype=Object.create(e.prototype),OB(n.prototype.constructor=n,e)}function OB(n,e){return(OB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}function RB(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 NB(i,r),nE(i,[{key:"typename",get:function(){return e}}]),i}(n);return ke._assign(t.prototype,l),t}var Qde=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"),RB(this,e,l)},nE(n,[{key:"typename",get:function(){return this.constructor.name}}]),n}(),Zde=function(n){function e(){var l;return(l=n.call(this)||this).init.apply(l,arguments),l}return NB(e,n),e.prototype.init=function(){},e.extend=function(l,t){return typeof l=="object"&&(t=l,l="anonymous"),RB(this,l,t)},nE(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(wl),s4={Obj:Qde,EmitterObj:Zde};function Dj(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 lE(n,e,l){return e&&Dj(n.prototype,e),l&&Dj(n,l),Object.defineProperty(n,"prototype",{writable:!1}),n}function lc(n,e){n.prototype=Object.create(e.prototype),IB(n.prototype.constructor=n,e)}function IB(n,e){return(IB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}function Lj(n,e,l){n instanceof e&&l.push(n),n instanceof Pl&&n.findAll(e,l)}var Pl=function(n){function e(){return n.apply(this,arguments)||this}lc(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 Mr?this.children.forEach(function(s){return Lj(s,t,r)}):this.fields.forEach(function(s){return Lj(i[s],t,r)}),r},l.iterFields=function(t){var r=this;this.fields.forEach(function(i){t(r[i],i)})},e}(s4.Obj),tE=function(n){function e(){return n.apply(this,arguments)||this}return lc(e,n),lE(e,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),e}(Pl),Mr=function(n){function e(){return n.apply(this,arguments)||this}lc(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)},lE(e,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),e}(Pl),ehe=Mr.extend("Root"),CB=tE.extend("Literal"),nhe=tE.extend("Symbol"),lhe=Mr.extend("Group"),the=Mr.extend("Array"),rhe=Pl.extend("Pair",{fields:["key","value"]}),kB=Mr.extend("Dict"),ihe=Pl.extend("LookupVal",{fields:["target","val"]}),PB=Pl.extend("If",{fields:["cond","body","else_"]}),she=PB.extend("IfAsync"),uhe=Pl.extend("InlineIf",{fields:["cond","body","else_"]}),rE=Pl.extend("For",{fields:["arr","name","body","else_"]}),ahe=rE.extend("AsyncEach"),ohe=rE.extend("AsyncAll"),DB=
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:Pl,Root:kde,NodeList:Fr,Value:X_,Literal:EB,Symbol:Pde,Group:Dde,Array:Lde,Pair:Fde,Dict:bB,Output:ehe,Capture:nhe,TemplateData:lhe,If:TB,IfAsync:$de,InlineIf:jde,For:W_,AsyncEach:Ude,AsyncAll:Bde,Macro:SB,Caller:Hde,Import:qde,FromImport:Vde,FunCall:xB,Filter:AB,FilterAsync:zde,KeywordArgs:Gde,Block:Xde,Super:Wde,Extends:Kde,Include:Yde,Set:Jde,Switch:Qde,Case:Zde,LookupVal:Mde,BinOp:r3,In:the,Is:rhe,Or:ihe,And:she,Not:uhe,Add:ahe,Concat:ohe,Sub:che,Mul:fhe,Div:phe,FloorDiv:dhe,Mod:hhe,Pow:mhe,Neg:ghe,Pos:yhe,Compare:vhe,CompareOperand:_he,CallExtension:R_,CallExtensionAsync:Ehe,printNodes:function n(e,l){var t,r;l=l||0,Uo(e.typename+": ",l),e instanceof Fr?(Uo(`
|
||||
`),e.children.forEach(function(i){n(i,l+2)})):e instanceof R_?(Uo(e.extName+"."+e.prop+`
|
||||
`,process.stdout.write(r+i)})}var z={Node:Pl,Root:ehe,NodeList:Mr,Value:tE,Literal:CB,Symbol:nhe,Group:lhe,Array:the,Pair:rhe,Dict:kB,Output:The,Capture:She,TemplateData:xhe,If:PB,IfAsync:she,InlineIf:uhe,For:rE,AsyncEach:ahe,AsyncAll:ohe,Macro:DB,Caller:che,Import:fhe,FromImport:phe,FunCall:LB,Filter:FB,FilterAsync:dhe,KeywordArgs:hhe,Block:mhe,Super:ghe,Extends:yhe,Include:vhe,Set:_he,Switch:Ehe,Case:bhe,LookupVal:ihe,BinOp:r3,In:whe,Is:Ahe,Or:Nhe,And:Ohe,Not:Rhe,Add:Ihe,Concat:Che,Sub:khe,Mul:Phe,Div:Dhe,FloorDiv:Lhe,Mod:Fhe,Pow:Mhe,Neg:$he,Pos:jhe,Compare:Uhe,CompareOperand:Bhe,CallExtension:j_,CallExtensionAsync:Hhe,printNodes:function n(e,l){var t,r;l=l||0,Uo(e.typename+": ",l),e instanceof Mr?(Uo(`
|
||||
`),e.children.forEach(function(i){n(i,l+2)})):e instanceof j_?(Uo(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 Pl?t.push([s,i]):(r=r||{})[s]=i}),r?Uo(JSON.stringify(r,null,2)+`
|
||||
`,null,!0):Uo(`
|
||||
`),t.forEach(function(u){var s=u[0],u=u[1];Uo("["+s+"] =>",l+2),n(u,l+4)}))}};function wB(n,e){return(wB=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 Aj=function(n){var e;function l(){return n.apply(this,arguments)||this}e=n,(t=l).prototype=Object.create(e.prototype),wB(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.forEach(function(u){var s=u[0],u=u[1];Uo("["+s+"] =>",l+2),n(u,l+4)}))}};function MB(n,e){return(MB=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 Fj=function(n){var e;function l(){return n.apply(this,arguments)||this}e=n,(t=l).prototype=Object.create(e.prototype),MB(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(" "+Nhe[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
|
||||
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 d;0<m&&u._emit(","),p?(u._emitLine("function(cb) {"),u._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}"),d=u._pushBuffer(),u._withScopedSyntax(function(){u.compile(p,i),u._emitLine("cb(null, "+d+");")}),u._popBuffer(),u._emitLine("return "+d+";"),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(" "+Yhe[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 Yv,_=(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 Yv,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 Yv,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}(s4.Obj),Rhe={compile:function(s,e,l,t,r){var i=new Oj(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(xhe.transform(bhe.parse(s,l,r),e,t)),i.getCode()},Compiler:Oj},Ihe=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(`
|
||||
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(),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 z.Array?(this._emitLine("var "+p+";"),this._emitLine("if(runtime.isArray("+d+")) {"),this._emitLine("var "+m+" = "+d+".length;"),this._emitLine("for("+p+"=0; "+p+" < "+d+".length; "+p+"++) {"),r.name.children.forEach(function(g,_){var S=f._tmpid();f._emitLine("var "+S+" = "+d+"["+p+"]["+_+"];"),f._emitLine('frame.set("'+g+'", '+d+"["+p+"]["+_+"]);"),i.set(r.name.children[_].value,S)}),this._emitLoopBindings(r,d,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("+d+").length;"),this._emitLine("for(var "+u+" in "+d+") {"),this._emitLine(p+"++;"),this._emitLine("var "+a+" = "+d+"["+u+"];"),this._emitLine('frame.set("'+c.value+'", '+u+");"),this._emitLine('frame.set("'+s.value+'", '+a+");"),this._emitLoopBindings(r,d,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+" = "+d+".length;"),this._emitLine("for(var "+p+"=0; "+p+" < "+d+".length; "+p+"++) {"),this._emitLine("var "+c+" = "+d+"["+p+"];"),this._emitLine('frame.set("'+r.name.value+'", '+c+");"),this._emitLoopBindings(r,d,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(d){a._emit(d.value+",")}),this._emit(c+","+f+",next) {"),r.name.children.forEach(function(d){d=d.value,i.set(d,d),a._emitLine('frame.set("'+d+'", '+d+");")})):(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 d;s&&(d=a._pushBuffer()),a.compile(r.body,i),a._emitLine("next("+c+(d?","+d:"")+");"),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+'"'}),d=(a&&a.children||[]).map(function(S){return'"'+S.key.value+'"'}),g=f?_.push(!0):new s_,_=(this._emitLines("var "+c+" = runtime.makeMacro(","["+m.join(", ")+"], ","["+d.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 s_,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 s_,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}(s4.Obj),Jhe={compile:function(s,e,l,t,r){var i=new $j(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(Ghe.transform(qhe.parse(s,l,r),e,t)),i.getCode()},Compiler:$j},Qhe=an(function(n){function e(d,g){return d==null||d===!1?g:d}function l(d){return d!=d}function t(d){var g=(d=e(d,"")).toLowerCase();return on.copySafeness(d,g.charAt(0).toUpperCase()+g.slice(1))}function r(d){if(ke.isString(d))return d.split("");if(ke.isObject(d))return ke._entries(d||{}).map(function(g){return{key:g[0],value:g[1]}});if(ke.isArray(d))return d;throw new ke.TemplateError("list filter: type not iterable")}function i(d){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)===d})}}function s(d){return on.copySafeness(d,d.replace(/^\s*|\s*$/g,""))}(n=n.exports={}).abs=Math.abs,n.batch=function(d,g,_){for(var S=[],T=[],x=0;x<d.length;x++)x%g==0&&T.length&&(S.push(T),T=[]),T.push(d[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(d,g){var _;return(d=e(d,"")).length>=(g=g||80)?d:(g-=d.length,_=ke.repeat(" ",g/2-g%2),g=ke.repeat(" ",g/2),on.copySafeness(d,_+d+g))},n.default=function(d,g,_){return _?d||g:d!==void 0?d:g},n.dictsort=function(d,g,_){if(!ke.isObject(d))throw new ke.TemplateError("dictsort filter: val must be an object");var S,T,x=[];for(T in d)x.push([T,d[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(d,g){return JSON.stringify(d,null,g)},n.escape=function(d){return d instanceof on.SafeString?d:on.markSafe(ke.escape((d=d??"").toString()))},n.safe=function(d){return d instanceof on.SafeString?d:on.markSafe((d=d??"").toString())},n.first=function(d){return d[0]},n.forceescape=function(d){return on.markSafe(ke.escape((d=d??"").toString()))},n.groupby=function(d,g){return ke.groupBy(d,g,this.env.opts.throwOnUndefined)},n.indent=function(d,x,_){if((d=e(d,""))==="")return"";x=x||4;var S=d.split(`
|
||||
`),T=ke.repeat(" ",x),x=S.map(function(v,b){return b!==0||_?""+T+v:v}).join(`
|
||||
`);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,`
|
||||
`);return on.copySafeness(d,x)},n.join=function(d,g,_){return g=g||"",(d=_?ke.map(d,function(S){return S[_]}):d).join(g)},n.last=function(d){return d[d.length-1]},n.length=function(d){return(d=e(d,""))!==void 0?typeof Map=="function"&&d instanceof Map||typeof Set=="function"&&d instanceof Set?d.size:(!ke.isObject(d)||d instanceof on.SafeString?d:ke.keys(d)).length:0},n.list=r,n.lower=function(d){return(d=e(d,"")).toLowerCase()},n.nl2br=function(d){return d==null?"":on.copySafeness(d,d.replace(/\r\n|\n/g,`<br />
|
||||
`))},n.random=function(d){return d[Math.floor(Math.random()*d.length)]},n.reject=i(!1),n.rejectattr=function(d,g){return d.filter(function(_){return!_[g]})},n.select=i(!0),n.selectattr=function(d,g){return d.filter(function(_){return!!_[g]})},n.replace=function(d,g,_,S){var T=d;if(g instanceof RegExp)return d.replace(g,_);S===void 0&&(S=-1);var x="";if(typeof g=="number")g=""+g;else if(typeof g!="string")return d;if(typeof(d=typeof d=="number"?""+d:d)!="string"&&!(d instanceof on.SafeString))return d;if(g==="")return x=_+d.split("").join(_)+_,on.copySafeness(d,x);var v=d.indexOf(g);if(S===0||v===-1)return d;for(var b=0,A=0;-1<v&&(S===-1||A<S);)x+=d.substring(b,v)+_,b=v+g.length,A++,v=d.indexOf(g,b);return b<d.length&&(x+=d.substring(b)),on.copySafeness(T,x)},n.reverse=function(d){var g;return(g=ke.isString(d)?r(d):ke.map(d,function(_){return _})).reverse(),ke.isString(d)?on.copySafeness(d,g.join("")):g},n.round=function(d,g,_){return g=g||0,g=Math.pow(10,g),(_==="ceil"?Math.ceil:_==="floor"?Math.floor:Math.round)(d*g)/g},n.slice=function(d,g,_){for(var S=Math.floor(d.length/g),T=d.length%g,x=[],v=0,b=0;b<g;b++){var A=v+b*S;b<T&&v++,A=d.slice(A,v+(b+1)*S),_&&T<=b&&A.push(_),x.push(A)}return x},n.sum=function(d,g,_){return(_=_===void 0?0:_)+(d=g?ke.map(d,function(S){return S[g]}):d).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,A){if(b=S?v(b):b,A=S?v(A):A,T.env.opts.throwOnUndefined&&S&&(b===void 0||A===void 0))throw new TypeError('sort: attribute "'+S+'" resolved to undefined');return!_&&ke.isString(b)&&ke.isString(A)&&(b=b.toLowerCase(),A=A.toLowerCase()),b<A?g?1:-1:A<b?g?-1:1:0}),x}),n.string=function(d){return on.copySafeness(d,d)},n.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 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=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,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}),X7={};function CB(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 Che=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,Jv=function(n){return Che.exec(n).slice(1)};function Qv(){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?"/":"")+CB(Y_(n.split("/"),function(r){return!!r}),!e).join("/")||"."}function Nj(n){var e=kB(n),l=khe(n,-1)==="/";return(n=(n=CB(Y_(n.split("/"),function(t){return!!t}),!e).join("/"))||e?n:".")&&l&&(n+="/"),(e?"/":"")+n}function kB(n){return n.charAt(0)==="/"}var n4={extname:function(n){return Jv(n)[3]},basename:function(n,e){return n=Jv(n)[2],e&&n.substr(-1*e.length)===e?n.substr(0,n.length-e.length):n},dirname:function(l){var e=(l=Jv(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=Qv(n).substr(1),e=Qv(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 Nj(Y_(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:kB,normalize:Nj,resolve:Qv};function Y_(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 khe="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 PB(n,e){return(PB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var J_=function(n){var e;function l(){return n.apply(this,arguments)||this}e=n,(t=l).prototype=Object.create(e.prototype),PB(t.prototype.constructor=t,e);var t=l.prototype;return t.resolve=function(r,i){return n4.resolve(n4.dirname(r),i)},t.isRelative=function(r){return r.indexOf("./")===0||r.indexOf("../")===0},l}(s4.EmitterObj);function DB(n,e){return(DB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var Phe=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),DB(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}(J_);function LB(n,e){n.prototype=Object.create(e.prototype),FB(n.prototype.constructor=n,e)}function FB(n,e){return(FB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var Dhe=Phe,Lhe=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(n4.normalize)):r.searchPaths=["."],t.watch,r}return LB(e,n),e.prototype.getSource=function(l){for(var t=null,r=this.searchPaths,i=0;i<r.length;i++){var s=n4.resoLine truncated
|
||||
`):_.replace(/\s+/gi," ");return on.copySafeness(d,S)},n.title=function(d){var g=(d=e(d,"")).split(" ").map(t);return on.copySafeness(d,g.join(" "))},n.trim=s,n.truncate=function(d,g,_,S){var T=d;return(d=e(d,"")).length<=(g=g||255)?d:(d=_?d.substring(0,g):((_=d.lastIndexOf(" ",g))===-1&&(_=g),d.substring(0,_)),on.copySafeness(T,d+=S??"..."))},n.upper=function(d){return(d=e(d,"")).toUpperCase()},n.urlencode=function(d){var g=encodeURIComponent;return ke.isString(d)?g(d):(ke.isArray(d)?d:ke._entries(d)).map(function(T){var S=T[0],T=T[1];return g(S)+"="+g(T)}).join("&")};var u=/^(?:\(|<|<)?(.*?)(?:\.|,|\)|\n|>)?$/,a=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,c=/^https?:\/\/.*$/,f=/^www\./,p=/\.(?:org|net|com)(?:\:|\/|$)/,m=(n.urlize=function(d,g,_){l(g)&&(g=1/0);var S=_===!0?' rel="nofollow"':"";return d.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(d){return(d=(d=e(d,""))?d.match(/\w+/g):null)?d.length:null},n.float=function(d,g){return l(d=parseFloat(d))?g:d},on.makeMacro(["value","default","base"],[],function(d,g,_){return _===void 0&&(_=10),l(d=parseInt(d,_))?g:d}));n.int=m,n.d=n.default,n.e=n.escape}),Y7={};function HB(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 Zhe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,u_=function(n){return Zhe.exec(n).slice(1)};function a_(){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?"/":"")+HB(sE(n.split("/"),function(r){return!!r}),!e).join("/")||"."}function jj(n){var e=qB(n),l=eme(n,-1)==="/";return(n=(n=HB(sE(n.split("/"),function(t){return!!t}),!e).join("/"))||e?n:".")&&l&&(n+="/"),(e?"/":"")+n}function qB(n){return n.charAt(0)==="/"}var n4={extname:function(n){return u_(n)[3]},basename:function(n,e){return n=u_(n)[2],e&&n.substr(-1*e.length)===e?n.substr(0,n.length-e.length):n},dirname:function(l){var e=(l=u_(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=a_(n).substr(1),e=a_(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 jj(sE(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:qB,normalize:jj,resolve:a_};function sE(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 eme="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 VB(n,e){return(VB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var uE=function(n){var e;function l(){return n.apply(this,arguments)||this}e=n,(t=l).prototype=Object.create(e.prototype),VB(t.prototype.constructor=t,e);var t=l.prototype;return t.resolve=function(r,i){return n4.resolve(n4.dirname(r),i)},t.isRelative=function(r){return r.indexOf("./")===0||r.indexOf("../")===0},l}(s4.EmitterObj);function zB(n,e){return(zB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var nme=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),zB(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}(uE);function GB(n,e){n.prototype=Object.create(e.prototype),XB(n.prototype.constructor=n,e)}function XB(n,e){return(XB=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(l,t){return l.__proto__=t,l})(n,e)}var lme=nme,tme=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(n4.normalize)):r.searchPaths=["."],t.watch,r}return GB(e,n),e.prototype.getSource=function(l){for(var t=null,r=this.searchPaths,i=0;i<r.length;i++){var s=n4.resoLine truncated
|
||||
/* [wrapped with `+D+`] */
|
||||
`)):O}(A,function(O,D){return Tt(m,function(B){var V="_."+B[0];D&B[1]&&!D3(O,V)&&O.push(V)}),O.sort()}(function(){var O=A.match(P2);return O?O[1].split(Bl):[]}(),y)))}function QS(o){var d=0,y=0;return function(){var A=XW(),O=16-(A-y);if(y=A,0<O){if(800<=++d)return arguments[0]}else d=0;return o.apply(l,arguments)}}function O6(o,d){var y=-1,A=o.length,O=A-1;for(d=d===l?A:d;++y<d;){var D=qf(y,O),B=o[D];o[D]=o[y],o[y]=B}return o.length=d,o}var ZS=function(){var o=C6(function(y){var A=[];return y.charCodeAt(0)===46&&A.push(""),y.replace(sn,function(O,D,B,V){A.push(B?V.replace(zt,"$1"):D||O)}),A},function(y){return d.size===500&&d.clear(),y}),d=o.cache;return o}();function hr(o){var d;return typeof o=="string"||e3(o)?o:(d=o+"")=="0"&&1/o==-1/0?"-0":d}function pu(o){if(o!=null){try{return r6.call(o)}catch{}try{return o+""}catch{}}return""}function ex(o){var d;return o instanceof jn?o.clone():((d=new F3(o.__wrapped__,o.__chain__)).__actions__=D2(o.__actions__),d.__index__=o.__index__,d.__values__=o.__values__,d)}function nx(o,d,y){var A=o==null?0:o.length;return A?((y=y==null?0:vn(y))<0&&(y=xt(A+y,0)),ar(o,nn(d,3),y)):-1}function lx(o,d,y){var A,O=o==null?0:o.length;return O?(A=O-1,y!==l&&(A=vn(y),A=y<0?xt(O+A,0):r2(A,O-1)),ar(o,nn(d,3),A,!0)):-1}function tx(o){return o!=null&&o.length?Xt(o,1):[]}function rx(o){return o&&o.length?o[0]:l}function h3(o){var d=o==null?0:o.length;return d?o[d-1]:l}function ix(o,d){return o&&o.length&&d&&d.length?Hf(o,d):o}Cf=Tn(function(o,d){return at(o)?W4(o,Xt(d,1,at,!0)):[]}),fr=Tn(function(o,d){var y=h3(d);return at(y)&&(y=l),at(o)?W4(o,Xt(d,1,at,!0),nn(y,2)):[]}),V4=Tn(function(o,d){var y=h3(d);return at(y)&&(y=l),at(o)?W4(o,Xt(d,1,at,!0),l,y):[]}),Vn=Tn(function(o){var d=el(o,Wf);return d.length&&d[0]===o[0]?$f(d):[]}),wa=Tn(function(o){var d=h3(o),y=el(o,Wf);return d===h3(y)?d=l:y.pop(),y.length&&y[0]===o[0]?$f(y,nn(d,2)):[]}),kf=Tn(function(o){var d=h3(o),y=el(o,Wf);return(d=typeof d=="function"?d:l)&&y.pop(),y.length&&y[0]===o[0]?$f(y,l,d):[]}),i2=Tn(ix);var aK=ei(function(o,d){var y=o==null?0:o.length,A=Df(o,d);return vS(o,el(d,function(O){return ni(O,y)?+O:O}).sort(NS)),A});function ap(o){return o==null?o:KW.call(o)}var oK=Tn(function(o){return Fi(Xt(o,1,at,!0))}),cK=Tn(function(o){var d=h3(o);return at(d)&&(d=l),Fi(Xt(o,1,at,!0),nn(d,2))}),fK=Tn(function(o){var d=typeof(d=h3(o))=="function"?d:l;return Fi(Xt(o,1,at,!0),l,d)});function op(o){var d;return o&&o.length?(d=0,o=Ft(o,function(y){if(at(y))return d=xt(y.length,d),!0}),Q5(d,function(y){return el(o,or(y))})):[]}function sx(o,d){return o&&o.length?(o=op(o),d==null?o:el(o,function(y){return Lt(d,l,y)})):[]}var pK=Tn(function(o,d){return at(o)?W4(o,d):[]}),dK=Tn(function(o){return Xf(Ft(o,at))}),hK=Tn(function(o){var d=h3(o);return at(d)&&(d=l),Xf(Ft(o,at),nn(d,2))}),mK=Tn(function(o){var d=typeof(d=h3(o))=="function"?d:l;return Xf(Ft(o,at),l,d)}),gK=Tn(op),yK=Tn(function(o){var d=typeof(d=1<(d=o.length)?o[d-1]:l)=="function"?(o.pop(),d):l;return sx(o,d)});function ux(o){return(o=I(o)).__chain__=!0,o}function N6(o,d){return d(o)}var vK=ei(function(o){function d(D){return Df(D,o)}var y=o.length,A=y?o[0]:0,O=this.__wrapped__;return!(1<y||this.__actions__.length)&&O instanceof jn&&ni(A)?((O=O.slice(A,+A+(y?1:0))).__actions__.push({func:N6,args:[d],thisArg:l}),new F3(O,this.__chain__).thru(function(D){return y&&!D.length&&D.push(l),D})):this.thru(d)}),_K=E6(function(o,d,y){bl.call(o,y)?++o[y]:Qr(o,y,1)}),EK=DS(nx),bK=DS(lx);function ax(o,d){return(gn(o)?Tt:Li)(o,nn(d,3))}function ox(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}:iS)(o,nn(d,3))}var TK=E6(function(o,d,y){bl.call(o,y)?o[y].push(d):Qr(o,y,[d])}),SK=Tn(function(o,d,y){var A=-1,O=typeof d=="function",D=L2(o)?fe(o.length):[];return Li(o,function(B){D[++A]=O?Lt(d,B,y):K4(B,d,y)}),D}),xK=E6(function(o,d,y){Qr(o,y,d)});function R6(o,d){return(gn(o)?el:pS)(o,nn(d,3))}var AK=E6(function(o,d,y){o[y?0:1].push(d)},function(){return[[],[]]}),wK=Tn(function(o,d){var y;return o==null?[]:(1<(y=d.length)&&T2(o,d[0],d[1])?d=[]:2<y&&T2(d[0],d[1],d[2])&&(d=[d[0]]),gS(o,Xt(d,1),[]))}),I6=fp||function(){return $l.Date.now()};function cx(o,d,y){return d=y?l:d,d=o&&d==null?o.length:d,Zr(o,u,l,l,l,l,d)}function fx(o,d){var y;if(typeof d!="function")throw new f3(t);return o=vn(o),function(){return 0<--o&&(y=d.apply(this,arguments)),o<=1&&(d=l),y}}var cp=Tn(function(o,d,y){var A,O=1;return y.length&&(A=Kr(y,ka(cp)),O|=s),Zr(o,O,d,y,A)}),px=Tn(function(o,d,y){var A,O=3;return y.length&&(A=Kr(y,ka(px)),O|=s),Zr(d,O,o,y,A)});function dx(o,d,y){var A,O,D,B,V,K,ae=0,oe=!1,xe=!1,Ee=!0;if(typeof o!="function")throw new f3(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=I6();if(Se(Be))return Ne(Be);V=e0(We,function(Je){var tn=d-(Je-K);return xe?r2(tn,D-(Je-ae)):tn}(Be))}function Ne(Be){return V=l,Ee&&A?ge(Be):(A=O=l,B)}function Ie(){var Be
Line truncated
|
||||
`;if(o.replace(oe,function(Ee,ge,Se,We,Ne,Ie){return Se=Se||We,ae+=o.slice(V,Ie).replace(yt,qT),ge&&(A=!0,ae+=`' +
|
||||
__e(`+ge+`) +
|
||||
'`),Ne&&(O=!0,ae+=`';
|
||||
`+Ne+`;
|
||||
`)):N}(w,function(N,D){return Tt(m,function(B){var V="_."+B[0];D&B[1]&&!L3(N,V)&&N.push(V)}),N.sort()}(function(){var N=w.match(P2);return N?N[1].split(Bl):[]}(),y)))}function ox(o){var h=0,y=0;return function(){var w=mK(),N=16-(w-y);if(y=w,0<N){if(800<=++h)return arguments[0]}else h=0;return o.apply(l,arguments)}}function I6(o,h){var y=-1,w=o.length,N=w-1;for(h=h===l?w:h;++y<h;){var D=Zf(y,N),B=o[D];o[D]=o[y],o[y]=B}return o.length=h,o}var cx=function(){var o=D6(function(y){var w=[];return y.charCodeAt(0)===46&&w.push(""),y.replace(sn,function(N,D,B,V){w.push(B?V.replace(Gt,"$1"):D||N)}),w},function(y){return h.size===500&&h.clear(),y}),h=o.cache;return o}();function gr(o){var h;return typeof o=="string"||e3(o)?o:(h=o+"")=="0"&&1/o==-1/0?"-0":h}function pu(o){if(o!=null){try{return u6.call(o)}catch{}try{return o+""}catch{}}return""}function fx(o){var h;return o instanceof Un?o.clone():((h=new M3(o.__wrapped__,o.__chain__)).__actions__=D2(o.__actions__),h.__index__=o.__index__,h.__values__=o.__values__,h)}function px(o,h,y){var w=o==null?0:o.length;return w?((y=y==null?0:vn(y))<0&&(y=xt(w+y,0)),cr(o,nn(h,3),y)):-1}function dx(o,h,y){var w,N=o==null?0:o.length;return N?(w=N-1,y!==l&&(w=vn(y),w=y<0?xt(N+w,0):i2(w,N-1)),cr(o,nn(h,3),w,!0)):-1}function hx(o){return o!=null&&o.length?Wt(o,1):[]}function mx(o){return o&&o.length?o[0]:l}function h3(o){var h=o==null?0:o.length;return h?o[h-1]:l}function gx(o,h){return o&&o.length&&h&&h.length?Qf(o,h):o}Bf=Tn(function(o,h){return at(o)?X4(o,Wt(h,1,at,!0)):[]}),dr=Tn(function(o,h){var y=h3(h);return at(y)&&(y=l),at(o)?X4(o,Wt(h,1,at,!0),nn(y,2)):[]}),q4=Tn(function(o,h){var y=h3(h);return at(y)&&(y=l),at(o)?X4(o,Wt(h,1,at,!0),l,y):[]}),Vn=Tn(function(o){var h=el(o,rp);return h.length&&h[0]===o[0]?Wf(h):[]}),Aa=Tn(function(o){var h=h3(o),y=el(o,rp);return h===h3(y)?h=l:y.pop(),y.length&&y[0]===o[0]?Wf(y,nn(h,2)):[]}),Hf=Tn(function(o){var h=h3(o),y=el(o,rp);return(h=typeof h=="function"?h:l)&&y.pop(),y.length&&y[0]===o[0]?Wf(y,l,h):[]}),s2=Tn(gx);var IK=ni(function(o,h){var y=o==null?0:o.length,w=Vf(o,h);return RS(o,el(h,function(N){return li(N,y)?+N:N}).sort(jS)),w});function vp(o){return o==null?o:yK.call(o)}var CK=Tn(function(o){return Mi(Wt(o,1,at,!0))}),kK=Tn(function(o){var h=h3(o);return at(h)&&(h=l),Mi(Wt(o,1,at,!0),nn(h,2))}),PK=Tn(function(o){var h=typeof(h=h3(o))=="function"?h:l;return Mi(Wt(o,1,at,!0),l,h)});function _p(o){var h;return o&&o.length?(h=0,o=Ft(o,function(y){if(at(y))return h=xt(y.length,h),!0}),n6(h,function(y){return el(o,fr(y))})):[]}function yx(o,h){return o&&o.length?(o=_p(o),h==null?o:el(o,function(y){return Lt(h,l,y)})):[]}var DK=Tn(function(o,h){return at(o)?X4(o,h):[]}),LK=Tn(function(o){return tp(Ft(o,at))}),FK=Tn(function(o){var h=h3(o);return at(h)&&(h=l),tp(Ft(o,at),nn(h,2))}),MK=Tn(function(o){var h=typeof(h=h3(o))=="function"?h:l;return tp(Ft(o,at),l,h)}),$K=Tn(_p),jK=Tn(function(o){var h=typeof(h=1<(h=o.length)?o[h-1]:l)=="function"?(o.pop(),h):l;return yx(o,h)});function vx(o){return(o=I(o)).__chain__=!0,o}function C6(o,h){return h(o)}var UK=ni(function(o){function h(D){return Vf(D,o)}var y=o.length,w=y?o[0]:0,N=this.__wrapped__;return!(1<y||this.__actions__.length)&&N instanceof Un&&li(w)?((N=N.slice(w,+w+(y?1:0))).__actions__.push({func:C6,args:[h],thisArg:l}),new M3(N,this.__chain__).thru(function(D){return y&&!D.length&&D.push(l),D})):this.thru(h)}),BK=S6(function(o,h,y){bl.call(o,y)?++o[y]:Zr(o,y,1)}),HK=zS(px),qK=zS(dx);function _x(o,h){return(gn(o)?Tt:Fi)(o,nn(h,3))}function Ex(o,h){return(gn(o)?function(y,w){for(var N=y==null?0:y.length;N--&&w(y[N],N,y)!==!1;);return y}:gS)(o,nn(h,3))}var VK=S6(function(o,h,y){bl.call(o,y)?o[y].push(h):Zr(o,y,[h])}),zK=Tn(function(o,h,y){var w=-1,N=typeof h=="function",D=L2(o)?fe(o.length):[];return Fi(o,function(B){D[++w]=N?Lt(h,B,y):W4(B,h,y)}),D}),GK=S6(function(o,h,y){Zr(o,y,h)});function k6(o,h){return(gn(o)?el:SS)(o,nn(h,3))}var XK=S6(function(o,h,y){o[y?0:1].push(h)},function(){return[[],[]]}),WK=Tn(function(o,h){var y;return o==null?[]:(1<(y=h.length)&&S2(o,h[0],h[1])?h=[]:2<y&&S2(h[0],h[1],h[2])&&(h=[h[0]]),NS(o,Wt(h,1),[]))}),P6=bp||function(){return $l.Date.now()};function bx(o,h,y){return h=y?l:h,h=o&&h==null?o.length:h,ei(o,u,l,l,l,l,h)}function Tx(o,h){var y;if(typeof h!="function")throw new f3(t);return o=vn(o),function(){return 0<--o&&(y=h.apply(this,arguments)),o<=1&&(h=l),y}}var Ep=Tn(function(o,h,y){var w,N=1;return y.length&&(w=Yr(y,ka(Ep)),N|=s),ei(o,N,h,y,w)}),Sx=Tn(function(o,h,y){var w,N=3;return y.length&&(w=Yr(y,ka(Sx)),N|=s),ei(h,N,o,y,w)});function xx(o,h,y){var w,N,D,B,V,K,ae=0,oe=!1,xe=!1,Ee=!0;if(typeof o!="function")throw new f3(t);function ye(Be){var Je=w,tn=N;return w=N=l,ae=Be,B=o.apply(tn,Je)}function Se(Be){var Je=Be-K;return K===l||h<=Je||Je<0||xe&&D<=Be-ae}function We(){var Be=P6();if(Se(Be))return Oe(Be);V=Z4(We,function(Je){var tn=h-(Je-K);return xe?i2(tn,D-(Je-ae)):tn}(Be))}function Oe(Be){return V=l,Ee&&w?ye(Be):(w=N=l,B)}function Ie(){var Be
Line truncated
|
||||
`;if(o.replace(oe,function(Ee,ye,Se,We,Oe,Ie){return Se=Se||We,ae+=o.slice(V,Ie).replace(yt,eS),ye&&(w=!0,ae+=`' +
|
||||
__e(`+ye+`) +
|
||||
'`),Oe&&(N=!0,ae+=`';
|
||||
`+Oe+`;
|
||||
__p += '`),Se&&(ae+=`' +
|
||||
((__t = (`+Se+`)) == null ? '' : __t) +
|
||||
'`),V=Ie+Ee.length,Ee}),ae+=`';
|
||||
`,K=bl.call(d,"variable")&&d.variable){if(Ql.test(K))throw new Ye("Invalid `variable` option passed into `_.template`")}else ae=`with (obj) {
|
||||
`,K=bl.call(h,"variable")&&h.variable){if(Ql.test(K))throw new Ye("Invalid `variable` option passed into `_.template`")}else ae=`with (obj) {
|
||||
`+ae+`
|
||||
}
|
||||
`;if(ae=(O?ae.replace(On,""):ae).replace(Ge,"$1").replace(Hn,"$1;"),ae="function("+(K||"obj")+`) {
|
||||
`;if(ae=(N?ae.replace(Nn,""):ae).replace(Ge,"$1").replace(Hn,"$1;"),ae="function("+(K||"obj")+`) {
|
||||
`+(K?"":`obj || (obj = {});
|
||||
`)+"var __t, __p = ''"+(A?", __e = _.escape":"")+(O?`, __j = Array.prototype.join;
|
||||
`)+"var __t, __p = ''"+(w?", __e = _.escape":"")+(N?`, __j = Array.prototype.join;
|
||||
function print() { __p += __j.call(arguments, '') }
|
||||
`:`;
|
||||
`)+ae+`return __p
|
||||
}`,(oe=Ix(function(){return mn(D,xe+"return "+ae).apply(l,B)})).source=ae,hp(oe))throw oe;return oe},I.times=function(o,d){if((o=vn(o))<1||c<o)return[];var y=p,A=r2(o,p);for(d=nn(d),o-=p,A=Q5(A,d);++y<o;)d(y);return A},I.toFinite=ti,I.toInteger=vn,I.toLength=Ex,I.toLower=function(o){return il(o).toLowerCase()},I.toNumber=g3,I.toSafeInteger=function(o){return o?ou(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)?Wr(o):o&&(d=Z2(d))?$i(y=L3(o),Z5(y,d=L3(d)),e6(y,d)+1).join(""):o},I.trimEnd=function(o,d,y){return(o=il(o))&&(y||d===l)?o.slice(0,VT(o)+1):o&&(d=Z2(d))?$i(y=L3(o),0,e6(y,L3(d))+1).join(""):o},I.trimStart=function(o,d,y){return(o=il(o))&&(y||d===l)?o.replace(Jl,""):o&&(d=Z2(d))?$i(y=L3(o),Z5(y,L3(d))).join(""):o},I.truncate=function(o,O){var y,B=30,A="...",O=(Gl(O)&&(y="separator"in O?O.separator:y,B="length"in O?vn(O.length):B,A="omission"in O?Z2(O.omission):A),(o=il(o)).length);if((O=ru(o)?(D=L3(o)).length:O)<=B)return o;if((O=B-Sa(A))<1)return A;var D,B=D?$i(D,0,O).join(""):o.slice(0,O);if(y!==l)if(D&&(O+=B.length-O),mp(y)){if(o.slice(O).search(y)){var V,K=B;for((y=y.global?y:iu(y.source,il(u3.exec(y))+"g")).lastIndex=0;V=y.exec(K);)var ae=V.index;B=B.slice(0,ae===l?O:ae)}}else o.indexOf(Z2(y),O)!=O&&-1<(D=B.lastIndexOf(y))&&(B=B.slice(0,D));return B+A},I.unescape=function(o){return(o=il(o))&&Ol.test(o)?o.replace(Ke,jW):o},I.uniqueId=function(o){var d=++BW;return il(o)+d},I.upperCase=JK,I.upperFirst=vp,I.each=ax,I.eachRight=ox,I.first=rx,bp(I,(Ap={},pr(I,function(o,d){bl.call(I.prototype,d)||(Ap[d]=o)}),Ap),{chain:!1}),I.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){I[o].placeholder=I}),Tt(["drop","take"],function(o,d){jn.prototype[o]=function(y){y=y===l?1:xt(vn(y),0);var A=this.__filtered__&&!d?new jn(this):this.clone();return A.__filtered__?A.__takeCount__=r2(y,A.__takeCount__):A.__views__.push({size:r2(y,p),type:o+(A.__dir__<0?"Right":"")}),A},jn.prototype[o+"Right"]=function(y){return this.reverse()[o](y).reverse()}}),Tt(["filter","map","takeWhile"],function(o,d){var y=d+1,A=y==1||y==3;jn.prototype[o]=function(O){var D=this.clone();return D.__iteratees__.push({iteratee:nn(O,3),type:y}),D.__filtered__=D.__filtered__||A,D}}),Tt(["head","last"],function(o,d){var y="take"+(d?"Right":"");jn.prototype[o]=function(){return this[y](1).value()[0]}}),Tt(["initial","tail"],function(o,d){var y="drop"+(d?"":"Right");jn.prototype[o]=function(){return this.__filtered__?new jn(this):this[y](1)}}),jn.prototype.compact=function(){return this.filter(M2)},jn.prototype.find=function(o){return this.filter(o).head()},jn.prototype.findLast=function(o){return this.reverse().find(o)},jn.prototype.invokeMap=Tn(function(o,d){return typeof o=="function"?new jn(this):this.map(function(y){return K4(y,o,d)})}),jn.prototype.reject=function(o){return this.filter(k6(nn(o)))},jn.prototype.slice=function(o,d){o=vn(o);var y=this;return y.__filtered__&&(0<o||d<0)?new jn(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)},jn.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},jn.prototype.toArray=function(){return this.take(p)},pr(jn.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,ur([We],ae)),A&&xe?We[0]:We}var V,K=this.__wrapped__,ae=A?[1]:arguments,Se=K instanceof jn,Ee=ae[0],oe=Se||gn(K),xe=(oe&&y&&typeof Ee=="function"&&Ee.length!=1&&(Se=oe=!1),this.__chain__),Ee=!!this.__actions__.length,ge=D&&!xe,Se=Se&&!Ee;return!D&&oe?(K=Se?K:new jn(this),(V=o.apply(K,ae)).__actions__.push({func:N6,args:[B],thisArg:l}),new F3(V,xe)):ge&&Se?o.apply(this,ae):(V=this.thru(B),ge?A?V.value()[0]:V.value():V)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(o){var d=t6[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)})}}),pr(jn.prototype,function(o,d){var y,A=I[d];A&&(y=A.name+"",bl.call(Na,y)||(Na[y]=[]),Na[y].push({name:d,func:A}))}),Na[b6(l,2).name]=[{name:"wrapper",func:l}],jn.prototype.clone=function(){var o=new jn(this.__wrapped__);return o.__actions__=D2(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=D2(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=D2(this.__views__),o},jn.prototype.reverse=function(){var o;return this.__filtered__?((o=new jn(this)).__dir__=-1,o.__filtered__=!0):(o=this.clone()).__dir__*=-1,o},jn.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 Hl=-1,lt=tn.length;++Hl<lt;){var v
Line truncated
|
||||
`)){let a=u.trim();if(a)if(a.startsWith("#")){if(a.startsWith("#EXT")){let c=ome(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=cme(l,e);return t.source=n,t}var fme=["#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"],pme=["#EXT-X-MEDIA"],hE=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let l of e)if(l.startsWith("#"))if(fme.some(t=>l.startsWith(t)))super.push(l);else{if(this.includes(l)){if(pme.some(t=>l.startsWith(t)))continue;Le(`Redundant item (${l})`)}super.push(l)}else super.push(l);return this.length}};function vE(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 dme(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 cH(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=${uH(n.iv)}`)),n.format&&t.push(`KEYFORMAT="${n.format}"`),n.formatVersion&&t.push(`KEYFORMATVERSIONS="${n.formatVersion}"`),`${l}:${t.join(",")}`}function hme(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=${vE(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(bc(r))}if(e.video.length>0){t.push(`VIDEO="${e.video[0].groupId}"`);for(let r of e.video)n.push(bc(r))}if(e.subtitles.length>0){t.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let r of e.subtitles)n.push(bc(r))}if(eme().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(bc(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 bc(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 mme(n,e,l,t,r=1,i=null){let s=!1,u="";if(e.discontinuity&&n.push("#EXT-X-DISCONTINUITY"),e.key){let c=cH(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="${cE(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:${oE(e.programDateTime)}`),e.dateRange&&n.push(function(c){let f=[`ID="${c.id}"`];c.start&&f.push(`START-DATE="${oE(c.start)}"`),c.end&&f.push(`END-DATE="${oE(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}=${uH(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 pH="hls_cache",Lc=[],ra={},_5={},ta={},Dc="";function gme(n,e){if(Lc.push(n),ra[n]=e,Lc.length>5){let l=Lc.shift();yme(l)}}function yme(n){delete ra[n],delete Lc[n],new JSFile(pH+"/"+n).delete()}function vme(n,e){if(e.variants)for(let l of e.variants)l.uri.startsWith("http")||(l.uri=_E(n,l.uri));if(e.segments)for(let l of e.segments)l.uri.startsWith("http")||(l.uri=_E(n,l.uri)),l.key&&l.key.uri&&!l.key.uri.startsWith("http")&&(l.key.uri=_E(n,l.key.uri));return e}async function dH(n,e){let l=md5X(n);if(ra[l])return ra[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=vme(r,oH(i));return gme(l,{code:t.code,plist:s,key:l,headers:t.headers}),ra[l]}return{}}async function hH(n,e,l){if(!ra[n])return{};let r=ra[n].plist.segments,i=!ta[n];if(i){ta[n]={};for(let f of r){let p=md5X(f.uri+f.mediaSequenceNumber.toString());ta[n][p]={file:pH+"/"+n+"/"+p,uri:f.uri,key:p,index:f.mediaSequenceNumber,order:f.mediaSequenceNumber,state:-1,read:!1}}}for(let f in ta[n]){let p=ta[n][f];p.index>=e?p.order=p.index-e:p.order=r.length-e+p.index}i&&_me(n,5,l);let s=r[e],u=md5X(s.uri+s.mediaSequenceNumber.toString()),a=ta[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&&mH(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 mH(n,e,l){if(e.state>=0||!_5[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 _me(n,e,l){Dc&&Dc!=n&&delete _5[Dc],Dc=n,_5[n]=!0;for(let t=0;t<e&&_5[n];t++)new Promise(function(r,i){(async function s(){if(!_5[n]){r();return}let u=_e.pickBy(ta[n],function(c){return c.state==-1}),a=_e.minBy(Object.values(u),function(c){return c.order});if(!a){r();return}await mH(n,a,l),setTimeout(s,5)})()})}function _E(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 gH(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 Fc=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":Mr,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"),Ts(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=Ec(l),a=e;_e.isEmpty(u)||(a=e+"?"+u);let c=new c5(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(_e.isEmpty(t))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return ul(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]&&f_e[l])&&(l==="set-cookie"?e[l]?e[l].push(t):e[l]=[t]:e[l]=e[l]?e[l]+", "+t:t)}),e};var Nz=Symbol("internals");function P5(n){return n&&String(n).trim().toLowerCase()}function pf(n){return n===!1||n==null?n:X.isArray(n)?n.map(pf):String(n)}function p_e(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 d_e=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function gb(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 h_e(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,l,t)=>l.toUpperCase()+t)}function m_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 I4=class{constructor(e){e&&this.set(e)}set(e,l,t){let r=this;function i(u,a,c){let f=P5(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]=pf(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())&&!d_e(e)?s(Oz(e),l):e!=null&&i(l,e,t),this}get(e,l){if(e=P5(e),e){let t=X.findKey(this,e);if(t){let r=this[t];if(!l)return r;if(l===!0)return p_e(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=P5(e),e){let t=X.findKey(this,e);return!!(t&&this[t]!==void 0&&(!l||gb(this,this[t],t,l)))}return!1}delete(e,l){let t=this,r=!1;function i(s){if(s=P5(s),s){let u=X.findKey(t,s);u&&(!l||gb(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||gb(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]=pf(r),delete l[i];return}let u=e?h_e(i):String(i).trim();u!==i&&delete l[i],l[u]=pf(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[Nz]=this[Nz]={accessors:{}}).accessors,r=this.prototype;function i(s){let u=P5(s);t[u]||(m_e(r,s),t[u]=!0)}return X.isArray(e)?e.forEach(i):i(e),this}};I4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(I4.prototype,({value:n},e)=>{let l=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(t){this[l]=t}}});X.freezeMethods(I4);var kt=I4;function D5(n,e){let l=this||R4,t=e||l,r=kt.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 L5(n){return!!(n&&n.__CANCEL__)}function Rz(n,e,l){Fe.call(this,n??"canceled",Fe.ERR_CANCELED,e,l),this.name="CanceledError"}X.inherits(Rz,Fe,{__CANCEL__:!0});var lr=Rz;function Ns(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 yb(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function vb(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function pa(n,e){return n&&!yb(e)?vb(n,e):e}var Qz=At(Cz(),1),Zz=At(require("http"),1),eG=At(require("https"),1),nG=At(require("util"),1),lG=At($z(),1),Ii=At(require("zlib"),1);var ha="1.6.7";function B5(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}var k_e=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Cb(n,e,l){let t=l&&l.Blob||Ct.classes.Blob,r=B5(n);if(e===void 0&&t&&(e=!0),r==="data"){n=r.length?n.slice(r.length+1):n;let i=k_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 ma=At(require("stream"),1);var Uz=At(require("stream"),1);function P_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 jz=P_e;function D_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 df=D_e;var hf=Symbol("internals"),kb=class extends Uz.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[hf]={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=df(t.ticksRate*e.samplesCount,t.timeWindow);this.on("newListener",u=>{u==="progress"&&(t.isCaptured||(t.isCaptured=!0))});let i=0;t.updateProgress=jz(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[hf];return l.onReadCallback&&l.onReadCallback(),super._read(e)}_transform(e,l,t){let r=this,i=this[hf],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[hf].length=+e,this}},Pb=kb;var tG=At(require("events"),1);var Hz=require("util"),qz=require("stream");var{asyncIterator:Bz}=Symbol,L_e=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[Bz]?yield*n[Bz]():yield n},mf=L_e;var F_e=X.ALPHABET.ALPHA_DIGIT+"-_",H5=new Hz.TextEncoder,Rs=`\r
|
||||
`,M_e=H5.encode(Rs),$_e=2,Db=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=H5.encode(String(l).replace(/\r?\n|\r\n?/g,Rs)):i+=`Content-Type: ${l.type||"application/octet-stream"}${Rs}`,this.headers=H5.encode(i+Rs),this.contentLength=r?l.byteLength:l.size,this.size=this.headers.byteLength+this.contentLength+$_e,this.name=e,this.value=l}async*encode(){yield this.headers;let{value:e}=this;X.isTypedArray(e)?yield e:yield*mf(e),yield M_e}static escapeName(e){return String(e).replace(/[\r\n"]/g,l=>({"\r":"%0D","\n":"%0A",'"':"%22"})[l])}},j_e=(n,e,l)=>{let{tag:t="form-data-boundary",size:r=25,boundary:i=t+"-"+X.generateString(r,F_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=H5.encode("--"+i+Rs),u=H5.encode("--"+i+"--"+Rs+Rs),a=u.byteLength,c=Array.from(n.entries()).map(([p,m])=>{let h=new Db(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),qz.Readable.from(async function*(){for(let p of c)yield s,yield*p.encode();yield u}())},Vz=j_e;var zz=At(require("stream"),1),Lb=class extends zz.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)}},Gz=Lb;var U_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,Xz=U_e;var Wz={flush:Ii.default.constants.Z_SYNC_FLUSH,finishFlush:Ii.default.constants.Z_SYNC_FLUSH},B_e={flush:Ii.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ii.default.constants.BROTLI_OPERATION_FLUSH},Kz=X.isFunction(Ii.default.createBrotliDecompress),{http:H_e,https:q_e}=lG.default,V_e=/https:?/,Yz=Ct.protocols.map(n=>n+":");function z_e(n,e){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.config&&n.beforeRedirects.config(n,e)}function rG(n,e,l){let t=e;if(!t&&t!==!1){let r=(0,Qz.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){rG(i,e,i.href)}}var G_e=typeof process<"u"&&X.kindOf(process)==="process",X_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)}),W_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)}},Jz=(n,e)=>W_e(X.isObject(n)?n:{address:n,family:e}),iG=G_e&&function(e){return X_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=Xz(u,ye=>X.isArray(ye)?ye:[ye]);u=(ye,q,re)=>{ue(ye,q,(te,ne,Vl)=>{if(te)return re(te);let On=X.isArray(ne)?ne.map(Ge=>Jz(Ge)):[Jz(ne,Vl)];q.all?re(te,On):re(te,On[0].address,On[0].family)})}}let _=new tG.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 lr(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=pa(e.baseURL,e.url),v=new URL(x,"http://localhost"),b=v.protocol||Yz[0];if(b==="data:"){let ue;if(p!=="GET")return Ns(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{ue=Cb(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=ma.default.Readable.from(ue)),Ns(t,r,{data:ue,status:200,statusText:"OK",headers:new kt,config:e})}if(Yz.indexOf(b)===-1)return r(new Fe("Unsupported protocol "+b,Fe.ERR_BAD_REQUEST,e));let w=kt.from(e.headers).normalize();w.set("User-Agent","axios/"+ha,!1);let R=e.onDownloadProgress,N=e.onUploadProgress,k=e.maxRate,j,L;if(X.isSpecCompliantForm(s)){let ue=w.getContentType(/boundary=([-_\w\d]{10,70})/i);s=Vz(s,ye=>{w.set(ye)},{tag:`axios-${ha}-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 nG.default.promisify(s.getLength).call(s);
Line truncated
|
||||
`+i.map(cG).join(`
|
||||
`):" "+cG(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:Fb};function Mb(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new lr(null,n)}function yf(n){return Mb(n),n.headers=kt.from(n.headers),n.data=D5.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),gf.getAdapter(n.adapter||R4.adapter)(n).then(function(t){return Mb(n),t.data=D5.call(n,n.transformResponse,t),t.headers=kt.from(t.headers),t},function(t){return L5(t)||(Mb(n),t&&t.response&&(t.response.data=D5.call(n,n.transformResponse,t.response),t.response.headers=kt.from(t.response.headers))),Promise.reject(t)})}var fG=n=>n instanceof kt?n.toJSON():n;function Ci(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(fG(c),fG(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 $b={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{$b[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});var pG={};$b.transitional=function(e,l,t){function r(i,s){return"[Axios v"+ha+"] 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&&!pG[s]&&(pG[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 J_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 vf={assertOptions:J_e,validators:$b};var Is=vf.validators,k4=class{constructor(e){this.defaults=e,this.interceptors={request:new pb,response:new pb}}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=Ci(this.defaults,l);let{transitional:t,paramsSerializer:r,headers:i}=l;t!==void 0&&vf.assertOptions(t,{silentJSONParsing:Is.transitional(Is.boolean),forcedJSONParsing:Is.transitional(Is.boolean),clarifyTimeoutError:Is.transitional(Is.boolean)},!1),r!=null&&(X.isFunction(r)?l.paramsSerializer={serialize:r}:vf.assertOptions(r,{encode:Is.function,serialize:Is.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=kt.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=[yf.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=yf.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=Ci(this.defaults,e);let l=pa(e.baseURL,e.url);return fa(l,e.params,e.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(e){k4.prototype[e]=function(l,t){return this.request(Ci(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(Ci(u||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}k4.prototype[e]=l(),k4.prototype[e+"Form"]=l(!0)});var q5=k4;var jb=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 lr(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}}},dG=jb;function Ub(n){return function(l){return n.apply(null,l)}}function Bb(n){return X.isObject(n)&&n.isAxiosError===!0}var Hb={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(Hb).forEach(([n,e])=>{Hb[e]=n});var hG=Hb;function mG(n){let e=new q5(n),l=I5(q5.prototype.request,e);return X.extend(l,q5.prototype,e,{allOwnKeys:!0}),X.extend(l,e,null,{allOwnKeys:!0}),l.create=function(r){return mG(Ci(n,r))},l}var Et=mG(R4);Et.Axios=q5;Et.CanceledError=lr;Et.CancelToken=dG;Et.isCancel=L5;Et.VERSION=ha;Et.toFormData=Os;Et.AxiosError=Fe;Et.Cancel=Et.CanceledError;Et.all=function(e){return Promise.all(e)};Et.spread=Ub;Et.isAxiosError=Bb;Et.mergeConfig=Ci;Et.AxiosHeaders=kt;Et.formToJSON=n=>ff(X.isHTMLForm(n)?new FormData(n):n);Et.getAdapter=gf.getAdapter;Et.HttpStatusCode=hG;Et.default=Et;var P4=Et;var{Axios:oke,AxiosError:cke,CanceledError:fke,isCancel:pke,CancelToken:dke,VERSION:hke,all:mke,Cancel:gke,isAxiosError:yke,spread:vke,toFormData:gG,AxiosHeaders:_ke,HttpStatusCode:Eke,formToJSON:bke,getAdapter:Tke,mergeConfig:Ske}=P4;var xG=At(require("https"),1),AG=At(require("crypto"),1),wG=At(TG(),1),zb={};globalThis.dataBase=null;globalThis.local={get:async function(n,e){return await iEe(n,e)},set:asy
Line truncated
|
||||
`},timeout:.1}),await dataBase.push(t,zb)}globalThis.localLog={set:async function(n,e,l){aEe(n,e,l)}};function uEe(){ga.default.existsSync("log")||ga.default.mkdirSync("log");let n="log/info.log";return ga.default.existsSync(n)?ga.default.readFileSync(n).toString():(ga.default.writeFileSync(n,""),"")}function aEe(n){ga.default.writeFileSync("log/info.log",uEe()+`
|
||||
`+n)}globalThis.req=oEe;async function oEe(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=SG.default.stringify(l,{encode:!1}))):t==="form-data"&&(a["Content-Type"]="multipart/form-data",l=gG(l));let c=r===1||r===2?"arraybuffer":void 0,f;u?f=wG.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):f=xG.default.Agent({rejectUnauthorized:!1});let p=await P4(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=cEe;function cEe(n){return AG.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 fEe=["DEBUG","INFO","WARNING","ERROR"];var ks=class{constructor(e,l="DEBUG"){this.app_name=e,this.level=l,this.level_index=fEe.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 al=class extends wl{constructor(){super(),this.jadeLog=new ks(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 _e.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return _e.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 Jn,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
|
||||
`,"").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 Cn,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",!_e.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 Jn,t=e('[class="header-left"]');l.vod_name=e(e(t).find("h4")).text();let r=Tl(/<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=Tl(/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||_e.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 Wb;var Kb=class extends al{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 Kb;async function DG(n,e){return await Ds.init(n,e)}async function LG(n,e){return await Ds.home(n,e)}async function hEe(n,e){return await Ds.homeVod(n,e)}async function FG(n,e){return await Ds.category(n,e)}async function MG(n,e){return await Ds.detail(n,e)}async function $G(n,e){return await Ds.play(n,e)}async function jG(n,e){return await Ds.search(n,e)}async function mEe(n,e){return await Ds.proxy(n,e)}var UG={meta:{key:cl.getJSName(),name:cl.getName(),type:cl.getType()},api:async n=>{n.post("/init",DG),n.post("/home",LG),n.post("/category",FG),n.post("/detail",MG),n.post("/play",$G),n.post("/search",jG),n.get("/proxy/:what/:ids/:end",mEe)},spider:{init:DG,home:LG,homeVod:hEe,category:FG,detail:MG,play:$G,search:jG}};var Yb=class extends al{constructor(){super()}getName(){return"\u2503\u63A8\u9001\u2503"}getAppName(){return"\u63A8\u9001"}getJSName(){return"push"}getType(){return 4}async init(e,l){return await this.jadeLog.debug("\u521D\u59CB\u5316",!0),await Bc(e.server.config.alitoken),{}}async check(e,l){let t=e.body.clip;return await this.jadeLog.debug(`\u526A\u5207\u677F\u8F93\u5165\u5185\u5BB9\u4E3A:${t}`),t.startsWith("http")?(await this.jadeLog.debug("\u6EE1\u8DB3\u63A8\u9001\u6761\u4EF6",!0),"true"):(await this.jadeLog.debug("\u4E0D\u6EE1\u8DB3\u63A8\u9001\u6761\u4EF6",!0),"false")}async parseVodDetailfromJson(e){let l=new Jn;l.vod_pic=$r+"/resources/push.jpg";let t=ZB.exec(e);if(t!==null&&t.length>0){let r=await MH([e]);l.vod_play_url=r.vod_play_url,l.vod_play_from=r.vod_play_from}else l.vod_play_from="\u63A8\u9001",l.vod_play_url="\u63A8\u9001$"+e;return l}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setPlay(e,l,t){e==="\u63A8\u9001"?this.playUrl=l:this.playUrl=JSON.parse(await $H(e,l,t)).url}},_f=new Yb;async function gEe(n,e){return await _f.init(n,e)}async function yEe(n,e){return await _f.check(n,e)}async function vEe(n,e){return await _f.detail(n,e)}async function _Ee(n,e){return await _f.play(n,e)}var BG={meta:{key:"push",name:"\u63A8\u9001",type:4},api:async n=>{n.post("/init",gEe),n.post("/support",yEe),n.post("/detail",vEe),n.post("/play",_Ee)}};var Jb=class extends L4{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!1}getAppName(){return"\u91CF\u5B50\u8D44\u6E9018+"}getName(){return"\u{1F51E}\u2503\u91CF\u5B50\u8D44\u6E9018+\u2503\u{1F51E}"}getJSName(){return"liangzi18"}getType(){return 3}async spiderInit(e){await super.spiderInit(e)}async init(e){await super.init
Line truncated
|
||||
}`,(oe=Bx(function(){return mn(D,xe+"return "+ae).apply(l,B)})).source=ae,xp(oe))throw oe;return oe},I.times=function(o,h){if((o=vn(o))<1||c<o)return[];var y=p,w=i2(o,p);for(h=nn(h),o-=p,w=n6(w,h);++y<o;)h(y);return w},I.toFinite=ri,I.toInteger=vn,I.toLength=Cx,I.toLower=function(o){return il(o).toLowerCase()},I.toNumber=g3,I.toSafeInteger=function(o){return o?ou(vn(o),-9007199254740991,c):o===0?o:0},I.toString=il,I.toUpper=function(o){return il(o).toUpperCase()},I.trim=function(o,h,y){return(o=il(o))&&(y||h===l)?Kr(o):o&&(h=Z2(h))?ji(y=F3(o),l6(y,h=F3(h)),t6(y,h)+1).join(""):o},I.trimEnd=function(o,h,y){return(o=il(o))&&(y||h===l)?o.slice(0,nS(o)+1):o&&(h=Z2(h))?ji(y=F3(o),0,t6(y,F3(h))+1).join(""):o},I.trimStart=function(o,h,y){return(o=il(o))&&(y||h===l)?o.replace(Jl,""):o&&(h=Z2(h))?ji(y=F3(o),l6(y,F3(h))).join(""):o},I.truncate=function(o,N){var y,B=30,w="...",N=(Gl(N)&&(y="separator"in N?N.separator:y,B="length"in N?vn(N.length):B,w="omission"in N?Z2(N.omission):w),(o=il(o)).length);if((N=ru(o)?(D=F3(o)).length:N)<=B)return o;if((N=B-Sa(w))<1)return w;var D,B=D?ji(D,0,N).join(""):o.slice(0,N);if(y!==l)if(D&&(N+=B.length-N),wp(y)){if(o.slice(N).search(y)){var V,K=B;for((y=y.global?y:iu(y.source,il(u3.exec(y))+"g")).lastIndex=0;V=y.exec(K);)var ae=V.index;B=B.slice(0,ae===l?N:ae)}}else o.indexOf(Z2(y),N)!=N&&-1<(D=B.lastIndexOf(y))&&(B=B.slice(0,D));return B+w},I.unescape=function(o){return(o=il(o))&&Nl.test(o)?o.replace(Ke,uK):o},I.uniqueId=function(o){var h=++oK;return il(o)+h},I.upperCase=_Y,I.upperFirst=Op,I.each=_x,I.eachRight=Ex,I.first=mx,Cp(I,(Lp={},hr(I,function(o,h){bl.call(I.prototype,h)||(Lp[h]=o)}),Lp),{chain:!1}),I.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(o){I[o].placeholder=I}),Tt(["drop","take"],function(o,h){Un.prototype[o]=function(y){y=y===l?1:xt(vn(y),0);var w=this.__filtered__&&!h?new Un(this):this.clone();return w.__filtered__?w.__takeCount__=i2(y,w.__takeCount__):w.__views__.push({size:i2(y,p),type:o+(w.__dir__<0?"Right":"")}),w},Un.prototype[o+"Right"]=function(y){return this.reverse()[o](y).reverse()}}),Tt(["filter","map","takeWhile"],function(o,h){var y=h+1,w=y==1||y==3;Un.prototype[o]=function(N){var D=this.clone();return D.__iteratees__.push({iteratee:nn(N,3),type:y}),D.__filtered__=D.__filtered__||w,D}}),Tt(["head","last"],function(o,h){var y="take"+(h?"Right":"");Un.prototype[o]=function(){return this[y](1).value()[0]}}),Tt(["initial","tail"],function(o,h){var y="drop"+(h?"":"Right");Un.prototype[o]=function(){return this.__filtered__?new Un(this):this[y](1)}}),Un.prototype.compact=function(){return this.filter(M2)},Un.prototype.find=function(o){return this.filter(o).head()},Un.prototype.findLast=function(o){return this.reverse().find(o)},Un.prototype.invokeMap=Tn(function(o,h){return typeof o=="function"?new Un(this):this.map(function(y){return W4(y,o,h)})}),Un.prototype.reject=function(o){return this.filter(L6(nn(o)))},Un.prototype.slice=function(o,h){o=vn(o);var y=this;return y.__filtered__&&(0<o||h<0)?new Un(y):(o<0?y=y.takeRight(-o):o&&(y=y.drop(o)),h!==l?(h=vn(h))<0?y.dropRight(-h):y.take(h-o):y)},Un.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Un.prototype.toArray=function(){return this.take(p)},hr(Un.prototype,function(o,h){var y=/^(?:filter|find|map|reject)|While$/.test(h),w=/^(?:head|last)$/.test(h),N=I[w?"take"+(h=="last"?"Right":""):h],D=w||/^find/.test(h);N&&(I.prototype[h]=function(){function B(We){return We=N.apply(I,or([We],ae)),w&&xe?We[0]:We}var V,K=this.__wrapped__,ae=w?[1]:arguments,Se=K instanceof Un,Ee=ae[0],oe=Se||gn(K),xe=(oe&&y&&typeof Ee=="function"&&Ee.length!=1&&(Se=oe=!1),this.__chain__),Ee=!!this.__actions__.length,ye=D&&!xe,Se=Se&&!Ee;return!D&&oe?(K=Se?K:new Un(this),(V=o.apply(K,ae)).__actions__.push({func:C6,args:[B],thisArg:l}),new M3(V,xe)):ye&&Se?o.apply(this,ae):(V=this.thru(B),ye?w?V.value()[0]:V.value():V)})}),Tt(["pop","push","shift","sort","splice","unshift"],function(o){var h=s6[o],y=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",w=/^(?:pop|shift)$/.test(o);I.prototype[o]=function(){var N,D=arguments;return w&&!this.__chain__?(N=this.value(),h.apply(gn(N)?N:[],D)):this[y](function(B){return h.apply(gn(B)?B:[],D)})}}),hr(Un.prototype,function(o,h){var y,w=I[h];w&&(y=w.name+"",bl.call(Oa,y)||(Oa[y]=[]),Oa[y].push({name:h,func:w}))}),Oa[x6(l,2).name]=[{name:"wrapper",func:l}],Un.prototype.clone=function(){var o=new Un(this.__wrapped__);return o.__actions__=D2(this.__actions__),o.__dir__=this.__dir__,o.__filtered__=this.__filtered__,o.__iteratees__=D2(this.__iteratees__),o.__takeCount__=this.__takeCount__,o.__views__=D2(this.__views__),o},Un.prototype.reverse=function(){var o;return this.__filtered__?((o=new Un(this)).__dir__=-1,o.__filtered__=!0):(o=this.clone()).__dir__*=-1,o},Un.prototype.value=function(){var o=this.__wrapped__.value(),h=this.__dir__,y=gn(o),w=h<0,N=y?o.length:0,D=function(Be,Je,tn){for(var Hl=-1,lt=tn.length;++Hl<lt;){var v
Line truncated
|
||||
`)){let a=u.trim();if(a)if(a.startsWith("#")){if(a.startsWith("#EXT")){let c=Cme(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=kme(l,e);return t.source=n,t}var Pme=["#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"],Dme=["#EXT-X-MEDIA"],xE=class extends Array{constructor(e){super(),this.baseUri=e}push(...e){for(let l of e)if(l.startsWith("#"))if(Pme.some(t=>l.startsWith(t)))super.push(l);else{if(this.includes(l)){if(Dme.some(t=>l.startsWith(t)))continue;Le(`Redundant item (${l})`)}super.push(l)}else super.push(l);return this.length}};function OE(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 Lme(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 _H(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=${gH(n.iv)}`)),n.format&&t.push(`KEYFORMAT="${n.format}"`),n.formatVersion&&t.push(`KEYFORMATVERSIONS="${n.formatVersion}"`),`${l}:${t.join(",")}`}function Fme(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=${OE(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(Oc(r))}if(e.video.length>0){t.push(`VIDEO="${e.video[0].groupId}"`);for(let r of e.video)n.push(Oc(r))}if(e.subtitles.length>0){t.push(`SUBTITLES="${e.subtitles[0].groupId}"`);for(let r of e.subtitles)n.push(Oc(r))}if(Tme().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(Oc(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 Oc(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 Mme(n,e,l,t,r=1,i=null){let s=!1,u="";if(e.discontinuity&&n.push("#EXT-X-DISCONTINUITY"),e.key){let c=_H(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="${EE(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:${_E(e.programDateTime)}`),e.dateRange&&n.push(function(c){let f=[`ID="${c.id}"`];c.start&&f.push(`START-DATE="${_E(c.start)}"`),c.end&&f.push(`END-DATE="${_E(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}=${gH(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 d=m.value?`:${m.value}`:"";c.push(`#${m.tagName}${d}`)}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 d=[];if(d.push("TYPE=PART",`URI="${m.uri}"`),m.byterange){let{offset:g,length:_}=m.byterange;d.push(`BYTERANGE-START=${g}`),_&&d.push(`BYTERANGE-LENGTH=${_}`)}c.push(`#EXT-X-PRELOAD-HINT:${d.join(",")}`),p=!0}else{let d=[];d.push(
Line truncated
|
||||
`)}var bH="hls_cache",Hc=[],ra={},v5={},ta={},Bc="";function $me(n,e){if(Hc.push(n),ra[n]=e,Hc.length>5){let l=Hc.shift();jme(l)}}function jme(n){delete ra[n],delete Hc[n],new JSFile(bH+"/"+n).delete()}function Ume(n,e){if(e.variants)for(let l of e.variants)l.uri.startsWith("http")||(l.uri=RE(n,l.uri));if(e.segments)for(let l of e.segments)l.uri.startsWith("http")||(l.uri=RE(n,l.uri)),l.key&&l.key.uri&&!l.key.uri.startsWith("http")&&(l.key.uri=RE(n,l.key.uri));return e}async function TH(n,e){let l=md5X(n);if(ra[l])return ra[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=Ume(r,vH(i));return $me(l,{code:t.code,plist:s,key:l,headers:t.headers}),ra[l]}return{}}async function SH(n,e,l){if(!ra[n])return{};let r=ra[n].plist.segments,i=!ta[n];if(i){ta[n]={};for(let f of r){let p=md5X(f.uri+f.mediaSequenceNumber.toString());ta[n][p]={file:bH+"/"+n+"/"+p,uri:f.uri,key:p,index:f.mediaSequenceNumber,order:f.mediaSequenceNumber,state:-1,read:!1}}}for(let f in ta[n]){let p=ta[n][f];p.index>=e?p.order=p.index-e:p.order=r.length-e+p.index}i&&Bme(n,5,l);let s=r[e],u=md5X(s.uri+s.mediaSequenceNumber.toString()),a=ta[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&&xH(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 d=new JSFile(a.file+".dl");await d.open("r"),async function g(){let _=await d.size();if(_>f){var S=await d.read(_-f,f);await c.write(S),f=_}if(a.state==1||a.state<0){c.done(),await d.close(),await d.delete(),a.read=!1,p();return}setTimeout(g,5)}()}),{buffer:3,content:c}}}async function xH(n,e,l){if(e.state>=0||!v5[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 Bme(n,e,l){Bc&&Bc!=n&&delete v5[Bc],Bc=n,v5[n]=!0;for(let t=0;t<e&&v5[n];t++)new Promise(function(r,i){(async function s(){if(!v5[n]){r();return}let u=pe.pickBy(ta[n],function(c){return c.state==-1}),a=pe.minBy(Object.values(u),function(c){return c.order});if(!a){r();return}await xH(n,a,l),setTimeout(s,5)})()})}function RE(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 wH(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 qc=class{constructor(){this.siteUrl="https://search.youku.com",this.reconnectTimes=0,this.maxReconnectTimes=5,this.jadeLog=new N3(this.getAppName(),"DEBUG")}getAppName(){return"\u5F39\u5E55"}getHeader(){return{"User-Agent":$r,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"),lr(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=xc(l),a=e;pe.isEmpty(u)||(a=e+"?"+u);let c=new o5(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(pe.isEmpty(t))await this.jadeLog.error("html\u83B7\u53D6\u5931\u8D25",!0);else return ul(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]&&P_e[l])&&(l==="set-cookie"?e[l]?e[l].push(t):e[l]=[t]:e[l]=e[l]?e[l]+", "+t:t)}),e};var Gz=Symbol("internals");function F5(n){return n&&String(n).trim().toLowerCase()}function Tf(n){return n===!1||n==null?n:X.isArray(n)?n.map(Tf):String(n)}function D_e(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 L_e=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Nb(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 F_e(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,l,t)=>l.toUpperCase()+t)}function M_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 R4=class{constructor(e){e&&this.set(e)}set(e,l,t){let r=this;function i(u,a,c){let f=F5(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]=Tf(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())&&!L_e(e)?s(zz(e),l):e!=null&&i(l,e,t),this}get(e,l){if(e=F5(e),e){let t=X.findKey(this,e);if(t){let r=this[t];if(!l)return r;if(l===!0)return D_e(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=F5(e),e){let t=X.findKey(this,e);return!!(t&&this[t]!==void 0&&(!l||Nb(this,this[t],t,l)))}return!1}delete(e,l){let t=this,r=!1;function i(s){if(s=F5(s),s){let u=X.findKey(t,s);u&&(!l||Nb(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||Nb(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]=Tf(r),delete l[i];return}let u=e?F_e(i):String(i).trim();u!==i&&delete l[i],l[u]=Tf(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[Gz]=this[Gz]={accessors:{}}).accessors,r=this.prototype;function i(s){let u=F5(s);t[u]||(M_e(r,s),t[u]=!0)}return X.isArray(e)?e.forEach(i):i(e),this}};R4.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);X.reduceDescriptors(R4.prototype,({value:n},e)=>{let l=e[0].toUpperCase()+e.slice(1);return{get:()=>n,set(t){this[l]=t}}});X.freezeMethods(R4);var kt=R4;function M5(n,e){let l=this||O4,t=e||l,r=kt.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 $5(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 rr=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 Ob(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function Rb(n,e){return e?n.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):n}function pa(n,e){return n&&!Ob(e)?Rb(n,e):e}var gG=wt(Kz(),1),yG=wt(require("http"),1),vG=wt(require("https"),1),_G=wt(require("util"),1),EG=wt(lG(),1),Ci=wt(require("zlib"),1);var ha="1.6.7";function V5(n){let e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return e&&e[1]||""}var eEe=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Hb(n,e,l){let t=l&&l.Blob||Ct.classes.Blob,r=V5(n);if(e===void 0&&t&&(e=!0),r==="data"){n=r.length?n.slice(r.length+1):n;let i=eEe.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 ma=wt(require("stream"),1);var rG=wt(require("stream"),1);function nEe(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 tG=nEe;function lEe(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 d=f&&c-f;return d?Math.round(m*1e3/d):void 0}}var Sf=lEe;var xf=Symbol("internals"),qb=class extends rG.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[xf]={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=Sf(t.ticksRate*e.samplesCount,t.timeWindow);this.on("newListener",u=>{u==="progress"&&(t.isCaptured||(t.isCaptured=!0))});let i=0;t.updateProgress=tG(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[xf];return l.onReadCallback&&l.onReadCallback(),super._read(e)}_transform(e,l,t){let r=this,i=this[xf],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 d=(g,_)=>{let S=Buffer.byteLength(g),T=null,x=u,v,b=0;if(s){let A=Date.now();(!i.ts||(b=A-i.ts)>=a)&&(i.ts=A,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)}:_)};d(e,function g(_,S){if(_)return t(_);S?d(S,g):t(null)})}setLength(e){return this[xf].length=+e,this}},Vb=qb;var bG=wt(require("events"),1);var sG=require("util"),uG=require("stream");var{asyncIterator:iG}=Symbol,tEe=async function*(n){n.stream?yield*n.stream():n.arrayBuffer?yield await n.arrayBuffer():n[iG]?yield*n[iG]():yield n},wf=tEe;var rEe=X.ALPHABET.ALPHA_DIGIT+"-_",z5=new sG.TextEncoder,Rs=`\r
|
||||
`,iEe=z5.encode(Rs),sEe=2,zb=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=z5.encode(String(l).replace(/\r?\n|\r\n?/g,Rs)):i+=`Content-Type: ${l.type||"application/octet-stream"}${Rs}`,this.headers=z5.encode(i+Rs),this.contentLength=r?l.byteLength:l.size,this.size=this.headers.byteLength+this.contentLength+sEe,this.name=e,this.value=l}async*encode(){yield this.headers;let{value:e}=this;X.isTypedArray(e)?yield e:yield*wf(e),yield iEe}static escapeName(e){return String(e).replace(/[\r\n"]/g,l=>({"\r":"%0D","\n":"%0A",'"':"%22"})[l])}},uEe=(n,e,l)=>{let{tag:t="form-data-boundary",size:r=25,boundary:i=t+"-"+X.generateString(r,rEe)}=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=z5.encode("--"+i+Rs),u=z5.encode("--"+i+"--"+Rs+Rs),a=u.byteLength,c=Array.from(n.entries()).map(([p,m])=>{let d=new zb(p,m);return a+=d.size,d});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),uG.Readable.from(async function*(){for(let p of c)yield s,yield*p.encode();yield u}())},aG=uEe;var oG=wt(require("stream"),1),Gb=class extends oG.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)}},cG=Gb;var aEe=(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,fG=aEe;var pG={flush:Ci.default.constants.Z_SYNC_FLUSH,finishFlush:Ci.default.constants.Z_SYNC_FLUSH},oEe={flush:Ci.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:Ci.default.constants.BROTLI_OPERATION_FLUSH},dG=X.isFunction(Ci.default.createBrotliDecompress),{http:cEe,https:fEe}=EG.default,pEe=/https:?/,hG=Ct.protocols.map(n=>n+":");function dEe(n,e){n.beforeRedirects.proxy&&n.beforeRedirects.proxy(n),n.beforeRedirects.config&&n.beforeRedirects.config(n,e)}function TG(n,e,l){let t=e;if(!t&&t!==!1){let r=(0,gG.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){TG(i,e,i.href)}}var hEe=typeof process<"u"&&X.kindOf(process)==="process",mEe=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)}),gEe=({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)}},mG=(n,e)=>gEe(X.isObject(n)?n:{address:n,family:e}),SG=hEe&&function(e){return mEe(async function(t,r,i){let{data:s,lookup:u,family:a}=e,{responseType:c,responseEncoding:f}=e,p=e.method.toUpperCase(),m,d=!1,g;if(u){let ue=fG(u,ve=>X.isArray(ve)?ve:[ve]);u=(ve,q,re)=>{ue(ve,q,(te,ne,Vl)=>{if(te)return re(te);let Nn=X.isArray(ne)?ne.map(Ge=>mG(Ge)):[mG(ne,Vl)];q.all?re(te,Nn):re(te,Nn[0].address,Nn[0].family)})}}let _=new bG.default,S=()=>{e.cancelToken&&e.cancelToken.unsubscribe(T),e.signal&&e.signal.removeEventListener("abort",T),_.removeAllListeners()};i((ue,ve)=>{m=!0,ve&&(d=!0,S())});function T(ue){_.emit("abort",!ue||ue.type?new rr(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=pa(e.baseURL,e.url),v=new URL(x,"http://localhost"),b=v.protocol||hG[0];if(b==="data:"){let ue;if(p!=="GET")return Os(t,r,{status:405,statusText:"method not allowed",headers:{},config:e});try{ue=Hb(e.url,c==="blob",{Blob:e.env&&e.env.Blob})}catch(ve){throw Fe.from(ve,Fe.ERR_BAD_REQUEST,e)}return c==="text"?(ue=ue.toString(f),(!f||f==="utf8")&&(ue=X.stripBOM(ue))):c==="stream"&&(ue=ma.default.Readable.from(ue)),Os(t,r,{data:ue,status:200,statusText:"OK",headers:new kt,config:e})}if(hG.indexOf(b)===-1)return r(new Fe("Unsupported protocol "+b,Fe.ERR_BAD_REQUEST,e));let A=kt.from(e.headers).normalize();A.set("User-Agent","axios/"+ha,!1);let R=e.onDownloadProgress,O=e.onUploadProgress,k=e.maxRate,j,L;if(X.isSpecCompliantForm(s)){let ue=A.getContentType(/boundary=([-_\w\d]{10,70})/i);s=aG(s,ve=>{A.set(ve)},{tag:`axios-${ha}-boundary`,boundary:ue&&ue[1]||void 0})}else if(X.isFormData(s)&&X.isFunction(s.getHeaders)){if(A.set(s.getHeaders()),!A.hasContentLength())try{let ue=await _G.default.promisify(s.getLength).call(s);
Line truncated
|
||||
`+i.map(OG).join(`
|
||||
`):" "+OG(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:Xb};function Wb(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new rr(null,n)}function Nf(n){return Wb(n),n.headers=kt.from(n.headers),n.data=M5.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Af.getAdapter(n.adapter||O4.adapter)(n).then(function(t){return Wb(n),t.data=M5.call(n,n.transformResponse,t),t.headers=kt.from(t.headers),t},function(t){return $5(t)||(Wb(n),t&&t.response&&(t.response.data=M5.call(n,n.transformResponse,t.response),t.response.headers=kt.from(t.response.headers))),Promise.reject(t)})}var RG=n=>n instanceof kt?n.toJSON():n;function ki(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(RG(c),RG(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 Kb={};["object","boolean","number","function","string","symbol"].forEach((n,e)=>{Kb[n]=function(t){return typeof t===n||"a"+(e<1?"n ":" ")+n}});var IG={};Kb.transitional=function(e,l,t){function r(i,s){return"[Axios v"+ha+"] 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&&!IG[s]&&(IG[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 _Ee(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 Of={assertOptions:_Ee,validators:Kb};var Is=Of.validators,C4=class{constructor(e){this.defaults=e,this.interceptors={request:new Sb,response:new Sb}}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=ki(this.defaults,l);let{transitional:t,paramsSerializer:r,headers:i}=l;t!==void 0&&Of.assertOptions(t,{silentJSONParsing:Is.transitional(Is.boolean),forcedJSONParsing:Is.transitional(Is.boolean),clarifyTimeoutError:Is.transitional(Is.boolean)},!1),r!=null&&(X.isFunction(r)?l.paramsSerializer={serialize:r}:Of.assertOptions(r,{encode:Is.function,serialize:Is.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=kt.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=[Nf.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 d=l;for(p=0;p<m;){let g=u[p++],_=u[p++];try{d=g(d)}catch(S){_.call(this,S);break}}try{f=Nf.call(this,d)}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=ki(this.defaults,e);let l=pa(e.baseURL,e.url);return fa(l,e.params,e.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(e){C4.prototype[e]=function(l,t){return this.request(ki(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(ki(u||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}C4.prototype[e]=l(),C4.prototype[e+"Form"]=l(!0)});var G5=C4;var Yb=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 rr(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}}},CG=Yb;function Jb(n){return function(l){return n.apply(null,l)}}function Qb(n){return X.isObject(n)&&n.isAxiosError===!0}var Zb={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(Zb).forEach(([n,e])=>{Zb[e]=n});var kG=Zb;function PG(n){let e=new G5(n),l=P5(G5.prototype.request,e);return X.extend(l,G5.prototype,e,{allOwnKeys:!0}),X.extend(l,e,null,{allOwnKeys:!0}),l.create=function(r){return PG(ki(n,r))},l}var Et=PG(O4);Et.Axios=G5;Et.CanceledError=rr;Et.CancelToken=CG;Et.isCancel=$5;Et.VERSION=ha;Et.toFormData=Ns;Et.AxiosError=Fe;Et.Cancel=Et.CanceledError;Et.all=function(e){return Promise.all(e)};Et.spread=Jb;Et.isAxiosError=Qb;Et.mergeConfig=ki;Et.AxiosHeaders=kt;Et.formToJSON=n=>bf(X.isHTMLForm(n)?new FormData(n):n);Et.getAdapter=Af.getAdapter;Et.HttpStatusCode=kG;Et.default=Et;var k4=Et;var{Axios:jke,AxiosError:Uke,CanceledError:Bke,isCancel:Hke,CancelToken:qke,VERSION:Vke,all:zke,Cancel:Gke,isAxiosError:Xke,spread:Wke,toFormData:DG,AxiosHeaders:Kke,HttpStatusCode:Yke,formToJSON:Jke,getAdapter:Qke,mergeConfig:Zke}=k4;var HG=wt(require("https"),1),qG=wt(require("crypto"),1),VG=wt(UG(),1),lT={};globalThis.dataBase=null;globalThis.local={get:async function(n,e){return await NEe(n,e)},set:asy
Line truncated
|
||||
`},timeout:.1}),await dataBase.push(t,lT)}globalThis.localLog={set:async function(n,e,l){IEe(n,e,l)}};function REe(){ga.default.existsSync("log")||ga.default.mkdirSync("log");let n="log/info.log";return ga.default.existsSync(n)?ga.default.readFileSync(n).toString():(ga.default.writeFileSync(n,""),"")}function IEe(n){ga.default.writeFileSync("log/info.log",REe()+`
|
||||
`+n)}globalThis.req=CEe;async function CEe(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=BG.default.stringify(l,{encode:!1}))):t==="form-data"&&(a["Content-Type"]="multipart/form-data",l=DG(l));let c=r===1||r===2?"arraybuffer":void 0,f;u?f=VG.default.httpsOverHttp({proxy:{host:"127.0.0.1",port:7890}}):f=HG.default.Agent({rejectUnauthorized:!1});let p=await k4(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 d of p.headers){let g=d[1];m[d[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 d=e.stream;return d.onResp&&await d.onResp({code:p.status,headers:m}),d.onData?(l.on("data",async g=>{await d.onData(g)}),l.on("end",async()=>{d.onDone&&await d.onDone()})):d.onDone&&await d.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=kEe;function kEe(n){return qG.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 PEe=["DEBUG","INFO","WARNING","ERROR"];var ks=class{constructor(e,l="DEBUG"){this.app_name=e,this.level=l,this.level_index=PEe.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 al=class extends Al{constructor(){super(),this.jadeLog=new ks(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 pe.isEmpty(e)?this.classes:e}async getFiletObjCache(){let e=await this.db.getObjectDefault(this.deviceKey+"filterObj",{});return pe.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 Jn,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
|
||||
`,"").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 d=m.attribs.href;d.indexOf(this.siteUrl)>-1&&p.value.push({n:e(m).text(),v:d})}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 kn,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",!pe.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 Jn,t=e('[class="header-left"]');l.vod_name=e(e(t).find("h4")).text();let r=Tl(/<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=Tl(/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||pe.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 iT;var sT=class extends al{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().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await cl.initCloud(e.server.config):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 sT;async function QG(n,e){return await Ds.init(n,e)}async function ZG(n,e){return await Ds.home(n,e)}async function FEe(n,e){return await Ds.homeVod(n,e)}async function eX(n,e){return await Ds.category(n,e)}async function nX(n,e){return await Ds.detail(n,e)}async function lX(n,e){return await Ds.play(n,e)}async function tX(n,e){return await Ds.search(n,e)}async function MEe(n,e){return await Ds.proxy(n,e)}var rX={meta:{key:cl.getJSName(),name:cl.getName(),type:cl.getType()},api:async n=>{n.post("/init",QG),n.post("/home",ZG),n.post("/category",eX),n.post("/detail",nX),n.post("/play",lX),n.post("/search",tX),n.get("/proxy/:what/:ids/:end",MEe)},spider:{init:QG,home:ZG,homeVod:FEe,category:eX,detail:nX,play:lX,search:tX}};var uT=class extends al{constructor(){super()}getName(){return"\u2503\u63A8\u9001\u2503"}getAppName(){return"\u63A8\u9001"}getJSName(){return"push"}getType(){return 4}async init(e,l){return await this.jadeLog.debug("\u521D\u59CB\u5316",!0),await Jc(e.server.config),{}}async check(e,l){let t=e.body.clip;return await this.jadeLog.debug(`\u526A\u5207\u677F\u8F93\u5165\u5185\u5BB9\u4E3A:${t}`),t.startsWith("http")?(await this.jadeLog.debug("\u6EE1\u8DB3\u63A8\u9001\u6761\u4EF6",!0),"true"):(await this.jadeLog.debug("\u4E0D\u6EE1\u8DB3\u63A8\u9001\u6761\u4EF6",!0),"false")}async parseVodDetailfromJson(e){let l=new Jn;l.vod_pic=jr+"/resources/push.jpg";let t=Ac.exec(e),r=Nc.exec(e);if(t!==null&&t.length>0){let i=await DE([e]);l.vod_play_from=pe.keys(i).join("$$$"),l.vod_play_url=pe.values(i).join("$$$")}else if(r!==null&&r.length>0){let i=await DE([e]);l.vod_play_from=pe.keys(i).join("$$$"),l.vod_play_url=pe.values(i).join("$$$")}else l.vod_play_from="\u63A8\u9001",l.vod_play_url="\u63A8\u9001$"+e;return l}async setDetail(e){this.vodDetail=await this.parseVodDetailfromJson(e)}async setPlay(e,l,t){e==="\u63A8\u9001"?this.playUrl=l:(this.playUrl=await nq(e,l,t),this.result.setHeader(lq(e)))}},Rf=new uT;async function iX(n,e){return await Rf.init(n,e)}async function sX(n,e){return await Rf.check(n,e)}async function uX(n,e){return await Rf.detail(n,e)}async function aX(n,e){return await Rf.play(n,e)}var oX={meta:{key:"push",name:"\u63A8\u9001",type:4},api:async n=>{n.post("/init",iX),n.post("/support",sX),n.post("/detail",uX),n.post("/play",aX)},spider:{init:iX,support:sX,detail:uX,play:aX}};var aT=class extends D4{constructor(){super(),this.siteUrl="https://cj.lzcaiji.com",this.remove18=!1}getAppNa
Line truncated
|
||||
`,""),l.vod_actor=Tl(/出演女优(.*?)\n/,r).replaceAll(":","").replaceAll(`
|
||||
`,""),l.vod_remarks=Tl(/是否有码(.*?)\n/,r).replaceAll(":","").replaceAll(`
|
||||
`,""),l.vod_play_from="BT",l.vod_play_url=l.vod_name+"$"+Tl(/磁力链接: (.*)复制代码/,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 _e.isEmpty(l)?u=await req(s.vod_pic,{buffer:2,headers:{Referer:r,"User-Agent":Mr}}):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:""})}},pl=new Zb;var eT=class extends al{constructor(){super()}getName(){return pl.getName()}getAppName(){return pl.getAppName()}getJSName(){return pl.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await pl.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await pl.initCookie(e.server.config.bilicookie),await pl.spiderInit(e),pl.cfgObj.code=0,pl.catOpenStatus=!0,pl.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await pl.setClasses(),this.classes=pl.classes}async setFilterObj(){await pl.setFilterObj(),this.filterObj=pl.filterObj}async setHomeVod(){await pl.setHomeVod(),this.homeVodList=pl.homeVodList}async setCategory(e,l,t,r){await pl.setCategory(e,l,t,r),this.vodList=pl.vodList}async setDetail(e){await pl.setDetail(e),this.vodDetail=pl.vodDetail}async setPlay(e,l,t){await pl.setPlay(e,l,t),this.playUrl=pl.playUrl,this.result=pl.result}async setSearch(e,l,t){await pl.setSearch(e,l,t),this.vodList=pl.vodList,this.result=pl.result}async setProxy(e,l){return await pl.proxy(e,l)}},Fs=new eT;async function KG(n,e){return await Fs.init(n,e)}async function YG(n,e){return await Fs.home(n,e)}async function TEe(n,e){return await Fs.homeVod(n,e)}async function JG(n,e){return await Fs.category(n,e)}async function QG(n,e){return await Fs.detail(n,e)}async function ZG(n,e){return await Fs.play(n,e)}async function eX(n,e){return await Fs.search(n,e)}async function SEe(n,e){return await Fs.proxy(n,e)}var nX={meta:{key:pl.getJSName(),name:pl.getName(),type:pl.getType()},api:async n=>{n.post("/init",KG),n.post("/home",YG),n.post("/category",JG),n.post("/detail",QG),n.post("/play",ZG),n.post("/search",eX),n.get("/proxy/:what/:ids/:end",SEe)},spider:{init:KG,home:YG,homeVod:TEe,category:JG,detail:QG,play:ZG,search:eX}};function lX(n,{key:e,iv:l}={}){let t="B77A9FF7F323B5404902102257503C2F",r="B77A9FF7F323B5404902102257503C2F";var i=Bn.enc.Utf8.parse(n),s=Bn.AES.encrypt(i,Bn.enc.Utf8.parse(e||t),{iv:Bn.enc.Utf8.parse(l||r),mode:Bn.mode.CBC,padding:Bn.pad.Pkcs7});return Bn.enc.Base64.stringify(s.ciphertext)}function xEe(){let n=new Date;return lX(parseInt(n.getTime()/1e3)+n.getTimezoneOffset()*60+-1)}function AEe(n){let l=Bn.enc.Utf8.parse("46cc793c53dc451b"),t=Bn.AES.decrypt(n,l,{mode:Bn.mode.ECB,padding:Bn.pad.Pkcs7});return Bn.enc.Utf8.stringify(t).toString()}var nT=class extends wl{constructor(){super(),this.siteUrl="https://api.qianyuewenhua.xyz"}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"imgBt",this.getHeader()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"imgBt/",this.getHeader())}async init(e){awa
Line truncated
|
||||
`,""),l.vod_play_from="BT",l.vod_play_url=l.vod_name+"$"+Tl(/磁力链接: (.*)复制代码/,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=I3(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 pe.isEmpty(l)?u=await req(s.vod_pic,{buffer:2,headers:{Referer:r,"User-Agent":$r}}):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:""})}},pl=new cT;var fT=class extends al{constructor(){super()}getName(){return pl.getName()}getAppName(){return pl.getAppName()}getJSName(){return pl.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await pl.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await pl.initCookie(e.server.config.biliCookie),await pl.spiderInit(e),pl.cfgObj.code=0,pl.catOpenStatus=!0,pl.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await pl.setClasses(),this.classes=pl.classes}async setFilterObj(){await pl.setFilterObj(),this.filterObj=pl.filterObj}async setHomeVod(){await pl.setHomeVod(),this.homeVodList=pl.homeVodList}async setCategory(e,l,t,r){await pl.setCategory(e,l,t,r),this.vodList=pl.vodList}async setDetail(e){await pl.setDetail(e),this.vodDetail=pl.vodDetail}async setPlay(e,l,t){await pl.setPlay(e,l,t),this.playUrl=pl.playUrl,this.result=pl.result}async setSearch(e,l,t){await pl.setSearch(e,l,t),this.vodList=pl.vodList,this.result=pl.result}async setProxy(e,l){return await pl.proxy(e,l)}},Fs=new fT;async function yX(n,e){return await Fs.init(n,e)}async function vX(n,e){return await Fs.home(n,e)}async function UEe(n,e){return await Fs.homeVod(n,e)}async function _X(n,e){return await Fs.category(n,e)}async function EX(n,e){return await Fs.detail(n,e)}async function bX(n,e){return await Fs.play(n,e)}async function TX(n,e){return await Fs.search(n,e)}async function BEe(n,e){return await Fs.proxy(n,e)}var SX={meta:{key:pl.getJSName(),name:pl.getName(),type:pl.getType()},api:async n=>{n.post("/init",yX),n.post("/home",vX),n.post("/category",_X),n.post("/detail",EX),n.post("/play",bX),n.post("/search",TX),n.get("/proxy/:what/:ids/:end",BEe)},spider:{init:yX,home:vX,homeVod:UEe,category:_X,detail:EX,play:bX,search:TX}};function xX(n,{key:e,iv:l}={}){let t="B77A9FF7F323B5404902102257503C2F",r="B77A9FF7F323B5404902102257503C2F";var i=Cn.enc.Utf8.parse(n),s=Cn.AES.encrypt(i,Cn.enc.Utf8.parse(e||t),{iv:Cn.enc.Utf8.parse(l||r),mode:Cn.mode.CBC,padding:Cn.pad.Pkcs7});return Cn.enc.Base64.stringify(s.ciphertext)}function HEe(){let n=new Date;return xX(parseInt(n.getTime()/1e3)+n.getTimezoneOffset()*60+-1)}function qEe(n){let l=Cn.enc.Utf8.parse("46cc793c53dc451b"),t=Cn.AES.decrypt(n,l,{mode:Cn.mode.ECB,padding:Cn.pad.Pkcs7});return Cn.enc.Utf8.stringify(t).toString()}var pT=class extends Al{constructor(){super(),this.siteUrl="https://api.qianyuewenhua.xyz"}async spiderInit(e=null){e!==null?this.jsBase=await js2Proxy(e,"imgBt",this.getHeader()):this.jsBase=await js2Proxy(!0,this.siteType,this.siteKey,"imgB
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=Tl(/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)}},_l=new hT;var mT=class extends al{constructor(){super()}getName(){return _l.getName()}getAppName(){return _l.getAppName()}getJSName(){return _l.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await _l.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await _l.initCookie(e.server.config.bilicookie),await _l.spiderInit(e),_l.cfgObj.code=0,_l.catOpenStatus=!0,_l.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await _l.setClasses(),this.classes=_l.classes}async setFilterObj(){await _l.setFilterObj(),this.filterObj=_l.filterObj}async setHomeVod(){await _l.setHomeVod(),this.homeVodList=_l.homeVodList}async setCategory(e,l,t,r){await _l.setCategory(e,l,t,r),this.vodList=_l.vodList}async setDetail(e){await _l.setDetail(e),this.vodDetail=_l.vodDetail}async setPlay(e,l,t){await _l.setPlay(e,l,t),this.playUrl=_l.playUrl,this.result=_l.result}async setSearch(e,l,t){await _l.setSearch(e,l,t),this.vodList=_l.vodList,this.result=_l.result}async setProxy(e,l){return await _l.proxy(e,l)}},Xs=new mT;async function GX(n,e){return await Xs.init(n,e)}async function XX(n,e){return await Xs.home(n,e)}async function BEe(n,e){return await Xs.homeVod(n,e)}async function WX(n,e){return await Xs.category(n,e)}async function KX(n,e){return await Xs.detail(n,e)}async function YX(n,e){return await Xs.play(n,e)}async function JX(n,e){return await Xs.search(n,e)}async function HEe(n,e){return await Xs.proxy(n,e)}var QX={meta:{key:_l.getJSName(),name:_l.getName(),type:_l.getType()},api:async n=>{n.post("/init",GX),n.post("/home",XX),n.post("/category",WX),n.post("/detail",KX),n.post("/play",YX),n.post("/search",JX),n.get("/proxy/:what/:ids/:end",HEe)},spider:{init:GX,home:XX,homeVod:BEe,category:WX,detail:KX,play:YX,search:JX}};var ZX=[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,20515,20516,20519,20523,20527,20528,20529,20530,20531,20532,205
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 Cn;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 Jn,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(`
|
||||
`,""),d=p.attribs.href;d!==void 0&&c.push({n:m,v:d})}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=Tl(/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)}},_l=new wT;var AT=class extends al{constructor(){super()}getName(){return _l.getName()}getAppName(){return _l.getAppName()}getJSName(){return _l.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await _l.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await _l.initCookie(e.server.config.biliCookie),await _l.spiderInit(e),_l.cfgObj.code=0,_l.catOpenStatus=!0,_l.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await _l.setClasses(),this.classes=_l.classes}async setFilterObj(){await _l.setFilterObj(),this.filterObj=_l.filterObj}async setHomeVod(){await _l.setHomeVod(),this.homeVodList=_l.homeVodList}async setCategory(e,l,t,r){await _l.setCategory(e,l,t,r),this.vodList=_l.vodList}async setDetail(e){await _l.setDetail(e),this.vodDetail=_l.vodDetail}async setPlay(e,l,t){await _l.setPlay(e,l,t),this.playUrl=_l.playUrl,this.result=_l.result}async setSearch(e,l,t){await _l.setSearch(e,l,t),this.vodList=_l.vodList,this.result=_l.result}async setProxy(e,l){return await _l.proxy(e,l)}},Xs=new AT;async function hW(n,e){return await Xs.init(n,e)}async function mW(n,e){return await Xs.home(n,e)}async function ibe(n,e){return await Xs.homeVod(n,e)}async function gW(n,e){return await Xs.category(n,e)}async function yW(n,e){return await Xs.detail(n,e)}async function vW(n,e){return await Xs.play(n,e)}async function _W(n,e){return await Xs.search(n,e)}async function sbe(n,e){return await Xs.proxy(n,e)}var EW={meta:{key:_l.getJSName(),name:_l.getName(),type:_l.getType()},api:async n=>{n.post("/init",hW),n.post("/home",mW),n.post("/category",gW),n.post("/detail",yW),n.post("/play",vW),n.post("/search",_W),n.get("/proxy/:what/:ids/:end",sbe)},spider:{init:hW,home:mW,homeVod:ibe,category:gW,detail:yW,play:vW,search:_W}};var bW=[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,20515,20516,20519,20523,
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 kn;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 Jn,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=_e.values(r).join("$$$"),e.vod_play_from=_e.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=Tl(/<script type="text\/javascript" src="(.*?)">/,$.html()),playJsContent=await this.fetch(this.siteUrl+playJsUrl,null,this.getHeader()),playUrlListStr=Tl(/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=Tl(/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=ZX.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=ul(aE(t,"gb2312"));this.vodList=await this.parseVodShortListFromDocBySearch(r)}},ya=new V5;async function qEe(n){await ya.init(n)}async function VEe(n){return await ya.home(n)}async function zEe(){return await ya.homeVod()}async function GEe(n,e,l,t){return await ya.category(n,e,l,t)}async function XEe(n){return await ya.detail(n)}async function WEe(n,e,l){return await ya.play(n,e,l)}async function KEe(n,e){return await ya.search(n,e)}function TDe(){return{init:qEe,home:VEe,homeVod:zEe,category:GEe,detail:XEe,play:WEe,search:KEe}}var gT=class extends V5{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 Cn;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)}},El=new gT;var yT=class extends al{constructor(){super()}getName(){return El.getName()}getAppName(){return El.getAppName()}getJSName(){return El.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName()==="push_agent"?await El.initAli(e.server.config.alitoken):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await El.initCookie(e.server.config.bilicookie),await El.spiderInit(e),El.cfgObj.code=0,El.catOpenStatus=!0,El.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await El.setClasses(),this.classes=El.classes}async setFilterObj(){await El.setFilterObj(),this.filterObj=
Line truncated
|
||||
`,""))}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 d=m.attribs.title,g=m.attribs.href;p.push(d+"$"+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,d=n(n(c).find("div")).find("a")[0].attribs.href;d!=="javascript:void(0);"&&(p.push(m+"$"+d),r[f]=p.join("#"),u=u+1)}return e.vod_play_url=pe.values(r).join("$$$"),e.vod_play_from=pe.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=Tl(/<script type="text\/javascript" src="(.*?)">/,$.html()),playJsContent=await this.fetch(this.siteUrl+playJsUrl,null,this.getHeader()),playUrlListStr=Tl(/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=Tl(/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=bW.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=ul(vE(t,"gb2312"));this.vodList=await this.parseVodShortListFromDocBySearch(r)}},ya=new X5;async function ube(n){await ya.init(n)}async function abe(n){return await ya.home(n)}async function obe(){return await ya.homeVod()}async function cbe(n,e,l,t){return await ya.category(n,e,l,t)}async function fbe(n){return await ya.detail(n)}async function pbe(n,e,l){return await ya.play(n,e,l)}async function dbe(n,e){return await ya.search(n,e)}function ZDe(){return{init:ube,home:abe,homeVod:obe,category:cbe,detail:fbe,play:pbe,search:dbe}}var NT=class extends X5{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 kn;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)}},El=new NT;var OT=class extends al{constructor(){super()}getName(){return El.getName()}getAppName(){return El.getAppName()}getJSName(){return El.getJSName()}async init(e,l){dataBase=e.server.db,this.getAppName().indexOf("\u963F\u91CC")>-1||this.getAppName().indexOf("\u5382\u957F")>-1||this.getAppName()==="push_agent"?await El.initCloud(e.server.config):this.getAppName()==="\u54D4\u54E9\u54D4\u54E9"&&await El.initCookie(e.server.config.biliCookie),await El.spiderInit(e),El.cfgObj.code=0,El.catOpenStatus=!0,El.classes.push({type_name:"\u6700\u8FD1\u66F4\u65B0",type_id:"\u6700\u8FD1\u66F4\u65B0"}),await super.init(e,l)}async setClasses(){await El.setClasses(),this.classes=El.classes}async setFilterObj(){
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
uri-js/dist/es5/uri.all.js:
|
||||
|
||||
Reference in new issue
Block a user