promptfoo 0.115.1 → 0.115.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +1 -1
- package/dist/src/app/assets/{index-BguflfND.css → index-BPc2R353.css} +1 -1
- package/dist/src/app/assets/index-BXsrbFYA.js +839 -0
- package/dist/src/app/assets/{source-map-support-yC3CWAhX.js → source-map-support-CNXJ1-7r.js} +1 -1
- package/dist/src/app/assets/{sync-Dow9n6Ue.js → sync-CYtWtmxM.js} +1 -1
- package/dist/src/app/index.html +2 -2
- package/dist/src/assertions/openai.d.ts.map +1 -1
- package/dist/src/assertions/openai.js +3 -1
- package/dist/src/assertions/openai.js.map +1 -1
- package/dist/src/assertions/synthesis.d.ts +15 -0
- package/dist/src/assertions/synthesis.d.ts.map +1 -0
- package/dist/src/assertions/synthesis.js +504 -0
- package/dist/src/assertions/synthesis.js.map +1 -0
- package/dist/src/commands/delete.d.ts +2 -0
- package/dist/src/commands/delete.d.ts.map +1 -1
- package/dist/src/commands/delete.js +3 -0
- package/dist/src/commands/delete.js.map +1 -1
- package/dist/src/commands/eval.d.ts.map +1 -1
- package/dist/src/commands/eval.js +15 -14
- package/dist/src/commands/eval.js.map +1 -1
- package/dist/src/commands/generate/assertions.d.ts +19 -0
- package/dist/src/commands/generate/assertions.d.ts.map +1 -0
- package/dist/src/commands/generate/assertions.js +150 -0
- package/dist/src/commands/generate/assertions.js.map +1 -0
- package/dist/src/commands/modelScan.d.ts +1 -0
- package/dist/src/commands/modelScan.d.ts.map +1 -1
- package/dist/src/commands/modelScan.js +4 -5
- package/dist/src/commands/modelScan.js.map +1 -1
- package/dist/src/commands/show.d.ts +3 -0
- package/dist/src/commands/show.d.ts.map +1 -1
- package/dist/src/commands/show.js +7 -0
- package/dist/src/commands/show.js.map +1 -1
- package/dist/src/database/tables.d.ts +22 -0
- package/dist/src/database/tables.d.ts.map +1 -1
- package/dist/src/envars.d.ts +1 -1
- package/dist/src/envars.d.ts.map +1 -1
- package/dist/src/envars.js.map +1 -1
- package/dist/src/evaluator.d.ts +9 -0
- package/dist/src/evaluator.d.ts.map +1 -1
- package/dist/src/evaluator.js +48 -24
- package/dist/src/evaluator.js.map +1 -1
- package/dist/src/evaluatorHelpers.d.ts +33 -5
- package/dist/src/evaluatorHelpers.d.ts.map +1 -1
- package/dist/src/evaluatorHelpers.js +41 -5
- package/dist/src/evaluatorHelpers.js.map +1 -1
- package/dist/src/main.d.ts.map +1 -1
- package/dist/src/main.js +2 -0
- package/dist/src/main.js.map +1 -1
- package/dist/src/models/eval.d.ts +1 -0
- package/dist/src/models/eval.d.ts.map +1 -1
- package/dist/src/models/eval.js +2 -1
- package/dist/src/models/eval.js.map +1 -1
- package/dist/src/providers/azure/chat.d.ts.map +1 -1
- package/dist/src/providers/azure/chat.js +1 -1
- package/dist/src/providers/azure/chat.js.map +1 -1
- package/dist/src/providers/azure/completion.d.ts.map +1 -1
- package/dist/src/providers/azure/completion.js +1 -1
- package/dist/src/providers/azure/completion.js.map +1 -1
- package/dist/src/providers/azure/types.d.ts +1 -1
- package/dist/src/providers/azure/types.d.ts.map +1 -1
- package/dist/src/providers/golangCompletion.d.ts.map +1 -1
- package/dist/src/providers/golangCompletion.js +0 -1
- package/dist/src/providers/golangCompletion.js.map +1 -1
- package/dist/src/providers/google/ai.studio.js +1 -1
- package/dist/src/providers/google/ai.studio.js.map +1 -1
- package/dist/src/providers/google/live.d.ts +11 -0
- package/dist/src/providers/google/live.d.ts.map +1 -1
- package/dist/src/providers/google/live.js +84 -2
- package/dist/src/providers/google/live.js.map +1 -1
- package/dist/src/providers/google/shared.d.ts.map +1 -1
- package/dist/src/providers/google/shared.js +15 -0
- package/dist/src/providers/google/shared.js.map +1 -1
- package/dist/src/providers/google/types.d.ts +2 -2
- package/dist/src/providers/google/types.d.ts.map +1 -1
- package/dist/src/providers/google/vertex.d.ts +11 -0
- package/dist/src/providers/google/vertex.d.ts.map +1 -1
- package/dist/src/providers/google/vertex.js +82 -3
- package/dist/src/providers/google/vertex.js.map +1 -1
- package/dist/src/providers/groq.d.ts +3 -1
- package/dist/src/providers/groq.d.ts.map +1 -1
- package/dist/src/providers/http.js +1 -1
- package/dist/src/providers/http.js.map +1 -1
- package/dist/src/providers/hyperbolic/audio.d.ts +40 -0
- package/dist/src/providers/hyperbolic/audio.d.ts.map +1 -0
- package/dist/src/providers/hyperbolic/audio.js +141 -0
- package/dist/src/providers/hyperbolic/audio.js.map +1 -0
- package/dist/src/providers/hyperbolic/chat.d.ts +110 -0
- package/dist/src/providers/hyperbolic/chat.d.ts.map +1 -0
- package/dist/src/providers/hyperbolic/chat.js +318 -0
- package/dist/src/providers/hyperbolic/chat.js.map +1 -0
- package/dist/src/providers/hyperbolic/image.d.ts +57 -0
- package/dist/src/providers/hyperbolic/image.d.ts.map +1 -0
- package/dist/src/providers/hyperbolic/image.js +231 -0
- package/dist/src/providers/hyperbolic/image.js.map +1 -0
- package/dist/src/providers/litellm.d.ts +3 -1
- package/dist/src/providers/litellm.d.ts.map +1 -1
- package/dist/src/providers/ollama.d.ts.map +1 -1
- package/dist/src/providers/ollama.js +1 -1
- package/dist/src/providers/ollama.js.map +1 -1
- package/dist/src/providers/openai/chat.d.ts +11 -0
- package/dist/src/providers/openai/chat.d.ts.map +1 -1
- package/dist/src/providers/openai/chat.js +132 -4
- package/dist/src/providers/openai/chat.js.map +1 -1
- package/dist/src/providers/openai/completion.d.ts.map +1 -1
- package/dist/src/providers/openai/completion.js +1 -1
- package/dist/src/providers/openai/completion.js.map +1 -1
- package/dist/src/providers/openai/responses.d.ts.map +1 -1
- package/dist/src/providers/openai/responses.js +21 -1
- package/dist/src/providers/openai/responses.js.map +1 -1
- package/dist/src/providers/openai/types.d.ts +27 -2
- package/dist/src/providers/openai/types.d.ts.map +1 -1
- package/dist/src/providers/openai/util.d.ts.map +1 -1
- package/dist/src/providers/openai/util.js +24 -1
- package/dist/src/providers/openai/util.js.map +1 -1
- package/dist/src/providers/promptfoo.d.ts +1 -1
- package/dist/src/providers/promptfoo.d.ts.map +1 -1
- package/dist/src/providers/promptfoo.js.map +1 -1
- package/dist/src/providers/pythonCompletion.d.ts.map +1 -1
- package/dist/src/providers/pythonCompletion.js +0 -1
- package/dist/src/providers/pythonCompletion.js.map +1 -1
- package/dist/src/providers/registry.d.ts.map +1 -1
- package/dist/src/providers/registry.js +21 -12
- package/dist/src/providers/registry.js.map +1 -1
- package/dist/src/providers/sagemaker.js +1 -1
- package/dist/src/providers/sagemaker.js.map +1 -1
- package/dist/src/providers/scriptCompletion.d.ts.map +1 -1
- package/dist/src/providers/scriptCompletion.js +0 -1
- package/dist/src/providers/scriptCompletion.js.map +1 -1
- package/dist/src/providers/simulatedUser.d.ts.map +1 -1
- package/dist/src/providers/simulatedUser.js +5 -3
- package/dist/src/providers/simulatedUser.js.map +1 -1
- package/dist/src/providers/xai/chat.d.ts +3 -1
- package/dist/src/providers/xai/chat.d.ts.map +1 -1
- package/dist/src/python/pythonUtils.d.ts +1 -0
- package/dist/src/python/pythonUtils.d.ts.map +1 -1
- package/dist/src/python/pythonUtils.js +9 -7
- package/dist/src/python/pythonUtils.js.map +1 -1
- package/dist/src/redteam/commands/discover.d.ts +2 -8
- package/dist/src/redteam/commands/discover.d.ts.map +1 -1
- package/dist/src/redteam/commands/discover.js +31 -100
- package/dist/src/redteam/commands/discover.js.map +1 -1
- package/dist/src/redteam/commands/generate.d.ts.map +1 -1
- package/dist/src/redteam/commands/generate.js +10 -26
- package/dist/src/redteam/commands/generate.js.map +1 -1
- package/dist/src/redteam/index.d.ts.map +1 -1
- package/dist/src/redteam/index.js +24 -5
- package/dist/src/redteam/index.js.map +1 -1
- package/dist/src/redteam/plugins/base.d.ts +6 -0
- package/dist/src/redteam/plugins/base.d.ts.map +1 -1
- package/dist/src/redteam/plugins/base.js +19 -0
- package/dist/src/redteam/plugins/base.js.map +1 -1
- package/dist/src/redteam/plugins/crossSessionLeak.d.ts +2 -1
- package/dist/src/redteam/plugins/crossSessionLeak.d.ts.map +1 -1
- package/dist/src/redteam/plugins/crossSessionLeak.js +11 -0
- package/dist/src/redteam/plugins/crossSessionLeak.js.map +1 -1
- package/dist/src/redteam/providers/crescendo/index.d.ts +15 -3
- package/dist/src/redteam/providers/crescendo/index.d.ts.map +1 -1
- package/dist/src/redteam/providers/crescendo/index.js +152 -16
- package/dist/src/redteam/providers/crescendo/index.js.map +1 -1
- package/dist/src/redteam/providers/crescendo/prompts.js +4 -4
- package/dist/src/redteam/providers/goat.d.ts +9 -0
- package/dist/src/redteam/providers/goat.d.ts.map +1 -1
- package/dist/src/redteam/providers/goat.js +23 -3
- package/dist/src/redteam/providers/goat.js.map +1 -1
- package/dist/src/redteam/remoteGeneration.d.ts +5 -0
- package/dist/src/redteam/remoteGeneration.d.ts.map +1 -1
- package/dist/src/redteam/remoteGeneration.js +21 -7
- package/dist/src/redteam/remoteGeneration.js.map +1 -1
- package/dist/src/redteam/types.d.ts +1 -0
- package/dist/src/redteam/types.d.ts.map +1 -1
- package/dist/src/redteam/util.d.ts.map +1 -1
- package/dist/src/redteam/util.js +4 -0
- package/dist/src/redteam/util.js.map +1 -1
- package/dist/src/server/routes/eval.js +1 -0
- package/dist/src/server/routes/eval.js.map +1 -1
- package/dist/src/server/routes/providers.d.ts.map +1 -1
- package/dist/src/server/routes/providers.js +41 -0
- package/dist/src/server/routes/providers.js.map +1 -1
- package/dist/src/server/server.js +2 -2
- package/dist/src/server/server.js.map +1 -1
- package/dist/src/tableOutput.html +2 -2
- package/dist/src/types/env.d.ts +3 -0
- package/dist/src/types/env.d.ts.map +1 -1
- package/dist/src/types/env.js +1 -0
- package/dist/src/types/env.js.map +1 -1
- package/dist/src/types/index.d.ts +281 -0
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/providers.d.ts +1 -1
- package/dist/src/types/providers.d.ts.map +1 -1
- package/dist/src/util/config/load.d.ts +1 -1
- package/dist/src/util/config/load.d.ts.map +1 -1
- package/dist/src/util/config/load.js +1 -0
- package/dist/src/util/config/load.js.map +1 -1
- package/dist/src/util/database.d.ts +2 -0
- package/dist/src/util/database.d.ts.map +1 -1
- package/dist/src/util/server.d.ts +12 -0
- package/dist/src/util/server.d.ts.map +1 -1
- package/dist/src/util/server.js +59 -0
- package/dist/src/util/server.js.map +1 -1
- package/dist/src/util/templates.d.ts.map +1 -1
- package/dist/src/util/templates.js +9 -7
- package/dist/src/util/templates.js.map +1 -1
- package/dist/src/util/transform.d.ts +3 -8
- package/dist/src/util/transform.d.ts.map +1 -1
- package/dist/src/util/transform.js +1 -1
- package/dist/src/util/transform.js.map +1 -1
- package/dist/src/validators/providers.d.ts +20 -0
- package/dist/src/validators/providers.d.ts.map +1 -1
- package/dist/src/validators/redteam.d.ts +8 -0
- package/dist/src/validators/redteam.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/app/assets/index-DLhvLf11.js +0 -1051
- package/dist/src/app/assets/index.es-BFIXrhjI.js +0 -18
- package/dist/src/app/assets/purify.es-CQJ0hv7W.js +0 -2
package/dist/src/app/assets/{source-map-support-yC3CWAhX.js → source-map-support-CNXJ1-7r.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as j,r as Oe,a as be,p as T,g as Re}from"./index-DLhvLf11.js";function Ne(i,_){for(var w=0;w<_.length;w++){const S=_[w];if(typeof S!="string"&&!Array.isArray(S)){for(const g in S)if(g!=="default"&&!(g in i)){const s=Object.getOwnPropertyDescriptor(S,g);s&&Object.defineProperty(i,g,s.get?s:{enumerable:!0,get:()=>S[g]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var $={exports:{}},D={},J={},z={},W={},ie;function Ge(){if(ie)return W;ie=1;var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return W.encode=function(_){if(0<=_&&_<i.length)return i[_];throw new TypeError("Must be between 0 and 63: "+_)},W.decode=function(_){var w=65,S=90,g=97,s=122,o=48,t=57,r=43,n=47,e=26,a=52;return w<=_&&_<=S?_-w:g<=_&&_<=s?_-g+e:o<=_&&_<=t?_-o+a:_==r?62:_==n?63:-1},W}var ue;function me(){if(ue)return z;ue=1;var i=Ge(),_=5,w=1<<_,S=w-1,g=w;function s(t){return t<0?(-t<<1)+1:(t<<1)+0}function o(t){var r=(t&1)===1,n=t>>1;return r?-n:n}return z.encode=function(r){var n="",e,a=s(r);do e=a&S,a>>>=_,a>0&&(e|=g),n+=i.encode(e);while(a>0);return n},z.decode=function(r,n,e){var a=r.length,h=0,c=0,d,v;do{if(n>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(v=i.decode(r.charCodeAt(n++)),v===-1)throw new Error("Invalid base64 digit: "+r.charAt(n-1));d=!!(v&g),v&=S,h=h+(v<<c),c+=_}while(d);e.value=o(h),e.rest=n},z}var X={},se;function k(){return se||(se=1,function(i){function _(u,l,L){if(l in u)return u[l];if(arguments.length===3)return L;throw new Error('"'+l+'" is a required argument.')}i.getArg=_;var w=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,S=/^data:.+\,.+$/;function g(u){var l=u.match(w);return l?{scheme:l[1],auth:l[2],host:l[3],port:l[4],path:l[5]}:null}i.urlParse=g;function s(u){var l="";return u.scheme&&(l+=u.scheme+":"),l+="//",u.auth&&(l+=u.auth+"@"),u.host&&(l+=u.host),u.port&&(l+=":"+u.port),u.path&&(l+=u.path),l}i.urlGenerate=s;function o(u){var l=u,L=g(u);if(L){if(!L.path)return u;l=L.path}for(var y=i.isAbsolute(l),N=l.split(/\/+/),B,G=0,I=N.length-1;I>=0;I--)B=N[I],B==="."?N.splice(I,1):B===".."?G++:G>0&&(B===""?(N.splice(I+1,G),G=0):(N.splice(I,2),G--));return l=N.join("/"),l===""&&(l=y?"/":"."),L?(L.path=l,s(L)):l}i.normalize=o;function t(u,l){u===""&&(u="."),l===""&&(l=".");var L=g(l),y=g(u);if(y&&(u=y.path||"/"),L&&!L.scheme)return y&&(L.scheme=y.scheme),s(L);if(L||l.match(S))return l;if(y&&!y.host&&!y.path)return y.host=l,s(y);var N=l.charAt(0)==="/"?l:o(u.replace(/\/+$/,"")+"/"+l);return y?(y.path=N,s(y)):N}i.join=t,i.isAbsolute=function(u){return u.charAt(0)==="/"||w.test(u)};function r(u,l){u===""&&(u="."),u=u.replace(/\/$/,"");for(var L=0;l.indexOf(u+"/")!==0;){var y=u.lastIndexOf("/");if(y<0||(u=u.slice(0,y),u.match(/^([^\/]+:\/)?\/*$/)))return l;++L}return Array(L+1).join("../")+l.substr(u.length+1)}i.relative=r;var n=function(){var u=Object.create(null);return!("__proto__"in u)}();function e(u){return u}function a(u){return c(u)?"$"+u:u}i.toSetString=n?e:a;function h(u){return c(u)?u.slice(1):u}i.fromSetString=n?e:h;function c(u){if(!u)return!1;var l=u.length;if(l<9||u.charCodeAt(l-1)!==95||u.charCodeAt(l-2)!==95||u.charCodeAt(l-3)!==111||u.charCodeAt(l-4)!==116||u.charCodeAt(l-5)!==111||u.charCodeAt(l-6)!==114||u.charCodeAt(l-7)!==112||u.charCodeAt(l-8)!==95||u.charCodeAt(l-9)!==95)return!1;for(var L=l-10;L>=0;L--)if(u.charCodeAt(L)!==36)return!1;return!0}function d(u,l,L){var y=m(u.source,l.source);return y!==0||(y=u.originalLine-l.originalLine,y!==0)||(y=u.originalColumn-l.originalColumn,y!==0||L)||(y=u.generatedColumn-l.generatedColumn,y!==0)||(y=u.generatedLine-l.generatedLine,y!==0)?y:m(u.name,l.name)}i.compareByOriginalPositions=d;function v(u,l,L){var y=u.generatedLine-l.generatedLine;return y!==0||(y=u.generatedColumn-l.generatedColumn,y!==0||L)||(y=m(u.source,l.source),y!==0)||(y=u.originalLine-l.originalLine,y!==0)||(y=u.originalColumn-l.originalColumn,y!==0)?y:m(u.name,l.name)}i.compareByGeneratedPositionsDeflated=v;function m(u,l){return u===l?0:u===null?1:l===null?-1:u>l?1:-1}function E(u,l){var L=u.generatedLine-l.generatedLine;return L!==0||(L=u.generatedColumn-l.generatedColumn,L!==0)||(L=m(u.source,l.source),L!==0)||(L=u.originalLine-l.originalLine,L!==0)||(L=u.originalColumn-l.originalColumn,L!==0)?L:m(u.name,l.name)}i.compareByGeneratedPositionsInflated=E;function M(u){return JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}i.parseSourceMapInput=M;function A(u,l,L){if(l=l||"",u&&(u[u.length-1]!=="/"&&l[0]!=="/"&&(u+="/"),l=u+l),L){var y=g(L);if(!y)throw new Error("sourceMapURL could not be parsed");if(y.path){var N=y.path.lastIndexOf("/");N>=0&&(y.path=y.path.substring(0,N+1))}l=t(s(y),l)}return o(l)}i.computeSourceURL=A}(X)),X}var Z={},ae;function Se(){if(ae)return Z;ae=1;var i=k(),_=Object.prototype.hasOwnProperty,w=typeof Map<"u";function S(){this._array=[],this._set=w?new Map:Object.create(null)}return S.fromArray=function(s,o){for(var t=new S,r=0,n=s.length;r<n;r++)t.add(s[r],o);return t},S.prototype.size=function(){return w?this._set.size:Object.getOwnPropertyNames(this._set).length},S.prototype.add=function(s,o){var t=w?s:i.toSetString(s),r=w?this.has(s):_.call(this._set,t),n=this._array.length;(!r||o)&&this._array.push(s),r||(w?this._set.set(s,n):this._set[t]=n)},S.prototype.has=function(s){if(w)return this._set.has(s);var o=i.toSetString(s);return _.call(this._set,o)},S.prototype.indexOf=function(s){if(w){var o=this._set.get(s);if(o>=0)return o}else{var t=i.toSetString(s);if(_.call(this._set,t))return this._set[t]}throw new Error('"'+s+'" is not in the set.')},S.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)},S.prototype.toArray=function(){return this._array.slice()},Z.ArraySet=S,Z}var K={},le;function qe(){if(le)return K;le=1;var i=k();function _(S,g){var s=S.generatedLine,o=g.generatedLine,t=S.generatedColumn,r=g.generatedColumn;return o>s||o==s&&r>=t||i.compareByGeneratedPositionsInflated(S,g)<=0}function w(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return w.prototype.unsortedForEach=function(g,s){this._array.forEach(g,s)},w.prototype.add=function(g){_(this._last,g)?(this._last=g,this._array.push(g)):(this._sorted=!1,this._array.push(g))},w.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},K.MappingList=w,K}var ce;function ye(){if(ce)return J;ce=1;var i=me(),_=k(),w=Se().ArraySet,S=qe().MappingList;function g(s){s||(s={}),this._file=_.getArg(s,"file",null),this._sourceRoot=_.getArg(s,"sourceRoot",null),this._skipValidation=_.getArg(s,"skipValidation",!1),this._sources=new w,this._names=new w,this._mappings=new S,this._sourcesContents=null}return g.prototype._version=3,g.fromSourceMap=function(o){var t=o.sourceRoot,r=new g({file:o.file,sourceRoot:t});return o.eachMapping(function(n){var e={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(e.source=n.source,t!=null&&(e.source=_.relative(t,e.source)),e.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(e.name=n.name)),r.addMapping(e)}),o.sources.forEach(function(n){var e=n;t!==null&&(e=_.relative(t,n)),r._sources.has(e)||r._sources.add(e);var a=o.sourceContentFor(n);a!=null&&r.setSourceContent(n,a)}),r},g.prototype.addMapping=function(o){var t=_.getArg(o,"generated"),r=_.getArg(o,"original",null),n=_.getArg(o,"source",null),e=_.getArg(o,"name",null);this._skipValidation||this._validateMapping(t,r,n,e),n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),e!=null&&(e=String(e),this._names.has(e)||this._names.add(e)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:n,name:e})},g.prototype.setSourceContent=function(o,t){var r=o;this._sourceRoot!=null&&(r=_.relative(this._sourceRoot,r)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[_.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[_.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},g.prototype.applySourceMap=function(o,t,r){var n=t;if(t==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=o.file}var e=this._sourceRoot;e!=null&&(n=_.relative(e,n));var a=new w,h=new w;this._mappings.unsortedForEach(function(c){if(c.source===n&&c.originalLine!=null){var d=o.originalPositionFor({line:c.originalLine,column:c.originalColumn});d.source!=null&&(c.source=d.source,r!=null&&(c.source=_.join(r,c.source)),e!=null&&(c.source=_.relative(e,c.source)),c.originalLine=d.line,c.originalColumn=d.column,d.name!=null&&(c.name=d.name))}var v=c.source;v!=null&&!a.has(v)&&a.add(v);var m=c.name;m!=null&&!h.has(m)&&h.add(m)},this),this._sources=a,this._names=h,o.sources.forEach(function(c){var d=o.sourceContentFor(c);d!=null&&(r!=null&&(c=_.join(r,c)),e!=null&&(c=_.relative(e,c)),this.setSourceContent(c,d))},this)},g.prototype._validateMapping=function(o,t,r,n){if(t&&typeof t.line!="number"&&typeof t.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!t&&!r&&!n)){if(o&&"line"in o&&"column"in o&&t&&"line"in t&&"column"in t&&o.line>0&&o.column>=0&&t.line>0&&t.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:o,source:r,original:t,name:n}))}},g.prototype._serializeMappings=function(){for(var o=0,t=1,r=0,n=0,e=0,a=0,h="",c,d,v,m,E=this._mappings.toArray(),M=0,A=E.length;M<A;M++){if(d=E[M],c="",d.generatedLine!==t)for(o=0;d.generatedLine!==t;)c+=";",t++;else if(M>0){if(!_.compareByGeneratedPositionsInflated(d,E[M-1]))continue;c+=","}c+=i.encode(d.generatedColumn-o),o=d.generatedColumn,d.source!=null&&(m=this._sources.indexOf(d.source),c+=i.encode(m-a),a=m,c+=i.encode(d.originalLine-1-n),n=d.originalLine-1,c+=i.encode(d.originalColumn-r),r=d.originalColumn,d.name!=null&&(v=this._names.indexOf(d.name),c+=i.encode(v-e),e=v)),h+=c}return h},g.prototype._generateSourcesContent=function(o,t){return o.map(function(r){if(!this._sourcesContents)return null;t!=null&&(r=_.relative(t,r));var n=_.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},g.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o},g.prototype.toString=function(){return JSON.stringify(this.toJSON())},J.SourceMapGenerator=g,J}var U={},Y={},fe;function Ie(){return fe||(fe=1,function(i){i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2;function _(w,S,g,s,o,t){var r=Math.floor((S-w)/2)+w,n=o(g,s[r],!0);return n===0?r:n>0?S-r>1?_(r,S,g,s,o,t):t==i.LEAST_UPPER_BOUND?S<s.length?S:-1:r:r-w>1?_(w,r,g,s,o,t):t==i.LEAST_UPPER_BOUND?r:w<0?-1:w}i.search=function(S,g,s,o){if(g.length===0)return-1;var t=_(-1,g.length,S,g,s,o||i.GREATEST_LOWER_BOUND);if(t<0)return-1;for(;t-1>=0&&s(g[t],g[t-1],!0)===0;)--t;return t}}(Y)),Y}var H={},he;function Pe(){if(he)return H;he=1;function i(S,g,s){var o=S[g];S[g]=S[s],S[s]=o}function _(S,g){return Math.round(S+Math.random()*(g-S))}function w(S,g,s,o){if(s<o){var t=_(s,o),r=s-1;i(S,t,o);for(var n=S[o],e=s;e<o;e++)g(S[e],n)<=0&&(r+=1,i(S,r,e));i(S,r+1,e);var a=r+1;w(S,g,s,a-1),w(S,g,a+1,o)}}return H.quickSort=function(S,g){w(S,g,0,S.length-1)},H}var ge;function Te(){if(ge)return U;ge=1;var i=k(),_=Ie(),w=Se().ArraySet,S=me(),g=Pe().quickSort;function s(n,e){var a=n;return typeof n=="string"&&(a=i.parseSourceMapInput(n)),a.sections!=null?new r(a,e):new o(a,e)}s.fromSourceMap=function(n,e){return o.fromSourceMap(n,e)},s.prototype._version=3,s.prototype.__generatedMappings=null,Object.defineProperty(s.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),s.prototype.__originalMappings=null,Object.defineProperty(s.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),s.prototype._charIsMappingSeparator=function(e,a){var h=e.charAt(a);return h===";"||h===","},s.prototype._parseMappings=function(e,a){throw new Error("Subclasses must implement _parseMappings")},s.GENERATED_ORDER=1,s.ORIGINAL_ORDER=2,s.GREATEST_LOWER_BOUND=1,s.LEAST_UPPER_BOUND=2,s.prototype.eachMapping=function(e,a,h){var c=a||null,d=h||s.GENERATED_ORDER,v;switch(d){case s.GENERATED_ORDER:v=this._generatedMappings;break;case s.ORIGINAL_ORDER:v=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var m=this.sourceRoot;v.map(function(E){var M=E.source===null?null:this._sources.at(E.source);return M=i.computeSourceURL(m,M,this._sourceMapURL),{source:M,generatedLine:E.generatedLine,generatedColumn:E.generatedColumn,originalLine:E.originalLine,originalColumn:E.originalColumn,name:E.name===null?null:this._names.at(E.name)}},this).forEach(e,c)},s.prototype.allGeneratedPositionsFor=function(e){var a=i.getArg(e,"line"),h={source:i.getArg(e,"source"),originalLine:a,originalColumn:i.getArg(e,"column",0)};if(h.source=this._findSourceIndex(h.source),h.source<0)return[];var c=[],d=this._findMapping(h,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,_.LEAST_UPPER_BOUND);if(d>=0){var v=this._originalMappings[d];if(e.column===void 0)for(var m=v.originalLine;v&&v.originalLine===m;)c.push({line:i.getArg(v,"generatedLine",null),column:i.getArg(v,"generatedColumn",null),lastColumn:i.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++d];else for(var E=v.originalColumn;v&&v.originalLine===a&&v.originalColumn==E;)c.push({line:i.getArg(v,"generatedLine",null),column:i.getArg(v,"generatedColumn",null),lastColumn:i.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++d]}return c},U.SourceMapConsumer=s;function o(n,e){var a=n;typeof n=="string"&&(a=i.parseSourceMapInput(n));var h=i.getArg(a,"version"),c=i.getArg(a,"sources"),d=i.getArg(a,"names",[]),v=i.getArg(a,"sourceRoot",null),m=i.getArg(a,"sourcesContent",null),E=i.getArg(a,"mappings"),M=i.getArg(a,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);v&&(v=i.normalize(v)),c=c.map(String).map(i.normalize).map(function(A){return v&&i.isAbsolute(v)&&i.isAbsolute(A)?i.relative(v,A):A}),this._names=w.fromArray(d.map(String),!0),this._sources=w.fromArray(c,!0),this._absoluteSources=this._sources.toArray().map(function(A){return i.computeSourceURL(v,A,e)}),this.sourceRoot=v,this.sourcesContent=m,this._mappings=E,this._sourceMapURL=e,this.file=M}o.prototype=Object.create(s.prototype),o.prototype.consumer=s,o.prototype._findSourceIndex=function(n){var e=n;if(this.sourceRoot!=null&&(e=i.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var a;for(a=0;a<this._absoluteSources.length;++a)if(this._absoluteSources[a]==n)return a;return-1},o.fromSourceMap=function(e,a){var h=Object.create(o.prototype),c=h._names=w.fromArray(e._names.toArray(),!0),d=h._sources=w.fromArray(e._sources.toArray(),!0);h.sourceRoot=e._sourceRoot,h.sourcesContent=e._generateSourcesContent(h._sources.toArray(),h.sourceRoot),h.file=e._file,h._sourceMapURL=a,h._absoluteSources=h._sources.toArray().map(function(L){return i.computeSourceURL(h.sourceRoot,L,a)});for(var v=e._mappings.toArray().slice(),m=h.__generatedMappings=[],E=h.__originalMappings=[],M=0,A=v.length;M<A;M++){var u=v[M],l=new t;l.generatedLine=u.generatedLine,l.generatedColumn=u.generatedColumn,u.source&&(l.source=d.indexOf(u.source),l.originalLine=u.originalLine,l.originalColumn=u.originalColumn,u.name&&(l.name=c.indexOf(u.name)),E.push(l)),m.push(l)}return g(h.__originalMappings,i.compareByOriginalPositions),h},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function t(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}o.prototype._parseMappings=function(e,a){for(var h=1,c=0,d=0,v=0,m=0,E=0,M=e.length,A=0,u={},l={},L=[],y=[],N,B,G,I,V;A<M;)if(e.charAt(A)===";")h++,A++,c=0;else if(e.charAt(A)===",")A++;else{for(N=new t,N.generatedLine=h,I=A;I<M&&!this._charIsMappingSeparator(e,I);I++);if(B=e.slice(A,I),G=u[B],G)A+=B.length;else{for(G=[];A<I;)S.decode(e,A,l),V=l.value,A=l.rest,G.push(V);if(G.length===2)throw new Error("Found a source, but no line and column");if(G.length===3)throw new Error("Found a source and line, but no column");u[B]=G}N.generatedColumn=c+G[0],c=N.generatedColumn,G.length>1&&(N.source=m+G[1],m+=G[1],N.originalLine=d+G[2],d=N.originalLine,N.originalLine+=1,N.originalColumn=v+G[3],v=N.originalColumn,G.length>4&&(N.name=E+G[4],E+=G[4])),y.push(N),typeof N.originalLine=="number"&&L.push(N)}g(y,i.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,g(L,i.compareByOriginalPositions),this.__originalMappings=L},o.prototype._findMapping=function(e,a,h,c,d,v){if(e[h]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[h]);if(e[c]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[c]);return _.search(e,a,d,v)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var a=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var h=this._generatedMappings[e+1];if(a.generatedLine===h.generatedLine){a.lastGeneratedColumn=h.generatedColumn-1;continue}}a.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(e){var a={generatedLine:i.getArg(e,"line"),generatedColumn:i.getArg(e,"column")},h=this._findMapping(a,this._generatedMappings,"generatedLine","generatedColumn",i.compareByGeneratedPositionsDeflated,i.getArg(e,"bias",s.GREATEST_LOWER_BOUND));if(h>=0){var c=this._generatedMappings[h];if(c.generatedLine===a.generatedLine){var d=i.getArg(c,"source",null);d!==null&&(d=this._sources.at(d),d=i.computeSourceURL(this.sourceRoot,d,this._sourceMapURL));var v=i.getArg(c,"name",null);return v!==null&&(v=this._names.at(v)),{source:d,line:i.getArg(c,"originalLine",null),column:i.getArg(c,"originalColumn",null),name:v}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},o.prototype.sourceContentFor=function(e,a){if(!this.sourcesContent)return null;var h=this._findSourceIndex(e);if(h>=0)return this.sourcesContent[h];var c=e;this.sourceRoot!=null&&(c=i.relative(this.sourceRoot,c));var d;if(this.sourceRoot!=null&&(d=i.urlParse(this.sourceRoot))){var v=c.replace(/^file:\/\//,"");if(d.scheme=="file"&&this._sources.has(v))return this.sourcesContent[this._sources.indexOf(v)];if((!d.path||d.path=="/")&&this._sources.has("/"+c))return this.sourcesContent[this._sources.indexOf("/"+c)]}if(a)return null;throw new Error('"'+c+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var a=i.getArg(e,"source");if(a=this._findSourceIndex(a),a<0)return{line:null,column:null,lastColumn:null};var h={source:a,originalLine:i.getArg(e,"line"),originalColumn:i.getArg(e,"column")},c=this._findMapping(h,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,i.getArg(e,"bias",s.GREATEST_LOWER_BOUND));if(c>=0){var d=this._originalMappings[c];if(d.source===h.source)return{line:i.getArg(d,"generatedLine",null),column:i.getArg(d,"generatedColumn",null),lastColumn:i.getArg(d,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},U.BasicSourceMapConsumer=o;function r(n,e){var a=n;typeof n=="string"&&(a=i.parseSourceMapInput(n));var h=i.getArg(a,"version"),c=i.getArg(a,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new w,this._names=new w;var d={line:-1,column:0};this._sections=c.map(function(v){if(v.url)throw new Error("Support for url field in sections not implemented.");var m=i.getArg(v,"offset"),E=i.getArg(m,"line"),M=i.getArg(m,"column");if(E<d.line||E===d.line&&M<d.column)throw new Error("Section offsets must be ordered and non-overlapping.");return d=m,{generatedOffset:{generatedLine:E+1,generatedColumn:M+1},consumer:new s(i.getArg(v,"map"),e)}})}return r.prototype=Object.create(s.prototype),r.prototype.constructor=s,r.prototype._version=3,Object.defineProperty(r.prototype,"sources",{get:function(){for(var n=[],e=0;e<this._sections.length;e++)for(var a=0;a<this._sections[e].consumer.sources.length;a++)n.push(this._sections[e].consumer.sources[a]);return n}}),r.prototype.originalPositionFor=function(e){var a={generatedLine:i.getArg(e,"line"),generatedColumn:i.getArg(e,"column")},h=_.search(a,this._sections,function(d,v){var m=d.generatedLine-v.generatedOffset.generatedLine;return m||d.generatedColumn-v.generatedOffset.generatedColumn}),c=this._sections[h];return c?c.consumer.originalPositionFor({line:a.generatedLine-(c.generatedOffset.generatedLine-1),column:a.generatedColumn-(c.generatedOffset.generatedLine===a.generatedLine?c.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},r.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},r.prototype.sourceContentFor=function(e,a){for(var h=0;h<this._sections.length;h++){var c=this._sections[h],d=c.consumer.sourceContentFor(e,!0);if(d)return d}if(a)return null;throw new Error('"'+e+'" is not in the SourceMap.')},r.prototype.generatedPositionFor=function(e){for(var a=0;a<this._sections.length;a++){var h=this._sections[a];if(h.consumer._findSourceIndex(i.getArg(e,"source"))!==-1){var c=h.consumer.generatedPositionFor(e);if(c){var d={line:c.line+(h.generatedOffset.generatedLine-1),column:c.column+(h.generatedOffset.generatedLine===c.line?h.generatedOffset.generatedColumn-1:0)};return d}}}return{line:null,column:null}},r.prototype._parseMappings=function(e,a){this.__generatedMappings=[],this.__originalMappings=[];for(var h=0;h<this._sections.length;h++)for(var c=this._sections[h],d=c.consumer._generatedMappings,v=0;v<d.length;v++){var m=d[v],E=c.consumer._sources.at(m.source);E=i.computeSourceURL(c.consumer.sourceRoot,E,this._sourceMapURL),this._sources.add(E),E=this._sources.indexOf(E);var M=null;m.name&&(M=c.consumer._names.at(m.name),this._names.add(M),M=this._names.indexOf(M));var A={source:E,generatedLine:m.generatedLine+(c.generatedOffset.generatedLine-1),generatedColumn:m.generatedColumn+(c.generatedOffset.generatedLine===m.generatedLine?c.generatedOffset.generatedColumn-1:0),originalLine:m.originalLine,originalColumn:m.originalColumn,name:M};this.__generatedMappings.push(A),typeof A.originalLine=="number"&&this.__originalMappings.push(A)}g(this.__generatedMappings,i.compareByGeneratedPositionsDeflated),g(this.__originalMappings,i.compareByOriginalPositions)},U.IndexedSourceMapConsumer=r,U}var ee={},de;function Be(){if(de)return ee;de=1;var i=ye().SourceMapGenerator,_=k(),w=/(\r?\n)/,S=10,g="$$$isSourceNode$$$";function s(o,t,r,n,e){this.children=[],this.sourceContents={},this.line=o??null,this.column=t??null,this.source=r??null,this.name=e??null,this[g]=!0,n!=null&&this.add(n)}return s.fromStringWithSourceMap=function(t,r,n){var e=new s,a=t.split(w),h=0,c=function(){var M=u(),A=u()||"";return M+A;function u(){return h<a.length?a[h++]:void 0}},d=1,v=0,m=null;return r.eachMapping(function(M){if(m!==null)if(d<M.generatedLine)E(m,c()),d++,v=0;else{var A=a[h]||"",u=A.substr(0,M.generatedColumn-v);a[h]=A.substr(M.generatedColumn-v),v=M.generatedColumn,E(m,u),m=M;return}for(;d<M.generatedLine;)e.add(c()),d++;if(v<M.generatedColumn){var A=a[h]||"";e.add(A.substr(0,M.generatedColumn)),a[h]=A.substr(M.generatedColumn),v=M.generatedColumn}m=M},this),h<a.length&&(m&&E(m,c()),e.add(a.splice(h).join(""))),r.sources.forEach(function(M){var A=r.sourceContentFor(M);A!=null&&(n!=null&&(M=_.join(n,M)),e.setSourceContent(M,A))}),e;function E(M,A){if(M===null||M.source===void 0)e.add(A);else{var u=n?_.join(n,M.source):M.source;e.add(new s(M.originalLine,M.originalColumn,u,A,M.name))}}},s.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[g]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},s.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[g]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},s.prototype.walk=function(t){for(var r,n=0,e=this.children.length;n<e;n++)r=this.children[n],r[g]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})},s.prototype.join=function(t){var r,n,e=this.children.length;if(e>0){for(r=[],n=0;n<e-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this},s.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[g]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this},s.prototype.setSourceContent=function(t,r){this.sourceContents[_.toSetString(t)]=r},s.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][g]&&this.children[r].walkSourceContents(t);for(var e=Object.keys(this.sourceContents),r=0,n=e.length;r<n;r++)t(_.fromSetString(e[r]),this.sourceContents[e[r]])},s.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t},s.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new i(t),e=!1,a=null,h=null,c=null,d=null;return this.walk(function(v,m){r.code+=v,m.source!==null&&m.line!==null&&m.column!==null?((a!==m.source||h!==m.line||c!==m.column||d!==m.name)&&n.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:r.line,column:r.column},name:m.name}),a=m.source,h=m.line,c=m.column,d=m.name,e=!0):e&&(n.addMapping({generated:{line:r.line,column:r.column}}),a=null,e=!1);for(var E=0,M=v.length;E<M;E++)v.charCodeAt(E)===S?(r.line++,r.column=0,E+1===M?(a=null,e=!1):e&&n.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:r.line,column:r.column},name:m.name})):r.column++}),this.walkSourceContents(function(v,m){n.setSourceContent(v,m)}),{code:r.code,map:n}},ee.SourceNode=s,ee}var ve;function xe(){return ve||(ve=1,D.SourceMapGenerator=ye().SourceMapGenerator,D.SourceMapConsumer=Te().SourceMapConsumer,D.SourceNode=Be().SourceNode),D}var re,pe;function je(){if(pe)return re;pe=1;var i=Object.prototype.toString,_=typeof j<"u"&&typeof j.alloc=="function"&&typeof j.allocUnsafe=="function"&&typeof j.from=="function";function w(o){return i.call(o).slice(8,-1)==="ArrayBuffer"}function S(o,t,r){t>>>=0;var n=o.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=n;else if(r>>>=0,r>n)throw new RangeError("'length' is out of bounds");return _?j.from(o.slice(t,t+r)):new j(new Uint8Array(o.slice(t,t+r)))}function g(o,t){if((typeof t!="string"||t==="")&&(t="utf8"),!j.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return _?j.from(o,t):new j(o,t)}function s(o,t,r){if(typeof o=="number")throw new TypeError('"value" argument must not be a number');return w(o)?S(o,t,r):typeof o=="string"?g(o,t):_?j.from(o):new j(o)}return re=s,re}$.exports;var _e;function Fe(){return _e||(_e=1,function(i,_){var w=xe().SourceMapConsumer,S=Oe(),g;try{g=be,(!g.existsSync||!g.readFileSync)&&(g=null)}catch{}var s=je();function o(f,p){return f.require(p)}var t=!1,r=!1,n=!1,e="auto",a={},h={},c=/^data:application\/json[^,]+base64,/,d=[],v=[];function m(){return e==="browser"?!0:e==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function E(){return typeof T=="object"&&T!==null&&typeof T.on=="function"}function M(){return typeof T=="object"&&T!==null?T.version:""}function A(){if(typeof T=="object"&&T!==null)return T.stderr}function u(f){if(typeof T=="object"&&T!==null&&typeof T.exit=="function")return T.exit(f)}function l(f){return function(p){for(var C=0;C<f.length;C++){var b=f[C](p);if(b)return b}return null}}var L=l(d);d.push(function(f){if(f=f.trim(),/^file:/.test(f)&&(f=f.replace(/file:\/\/\/(\w:)?/,function(b,R){return R?"":"/"})),f in a)return a[f];var p="";try{if(g)g.existsSync(f)&&(p=g.readFileSync(f,"utf8"));else{var C=new XMLHttpRequest;C.open("GET",f,!1),C.send(null),C.readyState===4&&C.status===200&&(p=C.responseText)}}catch{}return a[f]=p});function y(f,p){if(!f)return p;var C=S.dirname(f),b=/^\w+:\/\/[^\/]*/.exec(C),R=b?b[0]:"",O=C.slice(R.length);return R&&/^\/\w\:/.test(O)?(R+="/",R+S.resolve(C.slice(R.length),p).replace(/\\/g,"/")):R+S.resolve(C.slice(R.length),p)}function N(f){var p;if(m())try{var C=new XMLHttpRequest;C.open("GET",f,!1),C.send(null),p=C.readyState===4?C.responseText:null;var b=C.getResponseHeader("SourceMap")||C.getResponseHeader("X-SourceMap");if(b)return b}catch{}p=L(f);for(var R=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,O,q;q=R.exec(p);)O=q;return O?O[1]:null}var B=l(v);v.push(function(f){var p=N(f);if(!p)return null;var C;if(c.test(p)){var b=p.slice(p.indexOf(",")+1);C=s(b,"base64").toString(),p=f}else p=y(f,p),C=L(p);return C?{url:p,map:C}:null});function G(f){var p=h[f.source];if(!p){var C=B(f.source);C?(p=h[f.source]={url:C.url,map:new w(C.map)},p.map.sourcesContent&&p.map.sources.forEach(function(R,O){var q=p.map.sourcesContent[O];if(q){var P=y(p.url,R);a[P]=q}})):p=h[f.source]={url:null,map:null}}if(p&&p.map&&typeof p.map.originalPositionFor=="function"){var b=p.map.originalPositionFor(f);if(b.source!==null)return b.source=y(p.url,b.source),b}return f}function I(f){var p=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(f);if(p){var C=G({source:p[2],line:+p[3],column:p[4]-1});return"eval at "+p[1]+" ("+C.source+":"+C.line+":"+(C.column+1)+")"}return p=/^eval at ([^(]+) \((.+)\)$/.exec(f),p?"eval at "+p[1]+" ("+I(p[2])+")":f}function V(){var f,p="";if(this.isNative())p="native";else{f=this.getScriptNameOrSourceURL(),!f&&this.isEval()&&(p=this.getEvalOrigin(),p+=", "),f?p+=f:p+="<anonymous>";var C=this.getLineNumber();if(C!=null){p+=":"+C;var b=this.getColumnNumber();b&&(p+=":"+b)}}var R="",O=this.getFunctionName(),q=!0,P=this.isConstructor(),Q=!(this.isToplevel()||P);if(Q){var x=this.getTypeName();x==="[object Object]"&&(x="null");var F=this.getMethodName();O?(x&&O.indexOf(x)!=0&&(R+=x+"."),R+=O,F&&O.indexOf("."+F)!=O.length-F.length-1&&(R+=" [as "+F+"]")):R+=x+"."+(F||"<anonymous>")}else P?R+="new "+(O||"<anonymous>"):O?R+=O:(R+=p,q=!1);return q&&(R+=" ("+p+")"),R}function ne(f){var p={};return Object.getOwnPropertyNames(Object.getPrototypeOf(f)).forEach(function(C){p[C]=/^(?:is|get)/.test(C)?function(){return f[C].call(f)}:f[C]}),p.toString=V,p}function te(f,p){if(p===void 0&&(p={nextPosition:null,curPosition:null}),f.isNative())return p.curPosition=null,f;var C=f.getFileName()||f.getScriptNameOrSourceURL();if(C){var b=f.getLineNumber(),R=f.getColumnNumber()-1,O=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,q=O.test(M())?0:62;b===1&&R>q&&!m()&&!f.isEval()&&(R-=q);var P=G({source:C,line:b,column:R});p.curPosition=P,f=ne(f);var Q=f.getFunctionName;return f.getFunctionName=function(){return p.nextPosition==null?Q():p.nextPosition.name||Q()},f.getFileName=function(){return P.source},f.getLineNumber=function(){return P.line},f.getColumnNumber=function(){return P.column+1},f.getScriptNameOrSourceURL=function(){return P.source},f}var x=f.isEval()&&f.getEvalOrigin();return x&&(x=I(x),f=ne(f),f.getEvalOrigin=function(){return x}),f}function Me(f,p){n&&(a={},h={});for(var C=f.name||"Error",b=f.message||"",R=C+": "+b,O={nextPosition:null,curPosition:null},q=[],P=p.length-1;P>=0;P--)q.push(`
|
|
1
|
+
import{B as j,r as Oe,a as be,p as T,g as Re}from"./index-BXsrbFYA.js";function Ne(i,_){for(var w=0;w<_.length;w++){const S=_[w];if(typeof S!="string"&&!Array.isArray(S)){for(const g in S)if(g!=="default"&&!(g in i)){const s=Object.getOwnPropertyDescriptor(S,g);s&&Object.defineProperty(i,g,s.get?s:{enumerable:!0,get:()=>S[g]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var $={exports:{}},D={},J={},z={},W={},ie;function Ge(){if(ie)return W;ie=1;var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return W.encode=function(_){if(0<=_&&_<i.length)return i[_];throw new TypeError("Must be between 0 and 63: "+_)},W.decode=function(_){var w=65,S=90,g=97,s=122,o=48,t=57,r=43,n=47,e=26,a=52;return w<=_&&_<=S?_-w:g<=_&&_<=s?_-g+e:o<=_&&_<=t?_-o+a:_==r?62:_==n?63:-1},W}var ue;function me(){if(ue)return z;ue=1;var i=Ge(),_=5,w=1<<_,S=w-1,g=w;function s(t){return t<0?(-t<<1)+1:(t<<1)+0}function o(t){var r=(t&1)===1,n=t>>1;return r?-n:n}return z.encode=function(r){var n="",e,a=s(r);do e=a&S,a>>>=_,a>0&&(e|=g),n+=i.encode(e);while(a>0);return n},z.decode=function(r,n,e){var a=r.length,h=0,c=0,d,v;do{if(n>=a)throw new Error("Expected more digits in base 64 VLQ value.");if(v=i.decode(r.charCodeAt(n++)),v===-1)throw new Error("Invalid base64 digit: "+r.charAt(n-1));d=!!(v&g),v&=S,h=h+(v<<c),c+=_}while(d);e.value=o(h),e.rest=n},z}var X={},se;function k(){return se||(se=1,function(i){function _(u,l,L){if(l in u)return u[l];if(arguments.length===3)return L;throw new Error('"'+l+'" is a required argument.')}i.getArg=_;var w=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,S=/^data:.+\,.+$/;function g(u){var l=u.match(w);return l?{scheme:l[1],auth:l[2],host:l[3],port:l[4],path:l[5]}:null}i.urlParse=g;function s(u){var l="";return u.scheme&&(l+=u.scheme+":"),l+="//",u.auth&&(l+=u.auth+"@"),u.host&&(l+=u.host),u.port&&(l+=":"+u.port),u.path&&(l+=u.path),l}i.urlGenerate=s;function o(u){var l=u,L=g(u);if(L){if(!L.path)return u;l=L.path}for(var y=i.isAbsolute(l),N=l.split(/\/+/),B,G=0,I=N.length-1;I>=0;I--)B=N[I],B==="."?N.splice(I,1):B===".."?G++:G>0&&(B===""?(N.splice(I+1,G),G=0):(N.splice(I,2),G--));return l=N.join("/"),l===""&&(l=y?"/":"."),L?(L.path=l,s(L)):l}i.normalize=o;function t(u,l){u===""&&(u="."),l===""&&(l=".");var L=g(l),y=g(u);if(y&&(u=y.path||"/"),L&&!L.scheme)return y&&(L.scheme=y.scheme),s(L);if(L||l.match(S))return l;if(y&&!y.host&&!y.path)return y.host=l,s(y);var N=l.charAt(0)==="/"?l:o(u.replace(/\/+$/,"")+"/"+l);return y?(y.path=N,s(y)):N}i.join=t,i.isAbsolute=function(u){return u.charAt(0)==="/"||w.test(u)};function r(u,l){u===""&&(u="."),u=u.replace(/\/$/,"");for(var L=0;l.indexOf(u+"/")!==0;){var y=u.lastIndexOf("/");if(y<0||(u=u.slice(0,y),u.match(/^([^\/]+:\/)?\/*$/)))return l;++L}return Array(L+1).join("../")+l.substr(u.length+1)}i.relative=r;var n=function(){var u=Object.create(null);return!("__proto__"in u)}();function e(u){return u}function a(u){return c(u)?"$"+u:u}i.toSetString=n?e:a;function h(u){return c(u)?u.slice(1):u}i.fromSetString=n?e:h;function c(u){if(!u)return!1;var l=u.length;if(l<9||u.charCodeAt(l-1)!==95||u.charCodeAt(l-2)!==95||u.charCodeAt(l-3)!==111||u.charCodeAt(l-4)!==116||u.charCodeAt(l-5)!==111||u.charCodeAt(l-6)!==114||u.charCodeAt(l-7)!==112||u.charCodeAt(l-8)!==95||u.charCodeAt(l-9)!==95)return!1;for(var L=l-10;L>=0;L--)if(u.charCodeAt(L)!==36)return!1;return!0}function d(u,l,L){var y=m(u.source,l.source);return y!==0||(y=u.originalLine-l.originalLine,y!==0)||(y=u.originalColumn-l.originalColumn,y!==0||L)||(y=u.generatedColumn-l.generatedColumn,y!==0)||(y=u.generatedLine-l.generatedLine,y!==0)?y:m(u.name,l.name)}i.compareByOriginalPositions=d;function v(u,l,L){var y=u.generatedLine-l.generatedLine;return y!==0||(y=u.generatedColumn-l.generatedColumn,y!==0||L)||(y=m(u.source,l.source),y!==0)||(y=u.originalLine-l.originalLine,y!==0)||(y=u.originalColumn-l.originalColumn,y!==0)?y:m(u.name,l.name)}i.compareByGeneratedPositionsDeflated=v;function m(u,l){return u===l?0:u===null?1:l===null?-1:u>l?1:-1}function E(u,l){var L=u.generatedLine-l.generatedLine;return L!==0||(L=u.generatedColumn-l.generatedColumn,L!==0)||(L=m(u.source,l.source),L!==0)||(L=u.originalLine-l.originalLine,L!==0)||(L=u.originalColumn-l.originalColumn,L!==0)?L:m(u.name,l.name)}i.compareByGeneratedPositionsInflated=E;function M(u){return JSON.parse(u.replace(/^\)]}'[^\n]*\n/,""))}i.parseSourceMapInput=M;function A(u,l,L){if(l=l||"",u&&(u[u.length-1]!=="/"&&l[0]!=="/"&&(u+="/"),l=u+l),L){var y=g(L);if(!y)throw new Error("sourceMapURL could not be parsed");if(y.path){var N=y.path.lastIndexOf("/");N>=0&&(y.path=y.path.substring(0,N+1))}l=t(s(y),l)}return o(l)}i.computeSourceURL=A}(X)),X}var Z={},ae;function Se(){if(ae)return Z;ae=1;var i=k(),_=Object.prototype.hasOwnProperty,w=typeof Map<"u";function S(){this._array=[],this._set=w?new Map:Object.create(null)}return S.fromArray=function(s,o){for(var t=new S,r=0,n=s.length;r<n;r++)t.add(s[r],o);return t},S.prototype.size=function(){return w?this._set.size:Object.getOwnPropertyNames(this._set).length},S.prototype.add=function(s,o){var t=w?s:i.toSetString(s),r=w?this.has(s):_.call(this._set,t),n=this._array.length;(!r||o)&&this._array.push(s),r||(w?this._set.set(s,n):this._set[t]=n)},S.prototype.has=function(s){if(w)return this._set.has(s);var o=i.toSetString(s);return _.call(this._set,o)},S.prototype.indexOf=function(s){if(w){var o=this._set.get(s);if(o>=0)return o}else{var t=i.toSetString(s);if(_.call(this._set,t))return this._set[t]}throw new Error('"'+s+'" is not in the set.')},S.prototype.at=function(s){if(s>=0&&s<this._array.length)return this._array[s];throw new Error("No element indexed by "+s)},S.prototype.toArray=function(){return this._array.slice()},Z.ArraySet=S,Z}var K={},le;function qe(){if(le)return K;le=1;var i=k();function _(S,g){var s=S.generatedLine,o=g.generatedLine,t=S.generatedColumn,r=g.generatedColumn;return o>s||o==s&&r>=t||i.compareByGeneratedPositionsInflated(S,g)<=0}function w(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return w.prototype.unsortedForEach=function(g,s){this._array.forEach(g,s)},w.prototype.add=function(g){_(this._last,g)?(this._last=g,this._array.push(g)):(this._sorted=!1,this._array.push(g))},w.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},K.MappingList=w,K}var ce;function ye(){if(ce)return J;ce=1;var i=me(),_=k(),w=Se().ArraySet,S=qe().MappingList;function g(s){s||(s={}),this._file=_.getArg(s,"file",null),this._sourceRoot=_.getArg(s,"sourceRoot",null),this._skipValidation=_.getArg(s,"skipValidation",!1),this._sources=new w,this._names=new w,this._mappings=new S,this._sourcesContents=null}return g.prototype._version=3,g.fromSourceMap=function(o){var t=o.sourceRoot,r=new g({file:o.file,sourceRoot:t});return o.eachMapping(function(n){var e={generated:{line:n.generatedLine,column:n.generatedColumn}};n.source!=null&&(e.source=n.source,t!=null&&(e.source=_.relative(t,e.source)),e.original={line:n.originalLine,column:n.originalColumn},n.name!=null&&(e.name=n.name)),r.addMapping(e)}),o.sources.forEach(function(n){var e=n;t!==null&&(e=_.relative(t,n)),r._sources.has(e)||r._sources.add(e);var a=o.sourceContentFor(n);a!=null&&r.setSourceContent(n,a)}),r},g.prototype.addMapping=function(o){var t=_.getArg(o,"generated"),r=_.getArg(o,"original",null),n=_.getArg(o,"source",null),e=_.getArg(o,"name",null);this._skipValidation||this._validateMapping(t,r,n,e),n!=null&&(n=String(n),this._sources.has(n)||this._sources.add(n)),e!=null&&(e=String(e),this._names.has(e)||this._names.add(e)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r!=null&&r.line,originalColumn:r!=null&&r.column,source:n,name:e})},g.prototype.setSourceContent=function(o,t){var r=o;this._sourceRoot!=null&&(r=_.relative(this._sourceRoot,r)),t!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[_.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[_.toSetString(r)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},g.prototype.applySourceMap=function(o,t,r){var n=t;if(t==null){if(o.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);n=o.file}var e=this._sourceRoot;e!=null&&(n=_.relative(e,n));var a=new w,h=new w;this._mappings.unsortedForEach(function(c){if(c.source===n&&c.originalLine!=null){var d=o.originalPositionFor({line:c.originalLine,column:c.originalColumn});d.source!=null&&(c.source=d.source,r!=null&&(c.source=_.join(r,c.source)),e!=null&&(c.source=_.relative(e,c.source)),c.originalLine=d.line,c.originalColumn=d.column,d.name!=null&&(c.name=d.name))}var v=c.source;v!=null&&!a.has(v)&&a.add(v);var m=c.name;m!=null&&!h.has(m)&&h.add(m)},this),this._sources=a,this._names=h,o.sources.forEach(function(c){var d=o.sourceContentFor(c);d!=null&&(r!=null&&(c=_.join(r,c)),e!=null&&(c=_.relative(e,c)),this.setSourceContent(c,d))},this)},g.prototype._validateMapping=function(o,t,r,n){if(t&&typeof t.line!="number"&&typeof t.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(o&&"line"in o&&"column"in o&&o.line>0&&o.column>=0&&!t&&!r&&!n)){if(o&&"line"in o&&"column"in o&&t&&"line"in t&&"column"in t&&o.line>0&&o.column>=0&&t.line>0&&t.column>=0&&r)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:o,source:r,original:t,name:n}))}},g.prototype._serializeMappings=function(){for(var o=0,t=1,r=0,n=0,e=0,a=0,h="",c,d,v,m,E=this._mappings.toArray(),M=0,A=E.length;M<A;M++){if(d=E[M],c="",d.generatedLine!==t)for(o=0;d.generatedLine!==t;)c+=";",t++;else if(M>0){if(!_.compareByGeneratedPositionsInflated(d,E[M-1]))continue;c+=","}c+=i.encode(d.generatedColumn-o),o=d.generatedColumn,d.source!=null&&(m=this._sources.indexOf(d.source),c+=i.encode(m-a),a=m,c+=i.encode(d.originalLine-1-n),n=d.originalLine-1,c+=i.encode(d.originalColumn-r),r=d.originalColumn,d.name!=null&&(v=this._names.indexOf(d.name),c+=i.encode(v-e),e=v)),h+=c}return h},g.prototype._generateSourcesContent=function(o,t){return o.map(function(r){if(!this._sourcesContents)return null;t!=null&&(r=_.relative(t,r));var n=_.toSetString(r);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},g.prototype.toJSON=function(){var o={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(o.file=this._file),this._sourceRoot!=null&&(o.sourceRoot=this._sourceRoot),this._sourcesContents&&(o.sourcesContent=this._generateSourcesContent(o.sources,o.sourceRoot)),o},g.prototype.toString=function(){return JSON.stringify(this.toJSON())},J.SourceMapGenerator=g,J}var U={},Y={},fe;function Ie(){return fe||(fe=1,function(i){i.GREATEST_LOWER_BOUND=1,i.LEAST_UPPER_BOUND=2;function _(w,S,g,s,o,t){var r=Math.floor((S-w)/2)+w,n=o(g,s[r],!0);return n===0?r:n>0?S-r>1?_(r,S,g,s,o,t):t==i.LEAST_UPPER_BOUND?S<s.length?S:-1:r:r-w>1?_(w,r,g,s,o,t):t==i.LEAST_UPPER_BOUND?r:w<0?-1:w}i.search=function(S,g,s,o){if(g.length===0)return-1;var t=_(-1,g.length,S,g,s,o||i.GREATEST_LOWER_BOUND);if(t<0)return-1;for(;t-1>=0&&s(g[t],g[t-1],!0)===0;)--t;return t}}(Y)),Y}var H={},he;function Pe(){if(he)return H;he=1;function i(S,g,s){var o=S[g];S[g]=S[s],S[s]=o}function _(S,g){return Math.round(S+Math.random()*(g-S))}function w(S,g,s,o){if(s<o){var t=_(s,o),r=s-1;i(S,t,o);for(var n=S[o],e=s;e<o;e++)g(S[e],n)<=0&&(r+=1,i(S,r,e));i(S,r+1,e);var a=r+1;w(S,g,s,a-1),w(S,g,a+1,o)}}return H.quickSort=function(S,g){w(S,g,0,S.length-1)},H}var ge;function Te(){if(ge)return U;ge=1;var i=k(),_=Ie(),w=Se().ArraySet,S=me(),g=Pe().quickSort;function s(n,e){var a=n;return typeof n=="string"&&(a=i.parseSourceMapInput(n)),a.sections!=null?new r(a,e):new o(a,e)}s.fromSourceMap=function(n,e){return o.fromSourceMap(n,e)},s.prototype._version=3,s.prototype.__generatedMappings=null,Object.defineProperty(s.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),s.prototype.__originalMappings=null,Object.defineProperty(s.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),s.prototype._charIsMappingSeparator=function(e,a){var h=e.charAt(a);return h===";"||h===","},s.prototype._parseMappings=function(e,a){throw new Error("Subclasses must implement _parseMappings")},s.GENERATED_ORDER=1,s.ORIGINAL_ORDER=2,s.GREATEST_LOWER_BOUND=1,s.LEAST_UPPER_BOUND=2,s.prototype.eachMapping=function(e,a,h){var c=a||null,d=h||s.GENERATED_ORDER,v;switch(d){case s.GENERATED_ORDER:v=this._generatedMappings;break;case s.ORIGINAL_ORDER:v=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var m=this.sourceRoot;v.map(function(E){var M=E.source===null?null:this._sources.at(E.source);return M=i.computeSourceURL(m,M,this._sourceMapURL),{source:M,generatedLine:E.generatedLine,generatedColumn:E.generatedColumn,originalLine:E.originalLine,originalColumn:E.originalColumn,name:E.name===null?null:this._names.at(E.name)}},this).forEach(e,c)},s.prototype.allGeneratedPositionsFor=function(e){var a=i.getArg(e,"line"),h={source:i.getArg(e,"source"),originalLine:a,originalColumn:i.getArg(e,"column",0)};if(h.source=this._findSourceIndex(h.source),h.source<0)return[];var c=[],d=this._findMapping(h,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,_.LEAST_UPPER_BOUND);if(d>=0){var v=this._originalMappings[d];if(e.column===void 0)for(var m=v.originalLine;v&&v.originalLine===m;)c.push({line:i.getArg(v,"generatedLine",null),column:i.getArg(v,"generatedColumn",null),lastColumn:i.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++d];else for(var E=v.originalColumn;v&&v.originalLine===a&&v.originalColumn==E;)c.push({line:i.getArg(v,"generatedLine",null),column:i.getArg(v,"generatedColumn",null),lastColumn:i.getArg(v,"lastGeneratedColumn",null)}),v=this._originalMappings[++d]}return c},U.SourceMapConsumer=s;function o(n,e){var a=n;typeof n=="string"&&(a=i.parseSourceMapInput(n));var h=i.getArg(a,"version"),c=i.getArg(a,"sources"),d=i.getArg(a,"names",[]),v=i.getArg(a,"sourceRoot",null),m=i.getArg(a,"sourcesContent",null),E=i.getArg(a,"mappings"),M=i.getArg(a,"file",null);if(h!=this._version)throw new Error("Unsupported version: "+h);v&&(v=i.normalize(v)),c=c.map(String).map(i.normalize).map(function(A){return v&&i.isAbsolute(v)&&i.isAbsolute(A)?i.relative(v,A):A}),this._names=w.fromArray(d.map(String),!0),this._sources=w.fromArray(c,!0),this._absoluteSources=this._sources.toArray().map(function(A){return i.computeSourceURL(v,A,e)}),this.sourceRoot=v,this.sourcesContent=m,this._mappings=E,this._sourceMapURL=e,this.file=M}o.prototype=Object.create(s.prototype),o.prototype.consumer=s,o.prototype._findSourceIndex=function(n){var e=n;if(this.sourceRoot!=null&&(e=i.relative(this.sourceRoot,e)),this._sources.has(e))return this._sources.indexOf(e);var a;for(a=0;a<this._absoluteSources.length;++a)if(this._absoluteSources[a]==n)return a;return-1},o.fromSourceMap=function(e,a){var h=Object.create(o.prototype),c=h._names=w.fromArray(e._names.toArray(),!0),d=h._sources=w.fromArray(e._sources.toArray(),!0);h.sourceRoot=e._sourceRoot,h.sourcesContent=e._generateSourcesContent(h._sources.toArray(),h.sourceRoot),h.file=e._file,h._sourceMapURL=a,h._absoluteSources=h._sources.toArray().map(function(L){return i.computeSourceURL(h.sourceRoot,L,a)});for(var v=e._mappings.toArray().slice(),m=h.__generatedMappings=[],E=h.__originalMappings=[],M=0,A=v.length;M<A;M++){var u=v[M],l=new t;l.generatedLine=u.generatedLine,l.generatedColumn=u.generatedColumn,u.source&&(l.source=d.indexOf(u.source),l.originalLine=u.originalLine,l.originalColumn=u.originalColumn,u.name&&(l.name=c.indexOf(u.name)),E.push(l)),m.push(l)}return g(h.__originalMappings,i.compareByOriginalPositions),h},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function t(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}o.prototype._parseMappings=function(e,a){for(var h=1,c=0,d=0,v=0,m=0,E=0,M=e.length,A=0,u={},l={},L=[],y=[],N,B,G,I,V;A<M;)if(e.charAt(A)===";")h++,A++,c=0;else if(e.charAt(A)===",")A++;else{for(N=new t,N.generatedLine=h,I=A;I<M&&!this._charIsMappingSeparator(e,I);I++);if(B=e.slice(A,I),G=u[B],G)A+=B.length;else{for(G=[];A<I;)S.decode(e,A,l),V=l.value,A=l.rest,G.push(V);if(G.length===2)throw new Error("Found a source, but no line and column");if(G.length===3)throw new Error("Found a source and line, but no column");u[B]=G}N.generatedColumn=c+G[0],c=N.generatedColumn,G.length>1&&(N.source=m+G[1],m+=G[1],N.originalLine=d+G[2],d=N.originalLine,N.originalLine+=1,N.originalColumn=v+G[3],v=N.originalColumn,G.length>4&&(N.name=E+G[4],E+=G[4])),y.push(N),typeof N.originalLine=="number"&&L.push(N)}g(y,i.compareByGeneratedPositionsDeflated),this.__generatedMappings=y,g(L,i.compareByOriginalPositions),this.__originalMappings=L},o.prototype._findMapping=function(e,a,h,c,d,v){if(e[h]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[h]);if(e[c]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[c]);return _.search(e,a,d,v)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var a=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var h=this._generatedMappings[e+1];if(a.generatedLine===h.generatedLine){a.lastGeneratedColumn=h.generatedColumn-1;continue}}a.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(e){var a={generatedLine:i.getArg(e,"line"),generatedColumn:i.getArg(e,"column")},h=this._findMapping(a,this._generatedMappings,"generatedLine","generatedColumn",i.compareByGeneratedPositionsDeflated,i.getArg(e,"bias",s.GREATEST_LOWER_BOUND));if(h>=0){var c=this._generatedMappings[h];if(c.generatedLine===a.generatedLine){var d=i.getArg(c,"source",null);d!==null&&(d=this._sources.at(d),d=i.computeSourceURL(this.sourceRoot,d,this._sourceMapURL));var v=i.getArg(c,"name",null);return v!==null&&(v=this._names.at(v)),{source:d,line:i.getArg(c,"originalLine",null),column:i.getArg(c,"originalColumn",null),name:v}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return e==null}):!1},o.prototype.sourceContentFor=function(e,a){if(!this.sourcesContent)return null;var h=this._findSourceIndex(e);if(h>=0)return this.sourcesContent[h];var c=e;this.sourceRoot!=null&&(c=i.relative(this.sourceRoot,c));var d;if(this.sourceRoot!=null&&(d=i.urlParse(this.sourceRoot))){var v=c.replace(/^file:\/\//,"");if(d.scheme=="file"&&this._sources.has(v))return this.sourcesContent[this._sources.indexOf(v)];if((!d.path||d.path=="/")&&this._sources.has("/"+c))return this.sourcesContent[this._sources.indexOf("/"+c)]}if(a)return null;throw new Error('"'+c+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var a=i.getArg(e,"source");if(a=this._findSourceIndex(a),a<0)return{line:null,column:null,lastColumn:null};var h={source:a,originalLine:i.getArg(e,"line"),originalColumn:i.getArg(e,"column")},c=this._findMapping(h,this._originalMappings,"originalLine","originalColumn",i.compareByOriginalPositions,i.getArg(e,"bias",s.GREATEST_LOWER_BOUND));if(c>=0){var d=this._originalMappings[c];if(d.source===h.source)return{line:i.getArg(d,"generatedLine",null),column:i.getArg(d,"generatedColumn",null),lastColumn:i.getArg(d,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},U.BasicSourceMapConsumer=o;function r(n,e){var a=n;typeof n=="string"&&(a=i.parseSourceMapInput(n));var h=i.getArg(a,"version"),c=i.getArg(a,"sections");if(h!=this._version)throw new Error("Unsupported version: "+h);this._sources=new w,this._names=new w;var d={line:-1,column:0};this._sections=c.map(function(v){if(v.url)throw new Error("Support for url field in sections not implemented.");var m=i.getArg(v,"offset"),E=i.getArg(m,"line"),M=i.getArg(m,"column");if(E<d.line||E===d.line&&M<d.column)throw new Error("Section offsets must be ordered and non-overlapping.");return d=m,{generatedOffset:{generatedLine:E+1,generatedColumn:M+1},consumer:new s(i.getArg(v,"map"),e)}})}return r.prototype=Object.create(s.prototype),r.prototype.constructor=s,r.prototype._version=3,Object.defineProperty(r.prototype,"sources",{get:function(){for(var n=[],e=0;e<this._sections.length;e++)for(var a=0;a<this._sections[e].consumer.sources.length;a++)n.push(this._sections[e].consumer.sources[a]);return n}}),r.prototype.originalPositionFor=function(e){var a={generatedLine:i.getArg(e,"line"),generatedColumn:i.getArg(e,"column")},h=_.search(a,this._sections,function(d,v){var m=d.generatedLine-v.generatedOffset.generatedLine;return m||d.generatedColumn-v.generatedOffset.generatedColumn}),c=this._sections[h];return c?c.consumer.originalPositionFor({line:a.generatedLine-(c.generatedOffset.generatedLine-1),column:a.generatedColumn-(c.generatedOffset.generatedLine===a.generatedLine?c.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},r.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},r.prototype.sourceContentFor=function(e,a){for(var h=0;h<this._sections.length;h++){var c=this._sections[h],d=c.consumer.sourceContentFor(e,!0);if(d)return d}if(a)return null;throw new Error('"'+e+'" is not in the SourceMap.')},r.prototype.generatedPositionFor=function(e){for(var a=0;a<this._sections.length;a++){var h=this._sections[a];if(h.consumer._findSourceIndex(i.getArg(e,"source"))!==-1){var c=h.consumer.generatedPositionFor(e);if(c){var d={line:c.line+(h.generatedOffset.generatedLine-1),column:c.column+(h.generatedOffset.generatedLine===c.line?h.generatedOffset.generatedColumn-1:0)};return d}}}return{line:null,column:null}},r.prototype._parseMappings=function(e,a){this.__generatedMappings=[],this.__originalMappings=[];for(var h=0;h<this._sections.length;h++)for(var c=this._sections[h],d=c.consumer._generatedMappings,v=0;v<d.length;v++){var m=d[v],E=c.consumer._sources.at(m.source);E=i.computeSourceURL(c.consumer.sourceRoot,E,this._sourceMapURL),this._sources.add(E),E=this._sources.indexOf(E);var M=null;m.name&&(M=c.consumer._names.at(m.name),this._names.add(M),M=this._names.indexOf(M));var A={source:E,generatedLine:m.generatedLine+(c.generatedOffset.generatedLine-1),generatedColumn:m.generatedColumn+(c.generatedOffset.generatedLine===m.generatedLine?c.generatedOffset.generatedColumn-1:0),originalLine:m.originalLine,originalColumn:m.originalColumn,name:M};this.__generatedMappings.push(A),typeof A.originalLine=="number"&&this.__originalMappings.push(A)}g(this.__generatedMappings,i.compareByGeneratedPositionsDeflated),g(this.__originalMappings,i.compareByOriginalPositions)},U.IndexedSourceMapConsumer=r,U}var ee={},de;function Be(){if(de)return ee;de=1;var i=ye().SourceMapGenerator,_=k(),w=/(\r?\n)/,S=10,g="$$$isSourceNode$$$";function s(o,t,r,n,e){this.children=[],this.sourceContents={},this.line=o??null,this.column=t??null,this.source=r??null,this.name=e??null,this[g]=!0,n!=null&&this.add(n)}return s.fromStringWithSourceMap=function(t,r,n){var e=new s,a=t.split(w),h=0,c=function(){var M=u(),A=u()||"";return M+A;function u(){return h<a.length?a[h++]:void 0}},d=1,v=0,m=null;return r.eachMapping(function(M){if(m!==null)if(d<M.generatedLine)E(m,c()),d++,v=0;else{var A=a[h]||"",u=A.substr(0,M.generatedColumn-v);a[h]=A.substr(M.generatedColumn-v),v=M.generatedColumn,E(m,u),m=M;return}for(;d<M.generatedLine;)e.add(c()),d++;if(v<M.generatedColumn){var A=a[h]||"";e.add(A.substr(0,M.generatedColumn)),a[h]=A.substr(M.generatedColumn),v=M.generatedColumn}m=M},this),h<a.length&&(m&&E(m,c()),e.add(a.splice(h).join(""))),r.sources.forEach(function(M){var A=r.sourceContentFor(M);A!=null&&(n!=null&&(M=_.join(n,M)),e.setSourceContent(M,A))}),e;function E(M,A){if(M===null||M.source===void 0)e.add(A);else{var u=n?_.join(n,M.source):M.source;e.add(new s(M.originalLine,M.originalColumn,u,A,M.name))}}},s.prototype.add=function(t){if(Array.isArray(t))t.forEach(function(r){this.add(r)},this);else if(t[g]||typeof t=="string")t&&this.children.push(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},s.prototype.prepend=function(t){if(Array.isArray(t))for(var r=t.length-1;r>=0;r--)this.prepend(t[r]);else if(t[g]||typeof t=="string")this.children.unshift(t);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);return this},s.prototype.walk=function(t){for(var r,n=0,e=this.children.length;n<e;n++)r=this.children[n],r[g]?r.walk(t):r!==""&&t(r,{source:this.source,line:this.line,column:this.column,name:this.name})},s.prototype.join=function(t){var r,n,e=this.children.length;if(e>0){for(r=[],n=0;n<e-1;n++)r.push(this.children[n]),r.push(t);r.push(this.children[n]),this.children=r}return this},s.prototype.replaceRight=function(t,r){var n=this.children[this.children.length-1];return n[g]?n.replaceRight(t,r):typeof n=="string"?this.children[this.children.length-1]=n.replace(t,r):this.children.push("".replace(t,r)),this},s.prototype.setSourceContent=function(t,r){this.sourceContents[_.toSetString(t)]=r},s.prototype.walkSourceContents=function(t){for(var r=0,n=this.children.length;r<n;r++)this.children[r][g]&&this.children[r].walkSourceContents(t);for(var e=Object.keys(this.sourceContents),r=0,n=e.length;r<n;r++)t(_.fromSetString(e[r]),this.sourceContents[e[r]])},s.prototype.toString=function(){var t="";return this.walk(function(r){t+=r}),t},s.prototype.toStringWithSourceMap=function(t){var r={code:"",line:1,column:0},n=new i(t),e=!1,a=null,h=null,c=null,d=null;return this.walk(function(v,m){r.code+=v,m.source!==null&&m.line!==null&&m.column!==null?((a!==m.source||h!==m.line||c!==m.column||d!==m.name)&&n.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:r.line,column:r.column},name:m.name}),a=m.source,h=m.line,c=m.column,d=m.name,e=!0):e&&(n.addMapping({generated:{line:r.line,column:r.column}}),a=null,e=!1);for(var E=0,M=v.length;E<M;E++)v.charCodeAt(E)===S?(r.line++,r.column=0,E+1===M?(a=null,e=!1):e&&n.addMapping({source:m.source,original:{line:m.line,column:m.column},generated:{line:r.line,column:r.column},name:m.name})):r.column++}),this.walkSourceContents(function(v,m){n.setSourceContent(v,m)}),{code:r.code,map:n}},ee.SourceNode=s,ee}var ve;function xe(){return ve||(ve=1,D.SourceMapGenerator=ye().SourceMapGenerator,D.SourceMapConsumer=Te().SourceMapConsumer,D.SourceNode=Be().SourceNode),D}var re,pe;function je(){if(pe)return re;pe=1;var i=Object.prototype.toString,_=typeof j<"u"&&typeof j.alloc=="function"&&typeof j.allocUnsafe=="function"&&typeof j.from=="function";function w(o){return i.call(o).slice(8,-1)==="ArrayBuffer"}function S(o,t,r){t>>>=0;var n=o.byteLength-t;if(n<0)throw new RangeError("'offset' is out of bounds");if(r===void 0)r=n;else if(r>>>=0,r>n)throw new RangeError("'length' is out of bounds");return _?j.from(o.slice(t,t+r)):new j(new Uint8Array(o.slice(t,t+r)))}function g(o,t){if((typeof t!="string"||t==="")&&(t="utf8"),!j.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');return _?j.from(o,t):new j(o,t)}function s(o,t,r){if(typeof o=="number")throw new TypeError('"value" argument must not be a number');return w(o)?S(o,t,r):typeof o=="string"?g(o,t):_?j.from(o):new j(o)}return re=s,re}$.exports;var _e;function Fe(){return _e||(_e=1,function(i,_){var w=xe().SourceMapConsumer,S=Oe(),g;try{g=be,(!g.existsSync||!g.readFileSync)&&(g=null)}catch{}var s=je();function o(f,p){return f.require(p)}var t=!1,r=!1,n=!1,e="auto",a={},h={},c=/^data:application\/json[^,]+base64,/,d=[],v=[];function m(){return e==="browser"?!0:e==="node"?!1:typeof window<"u"&&typeof XMLHttpRequest=="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function E(){return typeof T=="object"&&T!==null&&typeof T.on=="function"}function M(){return typeof T=="object"&&T!==null?T.version:""}function A(){if(typeof T=="object"&&T!==null)return T.stderr}function u(f){if(typeof T=="object"&&T!==null&&typeof T.exit=="function")return T.exit(f)}function l(f){return function(p){for(var C=0;C<f.length;C++){var b=f[C](p);if(b)return b}return null}}var L=l(d);d.push(function(f){if(f=f.trim(),/^file:/.test(f)&&(f=f.replace(/file:\/\/\/(\w:)?/,function(b,R){return R?"":"/"})),f in a)return a[f];var p="";try{if(g)g.existsSync(f)&&(p=g.readFileSync(f,"utf8"));else{var C=new XMLHttpRequest;C.open("GET",f,!1),C.send(null),C.readyState===4&&C.status===200&&(p=C.responseText)}}catch{}return a[f]=p});function y(f,p){if(!f)return p;var C=S.dirname(f),b=/^\w+:\/\/[^\/]*/.exec(C),R=b?b[0]:"",O=C.slice(R.length);return R&&/^\/\w\:/.test(O)?(R+="/",R+S.resolve(C.slice(R.length),p).replace(/\\/g,"/")):R+S.resolve(C.slice(R.length),p)}function N(f){var p;if(m())try{var C=new XMLHttpRequest;C.open("GET",f,!1),C.send(null),p=C.readyState===4?C.responseText:null;var b=C.getResponseHeader("SourceMap")||C.getResponseHeader("X-SourceMap");if(b)return b}catch{}p=L(f);for(var R=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg,O,q;q=R.exec(p);)O=q;return O?O[1]:null}var B=l(v);v.push(function(f){var p=N(f);if(!p)return null;var C;if(c.test(p)){var b=p.slice(p.indexOf(",")+1);C=s(b,"base64").toString(),p=f}else p=y(f,p),C=L(p);return C?{url:p,map:C}:null});function G(f){var p=h[f.source];if(!p){var C=B(f.source);C?(p=h[f.source]={url:C.url,map:new w(C.map)},p.map.sourcesContent&&p.map.sources.forEach(function(R,O){var q=p.map.sourcesContent[O];if(q){var P=y(p.url,R);a[P]=q}})):p=h[f.source]={url:null,map:null}}if(p&&p.map&&typeof p.map.originalPositionFor=="function"){var b=p.map.originalPositionFor(f);if(b.source!==null)return b.source=y(p.url,b.source),b}return f}function I(f){var p=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(f);if(p){var C=G({source:p[2],line:+p[3],column:p[4]-1});return"eval at "+p[1]+" ("+C.source+":"+C.line+":"+(C.column+1)+")"}return p=/^eval at ([^(]+) \((.+)\)$/.exec(f),p?"eval at "+p[1]+" ("+I(p[2])+")":f}function V(){var f,p="";if(this.isNative())p="native";else{f=this.getScriptNameOrSourceURL(),!f&&this.isEval()&&(p=this.getEvalOrigin(),p+=", "),f?p+=f:p+="<anonymous>";var C=this.getLineNumber();if(C!=null){p+=":"+C;var b=this.getColumnNumber();b&&(p+=":"+b)}}var R="",O=this.getFunctionName(),q=!0,P=this.isConstructor(),Q=!(this.isToplevel()||P);if(Q){var x=this.getTypeName();x==="[object Object]"&&(x="null");var F=this.getMethodName();O?(x&&O.indexOf(x)!=0&&(R+=x+"."),R+=O,F&&O.indexOf("."+F)!=O.length-F.length-1&&(R+=" [as "+F+"]")):R+=x+"."+(F||"<anonymous>")}else P?R+="new "+(O||"<anonymous>"):O?R+=O:(R+=p,q=!1);return q&&(R+=" ("+p+")"),R}function ne(f){var p={};return Object.getOwnPropertyNames(Object.getPrototypeOf(f)).forEach(function(C){p[C]=/^(?:is|get)/.test(C)?function(){return f[C].call(f)}:f[C]}),p.toString=V,p}function te(f,p){if(p===void 0&&(p={nextPosition:null,curPosition:null}),f.isNative())return p.curPosition=null,f;var C=f.getFileName()||f.getScriptNameOrSourceURL();if(C){var b=f.getLineNumber(),R=f.getColumnNumber()-1,O=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/,q=O.test(M())?0:62;b===1&&R>q&&!m()&&!f.isEval()&&(R-=q);var P=G({source:C,line:b,column:R});p.curPosition=P,f=ne(f);var Q=f.getFunctionName;return f.getFunctionName=function(){return p.nextPosition==null?Q():p.nextPosition.name||Q()},f.getFileName=function(){return P.source},f.getLineNumber=function(){return P.line},f.getColumnNumber=function(){return P.column+1},f.getScriptNameOrSourceURL=function(){return P.source},f}var x=f.isEval()&&f.getEvalOrigin();return x&&(x=I(x),f=ne(f),f.getEvalOrigin=function(){return x}),f}function Me(f,p){n&&(a={},h={});for(var C=f.name||"Error",b=f.message||"",R=C+": "+b,O={nextPosition:null,curPosition:null},q=[],P=p.length-1;P>=0;P--)q.push(`
|
|
2
2
|
at `+te(p[P],O)),O.nextPosition=O.curPosition;return O.curPosition=O.nextPosition=null,R+q.reverse().join("")}function oe(f){var p=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(f.stack);if(p){var C=p[1],b=+p[2],R=+p[3],O=a[C];if(!O&&g&&g.existsSync(C))try{O=g.readFileSync(C,"utf8")}catch{O=""}if(O){var q=O.split(/(?:\r\n|\r|\n)/)[b-1];if(q)return C+":"+b+`
|
|
3
3
|
`+q+`
|
|
4
4
|
`+new Array(R).join(" ")+"^"}}return null}function we(f){var p=oe(f),C=A();C&&C._handle&&C._handle.setBlocking&&C._handle.setBlocking(!0),p&&(console.error(),console.error(p)),console.error(f.stack),u(1)}function Le(){var f=T.emit;T.emit=function(p){if(p==="uncaughtException"){var C=arguments[1]&&arguments[1].stack,b=this.listeners(p).length>0;if(C&&!b)return we(arguments[1])}return f.apply(this,arguments)}}var Ee=d.slice(0),Ae=v.slice(0);_.wrapCallSite=te,_.getErrorSource=oe,_.mapSourcePosition=G,_.retrieveSourceMap=B,_.install=function(f){if(f=f||{},f.environment&&(e=f.environment,["node","browser","auto"].indexOf(e)===-1))throw new Error("environment "+e+" was unknown. Available options are {auto, browser, node}");if(f.retrieveFile&&(f.overrideRetrieveFile&&(d.length=0),d.unshift(f.retrieveFile)),f.retrieveSourceMap&&(f.overrideRetrieveSourceMap&&(v.length=0),v.unshift(f.retrieveSourceMap)),f.hookRequire&&!m()){var p=o(i,"module"),C=p.prototype._compile;C.__sourceMapSupport||(p.prototype._compile=function(O,q){return a[q]=O,h[q]=void 0,C.call(this,O,q)},p.prototype._compile.__sourceMapSupport=!0)}if(n||(n="emptyCacheBetweenOperations"in f?f.emptyCacheBetweenOperations:!1),t||(t=!0,Error.prepareStackTrace=Me),!r){var b="handleUncaughtExceptions"in f?f.handleUncaughtExceptions:!0;try{var R=o(i,"worker_threads");R.isMainThread===!1&&(b=!1)}catch{}b&&E()&&(r=!0,Le())}},_.resetRetrieveHandlers=function(){d.length=0,v.length=0,d=Ee.slice(0),v=Ae.slice(0),B=l(v),L=l(d)}}($,$.exports)),$.exports}var Ce=Fe();const De=Re(Ce),$e=Ne({__proto__:null,default:De},[Ce]);export{$e as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as l}from"./index-DLhvLf11.js";class _ extends Error{constructor(e,a,t,...i){Array.isArray(a)&&(a=a.join(" ").trim()),super(a),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,_),this.code=e;for(const s of i)for(const o in s){const n=s[o];this[o]=l.isBuffer(n)?n.toString(t.encoding):n==null?n:JSON.parse(JSON.stringify(n))}}}const U=function(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)},j=function(r){const e=[];for(let a=0,t=r.length;a<t;a++){const i=r[a];if(i==null||i===!1)e[a]={disabled:!0};else if(typeof i=="string")e[a]={name:i};else if(U(i)){if(typeof i.name!="string")throw new _("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${a}`,"when column is an object literal"]);e[a]=i}else throw new _("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(i)} at position ${a}`])}return e};class M{constructor(e=100){this.size=e,this.length=0,this.buf=l.allocUnsafe(e)}prepend(e){if(l.isBuffer(e)){const a=this.length+e.length;if(a>=this.size&&(this.resize(),a>=this.size))throw Error("INVALID_BUFFER_STATE");const t=this.buf;this.buf=l.allocUnsafe(this.size),e.copy(this.buf,0),t.copy(this.buf,e.length),this.length+=e.length}else{const a=this.length++;a===this.size&&this.resize();const t=this.clone();this.buf[0]=e,t.copy(this.buf,1,0,a)}}append(e){const a=this.length++;a===this.size&&this.resize(),this.buf[a]=e}clone(){return l.from(this.buf.slice(0,this.length))}resize(){const e=this.length;this.size=this.size*2;const a=l.allocUnsafe(this.size);this.buf.copy(a,0,0,e),this.buf=a}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}}const G=12,H=13,Y=10,Z=32,X=9,K=function(r){return{bomSkipped:!1,bufBytesStart:0,castField:r.cast_function,commenting:!1,error:void 0,enabled:r.from_line===1,escaping:!1,escapeIsQuote:l.isBuffer(r.escape)&&l.isBuffer(r.quote)&&l.compare(r.escape,r.quote)===0,expectedRecordLength:Array.isArray(r.columns)?r.columns.length:void 0,field:new M(20),firstLineToHeaders:r.cast_first_line_to_header,needMoreDataSize:Math.max(r.comment!==null?r.comment.length:0,...r.delimiter.map(e=>e.length),r.quote!==null?r.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new M(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:r.record_delimiter.length===0?0:Math.max(...r.record_delimiter.map(e=>e.length)),trimChars:[l.from(" ",r.encoding)[0],l.from(" ",r.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[l.from(l.from([H],"utf8").toString(),r.encoding),l.from(l.from([Y],"utf8").toString(),r.encoding),l.from(l.from([G],"utf8").toString(),r.encoding),l.from(l.from([Z],"utf8").toString(),r.encoding),l.from(l.from([X],"utf8").toString(),r.encoding)]}},W=function(r){return r.replace(/([A-Z])/g,function(e,a){return"_"+a.toLowerCase()})},k=function(r){const e={};for(const t in r)e[W(t)]=r[t];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new _("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new _("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new _("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(t){const i=Date.parse(t);return isNaN(i)?t:new Date(i)};else if(typeof e.cast_date!="function")throw new _("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=null,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=j(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new _("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new _("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new _("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=l.from(e.comment,e.encoding)),!l.isBuffer(e.comment))throw new _("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new _("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);const a=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new _("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${a}`],e);if(e.delimiter=e.delimiter.map(function(t){if(t==null||t===!1)return l.from(",",e.encoding);if(typeof t=="string"&&(t=l.from(t,e.encoding)),!l.isBuffer(t)||t.length===0)throw new _("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${a}`],e);return t}),e.escape===void 0||e.escape===!0?e.escape=l.from('"',e.encoding):typeof e.escape=="string"?e.escape=l.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!l.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(r.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(r.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(r.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new _("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new _("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(l.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new _("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=l.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=l.from(e.quote,e.encoding)),!l.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||l.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new _("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new _("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(t,i){if(typeof t!="string"&&!l.isBuffer(t))throw new _("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${i},`,`got ${JSON.stringify(t)}`],e);if(t.length===0)throw new _("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${i},`,`got ${JSON.stringify(t)}`],e);return typeof t=="string"&&(t=l.from(t,e.encoding)),t}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&r.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&r.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(r.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(r.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(r.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(r.to_line)}`);return e},B=function(r){return r.every(e=>e==null||e.toString&&e.toString().trim()==="")},ee=13,te=10,L={utf8:l.from([239,187,191]),utf16le:l.from([255,254])},ie=function(r={}){const e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},a=k(r);return{info:e,original_options:r,options:a,state:K(a),__needMoreData:function(t,i,s){if(s)return!1;const{encoding:o,escape:n,quote:u}=this.options,{quoting:c,needMoreDataSize:p,recordDelimiterMaxLength:b}=this.state,N=i-t-1,D=Math.max(p,b===0?l.from(`\r
|
|
1
|
+
import{B as l}from"./index-BXsrbFYA.js";class _ extends Error{constructor(e,a,t,...i){Array.isArray(a)&&(a=a.join(" ").trim()),super(a),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,_),this.code=e;for(const s of i)for(const o in s){const n=s[o];this[o]=l.isBuffer(n)?n.toString(t.encoding):n==null?n:JSON.parse(JSON.stringify(n))}}}const U=function(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)},j=function(r){const e=[];for(let a=0,t=r.length;a<t;a++){const i=r[a];if(i==null||i===!1)e[a]={disabled:!0};else if(typeof i=="string")e[a]={name:i};else if(U(i)){if(typeof i.name!="string")throw new _("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${a}`,"when column is an object literal"]);e[a]=i}else throw new _("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(i)} at position ${a}`])}return e};class M{constructor(e=100){this.size=e,this.length=0,this.buf=l.allocUnsafe(e)}prepend(e){if(l.isBuffer(e)){const a=this.length+e.length;if(a>=this.size&&(this.resize(),a>=this.size))throw Error("INVALID_BUFFER_STATE");const t=this.buf;this.buf=l.allocUnsafe(this.size),e.copy(this.buf,0),t.copy(this.buf,e.length),this.length+=e.length}else{const a=this.length++;a===this.size&&this.resize();const t=this.clone();this.buf[0]=e,t.copy(this.buf,1,0,a)}}append(e){const a=this.length++;a===this.size&&this.resize(),this.buf[a]=e}clone(){return l.from(this.buf.slice(0,this.length))}resize(){const e=this.length;this.size=this.size*2;const a=l.allocUnsafe(this.size);this.buf.copy(a,0,0,e),this.buf=a}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}}const G=12,H=13,Y=10,Z=32,X=9,K=function(r){return{bomSkipped:!1,bufBytesStart:0,castField:r.cast_function,commenting:!1,error:void 0,enabled:r.from_line===1,escaping:!1,escapeIsQuote:l.isBuffer(r.escape)&&l.isBuffer(r.quote)&&l.compare(r.escape,r.quote)===0,expectedRecordLength:Array.isArray(r.columns)?r.columns.length:void 0,field:new M(20),firstLineToHeaders:r.cast_first_line_to_header,needMoreDataSize:Math.max(r.comment!==null?r.comment.length:0,...r.delimiter.map(e=>e.length),r.quote!==null?r.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new M(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:r.record_delimiter.length===0?0:Math.max(...r.record_delimiter.map(e=>e.length)),trimChars:[l.from(" ",r.encoding)[0],l.from(" ",r.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[l.from(l.from([H],"utf8").toString(),r.encoding),l.from(l.from([Y],"utf8").toString(),r.encoding),l.from(l.from([G],"utf8").toString(),r.encoding),l.from(l.from([Z],"utf8").toString(),r.encoding),l.from(l.from([X],"utf8").toString(),r.encoding)]}},W=function(r){return r.replace(/([A-Z])/g,function(e,a){return"_"+a.toLowerCase()})},k=function(r){const e={};for(const t in r)e[W(t)]=r[t];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new _("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new _("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new _("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(t){const i=Date.parse(t);return isNaN(i)?t:new Date(i)};else if(typeof e.cast_date!="function")throw new _("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=null,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=j(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new _("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new _("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new _("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=l.from(e.comment,e.encoding)),!l.isBuffer(e.comment))throw new _("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new _("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);const a=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new _("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${a}`],e);if(e.delimiter=e.delimiter.map(function(t){if(t==null||t===!1)return l.from(",",e.encoding);if(typeof t=="string"&&(t=l.from(t,e.encoding)),!l.isBuffer(t)||t.length===0)throw new _("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${a}`],e);return t}),e.escape===void 0||e.escape===!0?e.escape=l.from('"',e.encoding):typeof e.escape=="string"?e.escape=l.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!l.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(r.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(r.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(r.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new _("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new _("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(l.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new _("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=l.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=l.from(e.quote,e.encoding)),!l.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||l.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new _("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new _("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(t,i){if(typeof t!="string"&&!l.isBuffer(t))throw new _("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${i},`,`got ${JSON.stringify(t)}`],e);if(t.length===0)throw new _("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${i},`,`got ${JSON.stringify(t)}`],e);return typeof t=="string"&&(t=l.from(t,e.encoding)),t}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&r.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&r.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(r.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(r.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(r.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(r.to_line)}`);return e},B=function(r){return r.every(e=>e==null||e.toString&&e.toString().trim()==="")},ee=13,te=10,L={utf8:l.from([239,187,191]),utf16le:l.from([255,254])},ie=function(r={}){const e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},a=k(r);return{info:e,original_options:r,options:a,state:K(a),__needMoreData:function(t,i,s){if(s)return!1;const{encoding:o,escape:n,quote:u}=this.options,{quoting:c,needMoreDataSize:p,recordDelimiterMaxLength:b}=this.state,N=i-t-1,D=Math.max(p,b===0?l.from(`\r
|
|
2
2
|
`,o).length:b,c?(n===null?0:n.length)+u.length:0,c?u.length+b:0);return N<D},parse:function(t,i,s,o){const{bom:n,comment_no_infix:u,encoding:c,from_line:p,ltrim:b,max_record_size:N,raw:D,relax_quotes:$,rtrim:w,skip_empty_lines:C,to:I,to_line:h}=this.options;let{comment:d,escape:O,quote:S,record_delimiter:V}=this.options;const{bomSkipped:z,previousBuf:T,rawBuffer:F,escapeIsQuote:Q}=this.state;let m;if(T===void 0)if(t===void 0){o();return}else m=t;else T!==void 0&&t===void 0?m=T:m=l.concat([T,t]);if(z===!1)if(n===!1)this.state.bomSkipped=!0;else if(m.length<3){if(i===!1){this.state.previousBuf=m;return}}else{for(const g in L)if(L[g].compare(m,0,L[g].length)===0){const x=L[g].length;this.state.bufBytesStart+=x,m=m.slice(x),this.options=k({...this.original_options,encoding:g}),{comment:d,escape:O,quote:S}=this.options;break}this.state.bomSkipped=!0}const q=m.length;let f;for(f=0;f<q&&!this.__needMoreData(f,q,i);f++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),h!==-1&&this.info.lines>h){this.state.stop=!0,o();return}this.state.quoting===!1&&V.length===0&&this.__autoDiscoverRecordDelimiter(m,f)&&(V=this.options.record_delimiter);const g=m[f];if(D===!0&&F.append(g),(g===ee||g===te)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(O!==null&&this.state.quoting===!0&&this.__isEscape(m,f,g)&&f+O.length<q)if(Q){if(this.__isQuote(m,f+O.length)){this.state.escaping=!0,f+=O.length-1;continue}}else{this.state.escaping=!0,f+=O.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(m,f))if(this.state.quoting===!0){const y=m[f+S.length],R=w&&this.__isCharTrimable(m,f+S.length),E=d!==null&&this.__compareBytes(d,m,f+S.length,y),v=this.__isDelimiter(m,f+S.length,y),A=V.length===0?this.__autoDiscoverRecordDelimiter(m,f+S.length):this.__isRecordDelimiter(y,m,f+S.length);if(O!==null&&this.__isEscape(m,f,g)&&this.__isQuote(m,f+O.length))f+=O.length-1;else if(!y||v||A||E||R){this.state.quoting=!1,this.state.wasQuoting=!0,f+=S.length-1;continue}else if($===!1){const J=this.__error(new _("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(y)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(J!==void 0)return J}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(S),f+=S.length-1}else if(this.state.field.length!==0){if($===!1){const y=this.__infoField(),R=Object.keys(L).map(v=>L[v].equals(this.state.field.toString())?v:!1).filter(Boolean)[0],E=this.__error(new _("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(y.column)} at line ${y.lines}, value is ${JSON.stringify(this.state.field.toString(c))}`,R?`(${R} bom)`:void 0],this.options,y,{field:this.state.field}));if(E!==void 0)return E}}else{this.state.quoting=!0,f+=S.length-1;continue}if(this.state.quoting===!1){const y=this.__isRecordDelimiter(g,m,f);if(y!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=p){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),f+=y-1;continue}if(C===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,f+=y-1;continue}this.info.bytes=this.state.bufBytesStart+f;const v=this.__onField();if(v!==void 0)return v;this.info.bytes=this.state.bufBytesStart+f+y;const A=this.__onRecord(s);if(A!==void 0)return A;if(I!==-1&&this.info.records>=I){this.state.stop=!0,o();return}}this.state.commenting=!1,f+=y-1;continue}if(this.state.commenting)continue;if(d!==null&&(u===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(d,m,f,g)!==0){this.state.commenting=!0;continue}const R=this.__isDelimiter(m,f,g);if(R!==0){this.info.bytes=this.state.bufBytesStart+f;const E=this.__onField();if(E!==void 0)return E;f+=R-1;continue}}}if(this.state.commenting===!1&&N!==0&&this.state.record_length+this.state.field.length>N)return this.__error(new _("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${N}`,`at line ${this.info.lines}`],this.options,this.__infoField()));const x=b===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(m,f),P=w===!1||this.state.wasQuoting===!1;if(x===!0&&P===!0)this.state.field.append(g);else{if(w===!0&&!this.__isCharTrimable(m,f))return this.__error(new _("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));x===!1&&(f+=this.__isCharTrimable(m,f)-1);continue}}if(i===!0)if(this.state.quoting===!0){const g=this.__error(new _("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(g!==void 0)return g}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+f;const g=this.__onField();if(g!==void 0)return g;const x=this.__onRecord(s);if(x!==void 0)return x}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=f,this.state.previousBuf=m.slice(f);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},__onRecord:function(t){const{columns:i,group_columns_by_name:s,encoding:o,info:n,from:u,relax_column_count:c,relax_column_count_less:p,relax_column_count_more:b,raw:N,skip_records_with_empty_values:D}=this.options,{enabled:$,record:w}=this.state;if($===!1)return this.__resetRecord();const C=w.length;if(i===!0){if(D===!0&&B(w)){this.__resetRecord();return}return this.__firstLineToColumns(w)}if(i===!1&&this.info.records===0&&(this.state.expectedRecordLength=C),C!==this.state.expectedRecordLength){const I=i===!1?new _("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${C} on line ${this.info.lines}`],this.options,this.__infoField(),{record:w}):new _("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${i.length},`,`got ${C} on line ${this.info.lines}`],this.options,this.__infoField(),{record:w});if(c===!0||p===!0&&C<this.state.expectedRecordLength||b===!0&&C>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=I;else{const h=this.__error(I);if(h)return h}}if(D===!0&&B(w)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,u===1||this.info.records>=u){const{objname:I}=this.options;if(i!==!1){const h={};for(let d=0,O=w.length;d<O;d++)i[d]===void 0||i[d].disabled||(s===!0&&h[i[d].name]!==void 0?Array.isArray(h[i[d].name])?h[i[d].name]=h[i[d].name].concat(w[d]):h[i[d].name]=[h[i[d].name],w[d]]:h[i[d].name]=w[d]);if(N===!0||n===!0){const d=Object.assign({record:h},N===!0?{raw:this.state.rawBuffer.toString(o)}:{},n===!0?{info:this.__infoRecord()}:{}),O=this.__push(I===void 0?d:[h[I],d],t);if(O)return O}else{const d=this.__push(I===void 0?h:[h[I],h],t);if(d)return d}}else if(N===!0||n===!0){const h=Object.assign({record:w},N===!0?{raw:this.state.rawBuffer.toString(o)}:{},n===!0?{info:this.__infoRecord()}:{}),d=this.__push(I===void 0?h:[w[I],h],t);if(d)return d}else{const h=this.__push(I===void 0?w:[w[I],w],t);if(h)return h}}this.__resetRecord()},__firstLineToColumns:function(t){const{firstLineToHeaders:i}=this.state;try{const s=i===void 0?t:i.call(null,t);if(!Array.isArray(s))return this.__error(new _("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(s)}`],this.options,this.__infoField(),{headers:s}));const o=j(s);this.state.expectedRecordLength=o.length,this.options.columns=o,this.__resetRecord();return}catch(s){return s}},__resetRecord:function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},__onField:function(){const{cast:t,encoding:i,rtrim:s,max_record_size:o}=this.options,{enabled:n,wasQuoting:u}=this.state;if(n===!1)return this.__resetField();let c=this.state.field.toString(i);if(s===!0&&u===!1&&(c=c.trimRight()),t===!0){const[p,b]=this.__cast(c);if(p!==void 0)return p;c=b}this.state.record.push(c),o!==0&&typeof c=="string"&&(this.state.record_length+=c.length),this.__resetField()},__resetField:function(){this.state.field.reset(),this.state.wasQuoting=!1},__push:function(t,i){const{on_record:s}=this.options;if(s!==void 0){const o=this.__infoRecord();try{t=s.call(null,t,o)}catch(n){return n}if(t==null)return}i(t)},__cast:function(t){const{columns:i,relax_column_count:s}=this.options;if(Array.isArray(i)===!0&&s&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{const n=this.__infoField();return[void 0,this.state.castField.call(null,t,n)]}catch(n){return[n]}if(this.__isFloat(t))return[void 0,parseFloat(t)];if(this.options.cast_date!==!1){const n=this.__infoField();return[void 0,this.options.cast_date.call(null,t,n)]}return[void 0,t]},__isCharTrimable:function(t,i){return((o,n)=>{const{timchars:u}=this.state;e:for(let c=0;c<u.length;c++){const p=u[c];for(let b=0;b<p.length;b++)if(p[b]!==o[n+b])continue e;return p.length}return 0})(t,i)},__isFloat:function(t){return t-parseFloat(t)+1>=0},__compareBytes:function(t,i,s,o){if(t[0]!==o)return 0;const n=t.length;for(let u=1;u<n;u++)if(t[u]!==i[s+u])return 0;return n},__isDelimiter:function(t,i,s){const{delimiter:o,ignore_last_delimiters:n}=this.options;if(n===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(n!==!1&&typeof n=="number"&&this.state.record.length===n-1)return 0;e:for(let u=0;u<o.length;u++){const c=o[u];if(c[0]===s){for(let p=1;p<c.length;p++)if(c[p]!==t[i+p])continue e;return c.length}}return 0},__isRecordDelimiter:function(t,i,s){const{record_delimiter:o}=this.options,n=o.length;e:for(let u=0;u<n;u++){const c=o[u],p=c.length;if(c[0]===t){for(let b=1;b<p;b++)if(c[b]!==i[s+b])continue e;return c.length}}return 0},__isEscape:function(t,i,s){const{escape:o}=this.options;if(o===null)return!1;const n=o.length;if(o[0]===s){for(let u=0;u<n;u++)if(o[u]!==t[i+u])return!1;return!0}return!1},__isQuote:function(t,i){const{quote:s}=this.options;if(s===null)return!1;const o=s.length;for(let n=0;n<o;n++)if(s[n]!==t[i+n])return!1;return!0},__autoDiscoverRecordDelimiter:function(t,i){const{encoding:s}=this.options,o=[l.from(`\r
|
|
3
3
|
`,s),l.from(`
|
|
4
4
|
`,s),l.from("\r",s)];e:for(let n=0;n<o.length;n++){const u=o[n].length;for(let c=0;c<u;c++)if(o[n][c]!==t[i+c])continue e;return this.options.record_delimiter.push(o[n]),this.state.recordDelimiterMaxLength=o[n].length,o[n].length}return 0},__error:function(t){const{encoding:i,raw:s,skip_records_with_error:o}=this.options,n=typeof t=="string"?new Error(t):t;if(o){this.state.recordHasError=!0,this.options.on_skip!==void 0&&this.options.on_skip(n,s?this.state.rawBuffer.toString(i):void 0);return}else return n},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){const{columns:t,raw:i,encoding:s}=this.options;return{...this.__infoDataSet(),error:this.state.error,header:t===!0,index:this.state.record.length,raw:i?this.state.rawBuffer.toString(s):void 0}},__infoField:function(){const{columns:t}=this.options,i=Array.isArray(t);return{...this.__infoRecord(),column:i===!0?t.length>this.state.record.length?t[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}},re=function(r,e={}){typeof r=="string"&&(r=l.from(r));const a=e&&e.objname?{}:[],t=ie(e),i=u=>{t.options.objname===void 0?a.push(u):a[u[0]]=u[1]},s=()=>{},o=t.parse(r,!1,i,s);if(o!==void 0)throw o;const n=t.parse(void 0,!0,i,s);if(n!==void 0)throw n;return a};export{_ as CsvError,re as parse};
|
package/dist/src/app/index.html
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<title>promptfoo</title>
|
|
8
8
|
<meta name="description" content="LLM testing and evaluation" />
|
|
9
9
|
<meta property="og:image" content="https://www.promptfoo.dev/img/thumbnail.png" />
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-BXsrbFYA.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BPc2R353.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<div id="root"></div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/assertions/openai.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C,eAAO,MAAM,4BAA4B,GAAI,wCAK1C,eAAe,KAAG,
|
|
1
|
+
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../../src/assertions/openai.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAI9C,eAAO,MAAM,4BAA4B,GAAI,wCAK1C,eAAe,KAAG,aAwFpB,CAAC"}
|
|
@@ -57,7 +57,9 @@ const handleIsValidOpenAiToolsCall = ({ assertion, output, provider, test, }) =>
|
|
|
57
57
|
(0, invariant_1.default)(tools, `Tools are expected to be an array of objects with a function property. Got: ${JSON.stringify(tools)}`);
|
|
58
58
|
try {
|
|
59
59
|
toolsOutput.forEach((toolOutput) => {
|
|
60
|
-
(0, util_1.validateFunctionCall)(toolOutput.function, tools
|
|
60
|
+
(0, util_1.validateFunctionCall)(toolOutput.function, tools
|
|
61
|
+
.filter((tool) => tool.type === 'function' && 'function' in tool)
|
|
62
|
+
.map((tool) => tool.function), test.vars);
|
|
61
63
|
});
|
|
62
64
|
return {
|
|
63
65
|
pass: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.js","sourceRoot":"","sources":["../../../src/assertions/openai.ts"],"names":[],"mappings":";;;;;;AACA,mDAAgE;AAGhE,kCAAyD;AACzD,kEAA0C;AAEnC,MAAM,4BAA4B,GAAG,CAAC,EAC3C,SAAS,EACT,MAAM,EACN,QAAQ,EACR,IAAI,GACY,EAAiB,EAAE;IACnC,6CAA6C;IAC7C,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAE/E,2CAA2C;IAC3C,IAAI,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAClF,+DAA+D;QAC/D,IAAI,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACzC,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;YACvE,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;YAC9D,OAAO;gBACL,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,4BAA4B,QAAQ,KAAK,QAAQ,EAAE;gBAC3D,SAAS;aACV,CAAC;QACJ,CAAC;QAED,0BAA0B;QAC1B,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1D,OAAO;YACL,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,+BAA+B,QAAQ,EAAE;YACjD,SAAS;SACV,CAAC;IACJ,CAAC;IAED,gDAAgD;IAChD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,YAAY,IAAI,MAAM,EAAE,CAAC;QACzD,MAAM,GAAI,MAA8B,CAAC,UAAU,CAAC;IACtD,CAAC;IACD,MAAM,WAAW,GAAG,MAGjB,CAAC;IACJ,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;QAC3B,WAAW,CAAC,MAAM,KAAK,CAAC;QACxB,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ;QAChD,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,KAAK,QAAQ,EACrD,CAAC;QACD,OAAO;YACL,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,yDAAyD,IAAI,CAAC,SAAS,CAC7E,WAAW,CACZ,EAAE;YACH,SAAS;SACV,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,GAAI,QAAyC,CAAC,MAAM,CAAC,KAAK,CAAC;IACpE,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,GAAG,IAAA,qCAA8B,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IACD,IAAA,mBAAS,EACP,KAAK,EACL,+EAA+E,IAAI,CAAC,SAAS,CAC3F,KAAK,CACN,EAAE,CACJ,CAAC;IACF,IAAI,CAAC;QACH,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YACjC,IAAA,2BAAoB,EAClB,UAAU,CAAC,QAAQ,EACnB,KAAK,
|
|
1
|
+
{"version":3,"file":"openai.js","sourceRoot":"","sources":["../../../src/assertions/openai.ts"],"names":[],"mappings":";;;;;;AACA,mDAAgE;AAGhE,kCAAyD;AACzD,kEAA0C;AAEnC,MAAM,4BAA4B,GAAG,CAAC,EAC3C,SAAS,EACT,MAAM,EACN,QAAQ,EACR,IAAI,GACY,EAAiB,EAAE;IACnC,6CAA6C;IAC7C,MAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAE/E,2CAA2C;IAC3C,IAAI,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAClF,+DAA+D;QAC/D,IAAI,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC;YACzC,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;YACvE,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;YAC9D,OAAO;gBACL,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,CAAC;gBACR,MAAM,EAAE,4BAA4B,QAAQ,KAAK,QAAQ,EAAE;gBAC3D,SAAS;aACV,CAAC;QACJ,CAAC;QAED,0BAA0B;QAC1B,MAAM,WAAW,GAAG,SAAS,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAC1D,OAAO;YACL,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,+BAA+B,QAAQ,EAAE;YACjD,SAAS;SACV,CAAC;IACJ,CAAC;IAED,gDAAgD;IAChD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,YAAY,IAAI,MAAM,EAAE,CAAC;QACzD,MAAM,GAAI,MAA8B,CAAC,UAAU,CAAC;IACtD,CAAC;IACD,MAAM,WAAW,GAAG,MAGjB,CAAC;IACJ,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC;QAC3B,WAAW,CAAC,MAAM,KAAK,CAAC;QACxB,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ;QAChD,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,KAAK,QAAQ,EACrD,CAAC;QACD,OAAO;YACL,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,yDAAyD,IAAI,CAAC,SAAS,CAC7E,WAAW,CACZ,EAAE;YACH,SAAS;SACV,CAAC;IACJ,CAAC;IAED,IAAI,KAAK,GAAI,QAAyC,CAAC,MAAM,CAAC,KAAK,CAAC;IACpE,IAAI,KAAK,EAAE,CAAC;QACV,KAAK,GAAG,IAAA,qCAA8B,EAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3D,CAAC;IACD,IAAA,mBAAS,EACP,KAAK,EACL,+EAA+E,IAAI,CAAC,SAAS,CAC3F,KAAK,CACN,EAAE,CACJ,CAAC;IACF,IAAI,CAAC;QACH,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YACjC,IAAA,2BAAoB,EAClB,UAAU,CAAC,QAAQ,EACnB,KAAK;iBACF,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,UAAU,IAAI,IAAI,CAAC;iBAChE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAC/B,IAAI,CAAC,IAAI,CACV,CAAC;QACJ,CAAC,CAAC,CAAC;QACH,OAAO;YACL,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,CAAC;YACR,MAAM,EAAE,kBAAkB;YAC1B,SAAS;SACV,CAAC;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,CAAC;YACR,MAAM,EAAG,GAAa,CAAC,OAAO;YAC9B,SAAS;SACV,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AA7FW,QAAA,4BAA4B,gCA6FvC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TestCase, TestSuite, Assertion } from '../types';
|
|
2
|
+
interface SynthesizeOptions {
|
|
3
|
+
instructions?: string;
|
|
4
|
+
numQuestions?: number;
|
|
5
|
+
prompts: string[];
|
|
6
|
+
provider?: string;
|
|
7
|
+
tests: TestCase[];
|
|
8
|
+
type?: 'pi' | 'g-eval' | 'llm-rubric';
|
|
9
|
+
}
|
|
10
|
+
export declare function generateNewQuestionsPrompt(prompts: string[], testCases: TestCase[], numQuestions: number): string;
|
|
11
|
+
export declare function convertQuestionToPythonPrompt(prompts: string[], question: string): string;
|
|
12
|
+
export declare function synthesize({ prompts, instructions, numQuestions, tests, provider, type, }: SynthesizeOptions): Promise<Assertion[]>;
|
|
13
|
+
export declare function synthesizeFromTestSuite(testSuite: TestSuite, options: Partial<SynthesizeOptions>): Promise<Assertion[]>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=synthesis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synthesis.d.ts","sourceRoot":"","sources":["../../../src/assertions/synthesis.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAe,SAAS,EAAE,MAAM,UAAU,CAAC;AAK5E,UAAU,iBAAiB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,IAAI,CAAC,EAAE,IAAI,GAAG,QAAQ,GAAG,YAAY,CAAC;CACvC;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EAAE,EACjB,SAAS,EAAE,QAAQ,EAAE,EACrB,YAAY,EAAE,MAAM,GACnB,MAAM,CAqMR;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,UAmMhF;AASD,wBAAsB,UAAU,CAAC,EAC/B,OAAO,EACP,YAAY,EACZ,YAAgB,EAChB,KAAK,EACL,QAAQ,EACR,IAAW,GACZ,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAgF1C;AAED,wBAAsB,uBAAuB,CAC3C,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,CAAC,iBAAiB,CAAC,GAClC,OAAO,CAAC,SAAS,EAAE,CAAC,CAMtB"}
|