rmapi-js 14.2.0 → 14.3.0

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.
@@ -1,4 +1,4 @@
1
- var xb=Object.create;var{getPrototypeOf:$b,defineProperty:Fo,getOwnPropertyNames:wb}=Object;var kb=Object.prototype.hasOwnProperty;function Ib(e){return this[e]}var Sb,zb,ht=(e,r,n)=>{var o=e!=null&&typeof e==="object";if(o){var t=r?Sb??=new WeakMap:zb??=new WeakMap,i=t.get(e);if(i)return i}n=e!=null?xb($b(e)):{};let a=r||!e||!e.__esModule?Fo(n,"default",{value:e,enumerable:!0}):n;if(e&&typeof e==="object"||typeof e==="function"){for(let s of wb(e))if(!kb.call(a,s))Fo(a,s,{get:Ib.bind(e,s),enumerable:!0})}if(o)t.set(e,a);return a};var G=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Pb=(e)=>e;function Tb(e,r){this[e]=Pb.bind(null,r)}var ct=(e,r)=>{for(var n in r)Fo(e,n,{get:r[n],enumerable:!0,configurable:!0,set:Tb.bind(r,n)})};var Bo=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,n)=>(typeof require<"u"?require:r)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Eb=Symbol.dispose||Symbol.for("Symbol.dispose"),Ob=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),$e=(e,r,n)=>{if(r!=null){if(typeof r!=="object"&&typeof r!=="function")throw TypeError('Object expected to be assigned to "using" declaration');var o;if(n)o=r[Ob];if(o===void 0)o=r[Eb];if(typeof o!=="function")throw TypeError("Object not disposable");e.push([n,o,r])}else if(n)e.push([n]);return r},Le=(e,r,n)=>{var o=typeof SuppressedError==="function"?SuppressedError:function(a,s,u,c){return c=Error(u),c.name="SuppressedError",c.error=a,c.suppressed=s,c},t=(a)=>r=n?new o(a,r,"An error was suppressed during disposal"):(n=!0,a),i=(a)=>{while(a=e.pop())try{var s=a[1]&&a[1].call(a[2]);if(a[0])return Promise.resolve(s).then(i,(u)=>(t(u),i()))}catch(u){t(u)}if(n)throw r};return i()};var om=G(function(im,Mo){/*!
1
+ var gp=Object.create;var{getPrototypeOf:yp,defineProperty:on,getOwnPropertyNames:bp}=Object;var li=Object.prototype.hasOwnProperty;function vp(e){return this[e]}var _p,wp,Xe=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var o=t?_p??=new WeakMap:wp??=new WeakMap,i=o.get(e);if(i)return i}r=e!=null?gp(yp(e)):{};let s=t||!e||!e.__esModule||!li.call(e,"default")?on(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let a of bp(e))if(!li.call(s,a))on(s,a,{get:vp.bind(e,a),enumerable:!0})}if(n)o.set(e,s);return s};var M=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var xp=(e)=>e;function kp(e,t){this[e]=xp.bind(null,t)}var zp=(e,t)=>{for(var r in t)on(e,r,{get:t[r],enumerable:!0,configurable:!0,set:kp.bind(t,r)})};var sn=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Ip=Symbol.dispose||Symbol.for("Symbol.dispose"),Sp=Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose"),ye=(e,t,r)=>{if(t!=null){if(typeof t!=="object"&&typeof t!=="function")throw TypeError('Object expected to be assigned to "using" declaration');var n;if(r)n=t[Sp];if(n===void 0)n=t[Ip];if(typeof n!=="function")throw TypeError("Object not disposable");e.push([r,n,t])}else if(r)e.push([r]);return t},$e=(e,t,r)=>{var n=typeof SuppressedError==="function"?SuppressedError:function(s,a,c,l){return l=Error(c),l.name="SuppressedError",l.error=s,l.suppressed=a,l},o=(s)=>t=r?new n(s,t,"An error was suppressed during disposal"):(r=!0,s),i=(s)=>{while(s=e.pop())try{var a=s[1]&&s[1].call(s[2]);if(s[0])return Promise.resolve(a).then(i,(c)=>(o(c),i()))}catch(c){o(c)}if(r)throw t};return i()};var fi=M(function(di,an){/*!
2
2
 
3
3
  JSZip v3.10.1 - A JavaScript class for generating and reading zip files
4
4
  <http://stuartk.com/jszip>
@@ -8,79 +8,78 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js
8
8
 
9
9
  JSZip uses the library pako released under the MIT license :
10
10
  https://github.com/nodeca/pako/blob/main/LICENSE
11
- */(function(e){if(typeof im=="object"&&typeof Mo<"u")Mo.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=e()})(function(){return function e(r,n,o){function t(s,u){if(!n[s]){if(!r[s]){var c=Bo;if(!u&&c)return c(s,!0);if(i)return i(s,!0);var d=Error("Cannot find module '"+s+"'");throw d.code="MODULE_NOT_FOUND",d}var l=n[s]={exports:{}};r[s][0].call(l.exports,function(h){var f=r[s][1][h];return t(f||h)},l,l.exports,e,r,n,o)}return n[s].exports}for(var i=Bo,a=0;a<o.length;a++)t(o[a]);return t}({1:[function(e,r,n){var o=e("./utils"),t=e("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(a){for(var s,u,c,d,l,h,f,g=[],v=0,y=a.length,w=y,P=o.getTypeOf(a)!=="string";v<a.length;)w=y-v,c=P?(s=a[v++],u=v<y?a[v++]:0,v<y?a[v++]:0):(s=a.charCodeAt(v++),u=v<y?a.charCodeAt(v++):0,v<y?a.charCodeAt(v++):0),d=s>>2,l=(3&s)<<4|u>>4,h=1<w?(15&u)<<2|c>>6:64,f=2<w?63&c:64,g.push(i.charAt(d)+i.charAt(l)+i.charAt(h)+i.charAt(f));return g.join("")},n.decode=function(a){var s,u,c,d,l,h,f=0,g=0,v="data:";if(a.substr(0,v.length)===v)throw Error("Invalid base64 input, it looks like a data url.");var y,w=3*(a=a.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(a.charAt(a.length-1)===i.charAt(64)&&w--,a.charAt(a.length-2)===i.charAt(64)&&w--,w%1!=0)throw Error("Invalid base64 input, bad content length.");for(y=t.uint8array?new Uint8Array(0|w):Array(0|w);f<a.length;)s=i.indexOf(a.charAt(f++))<<2|(d=i.indexOf(a.charAt(f++)))>>4,u=(15&d)<<4|(l=i.indexOf(a.charAt(f++)))>>2,c=(3&l)<<6|(h=i.indexOf(a.charAt(f++))),y[g++]=s,l!==64&&(y[g++]=u),h!==64&&(y[g++]=c);return y}},{"./support":30,"./utils":32}],2:[function(e,r,n){var o=e("./external"),t=e("./stream/DataWorker"),i=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function s(u,c,d,l,h){this.compressedSize=u,this.uncompressedSize=c,this.crc32=d,this.compression=l,this.compressedContent=h}s.prototype={getContentWorker:function(){var u=new t(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),c=this;return u.on("end",function(){if(this.streamInfo.data_length!==c.uncompressedSize)throw Error("Bug : uncompressed data size mismatch")}),u},getCompressedWorker:function(){return new t(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(u,c,d){return u.pipe(new i).pipe(new a("uncompressedSize")).pipe(c.compressWorker(d)).pipe(new a("compressedSize")).withStreamInfo("compression",c)},r.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,r,n){var o=e("./stream/GenericWorker");n.STORE={magic:"\x00\x00",compressWorker:function(){return new o("STORE compression")},uncompressWorker:function(){return new o("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,r,n){var o=e("./utils"),t=function(){for(var i,a=[],s=0;s<256;s++){i=s;for(var u=0;u<8;u++)i=1&i?3988292384^i>>>1:i>>>1;a[s]=i}return a}();r.exports=function(i,a){return i!==void 0&&i.length?o.getTypeOf(i)!=="string"?function(s,u,c,d){var l=t,h=d+c;s^=-1;for(var f=d;f<h;f++)s=s>>>8^l[255&(s^u[f])];return-1^s}(0|a,i,i.length,0):function(s,u,c,d){var l=t,h=d+c;s^=-1;for(var f=d;f<h;f++)s=s>>>8^l[255&(s^u.charCodeAt(f))];return-1^s}(0|a,i,i.length,0):0}},{"./utils":32}],5:[function(e,r,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,r,n){var o=null;o=typeof Promise<"u"?Promise:e("lie"),r.exports={Promise:o}},{lie:37}],7:[function(e,r,n){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",t=e("pako"),i=e("./utils"),a=e("./stream/GenericWorker"),s=o?"uint8array":"array";function u(c,d){a.call(this,"FlateWorker/"+c),this._pako=null,this._pakoAction=c,this._pakoOptions=d,this.meta={}}n.magic="\b\x00",i.inherits(u,a),u.prototype.processChunk=function(c){this.meta=c.meta,this._pako===null&&this._createPako(),this._pako.push(i.transformTo(s,c.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new t[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var c=this;this._pako.onData=function(d){c.push({data:d,meta:c.meta})}},n.compressWorker=function(c){return new u("Deflate",c)},n.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,r,n){function o(l,h){var f,g="";for(f=0;f<h;f++)g+=String.fromCharCode(255&l),l>>>=8;return g}function t(l,h,f,g,v,y){var w,P,k=l.file,E=l.compression,U=y!==s.utf8encode,B=i.transformTo("string",y(k.name)),I=i.transformTo("string",s.utf8encode(k.name)),V=k.comment,L=i.transformTo("string",y(V)),x=i.transformTo("string",s.utf8encode(V)),O=I.length!==k.name.length,p=x.length!==V.length,N="",ue="",K="",ce=k.dir,H=k.date,ae={crc32:0,compressedSize:0,uncompressedSize:0};h&&!f||(ae.crc32=l.crc32,ae.compressedSize=l.compressedSize,ae.uncompressedSize=l.uncompressedSize);var C=0;h&&(C|=8),U||!O&&!p||(C|=2048);var R=0,ie=0;ce&&(R|=16),v==="UNIX"?(ie=798,R|=function(ee,_e){var ze=ee;return ee||(ze=_e?16893:33204),(65535&ze)<<16}(k.unixPermissions,ce)):(ie=20,R|=function(ee){return 63&(ee||0)}(k.dosPermissions)),w=H.getUTCHours(),w<<=6,w|=H.getUTCMinutes(),w<<=5,w|=H.getUTCSeconds()/2,P=H.getUTCFullYear()-1980,P<<=4,P|=H.getUTCMonth()+1,P<<=5,P|=H.getUTCDate(),O&&(ue=o(1,1)+o(u(B),4)+I,N+="up"+o(ue.length,2)+ue),p&&(K=o(1,1)+o(u(L),4)+x,N+="uc"+o(K.length,2)+K);var re="";return re+=`
12
- \x00`,re+=o(C,2),re+=E.magic,re+=o(w,2),re+=o(P,2),re+=o(ae.crc32,4),re+=o(ae.compressedSize,4),re+=o(ae.uncompressedSize,4),re+=o(B.length,2),re+=o(N.length,2),{fileRecord:c.LOCAL_FILE_HEADER+re+B+N,dirRecord:c.CENTRAL_FILE_HEADER+o(ie,2)+re+o(L.length,2)+"\x00\x00\x00\x00"+o(R,4)+o(g,4)+B+N+L}}var i=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),u=e("../crc32"),c=e("../signature");function d(l,h,f,g){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=h,this.zipPlatform=f,this.encodeFileName=g,this.streamFiles=l,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(d,a),d.prototype.push=function(l){var h=l.meta.percent||0,f=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(l):(this.bytesWritten+=l.data.length,a.prototype.push.call(this,{data:l.data,meta:{currentFile:this.currentFile,percent:f?(h+100*(f-g-1))/f:100}}))},d.prototype.openedSource=function(l){this.currentSourceOffset=this.bytesWritten,this.currentFile=l.file.name;var h=this.streamFiles&&!l.file.dir;if(h){var f=t(l,h,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:f.fileRecord,meta:{percent:0}})}else this.accumulate=!0},d.prototype.closedSource=function(l){this.accumulate=!1;var h=this.streamFiles&&!l.file.dir,f=t(l,h,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(f.dirRecord),h)this.push({data:function(g){return c.DATA_DESCRIPTOR+o(g.crc32,4)+o(g.compressedSize,4)+o(g.uncompressedSize,4)}(l),meta:{percent:100}});else for(this.push({data:f.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},d.prototype.flush=function(){for(var l=this.bytesWritten,h=0;h<this.dirRecords.length;h++)this.push({data:this.dirRecords[h],meta:{percent:100}});var f=this.bytesWritten-l,g=function(v,y,w,P,k){var E=i.transformTo("string",k(P));return c.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+o(v,2)+o(v,2)+o(y,4)+o(w,4)+o(E.length,2)+E}(this.dirRecords.length,f,l,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},d.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},d.prototype.registerPrevious=function(l){this._sources.push(l);var h=this;return l.on("data",function(f){h.processChunk(f)}),l.on("end",function(){h.closedSource(h.previous.streamInfo),h._sources.length?h.prepareNextSource():h.end()}),l.on("error",function(f){h.error(f)}),this},d.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},d.prototype.error=function(l){var h=this._sources;if(!a.prototype.error.call(this,l))return!1;for(var f=0;f<h.length;f++)try{h[f].error(l)}catch(g){}return!0},d.prototype.lock=function(){a.prototype.lock.call(this);for(var l=this._sources,h=0;h<l.length;h++)l[h].lock()},r.exports=d},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,r,n){var o=e("../compressions"),t=e("./ZipFileWorker");n.generateWorker=function(i,a,s){var u=new t(a.streamFiles,s,a.platform,a.encodeFileName),c=0;try{i.forEach(function(d,l){c++;var h=function(y,w){var P=y||w,k=o[P];if(!k)throw Error(P+" is not a valid compression method !");return k}(l.options.compression,a.compression),f=l.options.compressionOptions||a.compressionOptions||{},g=l.dir,v=l.date;l._compressWorker(h,f).withStreamInfo("file",{name:d,dir:g,date:v,comment:l.comment||"",unixPermissions:l.unixPermissions,dosPermissions:l.dosPermissions}).pipe(u)}),u.entriesCount=c}catch(d){u.error(d)}return u}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,r,n){function o(){if(!(this instanceof o))return new o;if(arguments.length)throw Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var t=new o;for(var i in this)typeof this[i]!="function"&&(t[i]=this[i]);return t}}(o.prototype=e("./object")).loadAsync=e("./load"),o.support=e("./support"),o.defaults=e("./defaults"),o.version="3.10.1",o.loadAsync=function(t,i){return new o().loadAsync(t,i)},o.external=e("./external"),r.exports=o},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,r,n){var o=e("./utils"),t=e("./external"),i=e("./utf8"),a=e("./zipEntries"),s=e("./stream/Crc32Probe"),u=e("./nodejsUtils");function c(d){return new t.Promise(function(l,h){var f=d.decompressed.getContentWorker().pipe(new s);f.on("error",function(g){h(g)}).on("end",function(){f.streamInfo.crc32!==d.decompressed.crc32?h(Error("Corrupted zip : CRC32 mismatch")):l()}).resume()})}r.exports=function(d,l){var h=this;return l=o.extend(l||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),u.isNode&&u.isStream(d)?t.Promise.reject(Error("JSZip can't accept a stream when loading a zip file.")):o.prepareContent("the loaded zip file",d,!0,l.optimizedBinaryString,l.base64).then(function(f){var g=new a(l);return g.load(f),g}).then(function(f){var g=[t.Promise.resolve(f)],v=f.files;if(l.checkCRC32)for(var y=0;y<v.length;y++)g.push(c(v[y]));return t.Promise.all(g)}).then(function(f){for(var g=f.shift(),v=g.files,y=0;y<v.length;y++){var w=v[y],P=w.fileNameStr,k=o.resolve(w.fileNameStr);h.file(k,w.decompressed,{binary:!0,optimizedBinaryString:!0,date:w.date,dir:w.dir,comment:w.fileCommentStr.length?w.fileCommentStr:null,unixPermissions:w.unixPermissions,dosPermissions:w.dosPermissions,createFolders:l.createFolders}),w.dir||(h.file(k).unsafeOriginalName=P)}return g.zipComment.length&&(h.comment=g.zipComment),h})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,r,n){var o=e("../utils"),t=e("../stream/GenericWorker");function i(a,s){t.call(this,"Nodejs stream input adapter for "+a),this._upstreamEnded=!1,this._bindStream(s)}o.inherits(i,t),i.prototype._bindStream=function(a){var s=this;(this._stream=a).pause(),a.on("data",function(u){s.push({data:u,meta:{percent:0}})}).on("error",function(u){s.isPaused?this.generatedError=u:s.error(u)}).on("end",function(){s.isPaused?s._upstreamEnded=!0:s.end()})},i.prototype.pause=function(){return!!t.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!t.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,r,n){var o=e("readable-stream").Readable;function t(i,a,s){o.call(this,a),this._helper=i;var u=this;i.on("data",function(c,d){u.push(c)||u._helper.pause(),s&&s(d)}).on("error",function(c){u.emit("error",c)}).on("end",function(){u.push(null)})}e("../utils").inherits(t,o),t.prototype._read=function(){this._helper.resume()},r.exports=t},{"../utils":32,"readable-stream":16}],14:[function(e,r,n){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(o,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(o,t);if(typeof o=="number")throw Error('The "data" argument must not be a number');return new Buffer(o,t)},allocBuffer:function(o){if(Buffer.alloc)return Buffer.alloc(o);var t=new Buffer(o);return t.fill(0),t},isBuffer:function(o){return Buffer.isBuffer(o)},isStream:function(o){return o&&typeof o.on=="function"&&typeof o.pause=="function"&&typeof o.resume=="function"}}},{}],15:[function(e,r,n){function o(k,E,U){var B,I=i.getTypeOf(E),V=i.extend(U||{},u);V.date=V.date||new Date,V.compression!==null&&(V.compression=V.compression.toUpperCase()),typeof V.unixPermissions=="string"&&(V.unixPermissions=parseInt(V.unixPermissions,8)),V.unixPermissions&&16384&V.unixPermissions&&(V.dir=!0),V.dosPermissions&&16&V.dosPermissions&&(V.dir=!0),V.dir&&(k=v(k)),V.createFolders&&(B=g(k))&&y.call(this,B,!0);var L=I==="string"&&V.binary===!1&&V.base64===!1;U&&U.binary!==void 0||(V.binary=!L),(E instanceof c&&E.uncompressedSize===0||V.dir||!E||E.length===0)&&(V.base64=!1,V.binary=!0,E="",V.compression="STORE",I="string");var x=null;x=E instanceof c||E instanceof a?E:h.isNode&&h.isStream(E)?new f(k,E):i.prepareContent(k,E,V.binary,V.optimizedBinaryString,V.base64);var O=new d(k,x,V);this.files[k]=O}var t=e("./utf8"),i=e("./utils"),a=e("./stream/GenericWorker"),s=e("./stream/StreamHelper"),u=e("./defaults"),c=e("./compressedObject"),d=e("./zipObject"),l=e("./generate"),h=e("./nodejsUtils"),f=e("./nodejs/NodejsStreamInputAdapter"),g=function(k){k.slice(-1)==="/"&&(k=k.substring(0,k.length-1));var E=k.lastIndexOf("/");return 0<E?k.substring(0,E):""},v=function(k){return k.slice(-1)!=="/"&&(k+="/"),k},y=function(k,E){return E=E!==void 0?E:u.createFolders,k=v(k),this.files[k]||o.call(this,k,null,{dir:!0,createFolders:E}),this.files[k]};function w(k){return Object.prototype.toString.call(k)==="[object RegExp]"}var P={load:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(k){var E,U,B;for(E in this.files)B=this.files[E],(U=E.slice(this.root.length,E.length))&&E.slice(0,this.root.length)===this.root&&k(U,B)},filter:function(k){var E=[];return this.forEach(function(U,B){k(U,B)&&E.push(B)}),E},file:function(k,E,U){if(arguments.length!==1)return k=this.root+k,o.call(this,k,E,U),this;if(w(k)){var B=k;return this.filter(function(V,L){return!L.dir&&B.test(V)})}var I=this.files[this.root+k];return I&&!I.dir?I:null},folder:function(k){if(!k)return this;if(w(k))return this.filter(function(I,V){return V.dir&&k.test(I)});var E=this.root+k,U=y.call(this,E),B=this.clone();return B.root=U.name,B},remove:function(k){k=this.root+k;var E=this.files[k];if(E||(k.slice(-1)!=="/"&&(k+="/"),E=this.files[k]),E&&!E.dir)delete this.files[k];else for(var U=this.filter(function(I,V){return V.name.slice(0,k.length)===k}),B=0;B<U.length;B++)delete this.files[U[B].name];return this},generate:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(k){var E,U={};try{if((U=i.extend(k||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:t.utf8encode})).type=U.type.toLowerCase(),U.compression=U.compression.toUpperCase(),U.type==="binarystring"&&(U.type="string"),!U.type)throw Error("No output type specified.");i.checkSupport(U.type),U.platform!=="darwin"&&U.platform!=="freebsd"&&U.platform!=="linux"&&U.platform!=="sunos"||(U.platform="UNIX"),U.platform==="win32"&&(U.platform="DOS");var B=U.comment||this.comment||"";E=l.generateWorker(this,U,B)}catch(I){(E=new a("error")).error(I)}return new s(E,U.type||"string",U.mimeType)},generateAsync:function(k,E){return this.generateInternalStream(k).accumulate(E)},generateNodeStream:function(k,E){return(k=k||{}).type||(k.type="nodebuffer"),this.generateInternalStream(k).toNodejsStream(E)}};r.exports=P},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,r,n){r.exports=e("stream")},{stream:void 0}],17:[function(e,r,n){var o=e("./DataReader");function t(i){o.call(this,i);for(var a=0;a<this.data.length;a++)i[a]=255&i[a]}e("../utils").inherits(t,o),t.prototype.byteAt=function(i){return this.data[this.zero+i]},t.prototype.lastIndexOfSignature=function(i){for(var a=i.charCodeAt(0),s=i.charCodeAt(1),u=i.charCodeAt(2),c=i.charCodeAt(3),d=this.length-4;0<=d;--d)if(this.data[d]===a&&this.data[d+1]===s&&this.data[d+2]===u&&this.data[d+3]===c)return d-this.zero;return-1},t.prototype.readAndCheckSignature=function(i){var a=i.charCodeAt(0),s=i.charCodeAt(1),u=i.charCodeAt(2),c=i.charCodeAt(3),d=this.readData(4);return a===d[0]&&s===d[1]&&u===d[2]&&c===d[3]},t.prototype.readData=function(i){if(this.checkOffset(i),i===0)return[];var a=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,a},r.exports=t},{"../utils":32,"./DataReader":18}],18:[function(e,r,n){var o=e("../utils");function t(i){this.data=i,this.length=i.length,this.index=0,this.zero=0}t.prototype={checkOffset:function(i){this.checkIndex(this.index+i)},checkIndex:function(i){if(this.length<this.zero+i||i<0)throw Error("End of data reached (data length = "+this.length+", asked index = "+i+"). Corrupted zip ?")},setIndex:function(i){this.checkIndex(i),this.index=i},skip:function(i){this.setIndex(this.index+i)},byteAt:function(){},readInt:function(i){var a,s=0;for(this.checkOffset(i),a=this.index+i-1;a>=this.index;a--)s=(s<<8)+this.byteAt(a);return this.index+=i,s},readString:function(i){return o.transformTo("string",this.readData(i))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var i=this.readInt(4);return new Date(Date.UTC(1980+(i>>25&127),(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(31&i)<<1))}},r.exports=t},{"../utils":32}],19:[function(e,r,n){var o=e("./Uint8ArrayReader");function t(i){o.call(this,i)}e("../utils").inherits(t,o),t.prototype.readData=function(i){this.checkOffset(i);var a=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,a},r.exports=t},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,r,n){var o=e("./DataReader");function t(i){o.call(this,i)}e("../utils").inherits(t,o),t.prototype.byteAt=function(i){return this.data.charCodeAt(this.zero+i)},t.prototype.lastIndexOfSignature=function(i){return this.data.lastIndexOf(i)-this.zero},t.prototype.readAndCheckSignature=function(i){return i===this.readData(4)},t.prototype.readData=function(i){this.checkOffset(i);var a=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,a},r.exports=t},{"../utils":32,"./DataReader":18}],21:[function(e,r,n){var o=e("./ArrayReader");function t(i){o.call(this,i)}e("../utils").inherits(t,o),t.prototype.readData=function(i){if(this.checkOffset(i),i===0)return new Uint8Array(0);var a=this.data.subarray(this.zero+this.index,this.zero+this.index+i);return this.index+=i,a},r.exports=t},{"../utils":32,"./ArrayReader":17}],22:[function(e,r,n){var o=e("../utils"),t=e("../support"),i=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),u=e("./Uint8ArrayReader");r.exports=function(c){var d=o.getTypeOf(c);return o.checkSupport(d),d!=="string"||t.uint8array?d==="nodebuffer"?new s(c):t.uint8array?new u(o.transformTo("uint8array",c)):new i(o.transformTo("array",c)):new a(c)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,r,n){n.LOCAL_FILE_HEADER="PK\x03\x04",n.CENTRAL_FILE_HEADER="PK\x01\x02",n.CENTRAL_DIRECTORY_END="PK\x05\x06",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,r,n){var o=e("./GenericWorker"),t=e("../utils");function i(a){o.call(this,"ConvertWorker to "+a),this.destType=a}t.inherits(i,o),i.prototype.processChunk=function(a){this.push({data:t.transformTo(this.destType,a.data),meta:a.meta})},r.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(e,r,n){var o=e("./GenericWorker"),t=e("../crc32");function i(){o.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(i,o),i.prototype.processChunk=function(a){this.streamInfo.crc32=t(a.data,this.streamInfo.crc32||0),this.push(a)},r.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,r,n){var o=e("../utils"),t=e("./GenericWorker");function i(a){t.call(this,"DataLengthProbe for "+a),this.propName=a,this.withStreamInfo(a,0)}o.inherits(i,t),i.prototype.processChunk=function(a){if(a){var s=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=s+a.data.length}t.prototype.processChunk.call(this,a)},r.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(e,r,n){var o=e("../utils"),t=e("./GenericWorker");function i(a){t.call(this,"DataWorker");var s=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,a.then(function(u){s.dataIsReady=!0,s.data=u,s.max=u&&u.length||0,s.type=o.getTypeOf(u),s.isPaused||s._tickAndRepeat()},function(u){s.error(u)})}o.inherits(i,t),i.prototype.cleanUp=function(){t.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!t.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,o.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(o.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var a=null,s=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":a=this.data.substring(this.index,s);break;case"uint8array":a=this.data.subarray(this.index,s);break;case"array":case"nodebuffer":a=this.data.slice(this.index,s)}return this.index=s,this.push({data:a,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(e,r,n){function o(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}o.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,i){return this._listeners[t].push(i),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,i){if(this._listeners[t])for(var a=0;a<this._listeners[t].length;a++)this._listeners[t][a].call(this,i)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var i=this;return t.on("data",function(a){i.processChunk(a)}),t.on("end",function(){i.end()}),t.on("error",function(a){i.error(a)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,i){return this.extraStreamInfo[t]=i,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},r.exports=o},{}],29:[function(e,r,n){var o=e("../utils"),t=e("./ConvertWorker"),i=e("./GenericWorker"),a=e("../base64"),s=e("../support"),u=e("../external"),c=null;if(s.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(h){}function d(h,f){return new u.Promise(function(g,v){var y=[],w=h._internalType,P=h._outputType,k=h._mimeType;h.on("data",function(E,U){y.push(E),f&&f(U)}).on("error",function(E){y=[],v(E)}).on("end",function(){try{var E=function(U,B,I){switch(U){case"blob":return o.newBlob(o.transformTo("arraybuffer",B),I);case"base64":return a.encode(B);default:return o.transformTo(U,B)}}(P,function(U,B){var I,V=0,L=null,x=0;for(I=0;I<B.length;I++)x+=B[I].length;switch(U){case"string":return B.join("");case"array":return Array.prototype.concat.apply([],B);case"uint8array":for(L=new Uint8Array(x),I=0;I<B.length;I++)L.set(B[I],V),V+=B[I].length;return L;case"nodebuffer":return Buffer.concat(B);default:throw Error("concat : unsupported type '"+U+"'")}}(w,y),k);g(E)}catch(U){v(U)}y=[]}).resume()})}function l(h,f,g){var v=f;switch(f){case"blob":case"arraybuffer":v="uint8array";break;case"base64":v="string"}try{this._internalType=v,this._outputType=f,this._mimeType=g,o.checkSupport(v),this._worker=h.pipe(new t(v)),h.lock()}catch(y){this._worker=new i("error"),this._worker.error(y)}}l.prototype={accumulate:function(h){return d(this,h)},on:function(h,f){var g=this;return h==="data"?this._worker.on(h,function(v){f.call(g,v.data,v.meta)}):this._worker.on(h,function(){o.delay(f,arguments,g)}),this},resume:function(){return o.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(h){if(o.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:this._outputType!=="nodebuffer"},h)}},r.exports=l},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,r,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n.nodebuffer=typeof Buffer<"u",n.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n.blob=!1;else{var o=new ArrayBuffer(0);try{n.blob=new Blob([o],{type:"application/zip"}).size===0}catch(i){try{var t=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);t.append(o),n.blob=t.getBlob("application/zip").size===0}catch(a){n.blob=!1}}}try{n.nodestream=!!e("readable-stream").Readable}catch(i){n.nodestream=!1}},{"readable-stream":16}],31:[function(e,r,n){for(var o=e("./utils"),t=e("./support"),i=e("./nodejsUtils"),a=e("./stream/GenericWorker"),s=Array(256),u=0;u<256;u++)s[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;s[254]=s[254]=1;function c(){a.call(this,"utf-8 decode"),this.leftOver=null}function d(){a.call(this,"utf-8 encode")}n.utf8encode=function(l){return t.nodebuffer?i.newBufferFrom(l,"utf-8"):function(h){var f,g,v,y,w,P=h.length,k=0;for(y=0;y<P;y++)(64512&(g=h.charCodeAt(y)))==55296&&y+1<P&&(64512&(v=h.charCodeAt(y+1)))==56320&&(g=65536+(g-55296<<10)+(v-56320),y++),k+=g<128?1:g<2048?2:g<65536?3:4;for(f=t.uint8array?new Uint8Array(k):Array(k),y=w=0;w<k;y++)(64512&(g=h.charCodeAt(y)))==55296&&y+1<P&&(64512&(v=h.charCodeAt(y+1)))==56320&&(g=65536+(g-55296<<10)+(v-56320),y++),g<128?f[w++]=g:(g<2048?f[w++]=192|g>>>6:(g<65536?f[w++]=224|g>>>12:(f[w++]=240|g>>>18,f[w++]=128|g>>>12&63),f[w++]=128|g>>>6&63),f[w++]=128|63&g);return f}(l)},n.utf8decode=function(l){return t.nodebuffer?o.transformTo("nodebuffer",l).toString("utf-8"):function(h){var f,g,v,y,w=h.length,P=Array(2*w);for(f=g=0;f<w;)if((v=h[f++])<128)P[g++]=v;else if(4<(y=s[v]))P[g++]=65533,f+=y-1;else{for(v&=y===2?31:y===3?15:7;1<y&&f<w;)v=v<<6|63&h[f++],y--;1<y?P[g++]=65533:v<65536?P[g++]=v:(v-=65536,P[g++]=55296|v>>10&1023,P[g++]=56320|1023&v)}return P.length!==g&&(P.subarray?P=P.subarray(0,g):P.length=g),o.applyFromCharCode(P)}(l=o.transformTo(t.uint8array?"uint8array":"array",l))},o.inherits(c,a),c.prototype.processChunk=function(l){var h=o.transformTo(t.uint8array?"uint8array":"array",l.data);if(this.leftOver&&this.leftOver.length){if(t.uint8array){var f=h;(h=new Uint8Array(f.length+this.leftOver.length)).set(this.leftOver,0),h.set(f,this.leftOver.length)}else h=this.leftOver.concat(h);this.leftOver=null}var g=function(y,w){var P;for((w=w||y.length)>y.length&&(w=y.length),P=w-1;0<=P&&(192&y[P])==128;)P--;return P<0?w:P===0?w:P+s[y[P]]>w?P:w}(h),v=h;g!==h.length&&(t.uint8array?(v=h.subarray(0,g),this.leftOver=h.subarray(g,h.length)):(v=h.slice(0,g),this.leftOver=h.slice(g,h.length))),this.push({data:n.utf8decode(v),meta:l.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,o.inherits(d,a),d.prototype.processChunk=function(l){this.push({data:n.utf8encode(l.data),meta:l.meta})},n.Utf8EncodeWorker=d},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,r,n){var o=e("./support"),t=e("./base64"),i=e("./nodejsUtils"),a=e("./external");function s(f){return f}function u(f,g){for(var v=0;v<f.length;++v)g[v]=255&f.charCodeAt(v);return g}e("setimmediate"),n.newBlob=function(f,g){n.checkSupport("blob");try{return new Blob([f],{type:g})}catch(y){try{var v=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return v.append(f),v.getBlob(g)}catch(w){throw Error("Bug : can't construct the Blob.")}}};var c={stringifyByChunk:function(f,g,v){var y=[],w=0,P=f.length;if(P<=v)return String.fromCharCode.apply(null,f);for(;w<P;)g==="array"||g==="nodebuffer"?y.push(String.fromCharCode.apply(null,f.slice(w,Math.min(w+v,P)))):y.push(String.fromCharCode.apply(null,f.subarray(w,Math.min(w+v,P)))),w+=v;return y.join("")},stringifyByChar:function(f){for(var g="",v=0;v<f.length;v++)g+=String.fromCharCode(f[v]);return g},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(f){return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&String.fromCharCode.apply(null,i.allocBuffer(1)).length===1}catch(f){return!1}}()}};function d(f){var g=65536,v=n.getTypeOf(f),y=!0;if(v==="uint8array"?y=c.applyCanBeUsed.uint8array:v==="nodebuffer"&&(y=c.applyCanBeUsed.nodebuffer),y)for(;1<g;)try{return c.stringifyByChunk(f,v,g)}catch(w){g=Math.floor(g/2)}return c.stringifyByChar(f)}function l(f,g){for(var v=0;v<f.length;v++)g[v]=f[v];return g}n.applyFromCharCode=d;var h={};h.string={string:s,array:function(f){return u(f,Array(f.length))},arraybuffer:function(f){return h.string.uint8array(f).buffer},uint8array:function(f){return u(f,new Uint8Array(f.length))},nodebuffer:function(f){return u(f,i.allocBuffer(f.length))}},h.array={string:d,array:s,arraybuffer:function(f){return new Uint8Array(f).buffer},uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(f)}},h.arraybuffer={string:function(f){return d(new Uint8Array(f))},array:function(f){return l(new Uint8Array(f),Array(f.byteLength))},arraybuffer:s,uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(new Uint8Array(f))}},h.uint8array={string:d,array:function(f){return l(f,Array(f.length))},arraybuffer:function(f){return f.buffer},uint8array:s,nodebuffer:function(f){return i.newBufferFrom(f)}},h.nodebuffer={string:d,array:function(f){return l(f,Array(f.length))},arraybuffer:function(f){return h.nodebuffer.uint8array(f).buffer},uint8array:function(f){return l(f,new Uint8Array(f.length))},nodebuffer:s},n.transformTo=function(f,g){if(g=g||"",!f)return g;n.checkSupport(f);var v=n.getTypeOf(g);return h[v][f](g)},n.resolve=function(f){for(var g=f.split("/"),v=[],y=0;y<g.length;y++){var w=g[y];w==="."||w===""&&y!==0&&y!==g.length-1||(w===".."?v.pop():v.push(w))}return v.join("/")},n.getTypeOf=function(f){return typeof f=="string"?"string":Object.prototype.toString.call(f)==="[object Array]"?"array":o.nodebuffer&&i.isBuffer(f)?"nodebuffer":o.uint8array&&f instanceof Uint8Array?"uint8array":o.arraybuffer&&f instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(f){if(!o[f.toLowerCase()])throw Error(f+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(f){var g,v,y="";for(v=0;v<(f||"").length;v++)y+="\\x"+((g=f.charCodeAt(v))<16?"0":"")+g.toString(16).toUpperCase();return y},n.delay=function(f,g,v){setImmediate(function(){f.apply(v||null,g||[])})},n.inherits=function(f,g){function v(){}v.prototype=g.prototype,f.prototype=new v},n.extend=function(){var f,g,v={};for(f=0;f<arguments.length;f++)for(g in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],g)&&v[g]===void 0&&(v[g]=arguments[f][g]);return v},n.prepareContent=function(f,g,v,y,w){return a.Promise.resolve(g).then(function(P){return o.blob&&(P instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(P))!==-1)&&typeof FileReader<"u"?new a.Promise(function(k,E){var U=new FileReader;U.onload=function(B){k(B.target.result)},U.onerror=function(B){E(B.target.error)},U.readAsArrayBuffer(P)}):P}).then(function(P){var k=n.getTypeOf(P);return k?(k==="arraybuffer"?P=n.transformTo("uint8array",P):k==="string"&&(w?P=t.decode(P):v&&y!==!0&&(P=function(E){return u(E,o.uint8array?new Uint8Array(E.length):Array(E.length))}(P))),P):a.Promise.reject(Error("Can't read the data of '"+f+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,r,n){var o=e("./reader/readerFor"),t=e("./utils"),i=e("./signature"),a=e("./zipEntry"),s=e("./support");function u(c){this.files=[],this.loadOptions=c}u.prototype={checkSignature:function(c){if(!this.reader.readAndCheckSignature(c)){this.reader.index-=4;var d=this.reader.readString(4);throw Error("Corrupted zip or bug: unexpected signature ("+t.pretty(d)+", expected "+t.pretty(c)+")")}},isSignature:function(c,d){var l=this.reader.index;this.reader.setIndex(c);var h=this.reader.readString(4)===d;return this.reader.setIndex(l),h},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var c=this.reader.readData(this.zipCommentLength),d=s.uint8array?"uint8array":"array",l=t.transformTo(d,c);this.zipComment=this.loadOptions.decodeFileName(l)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var c,d,l,h=this.zip64EndOfCentralSize-44;0<h;)c=this.reader.readInt(2),d=this.reader.readInt(4),l=this.reader.readData(d),this.zip64ExtensibleData[c]={id:c,length:d,value:l}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var c,d;for(c=0;c<this.files.length;c++)d=this.files[c],this.reader.setIndex(d.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),d.readLocalPart(this.reader),d.handleUTF8(),d.processAttributes()},readCentralDir:function(){var c;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(c=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(c);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var c=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(c<0)throw!this.isSignature(0,i.LOCAL_FILE_HEADER)?Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(c);var d=c;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===t.MAX_VALUE_16BITS||this.diskWithCentralDirStart===t.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===t.MAX_VALUE_16BITS||this.centralDirRecords===t.MAX_VALUE_16BITS||this.centralDirSize===t.MAX_VALUE_32BITS||this.centralDirOffset===t.MAX_VALUE_32BITS){if(this.zip64=!0,(c=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(c),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var l=this.centralDirOffset+this.centralDirSize;this.zip64&&(l+=20,l+=12+this.zip64EndOfCentralSize);var h=d-l;if(0<h)this.isSignature(d,i.CENTRAL_FILE_HEADER)||(this.reader.zero=h);else if(h<0)throw Error("Corrupted zip: missing "+Math.abs(h)+" bytes.")},prepareReader:function(c){this.reader=o(c)},load:function(c){this.prepareReader(c),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,r,n){var o=e("./reader/readerFor"),t=e("./utils"),i=e("./compressedObject"),a=e("./crc32"),s=e("./utf8"),u=e("./compressions"),c=e("./support");function d(l,h){this.options=l,this.loadOptions=h}d.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(l){var h,f;if(l.skip(22),this.fileNameLength=l.readInt(2),f=l.readInt(2),this.fileName=l.readData(this.fileNameLength),l.skip(f),this.compressedSize===-1||this.uncompressedSize===-1)throw Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((h=function(g){for(var v in u)if(Object.prototype.hasOwnProperty.call(u,v)&&u[v].magic===g)return u[v];return null}(this.compressionMethod))===null)throw Error("Corrupted zip : compression "+t.pretty(this.compressionMethod)+" unknown (inner file : "+t.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,h,l.readData(this.compressedSize))},readCentralPart:function(l){this.versionMadeBy=l.readInt(2),l.skip(2),this.bitFlag=l.readInt(2),this.compressionMethod=l.readString(2),this.date=l.readDate(),this.crc32=l.readInt(4),this.compressedSize=l.readInt(4),this.uncompressedSize=l.readInt(4);var h=l.readInt(2);if(this.extraFieldsLength=l.readInt(2),this.fileCommentLength=l.readInt(2),this.diskNumberStart=l.readInt(2),this.internalFileAttributes=l.readInt(2),this.externalFileAttributes=l.readInt(4),this.localHeaderOffset=l.readInt(4),this.isEncrypted())throw Error("Encrypted zip are not supported");l.skip(h),this.readExtraFields(l),this.parseZIP64ExtraField(l),this.fileComment=l.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var l=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),l==0&&(this.dosPermissions=63&this.externalFileAttributes),l==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var l=o(this.extraFields[1].value);this.uncompressedSize===t.MAX_VALUE_32BITS&&(this.uncompressedSize=l.readInt(8)),this.compressedSize===t.MAX_VALUE_32BITS&&(this.compressedSize=l.readInt(8)),this.localHeaderOffset===t.MAX_VALUE_32BITS&&(this.localHeaderOffset=l.readInt(8)),this.diskNumberStart===t.MAX_VALUE_32BITS&&(this.diskNumberStart=l.readInt(4))}},readExtraFields:function(l){var h,f,g,v=l.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});l.index+4<v;)h=l.readInt(2),f=l.readInt(2),g=l.readData(f),this.extraFields[h]={id:h,length:f,value:g};l.setIndex(v)},handleUTF8:function(){var l=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var h=this.findExtraFieldUnicodePath();if(h!==null)this.fileNameStr=h;else{var f=t.transformTo(l,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(f)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var v=t.transformTo(l,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(v)}}},findExtraFieldUnicodePath:function(){var l=this.extraFields[28789];if(l){var h=o(l.value);return h.readInt(1)!==1?null:a(this.fileName)!==h.readInt(4)?null:s.utf8decode(h.readData(l.length-5))}return null},findExtraFieldUnicodeComment:function(){var l=this.extraFields[25461];if(l){var h=o(l.value);return h.readInt(1)!==1?null:a(this.fileComment)!==h.readInt(4)?null:s.utf8decode(h.readData(l.length-5))}return null}},r.exports=d},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,r,n){function o(h,f,g){this.name=h,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=f,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var t=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),a=e("./utf8"),s=e("./compressedObject"),u=e("./stream/GenericWorker");o.prototype={internalStream:function(h){var f=null,g="string";try{if(!h)throw Error("No output type specified.");var v=(g=h.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),f=this._decompressWorker();var y=!this._dataBinary;y&&!v&&(f=f.pipe(new a.Utf8EncodeWorker)),!y&&v&&(f=f.pipe(new a.Utf8DecodeWorker))}catch(w){(f=new u("error")).error(w)}return new t(f,g,"")},async:function(h,f){return this.internalStream(h).accumulate(f)},nodeStream:function(h,f){return this.internalStream(h||"nodebuffer").toNodejsStream(f)},_compressWorker:function(h,f){if(this._data instanceof s&&this._data.compression.magic===h.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(g,h,f)},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof u?this._data:new i(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],d=function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},l=0;l<c.length;l++)o.prototype[c[l]]=d;r.exports=o},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,r,n){(function(o){var t,i,a=o.MutationObserver||o.WebKitMutationObserver;if(a){var s=0,u=new a(h),c=o.document.createTextNode("");u.observe(c,{characterData:!0}),t=function(){c.data=s=++s%2}}else if(o.setImmediate||o.MessageChannel===void 0)t="document"in o&&"onreadystatechange"in o.document.createElement("script")?function(){var f=o.document.createElement("script");f.onreadystatechange=function(){h(),f.onreadystatechange=null,f.parentNode.removeChild(f),f=null},o.document.documentElement.appendChild(f)}:function(){setTimeout(h,0)};else{var d=new o.MessageChannel;d.port1.onmessage=h,t=function(){d.port2.postMessage(0)}}var l=[];function h(){var f,g;i=!0;for(var v=l.length;v;){for(g=l,l=[],f=-1;++f<v;)g[f]();v=l.length}i=!1}r.exports=function(f){l.push(f)!==1||i||t()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(e,r,n){var o=e("immediate");function t(){}var i={},a=["REJECTED"],s=["FULFILLED"],u=["PENDING"];function c(v){if(typeof v!="function")throw TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,v!==t&&f(this,v)}function d(v,y,w){this.promise=v,typeof y=="function"&&(this.onFulfilled=y,this.callFulfilled=this.otherCallFulfilled),typeof w=="function"&&(this.onRejected=w,this.callRejected=this.otherCallRejected)}function l(v,y,w){o(function(){var P;try{P=y(w)}catch(k){return i.reject(v,k)}P===v?i.reject(v,TypeError("Cannot resolve promise with itself")):i.resolve(v,P)})}function h(v){var y=v&&v.then;if(v&&(typeof v=="object"||typeof v=="function")&&typeof y=="function")return function(){y.apply(v,arguments)}}function f(v,y){var w=!1;function P(U){w||(w=!0,i.reject(v,U))}function k(U){w||(w=!0,i.resolve(v,U))}var E=g(function(){y(k,P)});E.status==="error"&&P(E.value)}function g(v,y){var w={};try{w.value=v(y),w.status="success"}catch(P){w.status="error",w.value=P}return w}(r.exports=c).prototype.finally=function(v){if(typeof v!="function")return this;var y=this.constructor;return this.then(function(w){return y.resolve(v()).then(function(){return w})},function(w){return y.resolve(v()).then(function(){throw w})})},c.prototype.catch=function(v){return this.then(null,v)},c.prototype.then=function(v,y){if(typeof v!="function"&&this.state===s||typeof y!="function"&&this.state===a)return this;var w=new this.constructor(t);return this.state!==u?l(w,this.state===s?v:y,this.outcome):this.queue.push(new d(w,v,y)),w},d.prototype.callFulfilled=function(v){i.resolve(this.promise,v)},d.prototype.otherCallFulfilled=function(v){l(this.promise,this.onFulfilled,v)},d.prototype.callRejected=function(v){i.reject(this.promise,v)},d.prototype.otherCallRejected=function(v){l(this.promise,this.onRejected,v)},i.resolve=function(v,y){var w=g(h,y);if(w.status==="error")return i.reject(v,w.value);var P=w.value;if(P)f(v,P);else{v.state=s,v.outcome=y;for(var k=-1,E=v.queue.length;++k<E;)v.queue[k].callFulfilled(y)}return v},i.reject=function(v,y){v.state=a,v.outcome=y;for(var w=-1,P=v.queue.length;++w<P;)v.queue[w].callRejected(y);return v},c.resolve=function(v){if(v instanceof this)return v;return i.resolve(new this(t),v)},c.reject=function(v){var y=new this(t);return i.reject(y,v)},c.all=function(v){var y=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(TypeError("must be an array"));var w=v.length,P=!1;if(!w)return this.resolve([]);var k=Array(w),E=0,U=-1,B=new this(t);for(;++U<w;)I(v[U],U);return B;function I(V,L){y.resolve(V).then(function(x){k[L]=x,++E!==w||P||(P=!0,i.resolve(B,k))},function(x){P||(P=!0,i.reject(B,x))})}},c.race=function(v){var y=this;if(Object.prototype.toString.call(v)!=="[object Array]")return this.reject(TypeError("must be an array"));var w=v.length,P=!1;if(!w)return this.resolve([]);var k=-1,E=new this(t);for(;++k<w;)U=v[k],y.resolve(U).then(function(B){P||(P=!0,i.resolve(E,B))},function(B){P||(P=!0,i.reject(E,B))});var U;return E}},{immediate:36}],38:[function(e,r,n){var o={};(0,e("./lib/utils/common").assign)(o,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),r.exports=o},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,r,n){var o=e("./zlib/deflate"),t=e("./utils/common"),i=e("./utils/strings"),a=e("./zlib/messages"),s=e("./zlib/zstream"),u=Object.prototype.toString,c=0,d=-1,l=0,h=8;function f(v){if(!(this instanceof f))return new f(v);this.options=t.assign({level:d,method:h,chunkSize:16384,windowBits:15,memLevel:8,strategy:l,to:""},v||{});var y=this.options;y.raw&&0<y.windowBits?y.windowBits=-y.windowBits:y.gzip&&0<y.windowBits&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var w=o.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(w!==c)throw Error(a[w]);if(y.header&&o.deflateSetHeader(this.strm,y.header),y.dictionary){var P;if(P=typeof y.dictionary=="string"?i.string2buf(y.dictionary):u.call(y.dictionary)==="[object ArrayBuffer]"?new Uint8Array(y.dictionary):y.dictionary,(w=o.deflateSetDictionary(this.strm,P))!==c)throw Error(a[w]);this._dict_set=!0}}function g(v,y){var w=new f(y);if(w.push(v,!0),w.err)throw w.msg||a[w.err];return w.result}f.prototype.push=function(v,y){var w,P,k=this.strm,E=this.options.chunkSize;if(this.ended)return!1;P=y===~~y?y:y===!0?4:0,typeof v=="string"?k.input=i.string2buf(v):u.call(v)==="[object ArrayBuffer]"?k.input=new Uint8Array(v):k.input=v,k.next_in=0,k.avail_in=k.input.length;do{if(k.avail_out===0&&(k.output=new t.Buf8(E),k.next_out=0,k.avail_out=E),(w=o.deflate(k,P))!==1&&w!==c)return this.onEnd(w),!(this.ended=!0);k.avail_out!==0&&(k.avail_in!==0||P!==4&&P!==2)||(this.options.to==="string"?this.onData(i.buf2binstring(t.shrinkBuf(k.output,k.next_out))):this.onData(t.shrinkBuf(k.output,k.next_out)))}while((0<k.avail_in||k.avail_out===0)&&w!==1);return P===4?(w=o.deflateEnd(this.strm),this.onEnd(w),this.ended=!0,w===c):P!==2||(this.onEnd(c),!(k.avail_out=0))},f.prototype.onData=function(v){this.chunks.push(v)},f.prototype.onEnd=function(v){v===c&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=v,this.msg=this.strm.msg},n.Deflate=f,n.deflate=g,n.deflateRaw=function(v,y){return(y=y||{}).raw=!0,g(v,y)},n.gzip=function(v,y){return(y=y||{}).gzip=!0,g(v,y)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,r,n){var o=e("./zlib/inflate"),t=e("./utils/common"),i=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),u=e("./zlib/zstream"),c=e("./zlib/gzheader"),d=Object.prototype.toString;function l(f){if(!(this instanceof l))return new l(f);this.options=t.assign({chunkSize:16384,windowBits:0,to:""},f||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||f&&f.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var v=o.inflateInit2(this.strm,g.windowBits);if(v!==a.Z_OK)throw Error(s[v]);this.header=new c,o.inflateGetHeader(this.strm,this.header)}function h(f,g){var v=new l(g);if(v.push(f,!0),v.err)throw v.msg||s[v.err];return v.result}l.prototype.push=function(f,g){var v,y,w,P,k,E,U=this.strm,B=this.options.chunkSize,I=this.options.dictionary,V=!1;if(this.ended)return!1;y=g===~~g?g:g===!0?a.Z_FINISH:a.Z_NO_FLUSH,typeof f=="string"?U.input=i.binstring2buf(f):d.call(f)==="[object ArrayBuffer]"?U.input=new Uint8Array(f):U.input=f,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new t.Buf8(B),U.next_out=0,U.avail_out=B),(v=o.inflate(U,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&I&&(E=typeof I=="string"?i.string2buf(I):d.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,v=o.inflateSetDictionary(this.strm,E)),v===a.Z_BUF_ERROR&&V===!0&&(v=a.Z_OK,V=!1),v!==a.Z_STREAM_END&&v!==a.Z_OK)return this.onEnd(v),!(this.ended=!0);U.next_out&&(U.avail_out!==0&&v!==a.Z_STREAM_END&&(U.avail_in!==0||y!==a.Z_FINISH&&y!==a.Z_SYNC_FLUSH)||(this.options.to==="string"?(w=i.utf8border(U.output,U.next_out),P=U.next_out-w,k=i.buf2string(U.output,w),U.next_out=P,U.avail_out=B-P,P&&t.arraySet(U.output,U.output,w,P,0),this.onData(k)):this.onData(t.shrinkBuf(U.output,U.next_out)))),U.avail_in===0&&U.avail_out===0&&(V=!0)}while((0<U.avail_in||U.avail_out===0)&&v!==a.Z_STREAM_END);return v===a.Z_STREAM_END&&(y=a.Z_FINISH),y===a.Z_FINISH?(v=o.inflateEnd(this.strm),this.onEnd(v),this.ended=!0,v===a.Z_OK):y!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(U.avail_out=0))},l.prototype.onData=function(f){this.chunks.push(f)},l.prototype.onEnd=function(f){f===a.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},n.Inflate=l,n.inflate=h,n.inflateRaw=function(f,g){return(g=g||{}).raw=!0,h(f,g)},n.ungzip=h},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,r,n){var o=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n.assign=function(a){for(var s=Array.prototype.slice.call(arguments,1);s.length;){var u=s.shift();if(u){if(typeof u!="object")throw TypeError(u+"must be non-object");for(var c in u)u.hasOwnProperty(c)&&(a[c]=u[c])}}return a},n.shrinkBuf=function(a,s){return a.length===s?a:a.subarray?a.subarray(0,s):(a.length=s,a)};var t={arraySet:function(a,s,u,c,d){if(s.subarray&&a.subarray)a.set(s.subarray(u,u+c),d);else for(var l=0;l<c;l++)a[d+l]=s[u+l]},flattenChunks:function(a){var s,u,c,d,l,h;for(s=c=0,u=a.length;s<u;s++)c+=a[s].length;for(h=new Uint8Array(c),s=d=0,u=a.length;s<u;s++)l=a[s],h.set(l,d),d+=l.length;return h}},i={arraySet:function(a,s,u,c,d){for(var l=0;l<c;l++)a[d+l]=s[u+l]},flattenChunks:function(a){return[].concat.apply([],a)}};n.setTyped=function(a){a?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,t)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,i))},n.setTyped(o)},{}],42:[function(e,r,n){var o=e("./common"),t=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(c){t=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(c){i=!1}for(var a=new o.Buf8(256),s=0;s<256;s++)a[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function u(c,d){if(d<65537&&(c.subarray&&i||!c.subarray&&t))return String.fromCharCode.apply(null,o.shrinkBuf(c,d));for(var l="",h=0;h<d;h++)l+=String.fromCharCode(c[h]);return l}a[254]=a[254]=1,n.string2buf=function(c){var d,l,h,f,g,v=c.length,y=0;for(f=0;f<v;f++)(64512&(l=c.charCodeAt(f)))==55296&&f+1<v&&(64512&(h=c.charCodeAt(f+1)))==56320&&(l=65536+(l-55296<<10)+(h-56320),f++),y+=l<128?1:l<2048?2:l<65536?3:4;for(d=new o.Buf8(y),f=g=0;g<y;f++)(64512&(l=c.charCodeAt(f)))==55296&&f+1<v&&(64512&(h=c.charCodeAt(f+1)))==56320&&(l=65536+(l-55296<<10)+(h-56320),f++),l<128?d[g++]=l:(l<2048?d[g++]=192|l>>>6:(l<65536?d[g++]=224|l>>>12:(d[g++]=240|l>>>18,d[g++]=128|l>>>12&63),d[g++]=128|l>>>6&63),d[g++]=128|63&l);return d},n.buf2binstring=function(c){return u(c,c.length)},n.binstring2buf=function(c){for(var d=new o.Buf8(c.length),l=0,h=d.length;l<h;l++)d[l]=c.charCodeAt(l);return d},n.buf2string=function(c,d){var l,h,f,g,v=d||c.length,y=Array(2*v);for(l=h=0;l<v;)if((f=c[l++])<128)y[h++]=f;else if(4<(g=a[f]))y[h++]=65533,l+=g-1;else{for(f&=g===2?31:g===3?15:7;1<g&&l<v;)f=f<<6|63&c[l++],g--;1<g?y[h++]=65533:f<65536?y[h++]=f:(f-=65536,y[h++]=55296|f>>10&1023,y[h++]=56320|1023&f)}return u(y,h)},n.utf8border=function(c,d){var l;for((d=d||c.length)>c.length&&(d=c.length),l=d-1;0<=l&&(192&c[l])==128;)l--;return l<0?d:l===0?d:l+a[c[l]]>d?l:d}},{"./common":41}],43:[function(e,r,n){r.exports=function(o,t,i,a){for(var s=65535&o|0,u=o>>>16&65535|0,c=0;i!==0;){for(i-=c=2000<i?2000:i;u=u+(s=s+t[a++]|0)|0,--c;);s%=65521,u%=65521}return s|u<<16|0}},{}],44:[function(e,r,n){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,r,n){var o=function(){for(var t,i=[],a=0;a<256;a++){t=a;for(var s=0;s<8;s++)t=1&t?3988292384^t>>>1:t>>>1;i[a]=t}return i}();r.exports=function(t,i,a,s){var u=o,c=s+a;t^=-1;for(var d=s;d<c;d++)t=t>>>8^u[255&(t^i[d])];return-1^t}},{}],46:[function(e,r,n){var o,t=e("../utils/common"),i=e("./trees"),a=e("./adler32"),s=e("./crc32"),u=e("./messages"),c=0,d=4,l=0,h=-2,f=-1,g=4,v=2,y=8,w=9,P=286,k=30,E=19,U=2*P+1,B=15,I=3,V=258,L=V+I+1,x=42,O=113,p=1,N=2,ue=3,K=4;function ce(m,Z){return m.msg=u[Z],Z}function H(m){return(m<<1)-(4<m?9:0)}function ae(m){for(var Z=m.length;0<=--Z;)m[Z]=0}function C(m){var Z=m.state,A=Z.pending;A>m.avail_out&&(A=m.avail_out),A!==0&&(t.arraySet(m.output,Z.pending_buf,Z.pending_out,A,m.next_out),m.next_out+=A,Z.pending_out+=A,m.total_out+=A,m.avail_out-=A,Z.pending-=A,Z.pending===0&&(Z.pending_out=0))}function R(m,Z){i._tr_flush_block(m,0<=m.block_start?m.block_start:-1,m.strstart-m.block_start,Z),m.block_start=m.strstart,C(m.strm)}function ie(m,Z){m.pending_buf[m.pending++]=Z}function re(m,Z){m.pending_buf[m.pending++]=Z>>>8&255,m.pending_buf[m.pending++]=255&Z}function ee(m,Z){var A,_,b=m.max_chain_length,T=m.strstart,F=m.prev_length,J=m.nice_match,j=m.strstart>m.w_size-L?m.strstart-(m.w_size-L):0,Y=m.window,ne=m.w_mask,Q=m.prev,oe=m.strstart+V,be=Y[T+F-1],me=Y[T+F];m.prev_length>=m.good_match&&(b>>=2),J>m.lookahead&&(J=m.lookahead);do if(Y[(A=Z)+F]===me&&Y[A+F-1]===be&&Y[A]===Y[T]&&Y[++A]===Y[T+1]){T+=2,A++;do;while(Y[++T]===Y[++A]&&Y[++T]===Y[++A]&&Y[++T]===Y[++A]&&Y[++T]===Y[++A]&&Y[++T]===Y[++A]&&Y[++T]===Y[++A]&&Y[++T]===Y[++A]&&Y[++T]===Y[++A]&&T<oe);if(_=V-(oe-T),T=oe-V,F<_){if(m.match_start=Z,J<=(F=_))break;be=Y[T+F-1],me=Y[T+F]}}while((Z=Q[Z&ne])>j&&--b!=0);return F<=m.lookahead?F:m.lookahead}function _e(m){var Z,A,_,b,T,F,J,j,Y,ne,Q=m.w_size;do{if(b=m.window_size-m.lookahead-m.strstart,m.strstart>=Q+(Q-L)){for(t.arraySet(m.window,m.window,Q,Q,0),m.match_start-=Q,m.strstart-=Q,m.block_start-=Q,Z=A=m.hash_size;_=m.head[--Z],m.head[Z]=Q<=_?_-Q:0,--A;);for(Z=A=Q;_=m.prev[--Z],m.prev[Z]=Q<=_?_-Q:0,--A;);b+=Q}if(m.strm.avail_in===0)break;if(F=m.strm,J=m.window,j=m.strstart+m.lookahead,Y=b,ne=void 0,ne=F.avail_in,Y<ne&&(ne=Y),A=ne===0?0:(F.avail_in-=ne,t.arraySet(J,F.input,F.next_in,ne,j),F.state.wrap===1?F.adler=a(F.adler,J,ne,j):F.state.wrap===2&&(F.adler=s(F.adler,J,ne,j)),F.next_in+=ne,F.total_in+=ne,ne),m.lookahead+=A,m.lookahead+m.insert>=I)for(T=m.strstart-m.insert,m.ins_h=m.window[T],m.ins_h=(m.ins_h<<m.hash_shift^m.window[T+1])&m.hash_mask;m.insert&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[T+I-1])&m.hash_mask,m.prev[T&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=T,T++,m.insert--,!(m.lookahead+m.insert<I)););}while(m.lookahead<L&&m.strm.avail_in!==0)}function ze(m,Z){for(var A,_;;){if(m.lookahead<L){if(_e(m),m.lookahead<L&&Z===c)return p;if(m.lookahead===0)break}if(A=0,m.lookahead>=I&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+I-1])&m.hash_mask,A=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart),A!==0&&m.strstart-A<=m.w_size-L&&(m.match_length=ee(m,A)),m.match_length>=I)if(_=i._tr_tally(m,m.strstart-m.match_start,m.match_length-I),m.lookahead-=m.match_length,m.match_length<=m.max_lazy_match&&m.lookahead>=I){for(m.match_length--;m.strstart++,m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+I-1])&m.hash_mask,A=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart,--m.match_length!=0;);m.strstart++}else m.strstart+=m.match_length,m.match_length=0,m.ins_h=m.window[m.strstart],m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+1])&m.hash_mask;else _=i._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++;if(_&&(R(m,!1),m.strm.avail_out===0))return p}return m.insert=m.strstart<I-1?m.strstart:I-1,Z===d?(R(m,!0),m.strm.avail_out===0?ue:K):m.last_lit&&(R(m,!1),m.strm.avail_out===0)?p:N}function fe(m,Z){for(var A,_,b;;){if(m.lookahead<L){if(_e(m),m.lookahead<L&&Z===c)return p;if(m.lookahead===0)break}if(A=0,m.lookahead>=I&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+I-1])&m.hash_mask,A=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart),m.prev_length=m.match_length,m.prev_match=m.match_start,m.match_length=I-1,A!==0&&m.prev_length<m.max_lazy_match&&m.strstart-A<=m.w_size-L&&(m.match_length=ee(m,A),m.match_length<=5&&(m.strategy===1||m.match_length===I&&4096<m.strstart-m.match_start)&&(m.match_length=I-1)),m.prev_length>=I&&m.match_length<=m.prev_length){for(b=m.strstart+m.lookahead-I,_=i._tr_tally(m,m.strstart-1-m.prev_match,m.prev_length-I),m.lookahead-=m.prev_length-1,m.prev_length-=2;++m.strstart<=b&&(m.ins_h=(m.ins_h<<m.hash_shift^m.window[m.strstart+I-1])&m.hash_mask,A=m.prev[m.strstart&m.w_mask]=m.head[m.ins_h],m.head[m.ins_h]=m.strstart),--m.prev_length!=0;);if(m.match_available=0,m.match_length=I-1,m.strstart++,_&&(R(m,!1),m.strm.avail_out===0))return p}else if(m.match_available){if((_=i._tr_tally(m,0,m.window[m.strstart-1]))&&R(m,!1),m.strstart++,m.lookahead--,m.strm.avail_out===0)return p}else m.match_available=1,m.strstart++,m.lookahead--}return m.match_available&&(_=i._tr_tally(m,0,m.window[m.strstart-1]),m.match_available=0),m.insert=m.strstart<I-1?m.strstart:I-1,Z===d?(R(m,!0),m.strm.avail_out===0?ue:K):m.last_lit&&(R(m,!1),m.strm.avail_out===0)?p:N}function pe(m,Z,A,_,b){this.good_length=m,this.max_lazy=Z,this.nice_length=A,this.max_chain=_,this.func=b}function Se(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(2*U),this.dyn_dtree=new t.Buf16(2*(2*k+1)),this.bl_tree=new t.Buf16(2*(2*E+1)),ae(this.dyn_ltree),ae(this.dyn_dtree),ae(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(B+1),this.heap=new t.Buf16(2*P+1),ae(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*P+1),ae(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function xe(m){var Z;return m&&m.state?(m.total_in=m.total_out=0,m.data_type=v,(Z=m.state).pending=0,Z.pending_out=0,Z.wrap<0&&(Z.wrap=-Z.wrap),Z.status=Z.wrap?x:O,m.adler=Z.wrap===2?0:1,Z.last_flush=c,i._tr_init(Z),l):ce(m,h)}function Ve(m){var Z=xe(m);return Z===l&&function(A){A.window_size=2*A.w_size,ae(A.head),A.max_lazy_match=o[A.level].max_lazy,A.good_match=o[A.level].good_length,A.nice_match=o[A.level].nice_length,A.max_chain_length=o[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=I-1,A.match_available=0,A.ins_h=0}(m.state),Z}function He(m,Z,A,_,b,T){if(!m)return h;var F=1;if(Z===f&&(Z=6),_<0?(F=0,_=-_):15<_&&(F=2,_-=16),b<1||w<b||A!==y||_<8||15<_||Z<0||9<Z||T<0||g<T)return ce(m,h);_===8&&(_=9);var J=new Se;return(m.state=J).strm=m,J.wrap=F,J.gzhead=null,J.w_bits=_,J.w_size=1<<J.w_bits,J.w_mask=J.w_size-1,J.hash_bits=b+7,J.hash_size=1<<J.hash_bits,J.hash_mask=J.hash_size-1,J.hash_shift=~~((J.hash_bits+I-1)/I),J.window=new t.Buf8(2*J.w_size),J.head=new t.Buf16(J.hash_size),J.prev=new t.Buf16(J.w_size),J.lit_bufsize=1<<b+6,J.pending_buf_size=4*J.lit_bufsize,J.pending_buf=new t.Buf8(J.pending_buf_size),J.d_buf=1*J.lit_bufsize,J.l_buf=3*J.lit_bufsize,J.level=Z,J.strategy=T,J.method=A,Ve(m)}o=[new pe(0,0,0,0,function(m,Z){var A=65535;for(A>m.pending_buf_size-5&&(A=m.pending_buf_size-5);;){if(m.lookahead<=1){if(_e(m),m.lookahead===0&&Z===c)return p;if(m.lookahead===0)break}m.strstart+=m.lookahead,m.lookahead=0;var _=m.block_start+A;if((m.strstart===0||m.strstart>=_)&&(m.lookahead=m.strstart-_,m.strstart=_,R(m,!1),m.strm.avail_out===0))return p;if(m.strstart-m.block_start>=m.w_size-L&&(R(m,!1),m.strm.avail_out===0))return p}return m.insert=0,Z===d?(R(m,!0),m.strm.avail_out===0?ue:K):(m.strstart>m.block_start&&(R(m,!1),m.strm.avail_out),p)}),new pe(4,4,8,4,ze),new pe(4,5,16,8,ze),new pe(4,6,32,32,ze),new pe(4,4,16,16,fe),new pe(8,16,32,32,fe),new pe(8,16,128,128,fe),new pe(8,32,128,256,fe),new pe(32,128,258,1024,fe),new pe(32,258,258,4096,fe)],n.deflateInit=function(m,Z){return He(m,Z,y,15,8,0)},n.deflateInit2=He,n.deflateReset=Ve,n.deflateResetKeep=xe,n.deflateSetHeader=function(m,Z){return m&&m.state?m.state.wrap!==2?h:(m.state.gzhead=Z,l):h},n.deflate=function(m,Z){var A,_,b,T;if(!m||!m.state||5<Z||Z<0)return m?ce(m,h):h;if(_=m.state,!m.output||!m.input&&m.avail_in!==0||_.status===666&&Z!==d)return ce(m,m.avail_out===0?-5:h);if(_.strm=m,A=_.last_flush,_.last_flush=Z,_.status===x)if(_.wrap===2)m.adler=0,ie(_,31),ie(_,139),ie(_,8),_.gzhead?(ie(_,(_.gzhead.text?1:0)+(_.gzhead.hcrc?2:0)+(_.gzhead.extra?4:0)+(_.gzhead.name?8:0)+(_.gzhead.comment?16:0)),ie(_,255&_.gzhead.time),ie(_,_.gzhead.time>>8&255),ie(_,_.gzhead.time>>16&255),ie(_,_.gzhead.time>>24&255),ie(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),ie(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(ie(_,255&_.gzhead.extra.length),ie(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(m.adler=s(m.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(ie(_,0),ie(_,0),ie(_,0),ie(_,0),ie(_,0),ie(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),ie(_,3),_.status=O);else{var F=y+(_.w_bits-8<<4)<<8;F|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&(F|=32),F+=31-F%31,_.status=O,re(_,F),_.strstart!==0&&(re(_,m.adler>>>16),re(_,65535&m.adler)),m.adler=1}if(_.status===69)if(_.gzhead.extra){for(b=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>b&&(m.adler=s(m.adler,_.pending_buf,_.pending-b,b)),C(m),b=_.pending,_.pending!==_.pending_buf_size));)ie(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>b&&(m.adler=s(m.adler,_.pending_buf,_.pending-b,b)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){b=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>b&&(m.adler=s(m.adler,_.pending_buf,_.pending-b,b)),C(m),b=_.pending,_.pending===_.pending_buf_size)){T=1;break}T=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,ie(_,T)}while(T!==0);_.gzhead.hcrc&&_.pending>b&&(m.adler=s(m.adler,_.pending_buf,_.pending-b,b)),T===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){b=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>b&&(m.adler=s(m.adler,_.pending_buf,_.pending-b,b)),C(m),b=_.pending,_.pending===_.pending_buf_size)){T=1;break}T=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,ie(_,T)}while(T!==0);_.gzhead.hcrc&&_.pending>b&&(m.adler=s(m.adler,_.pending_buf,_.pending-b,b)),T===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&C(m),_.pending+2<=_.pending_buf_size&&(ie(_,255&m.adler),ie(_,m.adler>>8&255),m.adler=0,_.status=O)):_.status=O),_.pending!==0){if(C(m),m.avail_out===0)return _.last_flush=-1,l}else if(m.avail_in===0&&H(Z)<=H(A)&&Z!==d)return ce(m,-5);if(_.status===666&&m.avail_in!==0)return ce(m,-5);if(m.avail_in!==0||_.lookahead!==0||Z!==c&&_.status!==666){var J=_.strategy===2?function(j,Y){for(var ne;;){if(j.lookahead===0&&(_e(j),j.lookahead===0)){if(Y===c)return p;break}if(j.match_length=0,ne=i._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++,ne&&(R(j,!1),j.strm.avail_out===0))return p}return j.insert=0,Y===d?(R(j,!0),j.strm.avail_out===0?ue:K):j.last_lit&&(R(j,!1),j.strm.avail_out===0)?p:N}(_,Z):_.strategy===3?function(j,Y){for(var ne,Q,oe,be,me=j.window;;){if(j.lookahead<=V){if(_e(j),j.lookahead<=V&&Y===c)return p;if(j.lookahead===0)break}if(j.match_length=0,j.lookahead>=I&&0<j.strstart&&(Q=me[oe=j.strstart-1])===me[++oe]&&Q===me[++oe]&&Q===me[++oe]){be=j.strstart+V;do;while(Q===me[++oe]&&Q===me[++oe]&&Q===me[++oe]&&Q===me[++oe]&&Q===me[++oe]&&Q===me[++oe]&&Q===me[++oe]&&Q===me[++oe]&&oe<be);j.match_length=V-(be-oe),j.match_length>j.lookahead&&(j.match_length=j.lookahead)}if(j.match_length>=I?(ne=i._tr_tally(j,1,j.match_length-I),j.lookahead-=j.match_length,j.strstart+=j.match_length,j.match_length=0):(ne=i._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++),ne&&(R(j,!1),j.strm.avail_out===0))return p}return j.insert=0,Y===d?(R(j,!0),j.strm.avail_out===0?ue:K):j.last_lit&&(R(j,!1),j.strm.avail_out===0)?p:N}(_,Z):o[_.level].func(_,Z);if(J!==ue&&J!==K||(_.status=666),J===p||J===ue)return m.avail_out===0&&(_.last_flush=-1),l;if(J===N&&(Z===1?i._tr_align(_):Z!==5&&(i._tr_stored_block(_,0,0,!1),Z===3&&(ae(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),C(m),m.avail_out===0))return _.last_flush=-1,l}return Z!==d?l:_.wrap<=0?1:(_.wrap===2?(ie(_,255&m.adler),ie(_,m.adler>>8&255),ie(_,m.adler>>16&255),ie(_,m.adler>>24&255),ie(_,255&m.total_in),ie(_,m.total_in>>8&255),ie(_,m.total_in>>16&255),ie(_,m.total_in>>24&255)):(re(_,m.adler>>>16),re(_,65535&m.adler)),C(m),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?l:1)},n.deflateEnd=function(m){var Z;return m&&m.state?(Z=m.state.status)!==x&&Z!==69&&Z!==73&&Z!==91&&Z!==103&&Z!==O&&Z!==666?ce(m,h):(m.state=null,Z===O?ce(m,-3):l):h},n.deflateSetDictionary=function(m,Z){var A,_,b,T,F,J,j,Y,ne=Z.length;if(!m||!m.state)return h;if((T=(A=m.state).wrap)===2||T===1&&A.status!==x||A.lookahead)return h;for(T===1&&(m.adler=a(m.adler,Z,ne,0)),A.wrap=0,ne>=A.w_size&&(T===0&&(ae(A.head),A.strstart=0,A.block_start=0,A.insert=0),Y=new t.Buf8(A.w_size),t.arraySet(Y,Z,ne-A.w_size,A.w_size,0),Z=Y,ne=A.w_size),F=m.avail_in,J=m.next_in,j=m.input,m.avail_in=ne,m.next_in=0,m.input=Z,_e(A);A.lookahead>=I;){for(_=A.strstart,b=A.lookahead-(I-1);A.ins_h=(A.ins_h<<A.hash_shift^A.window[_+I-1])&A.hash_mask,A.prev[_&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=_,_++,--b;);A.strstart=_,A.lookahead=I-1,_e(A)}return A.strstart+=A.lookahead,A.block_start=A.strstart,A.insert=A.lookahead,A.lookahead=0,A.match_length=A.prev_length=I-1,A.match_available=0,m.next_in=J,m.input=j,m.avail_in=F,A.wrap=T,l},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,r,n){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,r,n){r.exports=function(o,t){var i,a,s,u,c,d,l,h,f,g,v,y,w,P,k,E,U,B,I,V,L,x,O,p,N;i=o.state,a=o.next_in,p=o.input,s=a+(o.avail_in-5),u=o.next_out,N=o.output,c=u-(t-o.avail_out),d=u+(o.avail_out-257),l=i.dmax,h=i.wsize,f=i.whave,g=i.wnext,v=i.window,y=i.hold,w=i.bits,P=i.lencode,k=i.distcode,E=(1<<i.lenbits)-1,U=(1<<i.distbits)-1;e:do{w<15&&(y+=p[a++]<<w,w+=8,y+=p[a++]<<w,w+=8),B=P[y&E];t:for(;;){if(y>>>=I=B>>>24,w-=I,(I=B>>>16&255)===0)N[u++]=65535&B;else{if(!(16&I)){if((64&I)==0){B=P[(65535&B)+(y&(1<<I)-1)];continue t}if(32&I){i.mode=12;break e}o.msg="invalid literal/length code",i.mode=30;break e}V=65535&B,(I&=15)&&(w<I&&(y+=p[a++]<<w,w+=8),V+=y&(1<<I)-1,y>>>=I,w-=I),w<15&&(y+=p[a++]<<w,w+=8,y+=p[a++]<<w,w+=8),B=k[y&U];r:for(;;){if(y>>>=I=B>>>24,w-=I,!(16&(I=B>>>16&255))){if((64&I)==0){B=k[(65535&B)+(y&(1<<I)-1)];continue r}o.msg="invalid distance code",i.mode=30;break e}if(L=65535&B,w<(I&=15)&&(y+=p[a++]<<w,(w+=8)<I&&(y+=p[a++]<<w,w+=8)),l<(L+=y&(1<<I)-1)){o.msg="invalid distance too far back",i.mode=30;break e}if(y>>>=I,w-=I,(I=u-c)<L){if(f<(I=L-I)&&i.sane){o.msg="invalid distance too far back",i.mode=30;break e}if(O=v,(x=0)===g){if(x+=h-I,I<V){for(V-=I;N[u++]=v[x++],--I;);x=u-L,O=N}}else if(g<I){if(x+=h+g-I,(I-=g)<V){for(V-=I;N[u++]=v[x++],--I;);if(x=0,g<V){for(V-=I=g;N[u++]=v[x++],--I;);x=u-L,O=N}}}else if(x+=g-I,I<V){for(V-=I;N[u++]=v[x++],--I;);x=u-L,O=N}for(;2<V;)N[u++]=O[x++],N[u++]=O[x++],N[u++]=O[x++],V-=3;V&&(N[u++]=O[x++],1<V&&(N[u++]=O[x++]))}else{for(x=u-L;N[u++]=N[x++],N[u++]=N[x++],N[u++]=N[x++],2<(V-=3););V&&(N[u++]=N[x++],1<V&&(N[u++]=N[x++]))}break}}break}}while(a<s&&u<d);a-=V=w>>3,y&=(1<<(w-=V<<3))-1,o.next_in=a,o.next_out=u,o.avail_in=a<s?s-a+5:5-(a-s),o.avail_out=u<d?d-u+257:257-(u-d),i.hold=y,i.bits=w}},{}],49:[function(e,r,n){var o=e("../utils/common"),t=e("./adler32"),i=e("./crc32"),a=e("./inffast"),s=e("./inftrees"),u=1,c=2,d=0,l=-2,h=1,f=852,g=592;function v(x){return(x>>>24&255)+(x>>>8&65280)+((65280&x)<<8)+((255&x)<<24)}function y(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new o.Buf16(320),this.work=new o.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function w(x){var O;return x&&x.state?(O=x.state,x.total_in=x.total_out=O.total=0,x.msg="",O.wrap&&(x.adler=1&O.wrap),O.mode=h,O.last=0,O.havedict=0,O.dmax=32768,O.head=null,O.hold=0,O.bits=0,O.lencode=O.lendyn=new o.Buf32(f),O.distcode=O.distdyn=new o.Buf32(g),O.sane=1,O.back=-1,d):l}function P(x){var O;return x&&x.state?((O=x.state).wsize=0,O.whave=0,O.wnext=0,w(x)):l}function k(x,O){var p,N;return x&&x.state?(N=x.state,O<0?(p=0,O=-O):(p=1+(O>>4),O<48&&(O&=15)),O&&(O<8||15<O)?l:(N.window!==null&&N.wbits!==O&&(N.window=null),N.wrap=p,N.wbits=O,P(x))):l}function E(x,O){var p,N;return x?(N=new y,(x.state=N).window=null,(p=k(x,O))!==d&&(x.state=null),p):l}var U,B,I=!0;function V(x){if(I){var O;for(U=new o.Buf32(512),B=new o.Buf32(32),O=0;O<144;)x.lens[O++]=8;for(;O<256;)x.lens[O++]=9;for(;O<280;)x.lens[O++]=7;for(;O<288;)x.lens[O++]=8;for(s(u,x.lens,0,288,U,0,x.work,{bits:9}),O=0;O<32;)x.lens[O++]=5;s(c,x.lens,0,32,B,0,x.work,{bits:5}),I=!1}x.lencode=U,x.lenbits=9,x.distcode=B,x.distbits=5}function L(x,O,p,N){var ue,K=x.state;return K.window===null&&(K.wsize=1<<K.wbits,K.wnext=0,K.whave=0,K.window=new o.Buf8(K.wsize)),N>=K.wsize?(o.arraySet(K.window,O,p-K.wsize,K.wsize,0),K.wnext=0,K.whave=K.wsize):(N<(ue=K.wsize-K.wnext)&&(ue=N),o.arraySet(K.window,O,p-N,ue,K.wnext),(N-=ue)?(o.arraySet(K.window,O,p-N,N,0),K.wnext=N,K.whave=K.wsize):(K.wnext+=ue,K.wnext===K.wsize&&(K.wnext=0),K.whave<K.wsize&&(K.whave+=ue))),0}n.inflateReset=P,n.inflateReset2=k,n.inflateResetKeep=w,n.inflateInit=function(x){return E(x,15)},n.inflateInit2=E,n.inflate=function(x,O){var p,N,ue,K,ce,H,ae,C,R,ie,re,ee,_e,ze,fe,pe,Se,xe,Ve,He,m,Z,A,_,b=0,T=new o.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!x||!x.state||!x.output||!x.input&&x.avail_in!==0)return l;(p=x.state).mode===12&&(p.mode=13),ce=x.next_out,ue=x.output,ae=x.avail_out,K=x.next_in,N=x.input,H=x.avail_in,C=p.hold,R=p.bits,ie=H,re=ae,Z=d;e:for(;;)switch(p.mode){case h:if(p.wrap===0){p.mode=13;break}for(;R<16;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if(2&p.wrap&&C===35615){T[p.check=0]=255&C,T[1]=C>>>8&255,p.check=i(p.check,T,2,0),R=C=0,p.mode=2;break}if(p.flags=0,p.head&&(p.head.done=!1),!(1&p.wrap)||(((255&C)<<8)+(C>>8))%31){x.msg="incorrect header check",p.mode=30;break}if((15&C)!=8){x.msg="unknown compression method",p.mode=30;break}if(R-=4,m=8+(15&(C>>>=4)),p.wbits===0)p.wbits=m;else if(m>p.wbits){x.msg="invalid window size",p.mode=30;break}p.dmax=1<<m,x.adler=p.check=1,p.mode=512&C?10:12,R=C=0;break;case 2:for(;R<16;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if(p.flags=C,(255&p.flags)!=8){x.msg="unknown compression method",p.mode=30;break}if(57344&p.flags){x.msg="unknown header flags set",p.mode=30;break}p.head&&(p.head.text=C>>8&1),512&p.flags&&(T[0]=255&C,T[1]=C>>>8&255,p.check=i(p.check,T,2,0)),R=C=0,p.mode=3;case 3:for(;R<32;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}p.head&&(p.head.time=C),512&p.flags&&(T[0]=255&C,T[1]=C>>>8&255,T[2]=C>>>16&255,T[3]=C>>>24&255,p.check=i(p.check,T,4,0)),R=C=0,p.mode=4;case 4:for(;R<16;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}p.head&&(p.head.xflags=255&C,p.head.os=C>>8),512&p.flags&&(T[0]=255&C,T[1]=C>>>8&255,p.check=i(p.check,T,2,0)),R=C=0,p.mode=5;case 5:if(1024&p.flags){for(;R<16;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}p.length=C,p.head&&(p.head.extra_len=C),512&p.flags&&(T[0]=255&C,T[1]=C>>>8&255,p.check=i(p.check,T,2,0)),R=C=0}else p.head&&(p.head.extra=null);p.mode=6;case 6:if(1024&p.flags&&(H<(ee=p.length)&&(ee=H),ee&&(p.head&&(m=p.head.extra_len-p.length,p.head.extra||(p.head.extra=Array(p.head.extra_len)),o.arraySet(p.head.extra,N,K,ee,m)),512&p.flags&&(p.check=i(p.check,N,ee,K)),H-=ee,K+=ee,p.length-=ee),p.length))break e;p.length=0,p.mode=7;case 7:if(2048&p.flags){if(H===0)break e;for(ee=0;m=N[K+ee++],p.head&&m&&p.length<65536&&(p.head.name+=String.fromCharCode(m)),m&&ee<H;);if(512&p.flags&&(p.check=i(p.check,N,ee,K)),H-=ee,K+=ee,m)break e}else p.head&&(p.head.name=null);p.length=0,p.mode=8;case 8:if(4096&p.flags){if(H===0)break e;for(ee=0;m=N[K+ee++],p.head&&m&&p.length<65536&&(p.head.comment+=String.fromCharCode(m)),m&&ee<H;);if(512&p.flags&&(p.check=i(p.check,N,ee,K)),H-=ee,K+=ee,m)break e}else p.head&&(p.head.comment=null);p.mode=9;case 9:if(512&p.flags){for(;R<16;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if(C!==(65535&p.check)){x.msg="header crc mismatch",p.mode=30;break}R=C=0}p.head&&(p.head.hcrc=p.flags>>9&1,p.head.done=!0),x.adler=p.check=0,p.mode=12;break;case 10:for(;R<32;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}x.adler=p.check=v(C),R=C=0,p.mode=11;case 11:if(p.havedict===0)return x.next_out=ce,x.avail_out=ae,x.next_in=K,x.avail_in=H,p.hold=C,p.bits=R,2;x.adler=p.check=1,p.mode=12;case 12:if(O===5||O===6)break e;case 13:if(p.last){C>>>=7&R,R-=7&R,p.mode=27;break}for(;R<3;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}switch(p.last=1&C,R-=1,3&(C>>>=1)){case 0:p.mode=14;break;case 1:if(V(p),p.mode=20,O!==6)break;C>>>=2,R-=2;break e;case 2:p.mode=17;break;case 3:x.msg="invalid block type",p.mode=30}C>>>=2,R-=2;break;case 14:for(C>>>=7&R,R-=7&R;R<32;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if((65535&C)!=(C>>>16^65535)){x.msg="invalid stored block lengths",p.mode=30;break}if(p.length=65535&C,R=C=0,p.mode=15,O===6)break e;case 15:p.mode=16;case 16:if(ee=p.length){if(H<ee&&(ee=H),ae<ee&&(ee=ae),ee===0)break e;o.arraySet(ue,N,K,ee,ce),H-=ee,K+=ee,ae-=ee,ce+=ee,p.length-=ee;break}p.mode=12;break;case 17:for(;R<14;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if(p.nlen=257+(31&C),C>>>=5,R-=5,p.ndist=1+(31&C),C>>>=5,R-=5,p.ncode=4+(15&C),C>>>=4,R-=4,286<p.nlen||30<p.ndist){x.msg="too many length or distance symbols",p.mode=30;break}p.have=0,p.mode=18;case 18:for(;p.have<p.ncode;){for(;R<3;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}p.lens[F[p.have++]]=7&C,C>>>=3,R-=3}for(;p.have<19;)p.lens[F[p.have++]]=0;if(p.lencode=p.lendyn,p.lenbits=7,A={bits:p.lenbits},Z=s(0,p.lens,0,19,p.lencode,0,p.work,A),p.lenbits=A.bits,Z){x.msg="invalid code lengths set",p.mode=30;break}p.have=0,p.mode=19;case 19:for(;p.have<p.nlen+p.ndist;){for(;pe=(b=p.lencode[C&(1<<p.lenbits)-1])>>>16&255,Se=65535&b,!((fe=b>>>24)<=R);){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if(Se<16)C>>>=fe,R-=fe,p.lens[p.have++]=Se;else{if(Se===16){for(_=fe+2;R<_;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if(C>>>=fe,R-=fe,p.have===0){x.msg="invalid bit length repeat",p.mode=30;break}m=p.lens[p.have-1],ee=3+(3&C),C>>>=2,R-=2}else if(Se===17){for(_=fe+3;R<_;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}R-=fe,m=0,ee=3+(7&(C>>>=fe)),C>>>=3,R-=3}else{for(_=fe+7;R<_;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}R-=fe,m=0,ee=11+(127&(C>>>=fe)),C>>>=7,R-=7}if(p.have+ee>p.nlen+p.ndist){x.msg="invalid bit length repeat",p.mode=30;break}for(;ee--;)p.lens[p.have++]=m}}if(p.mode===30)break;if(p.lens[256]===0){x.msg="invalid code -- missing end-of-block",p.mode=30;break}if(p.lenbits=9,A={bits:p.lenbits},Z=s(u,p.lens,0,p.nlen,p.lencode,0,p.work,A),p.lenbits=A.bits,Z){x.msg="invalid literal/lengths set",p.mode=30;break}if(p.distbits=6,p.distcode=p.distdyn,A={bits:p.distbits},Z=s(c,p.lens,p.nlen,p.ndist,p.distcode,0,p.work,A),p.distbits=A.bits,Z){x.msg="invalid distances set",p.mode=30;break}if(p.mode=20,O===6)break e;case 20:p.mode=21;case 21:if(6<=H&&258<=ae){x.next_out=ce,x.avail_out=ae,x.next_in=K,x.avail_in=H,p.hold=C,p.bits=R,a(x,re),ce=x.next_out,ue=x.output,ae=x.avail_out,K=x.next_in,N=x.input,H=x.avail_in,C=p.hold,R=p.bits,p.mode===12&&(p.back=-1);break}for(p.back=0;pe=(b=p.lencode[C&(1<<p.lenbits)-1])>>>16&255,Se=65535&b,!((fe=b>>>24)<=R);){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if(pe&&(240&pe)==0){for(xe=fe,Ve=pe,He=Se;pe=(b=p.lencode[He+((C&(1<<xe+Ve)-1)>>xe)])>>>16&255,Se=65535&b,!(xe+(fe=b>>>24)<=R);){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}C>>>=xe,R-=xe,p.back+=xe}if(C>>>=fe,R-=fe,p.back+=fe,p.length=Se,pe===0){p.mode=26;break}if(32&pe){p.back=-1,p.mode=12;break}if(64&pe){x.msg="invalid literal/length code",p.mode=30;break}p.extra=15&pe,p.mode=22;case 22:if(p.extra){for(_=p.extra;R<_;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}p.length+=C&(1<<p.extra)-1,C>>>=p.extra,R-=p.extra,p.back+=p.extra}p.was=p.length,p.mode=23;case 23:for(;pe=(b=p.distcode[C&(1<<p.distbits)-1])>>>16&255,Se=65535&b,!((fe=b>>>24)<=R);){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if((240&pe)==0){for(xe=fe,Ve=pe,He=Se;pe=(b=p.distcode[He+((C&(1<<xe+Ve)-1)>>xe)])>>>16&255,Se=65535&b,!(xe+(fe=b>>>24)<=R);){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}C>>>=xe,R-=xe,p.back+=xe}if(C>>>=fe,R-=fe,p.back+=fe,64&pe){x.msg="invalid distance code",p.mode=30;break}p.offset=Se,p.extra=15&pe,p.mode=24;case 24:if(p.extra){for(_=p.extra;R<_;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}p.offset+=C&(1<<p.extra)-1,C>>>=p.extra,R-=p.extra,p.back+=p.extra}if(p.offset>p.dmax){x.msg="invalid distance too far back",p.mode=30;break}p.mode=25;case 25:if(ae===0)break e;if(ee=re-ae,p.offset>ee){if((ee=p.offset-ee)>p.whave&&p.sane){x.msg="invalid distance too far back",p.mode=30;break}_e=ee>p.wnext?(ee-=p.wnext,p.wsize-ee):p.wnext-ee,ee>p.length&&(ee=p.length),ze=p.window}else ze=ue,_e=ce-p.offset,ee=p.length;for(ae<ee&&(ee=ae),ae-=ee,p.length-=ee;ue[ce++]=ze[_e++],--ee;);p.length===0&&(p.mode=21);break;case 26:if(ae===0)break e;ue[ce++]=p.length,ae--,p.mode=21;break;case 27:if(p.wrap){for(;R<32;){if(H===0)break e;H--,C|=N[K++]<<R,R+=8}if(re-=ae,x.total_out+=re,p.total+=re,re&&(x.adler=p.check=p.flags?i(p.check,ue,re,ce-re):t(p.check,ue,re,ce-re)),re=ae,(p.flags?C:v(C))!==p.check){x.msg="incorrect data check",p.mode=30;break}R=C=0}p.mode=28;case 28:if(p.wrap&&p.flags){for(;R<32;){if(H===0)break e;H--,C+=N[K++]<<R,R+=8}if(C!==(4294967295&p.total)){x.msg="incorrect length check",p.mode=30;break}R=C=0}p.mode=29;case 29:Z=1;break e;case 30:Z=-3;break e;case 31:return-4;case 32:default:return l}return x.next_out=ce,x.avail_out=ae,x.next_in=K,x.avail_in=H,p.hold=C,p.bits=R,(p.wsize||re!==x.avail_out&&p.mode<30&&(p.mode<27||O!==4))&&L(x,x.output,x.next_out,re-x.avail_out)?(p.mode=31,-4):(ie-=x.avail_in,re-=x.avail_out,x.total_in+=ie,x.total_out+=re,p.total+=re,p.wrap&&re&&(x.adler=p.check=p.flags?i(p.check,ue,re,x.next_out-re):t(p.check,ue,re,x.next_out-re)),x.data_type=p.bits+(p.last?64:0)+(p.mode===12?128:0)+(p.mode===20||p.mode===15?256:0),(ie==0&&re===0||O===4)&&Z===d&&(Z=-5),Z)},n.inflateEnd=function(x){if(!x||!x.state)return l;var O=x.state;return O.window&&(O.window=null),x.state=null,d},n.inflateGetHeader=function(x,O){var p;return x&&x.state?(2&(p=x.state).wrap)==0?l:((p.head=O).done=!1,d):l},n.inflateSetDictionary=function(x,O){var p,N=O.length;return x&&x.state?(p=x.state).wrap!==0&&p.mode!==11?l:p.mode===11&&t(1,O,N,0)!==p.check?-3:L(x,O,N,N)?(p.mode=31,-4):(p.havedict=1,d):l},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,r,n){var o=e("../utils/common"),t=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(u,c,d,l,h,f,g,v){var y,w,P,k,E,U,B,I,V,L=v.bits,x=0,O=0,p=0,N=0,ue=0,K=0,ce=0,H=0,ae=0,C=0,R=null,ie=0,re=new o.Buf16(16),ee=new o.Buf16(16),_e=null,ze=0;for(x=0;x<=15;x++)re[x]=0;for(O=0;O<l;O++)re[c[d+O]]++;for(ue=L,N=15;1<=N&&re[N]===0;N--);if(N<ue&&(ue=N),N===0)return h[f++]=20971520,h[f++]=20971520,v.bits=1,0;for(p=1;p<N&&re[p]===0;p++);for(ue<p&&(ue=p),x=H=1;x<=15;x++)if(H<<=1,(H-=re[x])<0)return-1;if(0<H&&(u===0||N!==1))return-1;for(ee[1]=0,x=1;x<15;x++)ee[x+1]=ee[x]+re[x];for(O=0;O<l;O++)c[d+O]!==0&&(g[ee[c[d+O]]++]=O);if(U=u===0?(R=_e=g,19):u===1?(R=t,ie-=257,_e=i,ze-=257,256):(R=a,_e=s,-1),x=p,E=f,ce=O=C=0,P=-1,k=(ae=1<<(K=ue))-1,u===1&&852<ae||u===2&&592<ae)return 1;for(;;){for(B=x-ce,V=g[O]<U?(I=0,g[O]):g[O]>U?(I=_e[ze+g[O]],R[ie+g[O]]):(I=96,0),y=1<<x-ce,p=w=1<<K;h[E+(C>>ce)+(w-=y)]=B<<24|I<<16|V|0,w!==0;);for(y=1<<x-1;C&y;)y>>=1;if(y!==0?(C&=y-1,C+=y):C=0,O++,--re[x]==0){if(x===N)break;x=c[d+g[O]]}if(ue<x&&(C&k)!==P){for(ce===0&&(ce=ue),E+=p,H=1<<(K=x-ce);K+ce<N&&!((H-=re[K+ce])<=0);)K++,H<<=1;if(ae+=1<<K,u===1&&852<ae||u===2&&592<ae)return 1;h[P=C&k]=ue<<24|K<<16|E-f|0}}return C!==0&&(h[E+C]=x-ce<<24|4194304|0),v.bits=ue,0}},{"../utils/common":41}],51:[function(e,r,n){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,r,n){var o=e("../utils/common"),t=0,i=1;function a(b){for(var T=b.length;0<=--T;)b[T]=0}var s=0,u=29,c=256,d=c+1+u,l=30,h=19,f=2*d+1,g=15,v=16,y=7,w=256,P=16,k=17,E=18,U=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],B=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L=Array(2*(d+2));a(L);var x=Array(2*l);a(x);var O=Array(512);a(O);var p=Array(256);a(p);var N=Array(u);a(N);var ue,K,ce,H=Array(l);function ae(b,T,F,J,j){this.static_tree=b,this.extra_bits=T,this.extra_base=F,this.elems=J,this.max_length=j,this.has_stree=b&&b.length}function C(b,T){this.dyn_tree=b,this.max_code=0,this.stat_desc=T}function R(b){return b<256?O[b]:O[256+(b>>>7)]}function ie(b,T){b.pending_buf[b.pending++]=255&T,b.pending_buf[b.pending++]=T>>>8&255}function re(b,T,F){b.bi_valid>v-F?(b.bi_buf|=T<<b.bi_valid&65535,ie(b,b.bi_buf),b.bi_buf=T>>v-b.bi_valid,b.bi_valid+=F-v):(b.bi_buf|=T<<b.bi_valid&65535,b.bi_valid+=F)}function ee(b,T,F){re(b,F[2*T],F[2*T+1])}function _e(b,T){for(var F=0;F|=1&b,b>>>=1,F<<=1,0<--T;);return F>>>1}function ze(b,T,F){var J,j,Y=Array(g+1),ne=0;for(J=1;J<=g;J++)Y[J]=ne=ne+F[J-1]<<1;for(j=0;j<=T;j++){var Q=b[2*j+1];Q!==0&&(b[2*j]=_e(Y[Q]++,Q))}}function fe(b){var T;for(T=0;T<d;T++)b.dyn_ltree[2*T]=0;for(T=0;T<l;T++)b.dyn_dtree[2*T]=0;for(T=0;T<h;T++)b.bl_tree[2*T]=0;b.dyn_ltree[2*w]=1,b.opt_len=b.static_len=0,b.last_lit=b.matches=0}function pe(b){8<b.bi_valid?ie(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf),b.bi_buf=0,b.bi_valid=0}function Se(b,T,F,J){var j=2*T,Y=2*F;return b[j]<b[Y]||b[j]===b[Y]&&J[T]<=J[F]}function xe(b,T,F){for(var J=b.heap[F],j=F<<1;j<=b.heap_len&&(j<b.heap_len&&Se(T,b.heap[j+1],b.heap[j],b.depth)&&j++,!Se(T,J,b.heap[j],b.depth));)b.heap[F]=b.heap[j],F=j,j<<=1;b.heap[F]=J}function Ve(b,T,F){var J,j,Y,ne,Q=0;if(b.last_lit!==0)for(;J=b.pending_buf[b.d_buf+2*Q]<<8|b.pending_buf[b.d_buf+2*Q+1],j=b.pending_buf[b.l_buf+Q],Q++,J===0?ee(b,j,T):(ee(b,(Y=p[j])+c+1,T),(ne=U[Y])!==0&&re(b,j-=N[Y],ne),ee(b,Y=R(--J),F),(ne=B[Y])!==0&&re(b,J-=H[Y],ne)),Q<b.last_lit;);ee(b,w,T)}function He(b,T){var F,J,j,Y=T.dyn_tree,ne=T.stat_desc.static_tree,Q=T.stat_desc.has_stree,oe=T.stat_desc.elems,be=-1;for(b.heap_len=0,b.heap_max=f,F=0;F<oe;F++)Y[2*F]!==0?(b.heap[++b.heap_len]=be=F,b.depth[F]=0):Y[2*F+1]=0;for(;b.heap_len<2;)Y[2*(j=b.heap[++b.heap_len]=be<2?++be:0)]=1,b.depth[j]=0,b.opt_len--,Q&&(b.static_len-=ne[2*j+1]);for(T.max_code=be,F=b.heap_len>>1;1<=F;F--)xe(b,Y,F);for(j=oe;F=b.heap[1],b.heap[1]=b.heap[b.heap_len--],xe(b,Y,1),J=b.heap[1],b.heap[--b.heap_max]=F,b.heap[--b.heap_max]=J,Y[2*j]=Y[2*F]+Y[2*J],b.depth[j]=(b.depth[F]>=b.depth[J]?b.depth[F]:b.depth[J])+1,Y[2*F+1]=Y[2*J+1]=j,b.heap[1]=j++,xe(b,Y,1),2<=b.heap_len;);b.heap[--b.heap_max]=b.heap[1],function(me,qe){var Pr,Ye,Tr,Ie,wn,Lo,ut=qe.dyn_tree,rm=qe.max_code,yb=qe.stat_desc.static_tree,bb=qe.stat_desc.has_stree,_b=qe.stat_desc.extra_bits,nm=qe.stat_desc.extra_base,Er=qe.stat_desc.max_length,kn=0;for(Ie=0;Ie<=g;Ie++)me.bl_count[Ie]=0;for(ut[2*me.heap[me.heap_max]+1]=0,Pr=me.heap_max+1;Pr<f;Pr++)Er<(Ie=ut[2*ut[2*(Ye=me.heap[Pr])+1]+1]+1)&&(Ie=Er,kn++),ut[2*Ye+1]=Ie,rm<Ye||(me.bl_count[Ie]++,wn=0,nm<=Ye&&(wn=_b[Ye-nm]),Lo=ut[2*Ye],me.opt_len+=Lo*(Ie+wn),bb&&(me.static_len+=Lo*(yb[2*Ye+1]+wn)));if(kn!==0){do{for(Ie=Er-1;me.bl_count[Ie]===0;)Ie--;me.bl_count[Ie]--,me.bl_count[Ie+1]+=2,me.bl_count[Er]--,kn-=2}while(0<kn);for(Ie=Er;Ie!==0;Ie--)for(Ye=me.bl_count[Ie];Ye!==0;)rm<(Tr=me.heap[--Pr])||(ut[2*Tr+1]!==Ie&&(me.opt_len+=(Ie-ut[2*Tr+1])*ut[2*Tr],ut[2*Tr+1]=Ie),Ye--)}}(b,T),ze(Y,be,b.bl_count)}function m(b,T,F){var J,j,Y=-1,ne=T[1],Q=0,oe=7,be=4;for(ne===0&&(oe=138,be=3),T[2*(F+1)+1]=65535,J=0;J<=F;J++)j=ne,ne=T[2*(J+1)+1],++Q<oe&&j===ne||(Q<be?b.bl_tree[2*j]+=Q:j!==0?(j!==Y&&b.bl_tree[2*j]++,b.bl_tree[2*P]++):Q<=10?b.bl_tree[2*k]++:b.bl_tree[2*E]++,Y=j,be=(Q=0)===ne?(oe=138,3):j===ne?(oe=6,3):(oe=7,4))}function Z(b,T,F){var J,j,Y=-1,ne=T[1],Q=0,oe=7,be=4;for(ne===0&&(oe=138,be=3),J=0;J<=F;J++)if(j=ne,ne=T[2*(J+1)+1],!(++Q<oe&&j===ne)){if(Q<be)for(;ee(b,j,b.bl_tree),--Q!=0;);else j!==0?(j!==Y&&(ee(b,j,b.bl_tree),Q--),ee(b,P,b.bl_tree),re(b,Q-3,2)):Q<=10?(ee(b,k,b.bl_tree),re(b,Q-3,3)):(ee(b,E,b.bl_tree),re(b,Q-11,7));Y=j,be=(Q=0)===ne?(oe=138,3):j===ne?(oe=6,3):(oe=7,4)}}a(H);var A=!1;function _(b,T,F,J){re(b,(s<<1)+(J?1:0),3),function(j,Y,ne,Q){pe(j),Q&&(ie(j,ne),ie(j,~ne)),o.arraySet(j.pending_buf,j.window,Y,ne,j.pending),j.pending+=ne}(b,T,F,!0)}n._tr_init=function(b){A||(function(){var T,F,J,j,Y,ne=Array(g+1);for(j=J=0;j<u-1;j++)for(N[j]=J,T=0;T<1<<U[j];T++)p[J++]=j;for(p[J-1]=j,j=Y=0;j<16;j++)for(H[j]=Y,T=0;T<1<<B[j];T++)O[Y++]=j;for(Y>>=7;j<l;j++)for(H[j]=Y<<7,T=0;T<1<<B[j]-7;T++)O[256+Y++]=j;for(F=0;F<=g;F++)ne[F]=0;for(T=0;T<=143;)L[2*T+1]=8,T++,ne[8]++;for(;T<=255;)L[2*T+1]=9,T++,ne[9]++;for(;T<=279;)L[2*T+1]=7,T++,ne[7]++;for(;T<=287;)L[2*T+1]=8,T++,ne[8]++;for(ze(L,d+1,ne),T=0;T<l;T++)x[2*T+1]=5,x[2*T]=_e(T,5);ue=new ae(L,U,c+1,d,g),K=new ae(x,B,0,l,g),ce=new ae([],I,0,h,y)}(),A=!0),b.l_desc=new C(b.dyn_ltree,ue),b.d_desc=new C(b.dyn_dtree,K),b.bl_desc=new C(b.bl_tree,ce),b.bi_buf=0,b.bi_valid=0,fe(b)},n._tr_stored_block=_,n._tr_flush_block=function(b,T,F,J){var j,Y,ne=0;0<b.level?(b.strm.data_type===2&&(b.strm.data_type=function(Q){var oe,be=4093624447;for(oe=0;oe<=31;oe++,be>>>=1)if(1&be&&Q.dyn_ltree[2*oe]!==0)return t;if(Q.dyn_ltree[18]!==0||Q.dyn_ltree[20]!==0||Q.dyn_ltree[26]!==0)return i;for(oe=32;oe<c;oe++)if(Q.dyn_ltree[2*oe]!==0)return i;return t}(b)),He(b,b.l_desc),He(b,b.d_desc),ne=function(Q){var oe;for(m(Q,Q.dyn_ltree,Q.l_desc.max_code),m(Q,Q.dyn_dtree,Q.d_desc.max_code),He(Q,Q.bl_desc),oe=h-1;3<=oe&&Q.bl_tree[2*V[oe]+1]===0;oe--);return Q.opt_len+=3*(oe+1)+5+5+4,oe}(b),j=b.opt_len+3+7>>>3,(Y=b.static_len+3+7>>>3)<=j&&(j=Y)):j=Y=F+5,F+4<=j&&T!==-1?_(b,T,F,J):b.strategy===4||Y===j?(re(b,2+(J?1:0),3),Ve(b,L,x)):(re(b,4+(J?1:0),3),function(Q,oe,be,me){var qe;for(re(Q,oe-257,5),re(Q,be-1,5),re(Q,me-4,4),qe=0;qe<me;qe++)re(Q,Q.bl_tree[2*V[qe]+1],3);Z(Q,Q.dyn_ltree,oe-1),Z(Q,Q.dyn_dtree,be-1)}(b,b.l_desc.max_code+1,b.d_desc.max_code+1,ne+1),Ve(b,b.dyn_ltree,b.dyn_dtree)),fe(b),J&&pe(b)},n._tr_tally=function(b,T,F){return b.pending_buf[b.d_buf+2*b.last_lit]=T>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&T,b.pending_buf[b.l_buf+b.last_lit]=255&F,b.last_lit++,T===0?b.dyn_ltree[2*F]++:(b.matches++,T--,b.dyn_ltree[2*(p[F]+c+1)]++,b.dyn_dtree[2*R(T)]++),b.last_lit===b.lit_bufsize-1},n._tr_align=function(b){re(b,2,3),ee(b,w,L),function(T){T.bi_valid===16?(ie(T,T.bi_buf),T.bi_buf=0,T.bi_valid=0):8<=T.bi_valid&&(T.pending_buf[T.pending++]=255&T.bi_buf,T.bi_buf>>=8,T.bi_valid-=8)}(b)}},{"../utils/common":41}],53:[function(e,r,n){r.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,r,n){(function(o){(function(t,i){if(!t.setImmediate){var a,s,u,c,d=1,l={},h=!1,f=t.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(t);g=g&&g.setTimeout?g:t,a={}.toString.call(t.process)==="[object process]"?function(P){process.nextTick(function(){y(P)})}:function(){if(t.postMessage&&!t.importScripts){var P=!0,k=t.onmessage;return t.onmessage=function(){P=!1},t.postMessage("","*"),t.onmessage=k,P}}()?(c="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",w,!1):t.attachEvent("onmessage",w),function(P){t.postMessage(c+P,"*")}):t.MessageChannel?((u=new MessageChannel).port1.onmessage=function(P){y(P.data)},function(P){u.port2.postMessage(P)}):f&&("onreadystatechange"in f.createElement("script"))?(s=f.documentElement,function(P){var k=f.createElement("script");k.onreadystatechange=function(){y(P),k.onreadystatechange=null,s.removeChild(k),k=null},s.appendChild(k)}):function(P){setTimeout(y,0,P)},g.setImmediate=function(P){typeof P!="function"&&(P=Function(""+P));for(var k=Array(arguments.length-1),E=0;E<k.length;E++)k[E]=arguments[E+1];var U={callback:P,args:k};return l[d]=U,a(d),d++},g.clearImmediate=v}function v(P){delete l[P]}function y(P){if(h)setTimeout(y,0,P);else{var k=l[P];if(k){h=!0;try{(function(E){var{callback:U,args:B}=E;switch(B.length){case 0:U();break;case 1:U(B[0]);break;case 2:U(B[0],B[1]);break;case 3:U(B[0],B[1],B[2]);break;default:U.apply(i,B)}})(k)}finally{v(P),h=!1}}}}function w(P){P.source===t&&typeof P.data=="string"&&P.data.indexOf(c)===0&&y(+P.data.slice(c.length))}})(typeof self>"u"?o===void 0?this:o:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var ke=G(function(Vd,dh){var pn=function(e){return e&&e.Math===Math&&e};dh.exports=pn(typeof globalThis=="object"&&globalThis)||pn(typeof window=="object"&&window)||pn(typeof self=="object"&&self)||pn(typeof global=="object"&&global)||pn(typeof Vd=="object"&&Vd)||function(){return this}()||Function("return this")()});var mt=G(function(p2,fh){fh.exports=function(e){try{return!!e()}catch(r){return!0}}});var pt=G(function(h2,mh){var k$=mt();mh.exports=!k$(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var no=G(function(g2,ph){var I$=mt();ph.exports=!I$(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var hn=G(function(v2,hh){var S$=no(),io=Function.prototype.call;hh.exports=S$?io.bind(io):function(){return io.apply(io,arguments)}});var yh=G(function(P$){var gh={}.propertyIsEnumerable,vh=Object.getOwnPropertyDescriptor,z$=vh&&!gh.call({1:2},1);P$.f=z$?function(r){var n=vh(this,r);return!!n&&n.enumerable}:gh});var qd=G(function(b2,bh){bh.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var Ee=G(function(_2,$h){var _h=no(),xh=Function.prototype,Jd=xh.call,E$=_h&&xh.bind.bind(Jd,Jd);$h.exports=_h?E$:function(e){return function(){return Jd.apply(e,arguments)}}});var gn=G(function(x2,kh){var wh=Ee(),O$=wh({}.toString),j$=wh("".slice);kh.exports=function(e){return j$(O$(e),8,-1)}});var Sh=G(function($2,Ih){var D$=Ee(),U$=mt(),R$=gn(),Wd=Object,C$=D$("".split);Ih.exports=U$(function(){return!Wd("z").propertyIsEnumerable(0)})?function(e){return R$(e)==="String"?C$(e,""):Wd(e)}:Wd});var oo=G(function(w2,zh){zh.exports=function(e){return e===null||e===void 0}});var Gd=G(function(k2,Ph){var A$=oo(),N$=TypeError;Ph.exports=function(e){if(A$(e))throw new N$("Can't call method on "+e);return e}});var ao=G(function(I2,Th){var Z$=Sh(),L$=Gd();Th.exports=function(e){return Z$(L$(e))}});var We=G(function(S2,Eh){var Hd=typeof document=="object"&&document.all;Eh.exports=typeof Hd>"u"&&Hd!==void 0?function(e){return typeof e=="function"||e===Hd}:function(e){return typeof e=="function"}});var Lt=G(function(z2,Oh){var F$=We();Oh.exports=function(e){return typeof e=="object"?e!==null:F$(e)}});var vn=G(function(P2,jh){var Kd=ke(),B$=We(),M$=function(e){return B$(e)?e:void 0};jh.exports=function(e,r){return arguments.length<2?M$(Kd[e]):Kd[e]&&Kd[e][r]}});var Xd=G(function(T2,Dh){var V$=Ee();Dh.exports=V$({}.isPrototypeOf)});var Ah=G(function(E2,Ch){var q$=ke(),Uh=q$.navigator,Rh=Uh&&Uh.userAgent;Ch.exports=Rh?String(Rh):""});var Qd=G(function(O2,Mh){var Bh=ke(),Yd=Ah(),Nh=Bh.process,Zh=Bh.Deno,Lh=Nh&&Nh.versions||Zh&&Zh.version,Fh=Lh&&Lh.v8,Xe,so;if(Fh)Xe=Fh.split("."),so=Xe[0]>0&&Xe[0]<4?1:+(Xe[0]+Xe[1]);if(!so&&Yd){if(Xe=Yd.match(/Edge\/(\d+)/),!Xe||Xe[1]>=74){if(Xe=Yd.match(/Chrome\/(\d+)/),Xe)so=+Xe[1]}}Mh.exports=so});var ef=G(function(j2,qh){var Vh=Qd(),J$=mt(),W$=ke(),G$=W$.String;qh.exports=!!Object.getOwnPropertySymbols&&!J$(function(){var e=Symbol("symbol detection");return!G$(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Vh&&Vh<41})});var tf=G(function(D2,Jh){var H$=ef();Jh.exports=H$&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var rf=G(function(U2,Wh){var K$=vn(),X$=We(),Y$=Xd(),Q$=tf(),ew=Object;Wh.exports=Q$?function(e){return typeof e=="symbol"}:function(e){var r=K$("Symbol");return X$(r)&&Y$(r.prototype,ew(e))}});var Hh=G(function(R2,Gh){var tw=String;Gh.exports=function(e){try{return tw(e)}catch(r){return"Object"}}});var $r=G(function(C2,Kh){var rw=We(),nw=Hh(),iw=TypeError;Kh.exports=function(e){if(rw(e))return e;throw new iw(nw(e)+" is not a function")}});var nf=G(function(A2,Xh){var ow=$r(),aw=oo();Xh.exports=function(e,r){var n=e[r];return aw(n)?void 0:ow(n)}});var Qh=G(function(N2,Yh){var of=hn(),af=We(),sf=Lt(),sw=TypeError;Yh.exports=function(e,r){var n,o;if(r==="string"&&af(n=e.toString)&&!sf(o=of(n,e)))return o;if(af(n=e.valueOf)&&!sf(o=of(n,e)))return o;if(r!=="string"&&af(n=e.toString)&&!sf(o=of(n,e)))return o;throw new sw("Can't convert object to primitive value")}});var tg=G(function(Z2,eg){eg.exports=!1});var uo=G(function(L2,ng){var rg=ke(),uw=Object.defineProperty;ng.exports=function(e,r){try{uw(rg,e,{value:r,configurable:!0,writable:!0})}catch(n){rg[e]=r}return r}});var co=G(function(F2,ag){var cw=tg(),lw=ke(),dw=uo(),ig="__core-js_shared__",og=ag.exports=lw[ig]||dw(ig,{});(og.versions||(og.versions=[])).push({version:"3.50.0",mode:cw?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var uf=G(function(B2,ug){var sg=co(),fw=Object.create||Object;ug.exports=function(e,r){return sg[e]||(sg[e]=r||fw(null))}});var lg=G(function(M2,cg){var mw=Gd(),pw=Object;cg.exports=function(e){return pw(mw(e))}});var it=G(function(V2,dg){var hw=Ee(),gw=lg(),vw=hw({}.hasOwnProperty);dg.exports=Object.hasOwn||function(r,n){return vw(gw(r),n)}});var cf=G(function(q2,fg){var yw=Ee(),bw=0,_w=Math.random(),xw=yw(1.1 .toString);fg.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+xw(++bw+_w,36)}});var Ft=G(function(J2,pg){var $w=ke(),ww=uf(),mg=it(),kw=cf(),Iw=ef(),Sw=tf(),wr=$w.Symbol,lf=ww("wks"),zw=Sw?wr.for||wr:wr&&wr.withoutSetter||kw;pg.exports=function(e){if(!mg(lf,e))lf[e]=Iw&&mg(wr,e)?wr[e]:zw("Symbol."+e);return lf[e]}});var yg=G(function(W2,vg){var Pw=hn(),hg=Lt(),gg=rf(),Tw=nf(),Ew=Qh(),Ow=Ft(),jw=TypeError,Dw=Ow("toPrimitive");vg.exports=function(e,r){if(!hg(e)||gg(e))return e;var n=Tw(e,Dw),o;if(n){if(r===void 0)r="default";if(o=Pw(n,e,r),!hg(o)||gg(o))return o;throw new jw("Can't convert object to primitive value")}if(r===void 0)r="number";return Ew(e,r)}});var df=G(function(G2,bg){var Uw=yg(),Rw=rf();bg.exports=function(e){var r=Uw(e,"string");return Rw(r)?r:r+""}});var $g=G(function(H2,xg){var Cw=ke(),_g=Lt(),ff=Cw.document,Aw=_g(ff)&&_g(ff.createElement);xg.exports=function(e){return Aw?ff.createElement(e):{}}});var mf=G(function(K2,wg){var Nw=pt(),Zw=mt(),Lw=$g();wg.exports=!Nw&&!Zw(function(){return Object.defineProperty(Lw("div"),"a",{get:function(){return 7}}).a!==7})});var lo=G(function(Hw){var Fw=pt(),Bw=hn(),Mw=yh(),Vw=qd(),qw=ao(),Jw=df(),Ww=it(),Gw=mf(),kg=Object.getOwnPropertyDescriptor;Hw.f=Fw?kg:function(r,n){if(r=qw(r),n=Jw(n),Gw)try{return kg(r,n)}catch(o){}if(Ww(r,n))return Vw(!Bw(Mw.f,r,n),r[n])}});var Sg=G(function(Y2,Ig){var Xw=pt(),Yw=mt();Ig.exports=Xw&&Yw(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var fo=G(function(Q2,zg){var Qw=Lt(),ek=String,tk=TypeError;zg.exports=function(e){if(Qw(e))return e;throw new tk(ek(e)+" is not an object")}});var Bt=G(function(sk){var rk=pt(),nk=mf(),ik=Sg(),mo=fo(),Pg=df(),ok=TypeError,pf=Object.defineProperty,ak=Object.getOwnPropertyDescriptor,hf="enumerable",gf="configurable",vf="writable";sk.f=rk?ik?function(r,n,o){if(mo(r),n=Pg(n),mo(o),typeof r==="function"&&n==="prototype"&&"value"in o&&vf in o&&!o[vf]){var t=ak(r,n);if(t&&t[vf])r[n]=o.value,o={configurable:gf in o?o[gf]:t[gf],enumerable:hf in o?o[hf]:t[hf],writable:!1}}return pf(r,n,o)}:pf:function(r,n,o){if(mo(r),n=Pg(n),mo(o),nk)try{return pf(r,n,o)}catch(t){}if("get"in o||"set"in o)throw new ok("Accessors not supported");if("value"in o)r[n]=o.value;return r}});var yf=G(function(tP,Tg){var ck=pt(),lk=Bt(),dk=qd();Tg.exports=ck?function(e,r,n){return lk.f(e,r,dk(1,n))}:function(e,r,n){return e[r]=n,e}});var jg=G(function(rP,Og){var bf=pt(),fk=it(),Eg=Function.prototype,mk=bf&&Object.getOwnPropertyDescriptor,_f=fk(Eg,"name"),pk=_f&&function(){}.name==="something",hk=_f&&(!bf||bf&&mk(Eg,"name").configurable);Og.exports={EXISTS:_f,PROPER:pk,CONFIGURABLE:hk}});var Ug=G(function(nP,Dg){var gk=Ee(),vk=We(),xf=co(),yk=gk(Function.toString);if(!vk(xf.inspectSource))xf.inspectSource=function(e){return yk(e)};Dg.exports=xf.inspectSource});var Ag=G(function(iP,Cg){var bk=ke(),_k=We(),Rg=bk.WeakMap;Cg.exports=_k(Rg)&&/native code/.test(String(Rg))});var Lg=G(function(oP,Zg){var xk=uf(),$k=cf(),Ng=xk("keys");Zg.exports=function(e){return Ng[e]||(Ng[e]=$k(e))}});var $f=G(function(aP,Fg){Fg.exports={}});var Sf=G(function(sP,Vg){var wk=Ag(),Mg=ke(),kk=Lt(),Ik=yf(),wf=it(),kf=co(),Sk=Lg(),zk=$f(),Bg="Object already initialized",If=Mg.TypeError,Pk=Mg.WeakMap,po,yn,ho,Tk=function(e){return ho(e)?yn(e):po(e,{})},Ek=function(e){return function(r){var n;if(!kk(r)||(n=yn(r)).type!==e)throw new If("Incompatible receiver, "+e+" required");return n}};if(wk||kf.state)Ge=kf.state||(kf.state=new Pk),Ge.get=Ge.get,Ge.has=Ge.has,Ge.set=Ge.set,po=function(e,r){if(Ge.has(e))throw new If(Bg);return r.facade=e,Ge.set(e,r),r},yn=function(e){return Ge.get(e)||{}},ho=function(e){return Ge.has(e)};else It=Sk("state"),zk[It]=!0,po=function(e,r){if(wf(e,It))throw new If(Bg);return r.facade=e,Ik(e,It,r),r},yn=function(e){return wf(e,It)?e[It]:{}},ho=function(e){return wf(e,It)};var Ge,It;Vg.exports={set:po,get:yn,has:ho,enforce:Tk,getterFor:Ek}});var Tf=G(function(uP,Wg){var Pf=Ee(),Ok=mt(),jk=We(),go=it(),zf=pt(),Dk=jg().CONFIGURABLE,Uk=Ug(),Jg=Sf(),Rk=Jg.enforce,Ck=Jg.get,qg=String,vo=Object.defineProperty,Ak=Pf("".slice),Nk=Pf("".replace),Zk=Pf([].join),Lk=zf&&!Ok(function(){return vo(function(){},"length",{value:8}).length!==8}),Fk=String(String).split("String"),Bk=Wg.exports=function(e,r,n){if(Ak(qg(r),0,7)==="Symbol(")r="["+Nk(qg(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]";if(n&&n.getter)r="get "+r;if(n&&n.setter)r="set "+r;if(!go(e,"name")||Dk&&e.name!==r)if(zf)vo(e,"name",{value:r,configurable:!0});else e.name=r;if(Lk&&n&&go(n,"arity")&&e.length!==n.arity)vo(e,"length",{value:n.arity});try{if(n&&go(n,"constructor")&&n.constructor){if(zf)vo(e,"prototype",{writable:!1})}else if(e.prototype)e.prototype=void 0}catch(t){}var o=Rk(e);if(!go(o,"source"))o.source=Zk(Fk,typeof r=="string"?r:"");return e};Function.prototype.toString=Bk(function(){return jk(this)&&Ck(this).source||Uk(this)},"toString")});var yo=G(function(cP,Gg){var Mk=We(),Vk=Bt(),qk=Tf(),Jk=uo();Gg.exports=function(e,r,n,o){if(!o)o={};var t=o.enumerable,i=o.name!==void 0?o.name:r;if(Mk(n))qk(n,i,o);if(o.global)if(t)e[r]=n;else Jk(r,n);else{try{if(!o.unsafe)delete e[r];else if(e[r])t=!0}catch(a){}if(t)e[r]=n;else Vk.f(e,r,{value:n,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e}});var Kg=G(function(lP,Hg){var{ceil:Wk,floor:Gk}=Math;Hg.exports=Math.trunc||function(r){var n=+r;return(n>0?Gk:Wk)(n)}});var Ef=G(function(dP,Xg){var Hk=Kg();Xg.exports=function(e){var r=+e;return r!==r||r===0?0:Hk(r)}});var Qg=G(function(fP,Yg){var Kk=Ef(),Xk=Math.max,Yk=Math.min;Yg.exports=function(e,r){var n=Kk(e);return n<0?Xk(n+r,0):Yk(n,r)}});var tv=G(function(mP,ev){var Qk=Ef(),eI=Math.min;ev.exports=function(e){var r=Qk(e);return r>0?eI(r,9007199254740991):0}});var Of=G(function(pP,rv){var tI=tv();rv.exports=function(e){return tI(e.length)}});var ov=G(function(hP,iv){var rI=ao(),nI=Qg(),iI=Of(),nv=function(e){return function(r,n,o){var t=rI(r),i=iI(t);if(i===0)return!e&&-1;var a=nI(o,i),s;if(e&&n!==n){while(i>a)if(s=t[a++],s!==s)return!0}else for(;i>a;a++)if((e||(a in t))&&t[a]===n)return e||a||0;return!e&&-1}};iv.exports={includes:nv(!0),indexOf:nv(!1)}});var uv=G(function(gP,sv){var oI=Ee(),jf=it(),aI=ao(),sI=ov().indexOf,uI=$f(),av=oI([].push);sv.exports=function(e,r){var n=aI(e),o=0,t=[],i;for(i in n)!jf(uI,i)&&jf(n,i)&&av(t,i);while(r.length>o)if(jf(n,i=r[o++]))~sI(t,i)||av(t,i);return t}});var lv=G(function(vP,cv){cv.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var dv=G(function(fI){var cI=uv(),lI=lv(),dI=lI.concat("length","prototype");fI.f=Object.getOwnPropertyNames||function(r){return cI(r,dI)}});var fv=G(function(pI){pI.f=Object.getOwnPropertySymbols});var pv=G(function(_P,mv){var gI=vn(),vI=Ee(),yI=dv(),bI=fv(),_I=fo(),xI=vI([].concat);mv.exports=gI("Reflect","ownKeys")||function(r){var n=yI.f(_I(r)),o=bI.f;return o?xI(n,o(r)):n}});var vv=G(function(xP,gv){var hv=it(),$I=pv(),wI=lo(),kI=Bt();gv.exports=function(e,r,n){var o=$I(r),t=kI.f,i=wI.f;for(var a=0;a<o.length;a++){var s=o[a];if(!hv(e,s)&&!(n&&hv(n,s)))t(e,s,i(r,s))}}});var bv=G(function($P,yv){var II=mt(),SI=We(),zI=/#|\.prototype\./,bn=function(e,r){var n=TI[PI(e)];return n===OI?!0:n===EI?!1:SI(r)?II(r):!!r},PI=bn.normalize=function(e){return String(e).replace(zI,".").toLowerCase()},TI=bn.data={},EI=bn.NATIVE="N",OI=bn.POLYFILL="P";yv.exports=bn});var kr=G(function(wP,_v){var bo=ke(),jI=lo().f,DI=yf(),UI=yo(),RI=uo(),CI=vv(),AI=bv();_v.exports=function(e,r){var{target:n,global:o,stat:t}=e,i,a,s,u,c,d;if(o)a=bo;else if(t)a=bo[n]||RI(n,{});else a=bo[n]&&bo[n].prototype;if(a)for(s in r){if(c=r[s],e.dontCallGetSet)d=jI(a,s),u=d&&d.value;else u=a[s];if(i=AI(o?s:n+(t?".":"#")+s,e.forced),!i&&u!==void 0){if(typeof c==typeof u)continue;CI(c,u)}if(e.sham||u&&u.sham)DI(c,"sham",!0);UI(a,s,c,e)}}});var $v=G(function(kP,xv){var NI=Xd(),ZI=TypeError;xv.exports=function(e,r){if(NI(r,e))return e;throw new ZI("Incorrect invocation")}});var kv=G(function(IP,wv){var LI=yo();wv.exports=function(e,r,n){for(var o in r)LI(e,o,r[o],n);return e}});var zv=G(function(SP,Sv){var Iv=Tf(),FI=Bt();Sv.exports=function(e,r,n){if(n.get)Iv(n.get,r,{getter:!0});if(n.set)Iv(n.set,r,{setter:!0});return FI.f(e,r,n)}});var Tv=G(function(zP,Pv){var BI=gn(),MI=Ee();Pv.exports=function(e){if(BI(e)==="Function")return MI(e)}});var jv=G(function(PP,Ov){var Ev=Tv(),VI=$r(),qI=no(),JI=Ev(Ev.bind);Ov.exports=function(e,r){return VI(e),r===void 0?e:qI?JI(e,r):function(){return e.apply(r,arguments)}}});var Nv=G(function(TP,Av){var WI=vn(),GI=hn(),HI=Ee(),KI=jv(),XI=fo(),YI=$r(),Rv=oo(),Df=nf(),Cv=Ft(),QI=Cv("asyncDispose"),Dv=Cv("dispose"),e0=HI([].push),t0=function(e,r){if(r==="async-dispose"){var n=Df(e,QI);if(n!==void 0)return n;if(n=Df(e,Dv),n===void 0)return n;return function(){var o=this,t=WI("Promise");return new t(function(i){GI(n,o),i(void 0)})}}return Df(e,Dv)},Uv=function(e,r,n){if(arguments.length<3&&!Rv(e))n=YI(t0(XI(e),r));return n===void 0?function(){return}:KI(n,e)};Av.exports=function(e,r,n,o){var t;if(arguments.length<4){if(Rv(r)&&n==="sync-dispose")return;t=Uv(r,n)}else t=Uv(void 0,n,o);e0(e.stack,t)}});var Jv=G(function(){var r0=kr(),xo=pt(),Bv=vn(),Zv=$r(),n0=$v(),Mv=yo(),i0=kv(),o0=zv(),Vv=Ft(),qv=Sf(),Uf=Nv(),Lv=Qd(),Fv=Bv("Promise"),a0=Bv("SuppressedError"),s0=ReferenceError,u0=Vv("asyncDispose"),c0=Vv("toStringTag"),wo="AsyncDisposableStack",l0=qv.set,$o=qv.getterFor(wo),Rf="async-dispose",_n="disposed",d0="pending",_o=function(e){var r=$o(e);if(r.state===_n)throw new s0(wo+" already disposed");return r},Cf=function(){if(l0(n0(this,Ir),{type:wo,state:d0,stack:[]}),!xo)this.disposed=!1},Ir=Cf.prototype;i0(Ir,{disposeAsync:function(){var r=this;return new Fv(function(n,o){var t=$o(r);if(t.state===_n)return n(void 0);if(t.state=_n,!xo)r.disposed=!0;var i=t.stack,a=i.length,s=!1,u,c=function(l){if(s)u=new a0(l,u);else s=!0,u=l;d()},d=function(){if(a){var l=i[--a];i[a]=null;try{Fv.resolve(l()).then(d,c)}catch(h){c(h)}}else t.stack=null,s?o(u):n(void 0)};d()})},use:function(r){return Uf(_o(this),r,Rf),r},adopt:function(r,n){var o=_o(this);return Zv(n),Uf(o,void 0,Rf,function(){return n(r)}),r},defer:function(r){var n=_o(this);Zv(r),Uf(n,void 0,Rf,r)},move:function(){var r=_o(this),n=new Cf;if($o(n).stack=r.stack,r.stack=[],r.state=_n,!xo)this.disposed=!0;return n}});if(xo)o0(Ir,"disposed",{configurable:!0,get:function(){return $o(this).state===_n}});Mv(Ir,u0,Ir.disposeAsync,{name:"disposeAsync"});Mv(Ir,c0,wo,{nonWritable:!0});var f0=Lv&&Lv<136;r0({global:!0,constructor:!0,forced:f0},{AsyncDisposableStack:Cf})});var Gv=G(function(jP,Wv){var m0=ke();Wv.exports=m0});var Hv=G(function(h0){var p0=Ft();h0.f=p0});var Yv=G(function(UP,Xv){var Kv=Gv(),v0=it(),y0=Hv(),b0=Bt().f;Xv.exports=function(e){var r=Kv.Symbol||(Kv.Symbol={});if(!v0(r,e))b0(r,e,{value:y0.f(e)})}});var Qv=G(function(){var _0=ke(),x0=Yv(),$0=Bt().f,w0=lo().f,Af=_0.Symbol;x0("asyncDispose");if(Af){if(Sr=w0(Af,"asyncDispose"),Sr.enumerable&&Sr.configurable&&Sr.writable)$0(Af,"asyncDispose",{value:Sr.value,enumerable:!1,configurable:!1,writable:!1})}var Sr});var ty=G(function(AP,ey){var k0=Of();ey.exports=function(e,r,n){var o=0,t=arguments.length>2?n:k0(r),i=new e(t);while(t>o)i[o]=r[o++];return i}});var Nf=G(function(NP,ry){var I0=Lt(),S0=String,z0=TypeError;ry.exports=function(e){if(e===void 0||I0(e))return e;throw new z0(S0(e)+" is not an object or undefined")}});var Zf=G(function(ZP,ny){var P0=TypeError;ny.exports=function(e){if(typeof e=="string")return e;throw new P0("Argument is not a string")}});var Lf=G(function(LP,uy){var sy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",iy=sy+"+/",oy=sy+"-_",ay=function(e){var r={},n=0;for(;n<64;n++)r[e.charAt(n)]=n;return r};uy.exports={i2c:iy,c2i:ay(iy),i2cUrl:oy,c2iUrl:ay(oy)}});var Ff=G(function(FP,cy){var T0=TypeError;cy.exports=function(e){var r=e&&e.alphabet;if(r===void 0||r==="base64"||r==="base64url")return r||"base64";throw new T0("Incorrect `alphabet` option")}});var dy=G(function(BP,ly){ly.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"});var my=G(function(MP,fy){var E0=Ee(),O0=$r();fy.exports=function(e,r,n){try{return E0(O0(Object.getOwnPropertyDescriptor(e,r)[n]))}catch(o){}}});var vy=G(function(VP,gy){var hy=ke(),j0=my(),D0=gn(),py=hy.ArrayBuffer,U0=hy.TypeError;gy.exports=py&&j0(py.prototype,"byteLength","get")||function(e){if(D0(e)!=="ArrayBuffer")throw new U0("ArrayBuffer expected");return e.byteLength}});var by=G(function(qP,yy){var R0=ke(),C0=dy(),A0=vy(),N0=R0.DataView;yy.exports=function(e){if(!C0||A0(e)!==0)return!1;try{return new N0(e),!1}catch(r){return!0}}});var ko=G(function(JP,_y){var Z0=by(),L0=TypeError;_y.exports=function(e){if(Z0(e))throw new L0("ArrayBuffer is detached");return e}});var wy=G(function(WP,$y){var qf=ke(),F0=Ee(),B0=Nf(),M0=Zf(),V0=it(),xy=Lf(),q0=Ff(),J0=ko(),W0=xy.c2i,G0=xy.c2iUrl,St=qf.SyntaxError,H0=qf.TypeError,K0=qf.Array,Mt=F0("".charAt),X0=Math.floor,Bf=function(e,r){var n=e.length;for(;r<n;r++){var o=Mt(e,r);if(o!==" "&&o!=="\t"&&o!==`
13
- `&&o!=="\f"&&o!=="\r")break}return r},Mf=function(e,r,n){var o=e.length;if(o<4)e+=o===2?"AA":"A";var t=(r[Mt(e,0)]<<18)+(r[Mt(e,1)]<<12)+(r[Mt(e,2)]<<6)+r[Mt(e,3)],i=[t>>16&255,t>>8&255,t&255];if(o===2){if(n&&i[1]!==0)throw new St("Extra bits");return[i[0]]}if(o===3){if(n&&i[2]!==0)throw new St("Extra bits");return[i[0],i[1]]}return i},Vf=function(e,r,n){var o=r.length;for(var t=0;t<o;t++)e[n+t]=r[t];return n+o};$y.exports=function(e,r,n,o){M0(e),B0(r);var t=q0(r)==="base64"?W0:G0,i=r?r.lastChunkHandling:void 0;if(i===void 0)i="loose";if(i!=="loose"&&i!=="strict"&&i!=="stop-before-partial")throw new H0("Incorrect `lastChunkHandling` option");if(n)J0(n.buffer);var a=e.length,s=n||K0(X0(a*3/4)),u=0,c=0,d="",l=0;if(o)while(!0){if(l=Bf(e,l),l===a){if(d.length>0){if(i==="stop-before-partial")break;if(i==="loose"){if(d.length===1)throw new St("Malformed padding: exactly one additional character");u=Vf(s,Mf(d,t,!1),u)}else throw new St("Missing padding")}c=a;break}var h=Mt(e,l);if(++l,h==="="){if(d.length<2)throw new St("Padding is too early");if(l=Bf(e,l),d.length===2){if(l===a){if(i==="stop-before-partial")break;throw new St("Malformed padding: only one =")}if(Mt(e,l)==="=")++l,l=Bf(e,l)}if(l<a)throw new St("Unexpected character after padding");u=Vf(s,Mf(d,t,i==="strict"),u),c=a;break}if(!V0(t,h))throw new St("Unexpected character");var f=o-u;if(f===1&&d.length===2||f===2&&d.length===3)break;if(d+=h,d.length===4){if(u=Vf(s,Mf(d,t,!1),u),d="",c=l,u===o)break}}if(!n)s.length=u;return{bytes:s,read:c,written:u}}});var ky=G(function(){var Y0=kr(),Q0=ke(),eS=ty(),tS=wy(),zr=Q0.Uint8Array,rS=!zr||!zr.fromBase64||!function(){try{zr.fromBase64("a");return}catch(e){}try{zr.fromBase64("",null)}catch(e){return!0}}();if(zr)Y0({target:"Uint8Array",stat:!0,forced:rS},{fromBase64:function(r){var n=tS(r,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return eS(zr,n.bytes)}})});var Py=G(function(KP,zy){var Sy=ke(),nS=Ee(),iS=Sy.Uint8Array,Iy=Sy.SyntaxError,oS=Math.min,aS=nS("".match);zy.exports=function(e,r){var n=e.length;if(n%2!==0)throw new Iy("String should be an even number of characters");var o=r?oS(r.length,n/2):n/2,t=r||new iS(o),i=aS(e,/[\S\s]{2}/g),a=0;for(;a<o;a++){var s=+("0x"+i[a]+"0");if(s!==s)throw new Iy("String should only contain hex characters");t[a]=s>>4}return{bytes:t,read:a<<1}}});var Ty=G(function(){var sS=kr(),uS=ke(),cS=Zf(),lS=Py();if(uS.Uint8Array)sS({target:"Uint8Array",stat:!0},{fromHex:function(r){return lS(cS(r)).bytes}})});var jy=G(function(QP,Oy){var dS=Ft(),fS=dS("toStringTag"),Ey={};Ey[fS]="z";Oy.exports=String(Ey)==="[object z]"});var Uy=G(function(eT,Dy){var mS=jy(),pS=We(),Io=gn(),hS=Ft(),gS=hS("toStringTag"),vS=Object,yS=Io(function(){return arguments}())==="Arguments",bS=function(e,r){try{return e[r]}catch(n){}};Dy.exports=mS?Io:function(e){var r,n,o;return e===void 0?"Undefined":e===null?"Null":typeof(n=bS(r=vS(e),gS))=="string"?n:yS?Io(r):(o=Io(r))==="Object"&&pS(r.callee)?"Arguments":o}});var Jf=G(function(tT,Ry){var _S=Uy(),xS=TypeError;Ry.exports=function(e){if(_S(e)==="Uint8Array")return e;throw new xS("Argument is not an Uint8Array")}});var Zy=G(function(){var $S=kr(),Cy=ke(),Ay=Ee(),wS=Nf(),kS=Jf(),IS=ko(),Ny=Lf(),SS=Ff(),zS=Ny.i2c,PS=Ny.i2cUrl,TS=Math.floor,ES=Math.ceil,OS=Ay("".charAt),So=Cy.Uint8Array,jS=Cy.Array,DS=Ay([].join),US=!So||!So.prototype.toBase64||!function(){try{var e=new So;e.toBase64(null)}catch(r){return!0}}();if(So)$S({target:"Uint8Array",proto:!0,forced:US},{toBase64:function(){var r=kS(this),n=arguments.length?wS(arguments[0]):void 0,o=SS(n)==="base64"?zS:PS,t=!!n&&!!n.omitPadding;IS(this.buffer);var i=0,a=r.length,s=jS(t?TS(a/3)*4+(a%3?a%3+1:0):ES(a/3)*4),u=0,c,d=function(l){return OS(o,c>>6*l&63)};for(;i+2<a;i+=3)c=(r[i]<<16)+(r[i+1]<<8)+r[i+2],s[u++]=d(3),s[u++]=d(2),s[u++]=d(1),s[u++]=d(0);if(i+2===a){if(c=(r[i]<<16)+(r[i+1]<<8),s[u++]=d(3),s[u++]=d(2),s[u++]=d(1),!t)s[u++]="="}else if(i+1===a){if(c=r[i]<<16,s[u++]=d(3),s[u++]=d(2),!t)s[u++]="=",s[u++]="="}return DS(s,"")}})});var Fy=G(function(){var RS=kr(),CS=ke(),Ly=Ee(),AS=Jf(),NS=ko(),ZS=Ly(1.1 .toString),LS=Ly([].join),FS=Array,zo=CS.Uint8Array,BS=!zo||!zo.prototype.toHex||!function(){try{var e=new zo([255,255,255,255,255,255,255,255]);return e.toHex()==="ffffffffffffffff"}catch(r){return!1}}();if(zo)RS({target:"Uint8Array",proto:!0,forced:BS},{toHex:function(){AS(this),NS(this.buffer);var r=FS(this.length);for(var n=0,o=this.length;n<o;n++){var t=ZS(this[n],16);r[n]=t.length===1?"0"+t:t}return LS(r,"")}})});var My=G(function(Wf){/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */var By;(function(e){if(typeof DO_NOT_EXPORT_CRC>"u")if(typeof Wf==="object")e(Wf);else if(typeof define==="function"&&define.amd)define(function(){var r={};return e(r),r});else e(By={});else e(By={})})(function(e){e.version="1.2.2";function r(){var I=0,V=Array(256);for(var L=0;L!=256;++L)I=L,I=I&1?-2097792136^I>>>1:I>>>1,I=I&1?-2097792136^I>>>1:I>>>1,I=I&1?-2097792136^I>>>1:I>>>1,I=I&1?-2097792136^I>>>1:I>>>1,I=I&1?-2097792136^I>>>1:I>>>1,I=I&1?-2097792136^I>>>1:I>>>1,I=I&1?-2097792136^I>>>1:I>>>1,I=I&1?-2097792136^I>>>1:I>>>1,V[L]=I;return typeof Int32Array<"u"?new Int32Array(V):V}var n=r();function o(I){var V=0,L=0,x=0,O=typeof Int32Array<"u"?new Int32Array(4096):Array(4096);for(x=0;x!=256;++x)O[x]=I[x];for(x=0;x!=256;++x){L=I[x];for(V=256+x;V<4096;V+=256)L=O[V]=L>>>8^I[L&255]}var p=[];for(x=1;x!=16;++x)p[x-1]=typeof Int32Array<"u"?O.subarray(x*256,x*256+256):O.slice(x*256,x*256+256);return p}var t=o(n),i=t[0],a=t[1],s=t[2],u=t[3],c=t[4],d=t[5],l=t[6],h=t[7],f=t[8],g=t[9],v=t[10],y=t[11],w=t[12],P=t[13],k=t[14];function E(I,V){var L=V^-1;for(var x=0,O=I.length;x<O;)L=L>>>8^n[(L^I.charCodeAt(x++))&255];return~L}function U(I,V){var L=V^-1,x=I.length-15,O=0;for(;O<x;)L=k[I[O++]^L&255]^P[I[O++]^L>>8&255]^w[I[O++]^L>>16&255]^y[I[O++]^L>>>24]^v[I[O++]]^g[I[O++]]^f[I[O++]]^h[I[O++]]^l[I[O++]]^d[I[O++]]^c[I[O++]]^u[I[O++]]^s[I[O++]]^a[I[O++]]^i[I[O++]]^n[I[O++]];x+=15;while(O<x)L=L>>>8^n[(L^I[O++])&255];return~L}function B(I,V){var L=V^-1;for(var x=0,O=I.length,p=0,N=0;x<O;)if(p=I.charCodeAt(x++),p<128)L=L>>>8^n[(L^p)&255];else if(p<2048)L=L>>>8^n[(L^(192|p>>6&31))&255],L=L>>>8^n[(L^(128|p&63))&255];else if(p>=55296&&p<57344)p=(p&1023)+64,N=I.charCodeAt(x++)&1023,L=L>>>8^n[(L^(240|p>>8&7))&255],L=L>>>8^n[(L^(128|p>>2&63))&255],L=L>>>8^n[(L^(128|N>>6&15|(p&3)<<4))&255],L=L>>>8^n[(L^(128|N&63))&255];else L=L>>>8^n[(L^(224|p>>12&15))&255],L=L>>>8^n[(L^(128|p>>6&63))&255],L=L>>>8^n[(L^(128|p&63))&255];return~L}e.table=n,e.bstr=E,e.buf=U,e.str=B})});var em=ht(om(),1);var jb=new Uint8Array(16);function Vo(){return crypto.getRandomValues(jb)}var Pe=[];for(let e=0;e<256;++e)Pe.push((e+256).toString(16).slice(1));function am(e,r=0){return(Pe[e[r+0]]+Pe[e[r+1]]+Pe[e[r+2]]+Pe[e[r+3]]+"-"+Pe[e[r+4]]+Pe[e[r+5]]+"-"+Pe[e[r+6]]+Pe[e[r+7]]+"-"+Pe[e[r+8]]+Pe[e[r+9]]+"-"+Pe[e[r+10]]+Pe[e[r+11]]+Pe[e[r+12]]+Pe[e[r+13]]+Pe[e[r+14]]+Pe[e[r+15]]).toLowerCase()}function Db(e,r,n){if(!r&&!e&&crypto.randomUUID)return crypto.randomUUID();return Ub(e,r,n)}function Ub(e,r,n){e=e||{};let o=e.random??e.rng?.()??Vo();if(o.length<16)throw Error("Random bytes length must be >= 16");if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,r){if(n=n||0,n<0||n+16>r.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let t=0;t<16;++t)r[n+t]=o[t];return r}return am(o)}var Tt=Db;var S={};ct(S,{$brand:()=>Jo,$input:()=>sc,$output:()=>ac,NEVER:()=>qo,TimePrecision:()=>fc,ZodAny:()=>rd,ZodArray:()=>ad,ZodBase64:()=>Ji,ZodBase64URL:()=>Wi,ZodBigInt:()=>_r,ZodBigIntFormat:()=>Ki,ZodBoolean:()=>br,ZodCIDRv4:()=>Vi,ZodCIDRv6:()=>qi,ZodCUID:()=>Ai,ZodCUID2:()=>Ni,ZodCatch:()=>Pd,ZodCodec:()=>fn,ZodCustom:()=>mn,ZodCustomStringFormat:()=>vr,ZodDate:()=>sn,ZodDefault:()=>$d,ZodDiscriminatedUnion:()=>ud,ZodE164:()=>Gi,ZodEmail:()=>Ui,ZodEmoji:()=>Ri,ZodEnum:()=>hr,ZodError:()=>d$,ZodExactOptional:()=>bd,ZodFile:()=>vd,ZodFirstPartyTypeKind:()=>Fd,ZodFunction:()=>Nd,ZodGUID:()=>tn,ZodIPv4:()=>Bi,ZodIPv6:()=>Mi,ZodISODate:()=>Pi,ZodISODateTime:()=>zi,ZodISODuration:()=>Ei,ZodISOTime:()=>Ti,ZodIntersection:()=>cd,ZodIssueCode:()=>m$,ZodJWT:()=>Hi,ZodKSUID:()=>Fi,ZodLazy:()=>Rd,ZodLiteral:()=>gd,ZodMAC:()=>Hl,ZodMap:()=>pd,ZodNaN:()=>Ed,ZodNanoID:()=>Ci,ZodNever:()=>id,ZodNonOptional:()=>ro,ZodNull:()=>ed,ZodNullable:()=>xd,ZodNumber:()=>yr,ZodNumberFormat:()=>Zt,ZodObject:()=>cn,ZodOptional:()=>to,ZodPipe:()=>dn,ZodPrefault:()=>kd,ZodPreprocess:()=>Od,ZodPromise:()=>Ad,ZodReadonly:()=>jd,ZodRealError:()=>Ze,ZodRecord:()=>pr,ZodSet:()=>hd,ZodString:()=>gr,ZodStringFormat:()=>ve,ZodSuccess:()=>zd,ZodSymbol:()=>Yl,ZodTemplateLiteral:()=>Ud,ZodTransform:()=>yd,ZodTuple:()=>dd,ZodType:()=>le,ZodULID:()=>Zi,ZodURL:()=>an,ZodUUID:()=>nt,ZodUndefined:()=>Ql,ZodUnion:()=>ln,ZodUnknown:()=>nd,ZodVoid:()=>od,ZodXID:()=>Li,ZodXor:()=>sd,_ZodString:()=>Di,_default:()=>wd,_function:()=>eh,any:()=>Op,array:()=>un,base64:()=>pp,base64url:()=>hp,bigint:()=>Sp,boolean:()=>Xl,catch:()=>Td,check:()=>th,cidrv4:()=>fp,cidrv6:()=>mp,clone:()=>De,codec:()=>Kp,coerce:()=>Bd,config:()=>we,core:()=>ft,cuid:()=>ip,cuid2:()=>op,custom:()=>rh,date:()=>Dp,decode:()=>Bl,decodeAsync:()=>Vl,describe:()=>nh,discriminatedUnion:()=>Zp,e164:()=>gp,email:()=>Gm,emoji:()=>rp,encode:()=>Fl,encodeAsync:()=>Ml,endsWith:()=>ir,enum:()=>Qi,exactOptional:()=>_d,file:()=>Jp,flattenError:()=>Nr,float32:()=>$p,float64:()=>wp,formatError:()=>Zr,fromJSONSchema:()=>lh,function:()=>eh,getErrorMap:()=>h$,globalRegistry:()=>Te,gt:()=>tt,gte:()=>Re,guid:()=>Hm,hash:()=>xp,hex:()=>_p,hostname:()=>bp,httpUrl:()=>tp,includes:()=>rr,instanceof:()=>oh,int:()=>Oi,int32:()=>kp,int64:()=>zp,intersection:()=>ld,invertCodec:()=>Xp,ipv4:()=>cp,ipv6:()=>dp,iso:()=>mr,json:()=>sh,jwt:()=>vp,keyof:()=>Up,ksuid:()=>up,lazy:()=>Cd,length:()=>At,literal:()=>qp,locales:()=>Kr,looseObject:()=>Ap,looseRecord:()=>Fp,lowercase:()=>er,lt:()=>et,lte:()=>Be,mac:()=>lp,map:()=>Bp,maxLength:()=>Ct,maxSize:()=>xt,meta:()=>ih,mime:()=>or,minLength:()=>dt,minSize:()=>rt,multipleOf:()=>_t,nan:()=>Hp,nanoid:()=>np,nativeEnum:()=>Vp,negative:()=>yi,never:()=>Xi,nonnegative:()=>_i,nonoptional:()=>Sd,nonpositive:()=>bi,normalize:()=>ar,null:()=>td,nullable:()=>nn,nullish:()=>Wp,number:()=>Kl,object:()=>Rp,optional:()=>rn,overwrite:()=>Ke,parse:()=>Al,parseAsync:()=>Nl,partialRecord:()=>Lp,pipe:()=>ji,positive:()=>vi,prefault:()=>Id,preprocess:()=>uh,prettifyError:()=>ia,promise:()=>Qp,property:()=>xi,readonly:()=>Dd,record:()=>md,refine:()=>Zd,regex:()=>Qt,regexes:()=>Fe,registry:()=>Kn,safeDecode:()=>Jl,safeDecodeAsync:()=>Gl,safeEncode:()=>ql,safeEncodeAsync:()=>Wl,safeParse:()=>Zl,safeParseAsync:()=>Ll,set:()=>Mp,setErrorMap:()=>p$,size:()=>Rt,slugify:()=>lr,startsWith:()=>nr,strictObject:()=>Cp,string:()=>en,stringFormat:()=>yp,stringbool:()=>ah,success:()=>Gp,superRefine:()=>Ld,symbol:()=>Tp,templateLiteral:()=>Yp,toJSONSchema:()=>Ii,toLowerCase:()=>ur,toUpperCase:()=>cr,transform:()=>eo,treeifyError:()=>na,trim:()=>sr,tuple:()=>fd,uint32:()=>Ip,uint64:()=>Pp,ulid:()=>ap,undefined:()=>Ep,union:()=>Yi,unknown:()=>Nt,uppercase:()=>tr,url:()=>ep,util:()=>W,uuid:()=>Km,uuidv4:()=>Xm,uuidv6:()=>Ym,uuidv7:()=>Qm,void:()=>jp,xid:()=>sp,xor:()=>Np});var ft={};ct(ft,{$ZodAny:()=>Ds,$ZodArray:()=>Ns,$ZodAsyncError:()=>Qe,$ZodBase64:()=>ws,$ZodBase64URL:()=>ks,$ZodBigInt:()=>Jn,$ZodBigIntFormat:()=>Ts,$ZodBoolean:()=>Mr,$ZodCIDRv4:()=>_s,$ZodCIDRv6:()=>xs,$ZodCUID:()=>us,$ZodCUID2:()=>cs,$ZodCatch:()=>ru,$ZodCheck:()=>ye,$ZodCheckBigIntFormat:()=>Na,$ZodCheckEndsWith:()=>Ka,$ZodCheckGreaterThan:()=>Zn,$ZodCheckIncludes:()=>Ga,$ZodCheckLengthEquals:()=>Va,$ZodCheckLessThan:()=>Nn,$ZodCheckLowerCase:()=>Ja,$ZodCheckMaxLength:()=>Ba,$ZodCheckMaxSize:()=>Za,$ZodCheckMimeType:()=>Ya,$ZodCheckMinLength:()=>Ma,$ZodCheckMinSize:()=>La,$ZodCheckMultipleOf:()=>Ca,$ZodCheckNumberFormat:()=>Aa,$ZodCheckOverwrite:()=>Qa,$ZodCheckProperty:()=>Xa,$ZodCheckRegex:()=>qa,$ZodCheckSizeEquals:()=>Fa,$ZodCheckStartsWith:()=>Ha,$ZodCheckStringFormat:()=>Xt,$ZodCheckUpperCase:()=>Wa,$ZodCodec:()=>qr,$ZodCustom:()=>lu,$ZodCustomStringFormat:()=>zs,$ZodDate:()=>As,$ZodDefault:()=>Ys,$ZodDiscriminatedUnion:()=>Fs,$ZodE164:()=>Is,$ZodEmail:()=>is,$ZodEmoji:()=>as,$ZodEncodeError:()=>Ot,$ZodEnum:()=>Js,$ZodError:()=>Ar,$ZodExactOptional:()=>Ks,$ZodFile:()=>Gs,$ZodFunction:()=>su,$ZodGUID:()=>rs,$ZodIPv4:()=>vs,$ZodIPv6:()=>ys,$ZodISODate:()=>ps,$ZodISODateTime:()=>ms,$ZodISODuration:()=>gs,$ZodISOTime:()=>hs,$ZodIntersection:()=>Bs,$ZodJWT:()=>Ss,$ZodKSUID:()=>fs,$ZodLazy:()=>cu,$ZodLiteral:()=>Ws,$ZodMAC:()=>bs,$ZodMap:()=>Vs,$ZodNaN:()=>nu,$ZodNanoID:()=>ss,$ZodNever:()=>Rs,$ZodNonOptional:()=>eu,$ZodNull:()=>js,$ZodNullable:()=>Xs,$ZodNumber:()=>qn,$ZodNumberFormat:()=>Ps,$ZodObject:()=>Nm,$ZodObjectJIT:()=>Zs,$ZodOptional:()=>Gn,$ZodPipe:()=>Hn,$ZodPrefault:()=>Qs,$ZodPreprocess:()=>iu,$ZodPromise:()=>uu,$ZodReadonly:()=>ou,$ZodRealError:()=>Ne,$ZodRecord:()=>Ms,$ZodRegistry:()=>uc,$ZodSet:()=>qs,$ZodString:()=>Ut,$ZodStringFormat:()=>ge,$ZodSuccess:()=>tu,$ZodSymbol:()=>Es,$ZodTemplateLiteral:()=>au,$ZodTransform:()=>Hs,$ZodTuple:()=>Wn,$ZodType:()=>se,$ZodULID:()=>ls,$ZodURL:()=>os,$ZodUUID:()=>ns,$ZodUndefined:()=>Os,$ZodUnion:()=>Vr,$ZodUnknown:()=>Us,$ZodVoid:()=>Cs,$ZodXID:()=>ds,$ZodXor:()=>Ls,$brand:()=>Jo,$constructor:()=>z,$input:()=>sc,$output:()=>ac,Doc:()=>Ln,JSONSchema:()=>qm,JSONSchemaGenerator:()=>jl,NEVER:()=>qo,TimePrecision:()=>fc,_any:()=>Dc,_array:()=>Lc,_base64:()=>mi,_base64url:()=>pi,_bigint:()=>Sc,_boolean:()=>kc,_catch:()=>n$,_check:()=>Vm,_cidrv4:()=>di,_cidrv6:()=>fi,_coercedBigint:()=>zc,_coercedBoolean:()=>Ic,_coercedDate:()=>Nc,_coercedNumber:()=>yc,_coercedString:()=>lc,_cuid:()=>ii,_cuid2:()=>oi,_custom:()=>Bc,_date:()=>Ac,_decode:()=>En,_decodeAsync:()=>jn,_default:()=>e$,_discriminatedUnion:()=>Bx,_e164:()=>hi,_email:()=>Xn,_emoji:()=>ri,_encode:()=>Tn,_encodeAsync:()=>On,_endsWith:()=>ir,_enum:()=>Gx,_file:()=>Fc,_float32:()=>_c,_float64:()=>xc,_gt:()=>tt,_gte:()=>Re,_guid:()=>Xr,_includes:()=>rr,_int:()=>bc,_int32:()=>$c,_int64:()=>Pc,_intersection:()=>Mx,_ipv4:()=>ci,_ipv6:()=>li,_isoDate:()=>pc,_isoDateTime:()=>mc,_isoDuration:()=>gc,_isoTime:()=>hc,_jwt:()=>gi,_ksuid:()=>ui,_lazy:()=>s$,_length:()=>At,_literal:()=>Kx,_lowercase:()=>er,_lt:()=>et,_lte:()=>Be,_mac:()=>dc,_map:()=>Jx,_max:()=>Be,_maxLength:()=>Ct,_maxSize:()=>xt,_mime:()=>or,_min:()=>Re,_minLength:()=>dt,_minSize:()=>rt,_multipleOf:()=>_t,_nan:()=>Zc,_nanoid:()=>ni,_nativeEnum:()=>Hx,_negative:()=>yi,_never:()=>Rc,_nonnegative:()=>_i,_nonoptional:()=>t$,_nonpositive:()=>bi,_normalize:()=>ar,_null:()=>jc,_nullable:()=>Qx,_number:()=>vc,_optional:()=>Yx,_overwrite:()=>Ke,_parse:()=>Wt,_parseAsync:()=>Gt,_pipe:()=>i$,_positive:()=>vi,_promise:()=>u$,_property:()=>xi,_readonly:()=>o$,_record:()=>qx,_refine:()=>Mc,_regex:()=>Qt,_safeDecode:()=>Un,_safeDecodeAsync:()=>Cn,_safeEncode:()=>Dn,_safeEncodeAsync:()=>Rn,_safeParse:()=>Ht,_safeParseAsync:()=>Kt,_set:()=>Wx,_size:()=>Rt,_slugify:()=>lr,_startsWith:()=>nr,_string:()=>cc,_stringFormat:()=>dr,_stringbool:()=>Wc,_success:()=>r$,_superRefine:()=>Vc,_symbol:()=>Ec,_templateLiteral:()=>a$,_toLowerCase:()=>ur,_toUpperCase:()=>cr,_transform:()=>Xx,_trim:()=>sr,_tuple:()=>Vx,_uint32:()=>wc,_uint64:()=>Tc,_ulid:()=>ai,_undefined:()=>Oc,_union:()=>Lx,_unknown:()=>Uc,_uppercase:()=>tr,_url:()=>Yr,_uuid:()=>Yn,_uuidv4:()=>Qn,_uuidv6:()=>ei,_uuidv7:()=>ti,_void:()=>Cc,_xid:()=>si,_xor:()=>Fx,clone:()=>De,config:()=>we,createStandardJSONSchemaMethod:()=>fr,createToJSONSchemaMethod:()=>Gc,decode:()=>u_,decodeAsync:()=>l_,describe:()=>qc,encode:()=>s_,encodeAsync:()=>c_,extractDefs:()=>wt,finalize:()=>kt,flattenError:()=>Nr,formatError:()=>Zr,globalConfig:()=>Et,globalRegistry:()=>Te,initializeContext:()=>$t,isValidBase64:()=>$s,isValidBase64URL:()=>Um,isValidJWT:()=>Rm,locales:()=>Kr,meta:()=>Jc,parse:()=>zn,parseAsync:()=>Pn,prettifyError:()=>ia,process:()=>he,regexes:()=>Fe,registry:()=>Kn,safeDecode:()=>f_,safeDecodeAsync:()=>p_,safeEncode:()=>d_,safeEncodeAsync:()=>m_,safeParse:()=>oa,safeParseAsync:()=>aa,toDotPath:()=>mm,toJSONSchema:()=>Ii,treeifyError:()=>na,util:()=>W,version:()=>es});var sm,qo=Object.freeze({status:"aborted"});function z(e,r,n){function o(s,u){if(!s._zod)Object.defineProperty(s,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1});if(s._zod.traits.has(e))return;s._zod.traits.add(e),r(s,u);let c=a.prototype,d=Object.keys(c);for(let l=0;l<d.length;l++){let h=d[l];if(!(h in s))s[h]=c[h].bind(s)}}let t=n?.Parent??Object;class i extends t{}Object.defineProperty(i,"name",{value:e});function a(s){var u;let c=n?.Parent?new i:this;o(c,s),(u=c._zod).deferred??(u.deferred=[]);for(let d of c._zod.deferred)d();return c}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:(s)=>{if(n?.Parent&&s instanceof n.Parent)return!0;return s?._zod?.traits?.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}var Jo=Symbol("zod_brand");class Qe extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Ot extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}(sm=globalThis).__zod_globalConfig??(sm.__zod_globalConfig={});var Et=globalThis.__zod_globalConfig;function we(e){if(e)Object.assign(Et,e);return Et}var W={};ct(W,{BIGINT_FORMAT_RANGES:()=>ta,Class:()=>dm,NUMBER_FORMAT_RANGES:()=>ea,aborted:()=>bt,allowsEval:()=>Ko,assert:()=>Zb,assertEqual:()=>Rb,assertIs:()=>Ab,assertNever:()=>Nb,assertNotEqual:()=>Cb,assignProp:()=>vt,base64ToUint8Array:()=>cm,base64urlToUint8Array:()=>r_,cached:()=>qt,captureStackTrace:()=>Sn,cleanEnum:()=>t_,cleanRegex:()=>Dr,clone:()=>De,cloneDef:()=>Fb,createTransparentProxy:()=>Wb,defineLazy:()=>de,esc:()=>In,escapeRegex:()=>Je,explicitlyAborted:()=>ra,extend:()=>Kb,finalizeIssue:()=>Ue,floatSafeRemainder:()=>Go,getElementAtPath:()=>Bb,getEnumValues:()=>jr,getLengthableOrigin:()=>Cr,getParsedType:()=>Jb,getSizableOrigin:()=>Rr,hexToUint8Array:()=>i_,isObject:()=>jt,isPlainObject:()=>yt,issue:()=>Jt,joinValues:()=>D,jsonStringifyReplacer:()=>Vt,merge:()=>Yb,mergeDefs:()=>lt,normalizeParams:()=>X,nullish:()=>gt,numKeys:()=>qb,objectClone:()=>Lb,omit:()=>Hb,optionalKeys:()=>Qo,parsedType:()=>q,partial:()=>Qb,pick:()=>Gb,prefixIssues:()=>Ae,primitiveTypes:()=>Yo,promiseAllObject:()=>Mb,propertyKeyTypes:()=>Ur,randomString:()=>Vb,required:()=>e_,safeExtend:()=>Xb,shallowClone:()=>Xo,slugify:()=>Ho,stringifyPrimitive:()=>M,uint8ArrayToBase64:()=>lm,uint8ArrayToBase64url:()=>n_,uint8ArrayToHex:()=>o_,unwrapMessage:()=>Or});function Rb(e){return e}function Cb(e){return e}function Ab(e){}function Nb(e){throw Error("Unexpected value in exhaustive check")}function Zb(e){}function jr(e){let r=Object.values(e).filter((o)=>typeof o==="number");return Object.entries(e).filter(([o,t])=>r.indexOf(+o)===-1).map(([o,t])=>t)}function D(e,r="|"){return e.map((n)=>M(n)).join(r)}function Vt(e,r){if(typeof r==="bigint")return r.toString();return r}function qt(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw Error("cached value already set")}}}function gt(e){return e===null||e===void 0}function Dr(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Go(e,r){let n=e/r,o=Math.round(n),t=Number.EPSILON*Math.max(Math.abs(n),1);if(Math.abs(n-o)<t)return 0;return n-o}var um=Symbol("evaluating");function de(e,r,n){let o=void 0;Object.defineProperty(e,r,{get(){if(o===um)return;if(o===void 0)o=um,o=n();return o},set(t){Object.defineProperty(e,r,{value:t})},configurable:!0})}function Lb(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function vt(e,r,n){Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})}function lt(...e){let r={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(r,o)}return Object.defineProperties({},r)}function Fb(e){return lt(e._zod.def)}function Bb(e,r){if(!r)return e;return r.reduce((n,o)=>n?.[o],e)}function Mb(e){let r=Object.keys(e),n=r.map((o)=>e[o]);return Promise.all(n).then((o)=>{let t={};for(let i=0;i<r.length;i++)t[r[i]]=o[i];return t})}function Vb(e=10){let n="";for(let o=0;o<e;o++)n+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return n}function In(e){return JSON.stringify(e)}function Ho(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Sn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jt(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var Ko=qt(()=>{if(Et.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function yt(e){if(jt(e)===!1)return!1;let r=e.constructor;if(r===void 0)return!0;if(typeof r!=="function")return!0;let n=r.prototype;if(jt(n)===!1)return!1;if(Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)return!1;return!0}function Xo(e){if(yt(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}function qb(e){let r=0;for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n))r++;return r}var Jb=(e)=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(e))return"array";if(e===null)return"null";if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return"promise";if(typeof Map<"u"&&e instanceof Map)return"map";if(typeof Set<"u"&&e instanceof Set)return"set";if(typeof Date<"u"&&e instanceof Date)return"date";if(typeof File<"u"&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${r}`)}},Ur=new Set(["string","number","symbol"]),Yo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Je(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function De(e,r,n){let o=new e._zod.constr(r??e._zod.def);if(!r||n?.parent)o._zod.parent=e;return o}function X(e){let r=e;if(!r)return{};if(typeof r==="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");r.error=r.message}if(delete r.message,typeof r.error==="string")return{...r,error:()=>r.error};return r}function Wb(e){let r;return new Proxy({},{get(n,o,t){return r??(r=e()),Reflect.get(r,o,t)},set(n,o,t,i){return r??(r=e()),Reflect.set(r,o,t,i)},has(n,o){return r??(r=e()),Reflect.has(r,o)},deleteProperty(n,o){return r??(r=e()),Reflect.deleteProperty(r,o)},ownKeys(n){return r??(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,o){return r??(r=e()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(n,o,t){return r??(r=e()),Reflect.defineProperty(r,o,t)}})}function M(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function Qo(e){return Object.keys(e).filter((r)=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var ea={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ta={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Gb(e,r){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i=lt(e._zod.def,{get shape(){let a={};for(let s in r){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);if(!r[s])continue;a[s]=n.shape[s]}return vt(this,"shape",a),a},checks:[]});return De(e,i)}function Hb(e,r){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=lt(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in r){if(!(s in n.shape))throw Error(`Unrecognized key: "${s}"`);if(!r[s])continue;delete a[s]}return vt(this,"shape",a),a},checks:[]});return De(e,i)}function Kb(e,r){if(!yt(r))throw Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let t=lt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...r};return vt(this,"shape",i),i}});return De(e,t)}function Xb(e,r){if(!yt(r))throw Error("Invalid input to safeExtend: expected a plain object");let n=lt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...r};return vt(this,"shape",o),o}});return De(e,n)}function Yb(e,r){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=lt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...r._zod.def.shape};return vt(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return De(e,n)}function Qb(e,r,n){let t=r._zod.def.checks;if(t&&t.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let a=lt(r._zod.def,{get shape(){let s=r._zod.def.shape,u={...s};if(n)for(let c in n){if(!(c in s))throw Error(`Unrecognized key: "${c}"`);if(!n[c])continue;u[c]=e?new e({type:"optional",innerType:s[c]}):s[c]}else for(let c in s)u[c]=e?new e({type:"optional",innerType:s[c]}):s[c];return vt(this,"shape",u),u},checks:[]});return De(r,a)}function e_(e,r,n){let o=lt(r._zod.def,{get shape(){let t=r._zod.def.shape,i={...t};if(n)for(let a in n){if(!(a in i))throw Error(`Unrecognized key: "${a}"`);if(!n[a])continue;i[a]=new e({type:"nonoptional",innerType:t[a]})}else for(let a in t)i[a]=new e({type:"nonoptional",innerType:t[a]});return vt(this,"shape",i),i}});return De(r,o)}function bt(e,r=0){if(e.aborted===!0)return!0;for(let n=r;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ra(e,r=0){if(e.aborted===!0)return!0;for(let n=r;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Ae(e,r){return r.map((n)=>{var o;return(o=n).path??(o.path=[]),n.path.unshift(e),n})}function Or(e){return typeof e==="string"?e:e?.message}function Ue(e,r,n){let o=e.message?e.message:Or(e.inst?._zod.def?.error?.(e))??Or(r?.error?.(e))??Or(n.customError?.(e))??Or(n.localeError?.(e))??"Invalid input",{inst:t,continue:i,input:a,...s}=e;if(s.path??(s.path=[]),s.message=o,r?.reportInput)s.input=a;return s}function Rr(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map";if(e instanceof File)return"file";return"unknown"}function Cr(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function q(e){let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return r}function Jt(...e){let[r,n,o]=e;if(typeof r==="string")return{message:r,code:"custom",input:n,inst:o};return{...r}}function t_(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map((r)=>r[1])}function cm(e){let r=atob(e),n=new Uint8Array(r.length);for(let o=0;o<r.length;o++)n[o]=r.charCodeAt(o);return n}function lm(e){let r="";for(let n=0;n<e.length;n++)r+=String.fromCharCode(e[n]);return btoa(r)}function r_(e){let r=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-r.length%4)%4);return cm(r+n)}function n_(e){return lm(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function i_(e){let r=e.replace(/^0x/,"");if(r.length%2!==0)throw Error("Invalid hex string length");let n=new Uint8Array(r.length/2);for(let o=0;o<r.length;o+=2)n[o/2]=Number.parseInt(r.slice(o,o+2),16);return n}function o_(e){return Array.from(e).map((r)=>r.toString(16).padStart(2,"0")).join("")}class dm{constructor(...e){}}var fm=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,Vt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ar=z("$ZodError",fm),Ne=z("$ZodError",fm,{Parent:Error});function Nr(e,r=(n)=>n.message){let n={},o=[];for(let t of e.issues)if(t.path.length>0)n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t));else o.push(r(t));return{formErrors:o,fieldErrors:n}}function Zr(e,r=(n)=>n.message){let n={_errors:[]},o=(t,i=[])=>{for(let a of t.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map((s)=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{let s=[...i,...a.path];if(s.length===0)n._errors.push(r(a));else{let u=n,c=0;while(c<s.length){let d=s[c];if(c!==s.length-1)u[d]=u[d]||{_errors:[]};else u[d]=u[d]||{_errors:[]},u[d]._errors.push(r(a));u=u[d],c++}}}};return o(e),n}function na(e,r=(n)=>n.message){let n={errors:[]},o=(t,i=[])=>{var a,s;for(let u of t.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map((c)=>o({issues:c},[...i,...u.path]));else if(u.code==="invalid_key")o({issues:u.issues},[...i,...u.path]);else if(u.code==="invalid_element")o({issues:u.issues},[...i,...u.path]);else{let c=[...i,...u.path];if(c.length===0){n.errors.push(r(u));continue}let d=n,l=0;while(l<c.length){let h=c[l],f=l===c.length-1;if(typeof h==="string")d.properties??(d.properties={}),(a=d.properties)[h]??(a[h]={errors:[]}),d=d.properties[h];else d.items??(d.items=[]),(s=d.items)[h]??(s[h]={errors:[]}),d=d.items[h];if(f)d.errors.push(r(u));l++}}};return o(e),n}function mm(e){let r=[],n=e.map((o)=>typeof o==="object"?o.key:o);for(let o of n)if(typeof o==="number")r.push(`[${o}]`);else if(typeof o==="symbol")r.push(`[${JSON.stringify(String(o))}]`);else if(/[^\w$]/.test(o))r.push(`[${JSON.stringify(o)}]`);else{if(r.length)r.push(".");r.push(o)}return r.join("")}function ia(e){let r=[],n=[...e.issues].sort((o,t)=>(o.path??[]).length-(t.path??[]).length);for(let o of n)if(r.push(`✖ ${o.message}`),o.path?.length)r.push(` → at ${mm(o.path)}`);return r.join(`
14
- `)}var Wt=(e)=>(r,n,o,t)=>{let i=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Qe;if(a.issues.length){let s=new(t?.Err??e)(a.issues.map((u)=>Ue(u,i,we())));throw Sn(s,t?.callee),s}return a.value},zn=Wt(Ne),Gt=(e)=>async(r,n,o,t)=>{let i=o?{...o,async:!0}:{async:!0},a=r._zod.run({value:n,issues:[]},i);if(a instanceof Promise)a=await a;if(a.issues.length){let s=new(t?.Err??e)(a.issues.map((u)=>Ue(u,i,we())));throw Sn(s,t?.callee),s}return a.value},Pn=Gt(Ne),Ht=(e)=>(r,n,o)=>{let t=o?{...o,async:!1}:{async:!1},i=r._zod.run({value:n,issues:[]},t);if(i instanceof Promise)throw new Qe;return i.issues.length?{success:!1,error:new(e??Ar)(i.issues.map((a)=>Ue(a,t,we())))}:{success:!0,data:i.value}},oa=Ht(Ne),Kt=(e)=>async(r,n,o)=>{let t=o?{...o,async:!0}:{async:!0},i=r._zod.run({value:n,issues:[]},t);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((a)=>Ue(a,t,we())))}:{success:!0,data:i.value}},aa=Kt(Ne),Tn=(e)=>(r,n,o)=>{let t=o?{...o,direction:"backward"}:{direction:"backward"};return Wt(e)(r,n,t)},s_=Tn(Ne),En=(e)=>(r,n,o)=>Wt(e)(r,n,o),u_=En(Ne),On=(e)=>async(r,n,o)=>{let t=o?{...o,direction:"backward"}:{direction:"backward"};return Gt(e)(r,n,t)},c_=On(Ne),jn=(e)=>async(r,n,o)=>Gt(e)(r,n,o),l_=jn(Ne),Dn=(e)=>(r,n,o)=>{let t=o?{...o,direction:"backward"}:{direction:"backward"};return Ht(e)(r,n,t)},d_=Dn(Ne),Un=(e)=>(r,n,o)=>Ht(e)(r,n,o),f_=Un(Ne),Rn=(e)=>async(r,n,o)=>{let t=o?{...o,direction:"backward"}:{direction:"backward"};return Kt(e)(r,n,t)},m_=Rn(Ne),Cn=(e)=>async(r,n,o)=>Kt(e)(r,n,o),p_=Cn(Ne);var Fe={};ct(Fe,{base64:()=>$a,base64url:()=>An,bigint:()=>Ta,boolean:()=>Oa,browserEmail:()=>$_,cidrv4:()=>_a,cidrv6:()=>xa,cuid:()=>sa,cuid2:()=>ua,date:()=>Ia,datetime:()=>za,domain:()=>I_,duration:()=>ma,e164:()=>ka,email:()=>ha,emoji:()=>ga,extendedDuration:()=>h_,guid:()=>pa,hex:()=>S_,hostname:()=>k_,html5Email:()=>b_,httpProtocol:()=>wa,idnEmail:()=>x_,integer:()=>Ea,ipv4:()=>va,ipv6:()=>ya,ksuid:()=>da,lowercase:()=>Ua,mac:()=>ba,md5_base64:()=>P_,md5_base64url:()=>T_,md5_hex:()=>z_,nanoid:()=>fa,null:()=>ja,number:()=>Lr,rfc5322Email:()=>__,sha1_base64:()=>O_,sha1_base64url:()=>j_,sha1_hex:()=>E_,sha256_base64:()=>U_,sha256_base64url:()=>R_,sha256_hex:()=>D_,sha384_base64:()=>A_,sha384_base64url:()=>N_,sha384_hex:()=>C_,sha512_base64:()=>L_,sha512_base64url:()=>F_,sha512_hex:()=>Z_,string:()=>Pa,time:()=>Sa,ulid:()=>ca,undefined:()=>Da,unicodeEmail:()=>pm,uppercase:()=>Ra,uuid:()=>Dt,uuid4:()=>g_,uuid6:()=>v_,uuid7:()=>y_,xid:()=>la});var sa=/^[cC][0-9a-z]{6,}$/,ua=/^[0-9a-z]+$/,ca=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,la=/^[0-9a-vA-V]{20}$/,da=/^[A-Za-z0-9]{27}$/,fa=/^[a-zA-Z0-9_-]{21}$/,ma=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,h_=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pa=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Dt=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},g_=Dt(4),v_=Dt(6),y_=Dt(7),ha=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,b_=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,__=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,pm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,x_=pm,$_=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,w_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function ga(){return new RegExp(w_,"u")}var va=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ya=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ba=(e)=>{let r=Je(e??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},_a=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,xa=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$a=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,An=/^[A-Za-z0-9_-]*$/,k_=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,I_=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,wa=/^https?$/,ka=/^\+[1-9]\d{6,14}$/,hm="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ia=new RegExp(`^${hm}$`);function gm(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Sa(e){return new RegExp(`^${gm(e)}$`)}function za(e){let r=gm({precision:e.precision}),n=["Z"];if(e.local)n.push("");if(e.offset)n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${r}(?:${n.join("|")})`;return new RegExp(`^${hm}T(?:${o})$`)}var Pa=(e)=>{let r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},Ta=/^-?\d+n?$/,Ea=/^-?\d+$/,Lr=/^-?\d+(?:\.\d+)?$/,Oa=/^(?:true|false)$/i,ja=/^null$/i;var Da=/^undefined$/i;var Ua=/^[^A-Z]*$/,Ra=/^[^a-z]*$/,S_=/^[0-9a-fA-F]*$/;function Fr(e,r){return new RegExp(`^[A-Za-z0-9+/]{${e}}${r}$`)}function Br(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var z_=/^[0-9a-fA-F]{32}$/,P_=Fr(22,"=="),T_=Br(22),E_=/^[0-9a-fA-F]{40}$/,O_=Fr(27,"="),j_=Br(27),D_=/^[0-9a-fA-F]{64}$/,U_=Fr(43,"="),R_=Br(43),C_=/^[0-9a-fA-F]{96}$/,A_=Fr(64,""),N_=Br(64),Z_=/^[0-9a-fA-F]{128}$/,L_=Fr(86,"=="),F_=Br(86);var ye=z("$ZodCheck",(e,r)=>{var n;e._zod??(e._zod={}),e._zod.def=r,(n=e._zod).onattach??(n.onattach=[])}),ym={number:"number",bigint:"bigint",object:"date"},Nn=z("$ZodCheckLessThan",(e,r)=>{ye.init(e,r);let n=ym[typeof r.value];e._zod.onattach.push((o)=>{let t=o._zod.bag,i=(r.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(r.value<i)if(r.inclusive)t.maximum=r.value;else t.exclusiveMaximum=r.value}),e._zod.check=(o)=>{if(r.inclusive?o.value<=r.value:o.value<r.value)return;o.issues.push({origin:n,code:"too_big",maximum:typeof r.value==="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Zn=z("$ZodCheckGreaterThan",(e,r)=>{ye.init(e,r);let n=ym[typeof r.value];e._zod.onattach.push((o)=>{let t=o._zod.bag,i=(r.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(r.value>i)if(r.inclusive)t.minimum=r.value;else t.exclusiveMinimum=r.value}),e._zod.check=(o)=>{if(r.inclusive?o.value>=r.value:o.value>r.value)return;o.issues.push({origin:n,code:"too_small",minimum:typeof r.value==="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Ca=z("$ZodCheckMultipleOf",(e,r)=>{ye.init(e,r),e._zod.onattach.push((n)=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=r.value)}),e._zod.check=(n)=>{if(typeof n.value!==typeof r.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof n.value==="bigint"?n.value%r.value===BigInt(0):Go(n.value,r.value)===0)return;n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),Aa=z("$ZodCheckNumberFormat",(e,r)=>{ye.init(e,r),r.format=r.format||"float64";let n=r.format?.includes("int"),o=n?"int":"number",[t,i]=ea[r.format];e._zod.onattach.push((a)=>{let s=a._zod.bag;if(s.format=r.format,s.minimum=t,s.maximum=i,n)s.pattern=Ea}),e._zod.check=(a)=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){if(s>0)a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!r.abort});else a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!r.abort});return}}if(s<t)a.issues.push({origin:"number",input:s,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort});if(s>i)a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!r.abort})}}),Na=z("$ZodCheckBigIntFormat",(e,r)=>{ye.init(e,r);let[n,o]=ta[r.format];e._zod.onattach.push((t)=>{let i=t._zod.bag;i.format=r.format,i.minimum=n,i.maximum=o}),e._zod.check=(t)=>{let i=t.value;if(i<n)t.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort});if(i>o)t.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!r.abort})}}),Za=z("$ZodCheckMaxSize",(e,r)=>{var n;ye.init(e,r),(n=e._zod.def).when??(n.when=(o)=>{let t=o.value;return!gt(t)&&t.size!==void 0}),e._zod.onattach.push((o)=>{let t=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(r.maximum<t)o._zod.bag.maximum=r.maximum}),e._zod.check=(o)=>{let t=o.value;if(t.size<=r.maximum)return;o.issues.push({origin:Rr(t),code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),La=z("$ZodCheckMinSize",(e,r)=>{var n;ye.init(e,r),(n=e._zod.def).when??(n.when=(o)=>{let t=o.value;return!gt(t)&&t.size!==void 0}),e._zod.onattach.push((o)=>{let t=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(r.minimum>t)o._zod.bag.minimum=r.minimum}),e._zod.check=(o)=>{let t=o.value;if(t.size>=r.minimum)return;o.issues.push({origin:Rr(t),code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Fa=z("$ZodCheckSizeEquals",(e,r)=>{var n;ye.init(e,r),(n=e._zod.def).when??(n.when=(o)=>{let t=o.value;return!gt(t)&&t.size!==void 0}),e._zod.onattach.push((o)=>{let t=o._zod.bag;t.minimum=r.size,t.maximum=r.size,t.size=r.size}),e._zod.check=(o)=>{let t=o.value,i=t.size;if(i===r.size)return;let a=i>r.size;o.issues.push({origin:Rr(t),...a?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),Ba=z("$ZodCheckMaxLength",(e,r)=>{var n;ye.init(e,r),(n=e._zod.def).when??(n.when=(o)=>{let t=o.value;return!gt(t)&&t.length!==void 0}),e._zod.onattach.push((o)=>{let t=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(r.maximum<t)o._zod.bag.maximum=r.maximum}),e._zod.check=(o)=>{let t=o.value;if(t.length<=r.maximum)return;let a=Cr(t);o.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Ma=z("$ZodCheckMinLength",(e,r)=>{var n;ye.init(e,r),(n=e._zod.def).when??(n.when=(o)=>{let t=o.value;return!gt(t)&&t.length!==void 0}),e._zod.onattach.push((o)=>{let t=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(r.minimum>t)o._zod.bag.minimum=r.minimum}),e._zod.check=(o)=>{let t=o.value;if(t.length>=r.minimum)return;let a=Cr(t);o.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Va=z("$ZodCheckLengthEquals",(e,r)=>{var n;ye.init(e,r),(n=e._zod.def).when??(n.when=(o)=>{let t=o.value;return!gt(t)&&t.length!==void 0}),e._zod.onattach.push((o)=>{let t=o._zod.bag;t.minimum=r.length,t.maximum=r.length,t.length=r.length}),e._zod.check=(o)=>{let t=o.value,i=t.length;if(i===r.length)return;let a=Cr(t),s=i>r.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),Xt=z("$ZodCheckStringFormat",(e,r)=>{var n,o;if(ye.init(e,r),e._zod.onattach.push((t)=>{let i=t._zod.bag;if(i.format=r.format,r.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(r.pattern)}),r.pattern)(n=e._zod).check??(n.check=(t)=>{if(r.pattern.lastIndex=0,r.pattern.test(t.value))return;t.issues.push({origin:"string",code:"invalid_format",format:r.format,input:t.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})});else(o=e._zod).check??(o.check=()=>{})}),qa=z("$ZodCheckRegex",(e,r)=>{Xt.init(e,r),e._zod.check=(n)=>{if(r.pattern.lastIndex=0,r.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),Ja=z("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=Ua),Xt.init(e,r)}),Wa=z("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=Ra),Xt.init(e,r)}),Ga=z("$ZodCheckIncludes",(e,r)=>{ye.init(e,r);let n=Je(r.includes),o=new RegExp(typeof r.position==="number"?`^.{${r.position}}${n}`:n);r.pattern=o,e._zod.onattach.push((t)=>{let i=t._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=(t)=>{if(t.value.includes(r.includes,r.position))return;t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),Ha=z("$ZodCheckStartsWith",(e,r)=>{ye.init(e,r);let n=new RegExp(`^${Je(r.prefix)}.*`);r.pattern??(r.pattern=n),e._zod.onattach.push((o)=>{let t=o._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.startsWith(r.prefix))return;o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:e,continue:!r.abort})}}),Ka=z("$ZodCheckEndsWith",(e,r)=>{ye.init(e,r);let n=new RegExp(`.*${Je(r.suffix)}$`);r.pattern??(r.pattern=n),e._zod.onattach.push((o)=>{let t=o._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.endsWith(r.suffix))return;o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:e,continue:!r.abort})}});function vm(e,r,n){if(e.issues.length)r.issues.push(...Ae(n,e.issues))}var Xa=z("$ZodCheckProperty",(e,r)=>{ye.init(e,r),e._zod.check=(n)=>{let o=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(o instanceof Promise)return o.then((t)=>vm(t,n,r.property));vm(o,n,r.property);return}}),Ya=z("$ZodCheckMimeType",(e,r)=>{ye.init(e,r);let n=new Set(r.mime);e._zod.onattach.push((o)=>{o._zod.bag.mime=r.mime}),e._zod.check=(o)=>{if(n.has(o.value.type))return;o.issues.push({code:"invalid_value",values:r.mime,input:o.value.type,inst:e,continue:!r.abort})}}),Qa=z("$ZodCheckOverwrite",(e,r)=>{ye.init(e,r),e._zod.check=(n)=>{n.value=r.tx(n.value)}});class Ln{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
15
- `).filter((i)=>i),o=Math.min(...n.map((i)=>i.length-i.trimStart().length)),t=n.map((i)=>i.slice(o)).map((i)=>" ".repeat(this.indent*2)+i);for(let i of t)this.content.push(i)}compile(){let e=Function,r=this?.args,o=[...(this?.content??[""]).map((t)=>` ${t}`)];return new e(...r,o.join(`
16
- `))}}var es={major:4,minor:4,patch:3};var se=z("$ZodType",(e,r)=>{var n;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=es;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))o.unshift(e);for(let t of o)for(let i of t._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(a,s,u)=>{let c=bt(a),d;for(let l of s){if(l._zod.def.when){if(ra(a))continue;if(!l._zod.def.when(a))continue}else if(c)continue;let h=a.issues.length,f=l._zod.check(a);if(f instanceof Promise&&u?.async===!1)throw new Qe;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{if(await f,a.issues.length===h)return;if(!c)c=bt(a,h)});else{if(a.issues.length===h)continue;if(!c)c=bt(a,h)}}if(d)return d.then(()=>a);return a},i=(a,s,u)=>{if(bt(a))return a.aborted=!0,a;let c=t(s,o,u);if(c instanceof Promise){if(u.async===!1)throw new Qe;return c.then((d)=>e._zod.parse(d,u))}return e._zod.parse(c,u)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let c=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});if(c instanceof Promise)return c.then((d)=>i(d,a,s));return i(c,a,s)}let u=e._zod.parse(a,s);if(u instanceof Promise){if(s.async===!1)throw new Qe;return u.then((c)=>t(c,o,s))}return t(u,o,s)}}de(e,"~standard",()=>({validate:(t)=>{try{let i=oa(e,t);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return aa(e,t).then((a)=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Ut=z("$ZodString",(e,r)=>{se.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Pa(e._zod.bag),e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=String(n.value)}catch(t){}if(typeof n.value==="string")return n;return n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),ge=z("$ZodStringFormat",(e,r)=>{Xt.init(e,r),Ut.init(e,r)}),rs=z("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=pa),ge.init(e,r)}),ns=z("$ZodUUID",(e,r)=>{if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=Dt(o))}else r.pattern??(r.pattern=Dt());ge.init(e,r)}),is=z("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=ha),ge.init(e,r)}),os=z("$ZodURL",(e,r)=>{ge.init(e,r),e._zod.check=(n)=>{try{let o=n.value.trim();if(!r.normalize&&r.protocol?.source===wa.source){if(!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!r.abort});return}}let t=new URL(o);if(r.hostname){if(r.hostname.lastIndex=0,!r.hostname.test(t.hostname))n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:n.value,inst:e,continue:!r.abort})}if(r.protocol){if(r.protocol.lastIndex=0,!r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol))n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})}if(r.normalize)n.value=t.href;else n.value=o;return}catch(o){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),as=z("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=ga()),ge.init(e,r)}),ss=z("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=fa),ge.init(e,r)}),us=z("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=sa),ge.init(e,r)}),cs=z("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=ua),ge.init(e,r)}),ls=z("$ZodULID",(e,r)=>{r.pattern??(r.pattern=ca),ge.init(e,r)}),ds=z("$ZodXID",(e,r)=>{r.pattern??(r.pattern=la),ge.init(e,r)}),fs=z("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=da),ge.init(e,r)}),ms=z("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=za(r)),ge.init(e,r)}),ps=z("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=Ia),ge.init(e,r)}),hs=z("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=Sa(r)),ge.init(e,r)}),gs=z("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=ma),ge.init(e,r)}),vs=z("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=va),ge.init(e,r),e._zod.bag.format="ipv4"}),ys=z("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=ya),ge.init(e,r),e._zod.bag.format="ipv6",e._zod.check=(n)=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!r.abort})}}}),bs=z("$ZodMAC",(e,r)=>{r.pattern??(r.pattern=ba(r.delimiter)),ge.init(e,r),e._zod.bag.format="mac"}),_s=z("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=_a),ge.init(e,r)}),xs=z("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=xa),ge.init(e,r),e._zod.check=(n)=>{let o=n.value.split("/");try{if(o.length!==2)throw Error();let[t,i]=o;if(!i)throw Error();let a=Number(i);if(`${a}`!==i)throw Error();if(a<0||a>128)throw Error();new URL(`http://[${t}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!r.abort})}}});function $s(e){if(e==="")return!0;if(/\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var ws=z("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=$a),ge.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=(n)=>{if($s(n.value))return;n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!r.abort})}});function Um(e){if(!An.test(e))return!1;let r=e.replace(/[-_]/g,(o)=>o==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return $s(n)}var ks=z("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=An),ge.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=(n)=>{if(Um(n.value))return;n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!r.abort})}}),Is=z("$ZodE164",(e,r)=>{r.pattern??(r.pattern=ka),ge.init(e,r)});function Rm(e,r=null){try{let n=e.split(".");if(n.length!==3)return!1;let[o]=n;if(!o)return!1;let t=JSON.parse(atob(o));if("typ"in t&&t?.typ!=="JWT")return!1;if(!t.alg)return!1;if(r&&(!("alg"in t)||t.alg!==r))return!1;return!0}catch{return!1}}var Ss=z("$ZodJWT",(e,r)=>{ge.init(e,r),e._zod.check=(n)=>{if(Rm(n.value,r.alg))return;n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),zs=z("$ZodCustomStringFormat",(e,r)=>{ge.init(e,r),e._zod.check=(n)=>{if(r.fn(n.value))return;n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:e,continue:!r.abort})}}),qn=z("$ZodNumber",(e,r)=>{se.init(e,r),e._zod.pattern=e._zod.bag.pattern??Lr,e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=Number(n.value)}catch(a){}let t=n.value;if(typeof t==="number"&&!Number.isNaN(t)&&Number.isFinite(t))return n;let i=typeof t==="number"?Number.isNaN(t)?"NaN":!Number.isFinite(t)?"Infinity":void 0:void 0;return n.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...i?{received:i}:{}}),n}}),Ps=z("$ZodNumberFormat",(e,r)=>{Aa.init(e,r),qn.init(e,r)}),Mr=z("$ZodBoolean",(e,r)=>{se.init(e,r),e._zod.pattern=Oa,e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=Boolean(n.value)}catch(i){}let t=n.value;if(typeof t==="boolean")return n;return n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),Jn=z("$ZodBigInt",(e,r)=>{se.init(e,r),e._zod.pattern=Ta,e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch(t){}if(typeof n.value==="bigint")return n;return n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Ts=z("$ZodBigIntFormat",(e,r)=>{Na.init(e,r),Jn.init(e,r)}),Es=z("$ZodSymbol",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(typeof t==="symbol")return n;return n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),n}}),Os=z("$ZodUndefined",(e,r)=>{se.init(e,r),e._zod.pattern=Da,e._zod.values=new Set([void 0]),e._zod.parse=(n,o)=>{let t=n.value;if(typeof t>"u")return n;return n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),n}}),js=z("$ZodNull",(e,r)=>{se.init(e,r),e._zod.pattern=ja,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let t=n.value;if(t===null)return n;return n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),Ds=z("$ZodAny",(e,r)=>{se.init(e,r),e._zod.parse=(n)=>n}),Us=z("$ZodUnknown",(e,r)=>{se.init(e,r),e._zod.parse=(n)=>n}),Rs=z("$ZodNever",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Cs=z("$ZodVoid",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(typeof t>"u")return n;return n.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),n}}),As=z("$ZodDate",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{if(r.coerce)try{n.value=new Date(n.value)}catch(s){}let t=n.value,i=t instanceof Date;if(i&&!Number.isNaN(t.getTime()))return n;return n.issues.push({expected:"date",code:"invalid_type",input:t,...i?{received:"Invalid Date"}:{},inst:e}),n}});function _m(e,r,n){if(e.issues.length)r.issues.push(...Ae(n,e.issues));r.value[n]=e.value}var Ns=z("$ZodArray",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);let i=[];for(let a=0;a<t.length;a++){let s=t[a],u=r.element._zod.run({value:s,issues:[]},o);if(u instanceof Promise)i.push(u.then((c)=>_m(c,n,a)));else _m(u,n,a)}if(i.length)return Promise.all(i).then(()=>n);return n}});function Vn(e,r,n,o,t,i){let a=n in o;if(e.issues.length){if(t&&i&&!a)return;r.issues.push(...Ae(n,e.issues))}if(!a&&!t){if(!e.issues.length)r.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}if(e.value===void 0){if(a)r.value[n]=void 0}else r.value[n]=e.value}function Cm(e){let r=Object.keys(e.shape);for(let o of r)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Qo(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)}}function Am(e,r,n,o,t,i){let a=[],s=t.keySet,u=t.catchall._zod,c=u.def.type,d=u.optin==="optional",l=u.optout==="optional";for(let h in r){if(h==="__proto__")continue;if(s.has(h))continue;if(c==="never"){a.push(h);continue}let f=u.run({value:r[h],issues:[]},o);if(f instanceof Promise)e.push(f.then((g)=>Vn(g,n,h,r,d,l)));else Vn(f,n,h,r,d,l)}if(a.length)n.issues.push({code:"unrecognized_keys",keys:a,input:r,inst:i});if(!e.length)return n;return Promise.all(e).then(()=>n)}var Nm=z("$ZodObject",(e,r)=>{if(se.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let s=r.shape;Object.defineProperty(r,"shape",{get:()=>{let u={...s};return Object.defineProperty(r,"shape",{value:u}),u}})}let o=qt(()=>Cm(r));de(e._zod,"propValues",()=>{let s=r.shape,u={};for(let c in s){let d=s[c]._zod;if(d.values){u[c]??(u[c]=new Set);for(let l of d.values)u[c].add(l)}}return u});let t=jt,i=r.catchall,a;e._zod.parse=(s,u)=>{a??(a=o.value);let c=s.value;if(!t(c))return s.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),s;s.value={};let d=[],l=a.shape;for(let h of a.keys){let f=l[h],g=f._zod.optin==="optional",v=f._zod.optout==="optional",y=f._zod.run({value:c[h],issues:[]},u);if(y instanceof Promise)d.push(y.then((w)=>Vn(w,s,h,c,g,v)));else Vn(y,s,h,c,g,v)}if(!i)return d.length?Promise.all(d).then(()=>s):s;return Am(d,c,s,u,o.value,e)}}),Zs=z("$ZodObjectJIT",(e,r)=>{Nm.init(e,r);let n=e._zod.parse,o=qt(()=>Cm(r)),t=(h)=>{let f=new Ln(["shape","payload","ctx"]),g=o.value,v=(k)=>{let E=In(k);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};f.write("const input = payload.value;");let y=Object.create(null),w=0;for(let k of g.keys)y[k]=`key_${w++}`;f.write("const newResult = {};");for(let k of g.keys){let E=y[k],U=In(k),B=h[k],I=B?._zod?.optin==="optional",V=B?._zod?.optout==="optional";if(f.write(`const ${E} = ${v(k)};`),I&&V)f.write(`
17
- if (${E}.issues.length) {
18
- if (${U} in input) {
19
- payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
11
+ */(function(e){if(typeof di=="object"&&typeof an<"u")an.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=e()})(function(){return function e(t,r,n){function o(a,c){if(!r[a]){if(!t[a]){var l=sn;if(!c&&l)return l(a,!0);if(i)return i(a,!0);var p=Error("Cannot find module '"+a+"'");throw p.code="MODULE_NOT_FOUND",p}var u=r[a]={exports:{}};t[a][0].call(u.exports,function(m){var f=t[a][1][m];return o(f||m)},u,u.exports,e,t,r,n)}return r[a].exports}for(var i=sn,s=0;s<n.length;s++)o(n[s]);return o}({1:[function(e,t,r){var n=e("./utils"),o=e("./support"),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(s){for(var a,c,l,p,u,m,f,g=[],y=0,b=s.length,x=b,I=n.getTypeOf(s)!=="string";y<s.length;)x=b-y,l=I?(a=s[y++],c=y<b?s[y++]:0,y<b?s[y++]:0):(a=s.charCodeAt(y++),c=y<b?s.charCodeAt(y++):0,y<b?s.charCodeAt(y++):0),p=a>>2,u=(3&a)<<4|c>>4,m=1<x?(15&c)<<2|l>>6:64,f=2<x?63&l:64,g.push(i.charAt(p)+i.charAt(u)+i.charAt(m)+i.charAt(f));return g.join("")},r.decode=function(s){var a,c,l,p,u,m,f=0,g=0,y="data:";if(s.substr(0,y.length)===y)throw Error("Invalid base64 input, it looks like a data url.");var b,x=3*(s=s.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(s.charAt(s.length-1)===i.charAt(64)&&x--,s.charAt(s.length-2)===i.charAt(64)&&x--,x%1!=0)throw Error("Invalid base64 input, bad content length.");for(b=o.uint8array?new Uint8Array(0|x):Array(0|x);f<s.length;)a=i.indexOf(s.charAt(f++))<<2|(p=i.indexOf(s.charAt(f++)))>>4,c=(15&p)<<4|(u=i.indexOf(s.charAt(f++)))>>2,l=(3&u)<<6|(m=i.indexOf(s.charAt(f++))),b[g++]=a,u!==64&&(b[g++]=c),m!==64&&(b[g++]=l);return b}},{"./support":30,"./utils":32}],2:[function(e,t,r){var n=e("./external"),o=e("./stream/DataWorker"),i=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(c,l,p,u,m){this.compressedSize=c,this.uncompressedSize=l,this.crc32=p,this.compression=u,this.compressedContent=m}a.prototype={getContentWorker:function(){var c=new o(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),l=this;return c.on("end",function(){if(this.streamInfo.data_length!==l.uncompressedSize)throw Error("Bug : uncompressed data size mismatch")}),c},getCompressedWorker:function(){return new o(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(c,l,p){return c.pipe(new i).pipe(new s("uncompressedSize")).pipe(l.compressWorker(p)).pipe(new s("compressedSize")).withStreamInfo("compression",l)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var n=e("./stream/GenericWorker");r.STORE={magic:"\x00\x00",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var n=e("./utils"),o=function(){for(var i,s=[],a=0;a<256;a++){i=a;for(var c=0;c<8;c++)i=1&i?3988292384^i>>>1:i>>>1;s[a]=i}return s}();t.exports=function(i,s){return i!==void 0&&i.length?n.getTypeOf(i)!=="string"?function(a,c,l,p){var u=o,m=p+l;a^=-1;for(var f=p;f<m;f++)a=a>>>8^u[255&(a^c[f])];return-1^a}(0|s,i,i.length,0):function(a,c,l,p){var u=o,m=p+l;a^=-1;for(var f=p;f<m;f++)a=a>>>8^u[255&(a^c.charCodeAt(f))];return-1^a}(0|s,i,i.length,0):0}},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){var n=null;n=typeof Promise<"u"?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",o=e("pako"),i=e("./utils"),s=e("./stream/GenericWorker"),a=n?"uint8array":"array";function c(l,p){s.call(this,"FlateWorker/"+l),this._pako=null,this._pakoAction=l,this._pakoOptions=p,this.meta={}}r.magic="\b\x00",i.inherits(c,s),c.prototype.processChunk=function(l){this.meta=l.meta,this._pako===null&&this._createPako(),this._pako.push(i.transformTo(a,l.data),!1)},c.prototype.flush=function(){s.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new o[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var l=this;this._pako.onData=function(p){l.push({data:p,meta:l.meta})}},r.compressWorker=function(l){return new c("Deflate",l)},r.uncompressWorker=function(){return new c("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function n(u,m){var f,g="";for(f=0;f<m;f++)g+=String.fromCharCode(255&u),u>>>=8;return g}function o(u,m,f,g,y,b){var x,I,{file:k,compression:P}=u,R=b!==a.utf8encode,j=i.transformTo("string",b(k.name)),z=i.transformTo("string",a.utf8encode(k.name)),L=k.comment,F=i.transformTo("string",b(L)),w=i.transformTo("string",a.utf8encode(L)),E=z.length!==k.name.length,h=w.length!==L.length,N="",ne="",V="",{dir:oe,date:q}=k,te={crc32:0,compressedSize:0,uncompressedSize:0};m&&!f||(te.crc32=u.crc32,te.compressedSize=u.compressedSize,te.uncompressedSize=u.uncompressedSize);var O=0;m&&(O|=8),R||!E&&!h||(O|=2048);var C=0,Q=0;oe&&(C|=16),y==="UNIX"?(Q=798,C|=function(J,he){var ke=J;return J||(ke=he?16893:33204),(65535&ke)<<16}(k.unixPermissions,oe)):(Q=20,C|=function(J){return 63&(J||0)}(k.dosPermissions)),x=q.getUTCHours(),x<<=6,x|=q.getUTCMinutes(),x<<=5,x|=q.getUTCSeconds()/2,I=q.getUTCFullYear()-1980,I<<=4,I|=q.getUTCMonth()+1,I<<=5,I|=q.getUTCDate(),E&&(ne=n(1,1)+n(c(j),4)+z,N+="up"+n(ne.length,2)+ne),h&&(V=n(1,1)+n(c(F),4)+w,N+="uc"+n(V.length,2)+V);var G="";return G+=`
12
+ \x00`,G+=n(O,2),G+=P.magic,G+=n(x,2),G+=n(I,2),G+=n(te.crc32,4),G+=n(te.compressedSize,4),G+=n(te.uncompressedSize,4),G+=n(j.length,2),G+=n(N.length,2),{fileRecord:l.LOCAL_FILE_HEADER+G+j+N,dirRecord:l.CENTRAL_FILE_HEADER+n(Q,2)+G+n(F.length,2)+"\x00\x00\x00\x00"+n(C,4)+n(g,4)+j+N+F}}var i=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),c=e("../crc32"),l=e("../signature");function p(u,m,f,g){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=m,this.zipPlatform=f,this.encodeFileName=g,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}i.inherits(p,s),p.prototype.push=function(u){var m=u.meta.percent||0,f=this.entriesCount,g=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,s.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:f?(m+100*(f-g-1))/f:100}}))},p.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var m=this.streamFiles&&!u.file.dir;if(m){var f=o(u,m,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:f.fileRecord,meta:{percent:0}})}else this.accumulate=!0},p.prototype.closedSource=function(u){this.accumulate=!1;var m=this.streamFiles&&!u.file.dir,f=o(u,m,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(f.dirRecord),m)this.push({data:function(g){return l.DATA_DESCRIPTOR+n(g.crc32,4)+n(g.compressedSize,4)+n(g.uncompressedSize,4)}(u),meta:{percent:100}});else for(this.push({data:f.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},p.prototype.flush=function(){for(var u=this.bytesWritten,m=0;m<this.dirRecords.length;m++)this.push({data:this.dirRecords[m],meta:{percent:100}});var f=this.bytesWritten-u,g=function(y,b,x,I,k){var P=i.transformTo("string",k(I));return l.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+n(y,2)+n(y,2)+n(b,4)+n(x,4)+n(P.length,2)+P}(this.dirRecords.length,f,u,this.zipComment,this.encodeFileName);this.push({data:g,meta:{percent:100}})},p.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},p.prototype.registerPrevious=function(u){this._sources.push(u);var m=this;return u.on("data",function(f){m.processChunk(f)}),u.on("end",function(){m.closedSource(m.previous.streamInfo),m._sources.length?m.prepareNextSource():m.end()}),u.on("error",function(f){m.error(f)}),this},p.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},p.prototype.error=function(u){var m=this._sources;if(!s.prototype.error.call(this,u))return!1;for(var f=0;f<m.length;f++)try{m[f].error(u)}catch(g){}return!0},p.prototype.lock=function(){s.prototype.lock.call(this);for(var u=this._sources,m=0;m<u.length;m++)u[m].lock()},t.exports=p},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var n=e("../compressions"),o=e("./ZipFileWorker");r.generateWorker=function(i,s,a){var c=new o(s.streamFiles,a,s.platform,s.encodeFileName),l=0;try{i.forEach(function(p,u){l++;var m=function(b,x){var I=b||x,k=n[I];if(!k)throw Error(I+" is not a valid compression method !");return k}(u.options.compression,s.compression),f=u.options.compressionOptions||s.compressionOptions||{},{dir:g,date:y}=u;u._compressWorker(m,f).withStreamInfo("file",{name:p,dir:g,date:y,comment:u.comment||"",unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions}).pipe(c)}),c.entriesCount=l}catch(p){c.error(p)}return c}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){function n(){if(!(this instanceof n))return new n;if(arguments.length)throw Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var o=new n;for(var i in this)typeof this[i]!="function"&&(o[i]=this[i]);return o}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(o,i){return new n().loadAsync(o,i)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var n=e("./utils"),o=e("./external"),i=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),c=e("./nodejsUtils");function l(p){return new o.Promise(function(u,m){var f=p.decompressed.getContentWorker().pipe(new a);f.on("error",function(g){m(g)}).on("end",function(){f.streamInfo.crc32!==p.decompressed.crc32?m(Error("Corrupted zip : CRC32 mismatch")):u()}).resume()})}t.exports=function(p,u){var m=this;return u=n.extend(u||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i.utf8decode}),c.isNode&&c.isStream(p)?o.Promise.reject(Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",p,!0,u.optimizedBinaryString,u.base64).then(function(f){var g=new s(u);return g.load(f),g}).then(function(f){var g=[o.Promise.resolve(f)],y=f.files;if(u.checkCRC32)for(var b=0;b<y.length;b++)g.push(l(y[b]));return o.Promise.all(g)}).then(function(f){for(var g=f.shift(),y=g.files,b=0;b<y.length;b++){var x=y[b],I=x.fileNameStr,k=n.resolve(x.fileNameStr);m.file(k,x.decompressed,{binary:!0,optimizedBinaryString:!0,date:x.date,dir:x.dir,comment:x.fileCommentStr.length?x.fileCommentStr:null,unixPermissions:x.unixPermissions,dosPermissions:x.dosPermissions,createFolders:u.createFolders}),x.dir||(m.file(k).unsafeOriginalName=I)}return g.zipComment.length&&(m.comment=g.zipComment),m})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var n=e("../utils"),o=e("../stream/GenericWorker");function i(s,a){o.call(this,"Nodejs stream input adapter for "+s),this._upstreamEnded=!1,this._bindStream(a)}n.inherits(i,o),i.prototype._bindStream=function(s){var a=this;(this._stream=s).pause(),s.on("data",function(c){a.push({data:c,meta:{percent:0}})}).on("error",function(c){a.isPaused?this.generatedError=c:a.error(c)}).on("end",function(){a.isPaused?a._upstreamEnded=!0:a.end()})},i.prototype.pause=function(){return!!o.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=i},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var n=e("readable-stream").Readable;function o(i,s,a){n.call(this,s),this._helper=i;var c=this;i.on("data",function(l,p){c.push(l)||c._helper.pause(),a&&a(p)}).on("error",function(l){c.emit("error",l)}).on("end",function(){c.push(null)})}e("../utils").inherits(o,n),o.prototype._read=function(){this._helper.resume()},t.exports=o},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:typeof Buffer<"u",newBufferFrom:function(n,o){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(n,o);if(typeof n=="number")throw Error('The "data" argument must not be a number');return new Buffer(n,o)},allocBuffer:function(n){if(Buffer.alloc)return Buffer.alloc(n);var o=new Buffer(n);return o.fill(0),o},isBuffer:function(n){return Buffer.isBuffer(n)},isStream:function(n){return n&&typeof n.on=="function"&&typeof n.pause=="function"&&typeof n.resume=="function"}}},{}],15:[function(e,t,r){function n(k,P,R){var j,z=i.getTypeOf(P),L=i.extend(R||{},c);L.date=L.date||new Date,L.compression!==null&&(L.compression=L.compression.toUpperCase()),typeof L.unixPermissions=="string"&&(L.unixPermissions=parseInt(L.unixPermissions,8)),L.unixPermissions&&16384&L.unixPermissions&&(L.dir=!0),L.dosPermissions&&16&L.dosPermissions&&(L.dir=!0),L.dir&&(k=y(k)),L.createFolders&&(j=g(k))&&b.call(this,j,!0);var F=z==="string"&&L.binary===!1&&L.base64===!1;R&&R.binary!==void 0||(L.binary=!F),(P instanceof l&&P.uncompressedSize===0||L.dir||!P||P.length===0)&&(L.base64=!1,L.binary=!0,P="",L.compression="STORE",z="string");var w=null;w=P instanceof l||P instanceof s?P:m.isNode&&m.isStream(P)?new f(k,P):i.prepareContent(k,P,L.binary,L.optimizedBinaryString,L.base64);var E=new p(k,w,L);this.files[k]=E}var o=e("./utf8"),i=e("./utils"),s=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),c=e("./defaults"),l=e("./compressedObject"),p=e("./zipObject"),u=e("./generate"),m=e("./nodejsUtils"),f=e("./nodejs/NodejsStreamInputAdapter"),g=function(k){k.slice(-1)==="/"&&(k=k.substring(0,k.length-1));var P=k.lastIndexOf("/");return 0<P?k.substring(0,P):""},y=function(k){return k.slice(-1)!=="/"&&(k+="/"),k},b=function(k,P){return P=P!==void 0?P:c.createFolders,k=y(k),this.files[k]||n.call(this,k,null,{dir:!0,createFolders:P}),this.files[k]};function x(k){return Object.prototype.toString.call(k)==="[object RegExp]"}var I={load:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(k){var P,R,j;for(P in this.files)j=this.files[P],(R=P.slice(this.root.length,P.length))&&P.slice(0,this.root.length)===this.root&&k(R,j)},filter:function(k){var P=[];return this.forEach(function(R,j){k(R,j)&&P.push(j)}),P},file:function(k,P,R){if(arguments.length!==1)return k=this.root+k,n.call(this,k,P,R),this;if(x(k)){var j=k;return this.filter(function(L,F){return!F.dir&&j.test(L)})}var z=this.files[this.root+k];return z&&!z.dir?z:null},folder:function(k){if(!k)return this;if(x(k))return this.filter(function(z,L){return L.dir&&k.test(z)});var P=this.root+k,R=b.call(this,P),j=this.clone();return j.root=R.name,j},remove:function(k){k=this.root+k;var P=this.files[k];if(P||(k.slice(-1)!=="/"&&(k+="/"),P=this.files[k]),P&&!P.dir)delete this.files[k];else for(var R=this.filter(function(z,L){return L.name.slice(0,k.length)===k}),j=0;j<R.length;j++)delete this.files[R[j].name];return this},generate:function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(k){var P,R={};try{if((R=i.extend(k||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=R.type.toLowerCase(),R.compression=R.compression.toUpperCase(),R.type==="binarystring"&&(R.type="string"),!R.type)throw Error("No output type specified.");i.checkSupport(R.type),R.platform!=="darwin"&&R.platform!=="freebsd"&&R.platform!=="linux"&&R.platform!=="sunos"||(R.platform="UNIX"),R.platform==="win32"&&(R.platform="DOS");var j=R.comment||this.comment||"";P=u.generateWorker(this,R,j)}catch(z){(P=new s("error")).error(z)}return new a(P,R.type||"string",R.mimeType)},generateAsync:function(k,P){return this.generateInternalStream(k).accumulate(P)},generateNodeStream:function(k,P){return(k=k||{}).type||(k.type="nodebuffer"),this.generateInternalStream(k).toNodejsStream(P)}};t.exports=I},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){var n=e("./DataReader");function o(i){n.call(this,i);for(var s=0;s<this.data.length;s++)i[s]=255&i[s]}e("../utils").inherits(o,n),o.prototype.byteAt=function(i){return this.data[this.zero+i]},o.prototype.lastIndexOfSignature=function(i){for(var s=i.charCodeAt(0),a=i.charCodeAt(1),c=i.charCodeAt(2),l=i.charCodeAt(3),p=this.length-4;0<=p;--p)if(this.data[p]===s&&this.data[p+1]===a&&this.data[p+2]===c&&this.data[p+3]===l)return p-this.zero;return-1},o.prototype.readAndCheckSignature=function(i){var s=i.charCodeAt(0),a=i.charCodeAt(1),c=i.charCodeAt(2),l=i.charCodeAt(3),p=this.readData(4);return s===p[0]&&a===p[1]&&c===p[2]&&l===p[3]},o.prototype.readData=function(i){if(this.checkOffset(i),i===0)return[];var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},t.exports=o},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var n=e("../utils");function o(i){this.data=i,this.length=i.length,this.index=0,this.zero=0}o.prototype={checkOffset:function(i){this.checkIndex(this.index+i)},checkIndex:function(i){if(this.length<this.zero+i||i<0)throw Error("End of data reached (data length = "+this.length+", asked index = "+i+"). Corrupted zip ?")},setIndex:function(i){this.checkIndex(i),this.index=i},skip:function(i){this.setIndex(this.index+i)},byteAt:function(){},readInt:function(i){var s,a=0;for(this.checkOffset(i),s=this.index+i-1;s>=this.index;s--)a=(a<<8)+this.byteAt(s);return this.index+=i,a},readString:function(i){return n.transformTo("string",this.readData(i))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var i=this.readInt(4);return new Date(Date.UTC(1980+(i>>25&127),(i>>21&15)-1,i>>16&31,i>>11&31,i>>5&63,(31&i)<<1))}},t.exports=o},{"../utils":32}],19:[function(e,t,r){var n=e("./Uint8ArrayReader");function o(i){n.call(this,i)}e("../utils").inherits(o,n),o.prototype.readData=function(i){this.checkOffset(i);var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},t.exports=o},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var n=e("./DataReader");function o(i){n.call(this,i)}e("../utils").inherits(o,n),o.prototype.byteAt=function(i){return this.data.charCodeAt(this.zero+i)},o.prototype.lastIndexOfSignature=function(i){return this.data.lastIndexOf(i)-this.zero},o.prototype.readAndCheckSignature=function(i){return i===this.readData(4)},o.prototype.readData=function(i){this.checkOffset(i);var s=this.data.slice(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},t.exports=o},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var n=e("./ArrayReader");function o(i){n.call(this,i)}e("../utils").inherits(o,n),o.prototype.readData=function(i){if(this.checkOffset(i),i===0)return new Uint8Array(0);var s=this.data.subarray(this.zero+this.index,this.zero+this.index+i);return this.index+=i,s},t.exports=o},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var n=e("../utils"),o=e("../support"),i=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),c=e("./Uint8ArrayReader");t.exports=function(l){var p=n.getTypeOf(l);return n.checkSupport(p),p!=="string"||o.uint8array?p==="nodebuffer"?new a(l):o.uint8array?new c(n.transformTo("uint8array",l)):new i(n.transformTo("array",l)):new s(l)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK\x03\x04",r.CENTRAL_FILE_HEADER="PK\x01\x02",r.CENTRAL_DIRECTORY_END="PK\x05\x06",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",r.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(e,t,r){var n=e("./GenericWorker"),o=e("../utils");function i(s){n.call(this,"ConvertWorker to "+s),this.destType=s}o.inherits(i,n),i.prototype.processChunk=function(s){this.push({data:o.transformTo(this.destType,s.data),meta:s.meta})},t.exports=i},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var n=e("./GenericWorker"),o=e("../crc32");function i(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(i,n),i.prototype.processChunk=function(s){this.streamInfo.crc32=o(s.data,this.streamInfo.crc32||0),this.push(s)},t.exports=i},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var n=e("../utils"),o=e("./GenericWorker");function i(s){o.call(this,"DataLengthProbe for "+s),this.propName=s,this.withStreamInfo(s,0)}n.inherits(i,o),i.prototype.processChunk=function(s){if(s){var a=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=a+s.data.length}o.prototype.processChunk.call(this,s)},t.exports=i},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var n=e("../utils"),o=e("./GenericWorker");function i(s){o.call(this,"DataWorker");var a=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,s.then(function(c){a.dataIsReady=!0,a.data=c,a.max=c&&c.length||0,a.type=n.getTypeOf(c),a.isPaused||a._tickAndRepeat()},function(c){a.error(c)})}n.inherits(i,o),i.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var s=null,a=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":s=this.data.substring(this.index,a);break;case"uint8array":s=this.data.subarray(this.index,a);break;case"array":case"nodebuffer":s=this.data.slice(this.index,a)}return this.index=a,this.push({data:s,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=i},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function n(o){this.name=o||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(o){this.emit("data",o)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(o){this.emit("error",o)}return!0},error:function(o){return!this.isFinished&&(this.isPaused?this.generatedError=o:(this.isFinished=!0,this.emit("error",o),this.previous&&this.previous.error(o),this.cleanUp()),!0)},on:function(o,i){return this._listeners[o].push(i),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(o,i){if(this._listeners[o])for(var s=0;s<this._listeners[o].length;s++)this._listeners[o][s].call(this,i)},pipe:function(o){return o.registerPrevious(this)},registerPrevious:function(o){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");this.streamInfo=o.streamInfo,this.mergeStreamInfo(),this.previous=o;var i=this;return o.on("data",function(s){i.processChunk(s)}),o.on("end",function(){i.end()}),o.on("error",function(s){i.error(s)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var o=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),o=!0),this.previous&&this.previous.resume(),!o},flush:function(){},processChunk:function(o){this.push(o)},withStreamInfo:function(o,i){return this.extraStreamInfo[o]=i,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var o in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,o)&&(this.streamInfo[o]=this.extraStreamInfo[o])},lock:function(){if(this.isLocked)throw Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var o="Worker "+this.name;return this.previous?this.previous+" -> "+o:o}},t.exports=n},{}],29:[function(e,t,r){var n=e("../utils"),o=e("./ConvertWorker"),i=e("./GenericWorker"),s=e("../base64"),a=e("../support"),c=e("../external"),l=null;if(a.nodestream)try{l=e("../nodejs/NodejsStreamOutputAdapter")}catch(m){}function p(m,f){return new c.Promise(function(g,y){var b=[],{_internalType:x,_outputType:I,_mimeType:k}=m;m.on("data",function(P,R){b.push(P),f&&f(R)}).on("error",function(P){b=[],y(P)}).on("end",function(){try{var P=function(R,j,z){switch(R){case"blob":return n.newBlob(n.transformTo("arraybuffer",j),z);case"base64":return s.encode(j);default:return n.transformTo(R,j)}}(I,function(R,j){var z,L=0,F=null,w=0;for(z=0;z<j.length;z++)w+=j[z].length;switch(R){case"string":return j.join("");case"array":return Array.prototype.concat.apply([],j);case"uint8array":for(F=new Uint8Array(w),z=0;z<j.length;z++)F.set(j[z],L),L+=j[z].length;return F;case"nodebuffer":return Buffer.concat(j);default:throw Error("concat : unsupported type '"+R+"'")}}(x,b),k);g(P)}catch(R){y(R)}b=[]}).resume()})}function u(m,f,g){var y=f;switch(f){case"blob":case"arraybuffer":y="uint8array";break;case"base64":y="string"}try{this._internalType=y,this._outputType=f,this._mimeType=g,n.checkSupport(y),this._worker=m.pipe(new o(y)),m.lock()}catch(b){this._worker=new i("error"),this._worker.error(b)}}u.prototype={accumulate:function(m){return p(this,m)},on:function(m,f){var g=this;return m==="data"?this._worker.on(m,function(y){f.call(g,y.data,y.meta)}):this._worker.on(m,function(){n.delay(f,arguments,g)}),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(m){if(n.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:this._outputType!=="nodebuffer"},m)}},t.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",r.nodebuffer=typeof Buffer<"u",r.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=new Blob([n],{type:"application/zip"}).size===0}catch(i){try{var o=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);o.append(n),r.blob=o.getBlob("application/zip").size===0}catch(s){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(i){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,r){for(var n=e("./utils"),o=e("./support"),i=e("./nodejsUtils"),s=e("./stream/GenericWorker"),a=Array(256),c=0;c<256;c++)a[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;a[254]=a[254]=1;function l(){s.call(this,"utf-8 decode"),this.leftOver=null}function p(){s.call(this,"utf-8 encode")}r.utf8encode=function(u){return o.nodebuffer?i.newBufferFrom(u,"utf-8"):function(m){var f,g,y,b,x,I=m.length,k=0;for(b=0;b<I;b++)(64512&(g=m.charCodeAt(b)))==55296&&b+1<I&&(64512&(y=m.charCodeAt(b+1)))==56320&&(g=65536+(g-55296<<10)+(y-56320),b++),k+=g<128?1:g<2048?2:g<65536?3:4;for(f=o.uint8array?new Uint8Array(k):Array(k),b=x=0;x<k;b++)(64512&(g=m.charCodeAt(b)))==55296&&b+1<I&&(64512&(y=m.charCodeAt(b+1)))==56320&&(g=65536+(g-55296<<10)+(y-56320),b++),g<128?f[x++]=g:(g<2048?f[x++]=192|g>>>6:(g<65536?f[x++]=224|g>>>12:(f[x++]=240|g>>>18,f[x++]=128|g>>>12&63),f[x++]=128|g>>>6&63),f[x++]=128|63&g);return f}(u)},r.utf8decode=function(u){return o.nodebuffer?n.transformTo("nodebuffer",u).toString("utf-8"):function(m){var f,g,y,b,x=m.length,I=Array(2*x);for(f=g=0;f<x;)if((y=m[f++])<128)I[g++]=y;else if(4<(b=a[y]))I[g++]=65533,f+=b-1;else{for(y&=b===2?31:b===3?15:7;1<b&&f<x;)y=y<<6|63&m[f++],b--;1<b?I[g++]=65533:y<65536?I[g++]=y:(y-=65536,I[g++]=55296|y>>10&1023,I[g++]=56320|1023&y)}return I.length!==g&&(I.subarray?I=I.subarray(0,g):I.length=g),n.applyFromCharCode(I)}(u=n.transformTo(o.uint8array?"uint8array":"array",u))},n.inherits(l,s),l.prototype.processChunk=function(u){var m=n.transformTo(o.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(o.uint8array){var f=m;(m=new Uint8Array(f.length+this.leftOver.length)).set(this.leftOver,0),m.set(f,this.leftOver.length)}else m=this.leftOver.concat(m);this.leftOver=null}var g=function(b,x){var I;for((x=x||b.length)>b.length&&(x=b.length),I=x-1;0<=I&&(192&b[I])==128;)I--;return I<0?x:I===0?x:I+a[b[I]]>x?I:x}(m),y=m;g!==m.length&&(o.uint8array?(y=m.subarray(0,g),this.leftOver=m.subarray(g,m.length)):(y=m.slice(0,g),this.leftOver=m.slice(g,m.length))),this.push({data:r.utf8decode(y),meta:u.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=l,n.inherits(p,s),p.prototype.processChunk=function(u){this.push({data:r.utf8encode(u.data),meta:u.meta})},r.Utf8EncodeWorker=p},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){var n=e("./support"),o=e("./base64"),i=e("./nodejsUtils"),s=e("./external");function a(f){return f}function c(f,g){for(var y=0;y<f.length;++y)g[y]=255&f.charCodeAt(y);return g}e("setimmediate"),r.newBlob=function(f,g){r.checkSupport("blob");try{return new Blob([f],{type:g})}catch(b){try{var y=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return y.append(f),y.getBlob(g)}catch(x){throw Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(f,g,y){var b=[],x=0,I=f.length;if(I<=y)return String.fromCharCode.apply(null,f);for(;x<I;)g==="array"||g==="nodebuffer"?b.push(String.fromCharCode.apply(null,f.slice(x,Math.min(x+y,I)))):b.push(String.fromCharCode.apply(null,f.subarray(x,Math.min(x+y,I)))),x+=y;return b.join("")},stringifyByChar:function(f){for(var g="",y=0;y<f.length;y++)g+=String.fromCharCode(f[y]);return g},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(f){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&String.fromCharCode.apply(null,i.allocBuffer(1)).length===1}catch(f){return!1}}()}};function p(f){var g=65536,y=r.getTypeOf(f),b=!0;if(y==="uint8array"?b=l.applyCanBeUsed.uint8array:y==="nodebuffer"&&(b=l.applyCanBeUsed.nodebuffer),b)for(;1<g;)try{return l.stringifyByChunk(f,y,g)}catch(x){g=Math.floor(g/2)}return l.stringifyByChar(f)}function u(f,g){for(var y=0;y<f.length;y++)g[y]=f[y];return g}r.applyFromCharCode=p;var m={};m.string={string:a,array:function(f){return c(f,Array(f.length))},arraybuffer:function(f){return m.string.uint8array(f).buffer},uint8array:function(f){return c(f,new Uint8Array(f.length))},nodebuffer:function(f){return c(f,i.allocBuffer(f.length))}},m.array={string:p,array:a,arraybuffer:function(f){return new Uint8Array(f).buffer},uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(f)}},m.arraybuffer={string:function(f){return p(new Uint8Array(f))},array:function(f){return u(new Uint8Array(f),Array(f.byteLength))},arraybuffer:a,uint8array:function(f){return new Uint8Array(f)},nodebuffer:function(f){return i.newBufferFrom(new Uint8Array(f))}},m.uint8array={string:p,array:function(f){return u(f,Array(f.length))},arraybuffer:function(f){return f.buffer},uint8array:a,nodebuffer:function(f){return i.newBufferFrom(f)}},m.nodebuffer={string:p,array:function(f){return u(f,Array(f.length))},arraybuffer:function(f){return m.nodebuffer.uint8array(f).buffer},uint8array:function(f){return u(f,new Uint8Array(f.length))},nodebuffer:a},r.transformTo=function(f,g){if(g=g||"",!f)return g;r.checkSupport(f);var y=r.getTypeOf(g);return m[y][f](g)},r.resolve=function(f){for(var g=f.split("/"),y=[],b=0;b<g.length;b++){var x=g[b];x==="."||x===""&&b!==0&&b!==g.length-1||(x===".."?y.pop():y.push(x))}return y.join("/")},r.getTypeOf=function(f){return typeof f=="string"?"string":Object.prototype.toString.call(f)==="[object Array]"?"array":n.nodebuffer&&i.isBuffer(f)?"nodebuffer":n.uint8array&&f instanceof Uint8Array?"uint8array":n.arraybuffer&&f instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(f){if(!n[f.toLowerCase()])throw Error(f+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(f){var g,y,b="";for(y=0;y<(f||"").length;y++)b+="\\x"+((g=f.charCodeAt(y))<16?"0":"")+g.toString(16).toUpperCase();return b},r.delay=function(f,g,y){setImmediate(function(){f.apply(y||null,g||[])})},r.inherits=function(f,g){function y(){}y.prototype=g.prototype,f.prototype=new y},r.extend=function(){var f,g,y={};for(f=0;f<arguments.length;f++)for(g in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],g)&&y[g]===void 0&&(y[g]=arguments[f][g]);return y},r.prepareContent=function(f,g,y,b,x){return s.Promise.resolve(g).then(function(I){return n.blob&&(I instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(I))!==-1)&&typeof FileReader<"u"?new s.Promise(function(k,P){var R=new FileReader;R.onload=function(j){k(j.target.result)},R.onerror=function(j){P(j.target.error)},R.readAsArrayBuffer(I)}):I}).then(function(I){var k=r.getTypeOf(I);return k?(k==="arraybuffer"?I=r.transformTo("uint8array",I):k==="string"&&(x?I=o.decode(I):y&&b!==!0&&(I=function(P){return c(P,n.uint8array?new Uint8Array(P.length):Array(P.length))}(I))),I):s.Promise.reject(Error("Can't read the data of '"+f+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){var n=e("./reader/readerFor"),o=e("./utils"),i=e("./signature"),s=e("./zipEntry"),a=e("./support");function c(l){this.files=[],this.loadOptions=l}c.prototype={checkSignature:function(l){if(!this.reader.readAndCheckSignature(l)){this.reader.index-=4;var p=this.reader.readString(4);throw Error("Corrupted zip or bug: unexpected signature ("+o.pretty(p)+", expected "+o.pretty(l)+")")}},isSignature:function(l,p){var u=this.reader.index;this.reader.setIndex(l);var m=this.reader.readString(4)===p;return this.reader.setIndex(u),m},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var l=this.reader.readData(this.zipCommentLength),p=a.uint8array?"uint8array":"array",u=o.transformTo(p,l);this.zipComment=this.loadOptions.decodeFileName(u)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var l,p,u,m=this.zip64EndOfCentralSize-44;0<m;)l=this.reader.readInt(2),p=this.reader.readInt(4),u=this.reader.readData(p),this.zip64ExtensibleData[l]={id:l,length:p,value:u}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var l,p;for(l=0;l<this.files.length;l++)p=this.files[l],this.reader.setIndex(p.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),p.readLocalPart(this.reader),p.handleUTF8(),p.processAttributes()},readCentralDir:function(){var l;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(l=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(l);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var l=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(l<0)throw!this.isSignature(0,i.LOCAL_FILE_HEADER)?Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(l);var p=l;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===o.MAX_VALUE_16BITS||this.diskWithCentralDirStart===o.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===o.MAX_VALUE_16BITS||this.centralDirRecords===o.MAX_VALUE_16BITS||this.centralDirSize===o.MAX_VALUE_32BITS||this.centralDirOffset===o.MAX_VALUE_32BITS){if(this.zip64=!0,(l=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(l),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var u=this.centralDirOffset+this.centralDirSize;this.zip64&&(u+=20,u+=12+this.zip64EndOfCentralSize);var m=p-u;if(0<m)this.isSignature(p,i.CENTRAL_FILE_HEADER)||(this.reader.zero=m);else if(m<0)throw Error("Corrupted zip: missing "+Math.abs(m)+" bytes.")},prepareReader:function(l){this.reader=n(l)},load:function(l){this.prepareReader(l),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=c},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var n=e("./reader/readerFor"),o=e("./utils"),i=e("./compressedObject"),s=e("./crc32"),a=e("./utf8"),c=e("./compressions"),l=e("./support");function p(u,m){this.options=u,this.loadOptions=m}p.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(u){var m,f;if(u.skip(22),this.fileNameLength=u.readInt(2),f=u.readInt(2),this.fileName=u.readData(this.fileNameLength),u.skip(f),this.compressedSize===-1||this.uncompressedSize===-1)throw Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((m=function(g){for(var y in c)if(Object.prototype.hasOwnProperty.call(c,y)&&c[y].magic===g)return c[y];return null}(this.compressionMethod))===null)throw Error("Corrupted zip : compression "+o.pretty(this.compressionMethod)+" unknown (inner file : "+o.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,m,u.readData(this.compressedSize))},readCentralPart:function(u){this.versionMadeBy=u.readInt(2),u.skip(2),this.bitFlag=u.readInt(2),this.compressionMethod=u.readString(2),this.date=u.readDate(),this.crc32=u.readInt(4),this.compressedSize=u.readInt(4),this.uncompressedSize=u.readInt(4);var m=u.readInt(2);if(this.extraFieldsLength=u.readInt(2),this.fileCommentLength=u.readInt(2),this.diskNumberStart=u.readInt(2),this.internalFileAttributes=u.readInt(2),this.externalFileAttributes=u.readInt(4),this.localHeaderOffset=u.readInt(4),this.isEncrypted())throw Error("Encrypted zip are not supported");u.skip(m),this.readExtraFields(u),this.parseZIP64ExtraField(u),this.fileComment=u.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var u=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=n(this.extraFields[1].value);this.uncompressedSize===o.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===o.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===o.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===o.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var m,f,g,y=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4<y;)m=u.readInt(2),f=u.readInt(2),g=u.readData(f),this.extraFields[m]={id:m,length:f,value:g};u.setIndex(y)},handleUTF8:function(){var u=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var m=this.findExtraFieldUnicodePath();if(m!==null)this.fileNameStr=m;else{var f=o.transformTo(u,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(f)}var g=this.findExtraFieldUnicodeComment();if(g!==null)this.fileCommentStr=g;else{var y=o.transformTo(u,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(y)}}},findExtraFieldUnicodePath:function(){var u=this.extraFields[28789];if(u){var m=n(u.value);return m.readInt(1)!==1?null:s(this.fileName)!==m.readInt(4)?null:a.utf8decode(m.readData(u.length-5))}return null},findExtraFieldUnicodeComment:function(){var u=this.extraFields[25461];if(u){var m=n(u.value);return m.readInt(1)!==1?null:s(this.fileComment)!==m.readInt(4)?null:a.utf8decode(m.readData(u.length-5))}return null}},t.exports=p},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function n(m,f,g){this.name=m,this.dir=g.dir,this.date=g.date,this.comment=g.comment,this.unixPermissions=g.unixPermissions,this.dosPermissions=g.dosPermissions,this._data=f,this._dataBinary=g.binary,this.options={compression:g.compression,compressionOptions:g.compressionOptions}}var o=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),s=e("./utf8"),a=e("./compressedObject"),c=e("./stream/GenericWorker");n.prototype={internalStream:function(m){var f=null,g="string";try{if(!m)throw Error("No output type specified.");var y=(g=m.toLowerCase())==="string"||g==="text";g!=="binarystring"&&g!=="text"||(g="string"),f=this._decompressWorker();var b=!this._dataBinary;b&&!y&&(f=f.pipe(new s.Utf8EncodeWorker)),!b&&y&&(f=f.pipe(new s.Utf8DecodeWorker))}catch(x){(f=new c("error")).error(x)}return new o(f,g,"")},async:function(m,f){return this.internalStream(m).accumulate(f)},nodeStream:function(m,f){return this.internalStream(m||"nodebuffer").toNodejsStream(f)},_compressWorker:function(m,f){if(this._data instanceof a&&this._data.compression.magic===m.magic)return this._data.getCompressedWorker();var g=this._decompressWorker();return this._dataBinary||(g=g.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(g,m,f)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof c?this._data:new i(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],p=function(){throw Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<l.length;u++)n.prototype[l[u]]=p;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,t,r){(function(n){var o,i,s=n.MutationObserver||n.WebKitMutationObserver;if(s){var a=0,c=new s(m),l=n.document.createTextNode("");c.observe(l,{characterData:!0}),o=function(){l.data=a=++a%2}}else if(n.setImmediate||n.MessageChannel===void 0)o="document"in n&&"onreadystatechange"in n.document.createElement("script")?function(){var f=n.document.createElement("script");f.onreadystatechange=function(){m(),f.onreadystatechange=null,f.parentNode.removeChild(f),f=null},n.document.documentElement.appendChild(f)}:function(){setTimeout(m,0)};else{var p=new n.MessageChannel;p.port1.onmessage=m,o=function(){p.port2.postMessage(0)}}var u=[];function m(){var f,g;i=!0;for(var y=u.length;y;){for(g=u,u=[],f=-1;++f<y;)g[f]();y=u.length}i=!1}t.exports=function(f){u.push(f)!==1||i||o()}}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(e,t,r){var n=e("immediate");function o(){}var i={},s=["REJECTED"],a=["FULFILLED"],c=["PENDING"];function l(y){if(typeof y!="function")throw TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,y!==o&&f(this,y)}function p(y,b,x){this.promise=y,typeof b=="function"&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}function u(y,b,x){n(function(){var I;try{I=b(x)}catch(k){return i.reject(y,k)}I===y?i.reject(y,TypeError("Cannot resolve promise with itself")):i.resolve(y,I)})}function m(y){var b=y&&y.then;if(y&&(typeof y=="object"||typeof y=="function")&&typeof b=="function")return function(){b.apply(y,arguments)}}function f(y,b){var x=!1;function I(R){x||(x=!0,i.reject(y,R))}function k(R){x||(x=!0,i.resolve(y,R))}var P=g(function(){b(k,I)});P.status==="error"&&I(P.value)}function g(y,b){var x={};try{x.value=y(b),x.status="success"}catch(I){x.status="error",x.value=I}return x}(t.exports=l).prototype.finally=function(y){if(typeof y!="function")return this;var b=this.constructor;return this.then(function(x){return b.resolve(y()).then(function(){return x})},function(x){return b.resolve(y()).then(function(){throw x})})},l.prototype.catch=function(y){return this.then(null,y)},l.prototype.then=function(y,b){if(typeof y!="function"&&this.state===a||typeof b!="function"&&this.state===s)return this;var x=new this.constructor(o);return this.state!==c?u(x,this.state===a?y:b,this.outcome):this.queue.push(new p(x,y,b)),x},p.prototype.callFulfilled=function(y){i.resolve(this.promise,y)},p.prototype.otherCallFulfilled=function(y){u(this.promise,this.onFulfilled,y)},p.prototype.callRejected=function(y){i.reject(this.promise,y)},p.prototype.otherCallRejected=function(y){u(this.promise,this.onRejected,y)},i.resolve=function(y,b){var x=g(m,b);if(x.status==="error")return i.reject(y,x.value);var I=x.value;if(I)f(y,I);else{y.state=a,y.outcome=b;for(var k=-1,P=y.queue.length;++k<P;)y.queue[k].callFulfilled(b)}return y},i.reject=function(y,b){y.state=s,y.outcome=b;for(var x=-1,I=y.queue.length;++x<I;)y.queue[x].callRejected(b);return y},l.resolve=function(y){if(y instanceof this)return y;return i.resolve(new this(o),y)},l.reject=function(y){var b=new this(o);return i.reject(b,y)},l.all=function(y){var b=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(TypeError("must be an array"));var x=y.length,I=!1;if(!x)return this.resolve([]);var k=Array(x),P=0,R=-1,j=new this(o);for(;++R<x;)z(y[R],R);return j;function z(L,F){b.resolve(L).then(function(w){k[F]=w,++P!==x||I||(I=!0,i.resolve(j,k))},function(w){I||(I=!0,i.reject(j,w))})}},l.race=function(y){var b=this;if(Object.prototype.toString.call(y)!=="[object Array]")return this.reject(TypeError("must be an array"));var x=y.length,I=!1;if(!x)return this.resolve([]);var k=-1,P=new this(o);for(;++k<x;)R=y[k],b.resolve(R).then(function(j){I||(I=!0,i.resolve(P,j))},function(j){I||(I=!0,i.reject(P,j))});var R;return P}},{immediate:36}],38:[function(e,t,r){var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var n=e("./zlib/deflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/messages"),a=e("./zlib/zstream"),c=Object.prototype.toString,l=0,p=-1,u=0,m=8;function f(y){if(!(this instanceof f))return new f(y);this.options=o.assign({level:p,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},y||{});var b=this.options;b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var x=n.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(x!==l)throw Error(s[x]);if(b.header&&n.deflateSetHeader(this.strm,b.header),b.dictionary){var I;if(I=typeof b.dictionary=="string"?i.string2buf(b.dictionary):c.call(b.dictionary)==="[object ArrayBuffer]"?new Uint8Array(b.dictionary):b.dictionary,(x=n.deflateSetDictionary(this.strm,I))!==l)throw Error(s[x]);this._dict_set=!0}}function g(y,b){var x=new f(b);if(x.push(y,!0),x.err)throw x.msg||s[x.err];return x.result}f.prototype.push=function(y,b){var x,I,k=this.strm,P=this.options.chunkSize;if(this.ended)return!1;I=b===~~b?b:b===!0?4:0,typeof y=="string"?k.input=i.string2buf(y):c.call(y)==="[object ArrayBuffer]"?k.input=new Uint8Array(y):k.input=y,k.next_in=0,k.avail_in=k.input.length;do{if(k.avail_out===0&&(k.output=new o.Buf8(P),k.next_out=0,k.avail_out=P),(x=n.deflate(k,I))!==1&&x!==l)return this.onEnd(x),!(this.ended=!0);k.avail_out!==0&&(k.avail_in!==0||I!==4&&I!==2)||(this.options.to==="string"?this.onData(i.buf2binstring(o.shrinkBuf(k.output,k.next_out))):this.onData(o.shrinkBuf(k.output,k.next_out)))}while((0<k.avail_in||k.avail_out===0)&&x!==1);return I===4?(x=n.deflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===l):I!==2||(this.onEnd(l),!(k.avail_out=0))},f.prototype.onData=function(y){this.chunks.push(y)},f.prototype.onEnd=function(y){y===l&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=y,this.msg=this.strm.msg},r.Deflate=f,r.deflate=g,r.deflateRaw=function(y,b){return(b=b||{}).raw=!0,g(y,b)},r.gzip=function(y,b){return(b=b||{}).gzip=!0,g(y,b)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){var n=e("./zlib/inflate"),o=e("./utils/common"),i=e("./utils/strings"),s=e("./zlib/constants"),a=e("./zlib/messages"),c=e("./zlib/zstream"),l=e("./zlib/gzheader"),p=Object.prototype.toString;function u(f){if(!(this instanceof u))return new u(f);this.options=o.assign({chunkSize:16384,windowBits:0,to:""},f||{});var g=this.options;g.raw&&0<=g.windowBits&&g.windowBits<16&&(g.windowBits=-g.windowBits,g.windowBits===0&&(g.windowBits=-15)),!(0<=g.windowBits&&g.windowBits<16)||f&&f.windowBits||(g.windowBits+=32),15<g.windowBits&&g.windowBits<48&&(15&g.windowBits)==0&&(g.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new c,this.strm.avail_out=0;var y=n.inflateInit2(this.strm,g.windowBits);if(y!==s.Z_OK)throw Error(a[y]);this.header=new l,n.inflateGetHeader(this.strm,this.header)}function m(f,g){var y=new u(g);if(y.push(f,!0),y.err)throw y.msg||a[y.err];return y.result}u.prototype.push=function(f,g){var y,b,x,I,k,P,R=this.strm,j=this.options.chunkSize,z=this.options.dictionary,L=!1;if(this.ended)return!1;b=g===~~g?g:g===!0?s.Z_FINISH:s.Z_NO_FLUSH,typeof f=="string"?R.input=i.binstring2buf(f):p.call(f)==="[object ArrayBuffer]"?R.input=new Uint8Array(f):R.input=f,R.next_in=0,R.avail_in=R.input.length;do{if(R.avail_out===0&&(R.output=new o.Buf8(j),R.next_out=0,R.avail_out=j),(y=n.inflate(R,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&z&&(P=typeof z=="string"?i.string2buf(z):p.call(z)==="[object ArrayBuffer]"?new Uint8Array(z):z,y=n.inflateSetDictionary(this.strm,P)),y===s.Z_BUF_ERROR&&L===!0&&(y=s.Z_OK,L=!1),y!==s.Z_STREAM_END&&y!==s.Z_OK)return this.onEnd(y),!(this.ended=!0);R.next_out&&(R.avail_out!==0&&y!==s.Z_STREAM_END&&(R.avail_in!==0||b!==s.Z_FINISH&&b!==s.Z_SYNC_FLUSH)||(this.options.to==="string"?(x=i.utf8border(R.output,R.next_out),I=R.next_out-x,k=i.buf2string(R.output,x),R.next_out=I,R.avail_out=j-I,I&&o.arraySet(R.output,R.output,x,I,0),this.onData(k)):this.onData(o.shrinkBuf(R.output,R.next_out)))),R.avail_in===0&&R.avail_out===0&&(L=!0)}while((0<R.avail_in||R.avail_out===0)&&y!==s.Z_STREAM_END);return y===s.Z_STREAM_END&&(b=s.Z_FINISH),b===s.Z_FINISH?(y=n.inflateEnd(this.strm),this.onEnd(y),this.ended=!0,y===s.Z_OK):b!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(R.avail_out=0))},u.prototype.onData=function(f){this.chunks.push(f)},u.prototype.onEnd=function(f){f===s.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},r.Inflate=u,r.inflate=m,r.inflateRaw=function(f,g){return(g=g||{}).raw=!0,m(f,g)},r.ungzip=m},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";r.assign=function(s){for(var a=Array.prototype.slice.call(arguments,1);a.length;){var c=a.shift();if(c){if(typeof c!="object")throw TypeError(c+"must be non-object");for(var l in c)c.hasOwnProperty(l)&&(s[l]=c[l])}}return s},r.shrinkBuf=function(s,a){return s.length===a?s:s.subarray?s.subarray(0,a):(s.length=a,s)};var o={arraySet:function(s,a,c,l,p){if(a.subarray&&s.subarray)s.set(a.subarray(c,c+l),p);else for(var u=0;u<l;u++)s[p+u]=a[c+u]},flattenChunks:function(s){var a,c,l,p,u,m;for(a=l=0,c=s.length;a<c;a++)l+=s[a].length;for(m=new Uint8Array(l),a=p=0,c=s.length;a<c;a++)u=s[a],m.set(u,p),p+=u.length;return m}},i={arraySet:function(s,a,c,l,p){for(var u=0;u<l;u++)s[p+u]=a[c+u]},flattenChunks:function(s){return[].concat.apply([],s)}};r.setTyped=function(s){s?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,o)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,i))},r.setTyped(n)},{}],42:[function(e,t,r){var n=e("./common"),o=!0,i=!0;try{String.fromCharCode.apply(null,[0])}catch(l){o=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(l){i=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function c(l,p){if(p<65537&&(l.subarray&&i||!l.subarray&&o))return String.fromCharCode.apply(null,n.shrinkBuf(l,p));for(var u="",m=0;m<p;m++)u+=String.fromCharCode(l[m]);return u}s[254]=s[254]=1,r.string2buf=function(l){var p,u,m,f,g,y=l.length,b=0;for(f=0;f<y;f++)(64512&(u=l.charCodeAt(f)))==55296&&f+1<y&&(64512&(m=l.charCodeAt(f+1)))==56320&&(u=65536+(u-55296<<10)+(m-56320),f++),b+=u<128?1:u<2048?2:u<65536?3:4;for(p=new n.Buf8(b),f=g=0;g<b;f++)(64512&(u=l.charCodeAt(f)))==55296&&f+1<y&&(64512&(m=l.charCodeAt(f+1)))==56320&&(u=65536+(u-55296<<10)+(m-56320),f++),u<128?p[g++]=u:(u<2048?p[g++]=192|u>>>6:(u<65536?p[g++]=224|u>>>12:(p[g++]=240|u>>>18,p[g++]=128|u>>>12&63),p[g++]=128|u>>>6&63),p[g++]=128|63&u);return p},r.buf2binstring=function(l){return c(l,l.length)},r.binstring2buf=function(l){for(var p=new n.Buf8(l.length),u=0,m=p.length;u<m;u++)p[u]=l.charCodeAt(u);return p},r.buf2string=function(l,p){var u,m,f,g,y=p||l.length,b=Array(2*y);for(u=m=0;u<y;)if((f=l[u++])<128)b[m++]=f;else if(4<(g=s[f]))b[m++]=65533,u+=g-1;else{for(f&=g===2?31:g===3?15:7;1<g&&u<y;)f=f<<6|63&l[u++],g--;1<g?b[m++]=65533:f<65536?b[m++]=f:(f-=65536,b[m++]=55296|f>>10&1023,b[m++]=56320|1023&f)}return c(b,m)},r.utf8border=function(l,p){var u;for((p=p||l.length)>l.length&&(p=l.length),u=p-1;0<=u&&(192&l[u])==128;)u--;return u<0?p:u===0?p:u+s[l[u]]>p?u:p}},{"./common":41}],43:[function(e,t,r){t.exports=function(n,o,i,s){for(var a=65535&n|0,c=n>>>16&65535|0,l=0;i!==0;){for(i-=l=2000<i?2000:i;c=c+(a=a+o[s++]|0)|0,--l;);a%=65521,c%=65521}return a|c<<16|0}},{}],44:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){var n=function(){for(var o,i=[],s=0;s<256;s++){o=s;for(var a=0;a<8;a++)o=1&o?3988292384^o>>>1:o>>>1;i[s]=o}return i}();t.exports=function(o,i,s,a){var c=n,l=a+s;o^=-1;for(var p=a;p<l;p++)o=o>>>8^c[255&(o^i[p])];return-1^o}},{}],46:[function(e,t,r){var n,o=e("../utils/common"),i=e("./trees"),s=e("./adler32"),a=e("./crc32"),c=e("./messages"),l=0,p=4,u=0,m=-2,f=-1,g=4,y=2,b=8,x=9,I=286,k=30,P=19,R=2*I+1,j=15,z=3,L=258,F=L+z+1,w=42,E=113,h=1,N=2,ne=3,V=4;function oe(d,D){return d.msg=c[D],D}function q(d){return(d<<1)-(4<d?9:0)}function te(d){for(var D=d.length;0<=--D;)d[D]=0}function O(d){var D=d.state,A=D.pending;A>d.avail_out&&(A=d.avail_out),A!==0&&(o.arraySet(d.output,D.pending_buf,D.pending_out,A,d.next_out),d.next_out+=A,D.pending_out+=A,d.total_out+=A,d.avail_out-=A,D.pending-=A,D.pending===0&&(D.pending_out=0))}function C(d,D){i._tr_flush_block(d,0<=d.block_start?d.block_start:-1,d.strstart-d.block_start,D),d.block_start=d.strstart,O(d.strm)}function Q(d,D){d.pending_buf[d.pending++]=D}function G(d,D){d.pending_buf[d.pending++]=D>>>8&255,d.pending_buf[d.pending++]=255&D}function J(d,D){var A,_,{max_chain_length:v,strstart:S,prev_length:B,nice_match:U}=d,T=d.strstart>d.w_size-F?d.strstart-(d.w_size-F):0,{window:W,w_mask:K,prev:H}=d,ee=d.strstart+L,le=W[S+B-1],ae=W[S+B];d.prev_length>=d.good_match&&(v>>=2),U>d.lookahead&&(U=d.lookahead);do if(W[(A=D)+B]===ae&&W[A+B-1]===le&&W[A]===W[S]&&W[++A]===W[S+1]){S+=2,A++;do;while(W[++S]===W[++A]&&W[++S]===W[++A]&&W[++S]===W[++A]&&W[++S]===W[++A]&&W[++S]===W[++A]&&W[++S]===W[++A]&&W[++S]===W[++A]&&W[++S]===W[++A]&&S<ee);if(_=L-(ee-S),S=ee-L,B<_){if(d.match_start=D,U<=(B=_))break;le=W[S+B-1],ae=W[S+B]}}while((D=H[D&K])>T&&--v!=0);return B<=d.lookahead?B:d.lookahead}function he(d){var D,A,_,v,S,B,U,T,W,K,H=d.w_size;do{if(v=d.window_size-d.lookahead-d.strstart,d.strstart>=H+(H-F)){for(o.arraySet(d.window,d.window,H,H,0),d.match_start-=H,d.strstart-=H,d.block_start-=H,D=A=d.hash_size;_=d.head[--D],d.head[D]=H<=_?_-H:0,--A;);for(D=A=H;_=d.prev[--D],d.prev[D]=H<=_?_-H:0,--A;);v+=H}if(d.strm.avail_in===0)break;if(B=d.strm,U=d.window,T=d.strstart+d.lookahead,W=v,K=void 0,K=B.avail_in,W<K&&(K=W),A=K===0?0:(B.avail_in-=K,o.arraySet(U,B.input,B.next_in,K,T),B.state.wrap===1?B.adler=s(B.adler,U,K,T):B.state.wrap===2&&(B.adler=a(B.adler,U,K,T)),B.next_in+=K,B.total_in+=K,K),d.lookahead+=A,d.lookahead+d.insert>=z)for(S=d.strstart-d.insert,d.ins_h=d.window[S],d.ins_h=(d.ins_h<<d.hash_shift^d.window[S+1])&d.hash_mask;d.insert&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[S+z-1])&d.hash_mask,d.prev[S&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=S,S++,d.insert--,!(d.lookahead+d.insert<z)););}while(d.lookahead<F&&d.strm.avail_in!==0)}function ke(d,D){for(var A,_;;){if(d.lookahead<F){if(he(d),d.lookahead<F&&D===l)return h;if(d.lookahead===0)break}if(A=0,d.lookahead>=z&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+z-1])&d.hash_mask,A=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart),A!==0&&d.strstart-A<=d.w_size-F&&(d.match_length=J(d,A)),d.match_length>=z)if(_=i._tr_tally(d,d.strstart-d.match_start,d.match_length-z),d.lookahead-=d.match_length,d.match_length<=d.max_lazy_match&&d.lookahead>=z){for(d.match_length--;d.strstart++,d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+z-1])&d.hash_mask,A=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart,--d.match_length!=0;);d.strstart++}else d.strstart+=d.match_length,d.match_length=0,d.ins_h=d.window[d.strstart],d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+1])&d.hash_mask;else _=i._tr_tally(d,0,d.window[d.strstart]),d.lookahead--,d.strstart++;if(_&&(C(d,!1),d.strm.avail_out===0))return h}return d.insert=d.strstart<z-1?d.strstart:z-1,D===p?(C(d,!0),d.strm.avail_out===0?ne:V):d.last_lit&&(C(d,!1),d.strm.avail_out===0)?h:N}function ie(d,D){for(var A,_,v;;){if(d.lookahead<F){if(he(d),d.lookahead<F&&D===l)return h;if(d.lookahead===0)break}if(A=0,d.lookahead>=z&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+z-1])&d.hash_mask,A=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart),d.prev_length=d.match_length,d.prev_match=d.match_start,d.match_length=z-1,A!==0&&d.prev_length<d.max_lazy_match&&d.strstart-A<=d.w_size-F&&(d.match_length=J(d,A),d.match_length<=5&&(d.strategy===1||d.match_length===z&&4096<d.strstart-d.match_start)&&(d.match_length=z-1)),d.prev_length>=z&&d.match_length<=d.prev_length){for(v=d.strstart+d.lookahead-z,_=i._tr_tally(d,d.strstart-1-d.prev_match,d.prev_length-z),d.lookahead-=d.prev_length-1,d.prev_length-=2;++d.strstart<=v&&(d.ins_h=(d.ins_h<<d.hash_shift^d.window[d.strstart+z-1])&d.hash_mask,A=d.prev[d.strstart&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=d.strstart),--d.prev_length!=0;);if(d.match_available=0,d.match_length=z-1,d.strstart++,_&&(C(d,!1),d.strm.avail_out===0))return h}else if(d.match_available){if((_=i._tr_tally(d,0,d.window[d.strstart-1]))&&C(d,!1),d.strstart++,d.lookahead--,d.strm.avail_out===0)return h}else d.match_available=1,d.strstart++,d.lookahead--}return d.match_available&&(_=i._tr_tally(d,0,d.window[d.strstart-1]),d.match_available=0),d.insert=d.strstart<z-1?d.strstart:z-1,D===p?(C(d,!0),d.strm.avail_out===0?ne:V):d.last_lit&&(C(d,!1),d.strm.avail_out===0)?h:N}function ce(d,D,A,_,v){this.good_length=d,this.max_lazy=D,this.nice_length=A,this.max_chain=_,this.func=v}function we(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=b,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new o.Buf16(2*R),this.dyn_dtree=new o.Buf16(2*(2*k+1)),this.bl_tree=new o.Buf16(2*(2*P+1)),te(this.dyn_ltree),te(this.dyn_dtree),te(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new o.Buf16(j+1),this.heap=new o.Buf16(2*I+1),te(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new o.Buf16(2*I+1),te(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function me(d){var D;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=y,(D=d.state).pending=0,D.pending_out=0,D.wrap<0&&(D.wrap=-D.wrap),D.status=D.wrap?w:E,d.adler=D.wrap===2?0:1,D.last_flush=l,i._tr_init(D),u):oe(d,m)}function Oe(d){var D=me(d);return D===u&&function(A){A.window_size=2*A.w_size,te(A.head),A.max_lazy_match=n[A.level].max_lazy,A.good_match=n[A.level].good_length,A.nice_match=n[A.level].nice_length,A.max_chain_length=n[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=z-1,A.match_available=0,A.ins_h=0}(d.state),D}function De(d,D,A,_,v,S){if(!d)return m;var B=1;if(D===f&&(D=6),_<0?(B=0,_=-_):15<_&&(B=2,_-=16),v<1||x<v||A!==b||_<8||15<_||D<0||9<D||S<0||g<S)return oe(d,m);_===8&&(_=9);var U=new we;return(d.state=U).strm=d,U.wrap=B,U.gzhead=null,U.w_bits=_,U.w_size=1<<U.w_bits,U.w_mask=U.w_size-1,U.hash_bits=v+7,U.hash_size=1<<U.hash_bits,U.hash_mask=U.hash_size-1,U.hash_shift=~~((U.hash_bits+z-1)/z),U.window=new o.Buf8(2*U.w_size),U.head=new o.Buf16(U.hash_size),U.prev=new o.Buf16(U.w_size),U.lit_bufsize=1<<v+6,U.pending_buf_size=4*U.lit_bufsize,U.pending_buf=new o.Buf8(U.pending_buf_size),U.d_buf=1*U.lit_bufsize,U.l_buf=3*U.lit_bufsize,U.level=D,U.strategy=S,U.method=A,Oe(d)}n=[new ce(0,0,0,0,function(d,D){var A=65535;for(A>d.pending_buf_size-5&&(A=d.pending_buf_size-5);;){if(d.lookahead<=1){if(he(d),d.lookahead===0&&D===l)return h;if(d.lookahead===0)break}d.strstart+=d.lookahead,d.lookahead=0;var _=d.block_start+A;if((d.strstart===0||d.strstart>=_)&&(d.lookahead=d.strstart-_,d.strstart=_,C(d,!1),d.strm.avail_out===0))return h;if(d.strstart-d.block_start>=d.w_size-F&&(C(d,!1),d.strm.avail_out===0))return h}return d.insert=0,D===p?(C(d,!0),d.strm.avail_out===0?ne:V):(d.strstart>d.block_start&&(C(d,!1),d.strm.avail_out),h)}),new ce(4,4,8,4,ke),new ce(4,5,16,8,ke),new ce(4,6,32,32,ke),new ce(4,4,16,16,ie),new ce(8,16,32,32,ie),new ce(8,16,128,128,ie),new ce(8,32,128,256,ie),new ce(32,128,258,1024,ie),new ce(32,258,258,4096,ie)],r.deflateInit=function(d,D){return De(d,D,b,15,8,0)},r.deflateInit2=De,r.deflateReset=Oe,r.deflateResetKeep=me,r.deflateSetHeader=function(d,D){return d&&d.state?d.state.wrap!==2?m:(d.state.gzhead=D,u):m},r.deflate=function(d,D){var A,_,v,S;if(!d||!d.state||5<D||D<0)return d?oe(d,m):m;if(_=d.state,!d.output||!d.input&&d.avail_in!==0||_.status===666&&D!==p)return oe(d,d.avail_out===0?-5:m);if(_.strm=d,A=_.last_flush,_.last_flush=D,_.status===w)if(_.wrap===2)d.adler=0,Q(_,31),Q(_,139),Q(_,8),_.gzhead?(Q(_,(_.gzhead.text?1:0)+(_.gzhead.hcrc?2:0)+(_.gzhead.extra?4:0)+(_.gzhead.name?8:0)+(_.gzhead.comment?16:0)),Q(_,255&_.gzhead.time),Q(_,_.gzhead.time>>8&255),Q(_,_.gzhead.time>>16&255),Q(_,_.gzhead.time>>24&255),Q(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),Q(_,255&_.gzhead.os),_.gzhead.extra&&_.gzhead.extra.length&&(Q(_,255&_.gzhead.extra.length),Q(_,_.gzhead.extra.length>>8&255)),_.gzhead.hcrc&&(d.adler=a(d.adler,_.pending_buf,_.pending,0)),_.gzindex=0,_.status=69):(Q(_,0),Q(_,0),Q(_,0),Q(_,0),Q(_,0),Q(_,_.level===9?2:2<=_.strategy||_.level<2?4:0),Q(_,3),_.status=E);else{var B=b+(_.w_bits-8<<4)<<8;B|=(2<=_.strategy||_.level<2?0:_.level<6?1:_.level===6?2:3)<<6,_.strstart!==0&&(B|=32),B+=31-B%31,_.status=E,G(_,B),_.strstart!==0&&(G(_,d.adler>>>16),G(_,65535&d.adler)),d.adler=1}if(_.status===69)if(_.gzhead.extra){for(v=_.pending;_.gzindex<(65535&_.gzhead.extra.length)&&(_.pending!==_.pending_buf_size||(_.gzhead.hcrc&&_.pending>v&&(d.adler=a(d.adler,_.pending_buf,_.pending-v,v)),O(d),v=_.pending,_.pending!==_.pending_buf_size));)Q(_,255&_.gzhead.extra[_.gzindex]),_.gzindex++;_.gzhead.hcrc&&_.pending>v&&(d.adler=a(d.adler,_.pending_buf,_.pending-v,v)),_.gzindex===_.gzhead.extra.length&&(_.gzindex=0,_.status=73)}else _.status=73;if(_.status===73)if(_.gzhead.name){v=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>v&&(d.adler=a(d.adler,_.pending_buf,_.pending-v,v)),O(d),v=_.pending,_.pending===_.pending_buf_size)){S=1;break}S=_.gzindex<_.gzhead.name.length?255&_.gzhead.name.charCodeAt(_.gzindex++):0,Q(_,S)}while(S!==0);_.gzhead.hcrc&&_.pending>v&&(d.adler=a(d.adler,_.pending_buf,_.pending-v,v)),S===0&&(_.gzindex=0,_.status=91)}else _.status=91;if(_.status===91)if(_.gzhead.comment){v=_.pending;do{if(_.pending===_.pending_buf_size&&(_.gzhead.hcrc&&_.pending>v&&(d.adler=a(d.adler,_.pending_buf,_.pending-v,v)),O(d),v=_.pending,_.pending===_.pending_buf_size)){S=1;break}S=_.gzindex<_.gzhead.comment.length?255&_.gzhead.comment.charCodeAt(_.gzindex++):0,Q(_,S)}while(S!==0);_.gzhead.hcrc&&_.pending>v&&(d.adler=a(d.adler,_.pending_buf,_.pending-v,v)),S===0&&(_.status=103)}else _.status=103;if(_.status===103&&(_.gzhead.hcrc?(_.pending+2>_.pending_buf_size&&O(d),_.pending+2<=_.pending_buf_size&&(Q(_,255&d.adler),Q(_,d.adler>>8&255),d.adler=0,_.status=E)):_.status=E),_.pending!==0){if(O(d),d.avail_out===0)return _.last_flush=-1,u}else if(d.avail_in===0&&q(D)<=q(A)&&D!==p)return oe(d,-5);if(_.status===666&&d.avail_in!==0)return oe(d,-5);if(d.avail_in!==0||_.lookahead!==0||D!==l&&_.status!==666){var U=_.strategy===2?function(T,W){for(var K;;){if(T.lookahead===0&&(he(T),T.lookahead===0)){if(W===l)return h;break}if(T.match_length=0,K=i._tr_tally(T,0,T.window[T.strstart]),T.lookahead--,T.strstart++,K&&(C(T,!1),T.strm.avail_out===0))return h}return T.insert=0,W===p?(C(T,!0),T.strm.avail_out===0?ne:V):T.last_lit&&(C(T,!1),T.strm.avail_out===0)?h:N}(_,D):_.strategy===3?function(T,W){for(var K,H,ee,le,ae=T.window;;){if(T.lookahead<=L){if(he(T),T.lookahead<=L&&W===l)return h;if(T.lookahead===0)break}if(T.match_length=0,T.lookahead>=z&&0<T.strstart&&(H=ae[ee=T.strstart-1])===ae[++ee]&&H===ae[++ee]&&H===ae[++ee]){le=T.strstart+L;do;while(H===ae[++ee]&&H===ae[++ee]&&H===ae[++ee]&&H===ae[++ee]&&H===ae[++ee]&&H===ae[++ee]&&H===ae[++ee]&&H===ae[++ee]&&ee<le);T.match_length=L-(le-ee),T.match_length>T.lookahead&&(T.match_length=T.lookahead)}if(T.match_length>=z?(K=i._tr_tally(T,1,T.match_length-z),T.lookahead-=T.match_length,T.strstart+=T.match_length,T.match_length=0):(K=i._tr_tally(T,0,T.window[T.strstart]),T.lookahead--,T.strstart++),K&&(C(T,!1),T.strm.avail_out===0))return h}return T.insert=0,W===p?(C(T,!0),T.strm.avail_out===0?ne:V):T.last_lit&&(C(T,!1),T.strm.avail_out===0)?h:N}(_,D):n[_.level].func(_,D);if(U!==ne&&U!==V||(_.status=666),U===h||U===ne)return d.avail_out===0&&(_.last_flush=-1),u;if(U===N&&(D===1?i._tr_align(_):D!==5&&(i._tr_stored_block(_,0,0,!1),D===3&&(te(_.head),_.lookahead===0&&(_.strstart=0,_.block_start=0,_.insert=0))),O(d),d.avail_out===0))return _.last_flush=-1,u}return D!==p?u:_.wrap<=0?1:(_.wrap===2?(Q(_,255&d.adler),Q(_,d.adler>>8&255),Q(_,d.adler>>16&255),Q(_,d.adler>>24&255),Q(_,255&d.total_in),Q(_,d.total_in>>8&255),Q(_,d.total_in>>16&255),Q(_,d.total_in>>24&255)):(G(_,d.adler>>>16),G(_,65535&d.adler)),O(d),0<_.wrap&&(_.wrap=-_.wrap),_.pending!==0?u:1)},r.deflateEnd=function(d){var D;return d&&d.state?(D=d.state.status)!==w&&D!==69&&D!==73&&D!==91&&D!==103&&D!==E&&D!==666?oe(d,m):(d.state=null,D===E?oe(d,-3):u):m},r.deflateSetDictionary=function(d,D){var A,_,v,S,B,U,T,W,K=D.length;if(!d||!d.state)return m;if((S=(A=d.state).wrap)===2||S===1&&A.status!==w||A.lookahead)return m;for(S===1&&(d.adler=s(d.adler,D,K,0)),A.wrap=0,K>=A.w_size&&(S===0&&(te(A.head),A.strstart=0,A.block_start=0,A.insert=0),W=new o.Buf8(A.w_size),o.arraySet(W,D,K-A.w_size,A.w_size,0),D=W,K=A.w_size),B=d.avail_in,U=d.next_in,T=d.input,d.avail_in=K,d.next_in=0,d.input=D,he(A);A.lookahead>=z;){for(_=A.strstart,v=A.lookahead-(z-1);A.ins_h=(A.ins_h<<A.hash_shift^A.window[_+z-1])&A.hash_mask,A.prev[_&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=_,_++,--v;);A.strstart=_,A.lookahead=z-1,he(A)}return A.strstart+=A.lookahead,A.block_start=A.strstart,A.insert=A.lookahead,A.lookahead=0,A.match_length=A.prev_length=z-1,A.match_available=0,d.next_in=U,d.input=T,d.avail_in=B,A.wrap=S,u},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){t.exports=function(n,o){var i,s,a,c,l,p,u,m,f,g,y,b,x,I,k,P,R,j,z,L,F,w,E,h,N;i=n.state,s=n.next_in,h=n.input,a=s+(n.avail_in-5),c=n.next_out,N=n.output,l=c-(o-n.avail_out),p=c+(n.avail_out-257),u=i.dmax,m=i.wsize,f=i.whave,g=i.wnext,y=i.window,b=i.hold,x=i.bits,I=i.lencode,k=i.distcode,P=(1<<i.lenbits)-1,R=(1<<i.distbits)-1;e:do{x<15&&(b+=h[s++]<<x,x+=8,b+=h[s++]<<x,x+=8),j=I[b&P];t:for(;;){if(b>>>=z=j>>>24,x-=z,(z=j>>>16&255)===0)N[c++]=65535&j;else{if(!(16&z)){if((64&z)==0){j=I[(65535&j)+(b&(1<<z)-1)];continue t}if(32&z){i.mode=12;break e}n.msg="invalid literal/length code",i.mode=30;break e}L=65535&j,(z&=15)&&(x<z&&(b+=h[s++]<<x,x+=8),L+=b&(1<<z)-1,b>>>=z,x-=z),x<15&&(b+=h[s++]<<x,x+=8,b+=h[s++]<<x,x+=8),j=k[b&R];r:for(;;){if(b>>>=z=j>>>24,x-=z,!(16&(z=j>>>16&255))){if((64&z)==0){j=k[(65535&j)+(b&(1<<z)-1)];continue r}n.msg="invalid distance code",i.mode=30;break e}if(F=65535&j,x<(z&=15)&&(b+=h[s++]<<x,(x+=8)<z&&(b+=h[s++]<<x,x+=8)),u<(F+=b&(1<<z)-1)){n.msg="invalid distance too far back",i.mode=30;break e}if(b>>>=z,x-=z,(z=c-l)<F){if(f<(z=F-z)&&i.sane){n.msg="invalid distance too far back",i.mode=30;break e}if(E=y,(w=0)===g){if(w+=m-z,z<L){for(L-=z;N[c++]=y[w++],--z;);w=c-F,E=N}}else if(g<z){if(w+=m+g-z,(z-=g)<L){for(L-=z;N[c++]=y[w++],--z;);if(w=0,g<L){for(L-=z=g;N[c++]=y[w++],--z;);w=c-F,E=N}}}else if(w+=g-z,z<L){for(L-=z;N[c++]=y[w++],--z;);w=c-F,E=N}for(;2<L;)N[c++]=E[w++],N[c++]=E[w++],N[c++]=E[w++],L-=3;L&&(N[c++]=E[w++],1<L&&(N[c++]=E[w++]))}else{for(w=c-F;N[c++]=N[w++],N[c++]=N[w++],N[c++]=N[w++],2<(L-=3););L&&(N[c++]=N[w++],1<L&&(N[c++]=N[w++]))}break}}break}}while(s<a&&c<p);s-=L=x>>3,b&=(1<<(x-=L<<3))-1,n.next_in=s,n.next_out=c,n.avail_in=s<a?a-s+5:5-(s-a),n.avail_out=c<p?p-c+257:257-(c-p),i.hold=b,i.bits=x}},{}],49:[function(e,t,r){var n=e("../utils/common"),o=e("./adler32"),i=e("./crc32"),s=e("./inffast"),a=e("./inftrees"),c=1,l=2,p=0,u=-2,m=1,f=852,g=592;function y(w){return(w>>>24&255)+(w>>>8&65280)+((65280&w)<<8)+((255&w)<<24)}function b(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function x(w){var E;return w&&w.state?(E=w.state,w.total_in=w.total_out=E.total=0,w.msg="",E.wrap&&(w.adler=1&E.wrap),E.mode=m,E.last=0,E.havedict=0,E.dmax=32768,E.head=null,E.hold=0,E.bits=0,E.lencode=E.lendyn=new n.Buf32(f),E.distcode=E.distdyn=new n.Buf32(g),E.sane=1,E.back=-1,p):u}function I(w){var E;return w&&w.state?((E=w.state).wsize=0,E.whave=0,E.wnext=0,x(w)):u}function k(w,E){var h,N;return w&&w.state?(N=w.state,E<0?(h=0,E=-E):(h=1+(E>>4),E<48&&(E&=15)),E&&(E<8||15<E)?u:(N.window!==null&&N.wbits!==E&&(N.window=null),N.wrap=h,N.wbits=E,I(w))):u}function P(w,E){var h,N;return w?(N=new b,(w.state=N).window=null,(h=k(w,E))!==p&&(w.state=null),h):u}var R,j,z=!0;function L(w){if(z){var E;for(R=new n.Buf32(512),j=new n.Buf32(32),E=0;E<144;)w.lens[E++]=8;for(;E<256;)w.lens[E++]=9;for(;E<280;)w.lens[E++]=7;for(;E<288;)w.lens[E++]=8;for(a(c,w.lens,0,288,R,0,w.work,{bits:9}),E=0;E<32;)w.lens[E++]=5;a(l,w.lens,0,32,j,0,w.work,{bits:5}),z=!1}w.lencode=R,w.lenbits=9,w.distcode=j,w.distbits=5}function F(w,E,h,N){var ne,V=w.state;return V.window===null&&(V.wsize=1<<V.wbits,V.wnext=0,V.whave=0,V.window=new n.Buf8(V.wsize)),N>=V.wsize?(n.arraySet(V.window,E,h-V.wsize,V.wsize,0),V.wnext=0,V.whave=V.wsize):(N<(ne=V.wsize-V.wnext)&&(ne=N),n.arraySet(V.window,E,h-N,ne,V.wnext),(N-=ne)?(n.arraySet(V.window,E,h-N,N,0),V.wnext=N,V.whave=V.wsize):(V.wnext+=ne,V.wnext===V.wsize&&(V.wnext=0),V.whave<V.wsize&&(V.whave+=ne))),0}r.inflateReset=I,r.inflateReset2=k,r.inflateResetKeep=x,r.inflateInit=function(w){return P(w,15)},r.inflateInit2=P,r.inflate=function(w,E){var h,N,ne,V,oe,q,te,O,C,Q,G,J,he,ke,ie,ce,we,me,Oe,De,d,D,A,_,v=0,S=new n.Buf8(4),B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!w||!w.state||!w.output||!w.input&&w.avail_in!==0)return u;(h=w.state).mode===12&&(h.mode=13),oe=w.next_out,ne=w.output,te=w.avail_out,V=w.next_in,N=w.input,q=w.avail_in,O=h.hold,C=h.bits,Q=q,G=te,D=p;e:for(;;)switch(h.mode){case m:if(h.wrap===0){h.mode=13;break}for(;C<16;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if(2&h.wrap&&O===35615){S[h.check=0]=255&O,S[1]=O>>>8&255,h.check=i(h.check,S,2,0),C=O=0,h.mode=2;break}if(h.flags=0,h.head&&(h.head.done=!1),!(1&h.wrap)||(((255&O)<<8)+(O>>8))%31){w.msg="incorrect header check",h.mode=30;break}if((15&O)!=8){w.msg="unknown compression method",h.mode=30;break}if(C-=4,d=8+(15&(O>>>=4)),h.wbits===0)h.wbits=d;else if(d>h.wbits){w.msg="invalid window size",h.mode=30;break}h.dmax=1<<d,w.adler=h.check=1,h.mode=512&O?10:12,C=O=0;break;case 2:for(;C<16;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if(h.flags=O,(255&h.flags)!=8){w.msg="unknown compression method",h.mode=30;break}if(57344&h.flags){w.msg="unknown header flags set",h.mode=30;break}h.head&&(h.head.text=O>>8&1),512&h.flags&&(S[0]=255&O,S[1]=O>>>8&255,h.check=i(h.check,S,2,0)),C=O=0,h.mode=3;case 3:for(;C<32;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}h.head&&(h.head.time=O),512&h.flags&&(S[0]=255&O,S[1]=O>>>8&255,S[2]=O>>>16&255,S[3]=O>>>24&255,h.check=i(h.check,S,4,0)),C=O=0,h.mode=4;case 4:for(;C<16;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}h.head&&(h.head.xflags=255&O,h.head.os=O>>8),512&h.flags&&(S[0]=255&O,S[1]=O>>>8&255,h.check=i(h.check,S,2,0)),C=O=0,h.mode=5;case 5:if(1024&h.flags){for(;C<16;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}h.length=O,h.head&&(h.head.extra_len=O),512&h.flags&&(S[0]=255&O,S[1]=O>>>8&255,h.check=i(h.check,S,2,0)),C=O=0}else h.head&&(h.head.extra=null);h.mode=6;case 6:if(1024&h.flags&&(q<(J=h.length)&&(J=q),J&&(h.head&&(d=h.head.extra_len-h.length,h.head.extra||(h.head.extra=Array(h.head.extra_len)),n.arraySet(h.head.extra,N,V,J,d)),512&h.flags&&(h.check=i(h.check,N,J,V)),q-=J,V+=J,h.length-=J),h.length))break e;h.length=0,h.mode=7;case 7:if(2048&h.flags){if(q===0)break e;for(J=0;d=N[V+J++],h.head&&d&&h.length<65536&&(h.head.name+=String.fromCharCode(d)),d&&J<q;);if(512&h.flags&&(h.check=i(h.check,N,J,V)),q-=J,V+=J,d)break e}else h.head&&(h.head.name=null);h.length=0,h.mode=8;case 8:if(4096&h.flags){if(q===0)break e;for(J=0;d=N[V+J++],h.head&&d&&h.length<65536&&(h.head.comment+=String.fromCharCode(d)),d&&J<q;);if(512&h.flags&&(h.check=i(h.check,N,J,V)),q-=J,V+=J,d)break e}else h.head&&(h.head.comment=null);h.mode=9;case 9:if(512&h.flags){for(;C<16;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if(O!==(65535&h.check)){w.msg="header crc mismatch",h.mode=30;break}C=O=0}h.head&&(h.head.hcrc=h.flags>>9&1,h.head.done=!0),w.adler=h.check=0,h.mode=12;break;case 10:for(;C<32;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}w.adler=h.check=y(O),C=O=0,h.mode=11;case 11:if(h.havedict===0)return w.next_out=oe,w.avail_out=te,w.next_in=V,w.avail_in=q,h.hold=O,h.bits=C,2;w.adler=h.check=1,h.mode=12;case 12:if(E===5||E===6)break e;case 13:if(h.last){O>>>=7&C,C-=7&C,h.mode=27;break}for(;C<3;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}switch(h.last=1&O,C-=1,3&(O>>>=1)){case 0:h.mode=14;break;case 1:if(L(h),h.mode=20,E!==6)break;O>>>=2,C-=2;break e;case 2:h.mode=17;break;case 3:w.msg="invalid block type",h.mode=30}O>>>=2,C-=2;break;case 14:for(O>>>=7&C,C-=7&C;C<32;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if((65535&O)!=(O>>>16^65535)){w.msg="invalid stored block lengths",h.mode=30;break}if(h.length=65535&O,C=O=0,h.mode=15,E===6)break e;case 15:h.mode=16;case 16:if(J=h.length){if(q<J&&(J=q),te<J&&(J=te),J===0)break e;n.arraySet(ne,N,V,J,oe),q-=J,V+=J,te-=J,oe+=J,h.length-=J;break}h.mode=12;break;case 17:for(;C<14;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if(h.nlen=257+(31&O),O>>>=5,C-=5,h.ndist=1+(31&O),O>>>=5,C-=5,h.ncode=4+(15&O),O>>>=4,C-=4,286<h.nlen||30<h.ndist){w.msg="too many length or distance symbols",h.mode=30;break}h.have=0,h.mode=18;case 18:for(;h.have<h.ncode;){for(;C<3;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}h.lens[B[h.have++]]=7&O,O>>>=3,C-=3}for(;h.have<19;)h.lens[B[h.have++]]=0;if(h.lencode=h.lendyn,h.lenbits=7,A={bits:h.lenbits},D=a(0,h.lens,0,19,h.lencode,0,h.work,A),h.lenbits=A.bits,D){w.msg="invalid code lengths set",h.mode=30;break}h.have=0,h.mode=19;case 19:for(;h.have<h.nlen+h.ndist;){for(;ce=(v=h.lencode[O&(1<<h.lenbits)-1])>>>16&255,we=65535&v,!((ie=v>>>24)<=C);){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if(we<16)O>>>=ie,C-=ie,h.lens[h.have++]=we;else{if(we===16){for(_=ie+2;C<_;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if(O>>>=ie,C-=ie,h.have===0){w.msg="invalid bit length repeat",h.mode=30;break}d=h.lens[h.have-1],J=3+(3&O),O>>>=2,C-=2}else if(we===17){for(_=ie+3;C<_;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}C-=ie,d=0,J=3+(7&(O>>>=ie)),O>>>=3,C-=3}else{for(_=ie+7;C<_;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}C-=ie,d=0,J=11+(127&(O>>>=ie)),O>>>=7,C-=7}if(h.have+J>h.nlen+h.ndist){w.msg="invalid bit length repeat",h.mode=30;break}for(;J--;)h.lens[h.have++]=d}}if(h.mode===30)break;if(h.lens[256]===0){w.msg="invalid code -- missing end-of-block",h.mode=30;break}if(h.lenbits=9,A={bits:h.lenbits},D=a(c,h.lens,0,h.nlen,h.lencode,0,h.work,A),h.lenbits=A.bits,D){w.msg="invalid literal/lengths set",h.mode=30;break}if(h.distbits=6,h.distcode=h.distdyn,A={bits:h.distbits},D=a(l,h.lens,h.nlen,h.ndist,h.distcode,0,h.work,A),h.distbits=A.bits,D){w.msg="invalid distances set",h.mode=30;break}if(h.mode=20,E===6)break e;case 20:h.mode=21;case 21:if(6<=q&&258<=te){w.next_out=oe,w.avail_out=te,w.next_in=V,w.avail_in=q,h.hold=O,h.bits=C,s(w,G),oe=w.next_out,ne=w.output,te=w.avail_out,V=w.next_in,N=w.input,q=w.avail_in,O=h.hold,C=h.bits,h.mode===12&&(h.back=-1);break}for(h.back=0;ce=(v=h.lencode[O&(1<<h.lenbits)-1])>>>16&255,we=65535&v,!((ie=v>>>24)<=C);){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if(ce&&(240&ce)==0){for(me=ie,Oe=ce,De=we;ce=(v=h.lencode[De+((O&(1<<me+Oe)-1)>>me)])>>>16&255,we=65535&v,!(me+(ie=v>>>24)<=C);){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}O>>>=me,C-=me,h.back+=me}if(O>>>=ie,C-=ie,h.back+=ie,h.length=we,ce===0){h.mode=26;break}if(32&ce){h.back=-1,h.mode=12;break}if(64&ce){w.msg="invalid literal/length code",h.mode=30;break}h.extra=15&ce,h.mode=22;case 22:if(h.extra){for(_=h.extra;C<_;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}h.length+=O&(1<<h.extra)-1,O>>>=h.extra,C-=h.extra,h.back+=h.extra}h.was=h.length,h.mode=23;case 23:for(;ce=(v=h.distcode[O&(1<<h.distbits)-1])>>>16&255,we=65535&v,!((ie=v>>>24)<=C);){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if((240&ce)==0){for(me=ie,Oe=ce,De=we;ce=(v=h.distcode[De+((O&(1<<me+Oe)-1)>>me)])>>>16&255,we=65535&v,!(me+(ie=v>>>24)<=C);){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}O>>>=me,C-=me,h.back+=me}if(O>>>=ie,C-=ie,h.back+=ie,64&ce){w.msg="invalid distance code",h.mode=30;break}h.offset=we,h.extra=15&ce,h.mode=24;case 24:if(h.extra){for(_=h.extra;C<_;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}h.offset+=O&(1<<h.extra)-1,O>>>=h.extra,C-=h.extra,h.back+=h.extra}if(h.offset>h.dmax){w.msg="invalid distance too far back",h.mode=30;break}h.mode=25;case 25:if(te===0)break e;if(J=G-te,h.offset>J){if((J=h.offset-J)>h.whave&&h.sane){w.msg="invalid distance too far back",h.mode=30;break}he=J>h.wnext?(J-=h.wnext,h.wsize-J):h.wnext-J,J>h.length&&(J=h.length),ke=h.window}else ke=ne,he=oe-h.offset,J=h.length;for(te<J&&(J=te),te-=J,h.length-=J;ne[oe++]=ke[he++],--J;);h.length===0&&(h.mode=21);break;case 26:if(te===0)break e;ne[oe++]=h.length,te--,h.mode=21;break;case 27:if(h.wrap){for(;C<32;){if(q===0)break e;q--,O|=N[V++]<<C,C+=8}if(G-=te,w.total_out+=G,h.total+=G,G&&(w.adler=h.check=h.flags?i(h.check,ne,G,oe-G):o(h.check,ne,G,oe-G)),G=te,(h.flags?O:y(O))!==h.check){w.msg="incorrect data check",h.mode=30;break}C=O=0}h.mode=28;case 28:if(h.wrap&&h.flags){for(;C<32;){if(q===0)break e;q--,O+=N[V++]<<C,C+=8}if(O!==(4294967295&h.total)){w.msg="incorrect length check",h.mode=30;break}C=O=0}h.mode=29;case 29:D=1;break e;case 30:D=-3;break e;case 31:return-4;case 32:default:return u}return w.next_out=oe,w.avail_out=te,w.next_in=V,w.avail_in=q,h.hold=O,h.bits=C,(h.wsize||G!==w.avail_out&&h.mode<30&&(h.mode<27||E!==4))&&F(w,w.output,w.next_out,G-w.avail_out)?(h.mode=31,-4):(Q-=w.avail_in,G-=w.avail_out,w.total_in+=Q,w.total_out+=G,h.total+=G,h.wrap&&G&&(w.adler=h.check=h.flags?i(h.check,ne,G,w.next_out-G):o(h.check,ne,G,w.next_out-G)),w.data_type=h.bits+(h.last?64:0)+(h.mode===12?128:0)+(h.mode===20||h.mode===15?256:0),(Q==0&&G===0||E===4)&&D===p&&(D=-5),D)},r.inflateEnd=function(w){if(!w||!w.state)return u;var E=w.state;return E.window&&(E.window=null),w.state=null,p},r.inflateGetHeader=function(w,E){var h;return w&&w.state?(2&(h=w.state).wrap)==0?u:((h.head=E).done=!1,p):u},r.inflateSetDictionary=function(w,E){var h,N=E.length;return w&&w.state?(h=w.state).wrap!==0&&h.mode!==11?u:h.mode===11&&o(1,E,N,0)!==h.check?-3:F(w,E,N,N)?(h.mode=31,-4):(h.havedict=1,p):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){var n=e("../utils/common"),o=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],i=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(c,l,p,u,m,f,g,y){var b,x,I,k,P,R,j,z,L,F=y.bits,w=0,E=0,h=0,N=0,ne=0,V=0,oe=0,q=0,te=0,O=0,C=null,Q=0,G=new n.Buf16(16),J=new n.Buf16(16),he=null,ke=0;for(w=0;w<=15;w++)G[w]=0;for(E=0;E<u;E++)G[l[p+E]]++;for(ne=F,N=15;1<=N&&G[N]===0;N--);if(N<ne&&(ne=N),N===0)return m[f++]=20971520,m[f++]=20971520,y.bits=1,0;for(h=1;h<N&&G[h]===0;h++);for(ne<h&&(ne=h),w=q=1;w<=15;w++)if(q<<=1,(q-=G[w])<0)return-1;if(0<q&&(c===0||N!==1))return-1;for(J[1]=0,w=1;w<15;w++)J[w+1]=J[w]+G[w];for(E=0;E<u;E++)l[p+E]!==0&&(g[J[l[p+E]]++]=E);if(R=c===0?(C=he=g,19):c===1?(C=o,Q-=257,he=i,ke-=257,256):(C=s,he=a,-1),w=h,P=f,oe=E=O=0,I=-1,k=(te=1<<(V=ne))-1,c===1&&852<te||c===2&&592<te)return 1;for(;;){for(j=w-oe,L=g[E]<R?(z=0,g[E]):g[E]>R?(z=he[ke+g[E]],C[Q+g[E]]):(z=96,0),b=1<<w-oe,h=x=1<<V;m[P+(O>>oe)+(x-=b)]=j<<24|z<<16|L|0,x!==0;);for(b=1<<w-1;O&b;)b>>=1;if(b!==0?(O&=b-1,O+=b):O=0,E++,--G[w]==0){if(w===N)break;w=l[p+g[E]]}if(ne<w&&(O&k)!==I){for(oe===0&&(oe=ne),P+=h,q=1<<(V=w-oe);V+oe<N&&!((q-=G[V+oe])<=0);)V++,q<<=1;if(te+=1<<V,c===1&&852<te||c===2&&592<te)return 1;m[I=O&k]=ne<<24|V<<16|P-f|0}}return O!==0&&(m[P+O]=w-oe<<24|4194304|0),y.bits=ne,0}},{"../utils/common":41}],51:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){var n=e("../utils/common"),o=0,i=1;function s(v){for(var S=v.length;0<=--S;)v[S]=0}var a=0,c=29,l=256,p=l+1+c,u=30,m=19,f=2*p+1,g=15,y=16,b=7,x=256,I=16,k=17,P=18,R=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],j=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],F=Array(2*(p+2));s(F);var w=Array(2*u);s(w);var E=Array(512);s(E);var h=Array(256);s(h);var N=Array(c);s(N);var ne,V,oe,q=Array(u);function te(v,S,B,U,T){this.static_tree=v,this.extra_bits=S,this.extra_base=B,this.elems=U,this.max_length=T,this.has_stree=v&&v.length}function O(v,S){this.dyn_tree=v,this.max_code=0,this.stat_desc=S}function C(v){return v<256?E[v]:E[256+(v>>>7)]}function Q(v,S){v.pending_buf[v.pending++]=255&S,v.pending_buf[v.pending++]=S>>>8&255}function G(v,S,B){v.bi_valid>y-B?(v.bi_buf|=S<<v.bi_valid&65535,Q(v,v.bi_buf),v.bi_buf=S>>y-v.bi_valid,v.bi_valid+=B-y):(v.bi_buf|=S<<v.bi_valid&65535,v.bi_valid+=B)}function J(v,S,B){G(v,B[2*S],B[2*S+1])}function he(v,S){for(var B=0;B|=1&v,v>>>=1,B<<=1,0<--S;);return B>>>1}function ke(v,S,B){var U,T,W=Array(g+1),K=0;for(U=1;U<=g;U++)W[U]=K=K+B[U-1]<<1;for(T=0;T<=S;T++){var H=v[2*T+1];H!==0&&(v[2*T]=he(W[H]++,H))}}function ie(v){var S;for(S=0;S<p;S++)v.dyn_ltree[2*S]=0;for(S=0;S<u;S++)v.dyn_dtree[2*S]=0;for(S=0;S<m;S++)v.bl_tree[2*S]=0;v.dyn_ltree[2*x]=1,v.opt_len=v.static_len=0,v.last_lit=v.matches=0}function ce(v){8<v.bi_valid?Q(v,v.bi_buf):0<v.bi_valid&&(v.pending_buf[v.pending++]=v.bi_buf),v.bi_buf=0,v.bi_valid=0}function we(v,S,B,U){var T=2*S,W=2*B;return v[T]<v[W]||v[T]===v[W]&&U[S]<=U[B]}function me(v,S,B){for(var U=v.heap[B],T=B<<1;T<=v.heap_len&&(T<v.heap_len&&we(S,v.heap[T+1],v.heap[T],v.depth)&&T++,!we(S,U,v.heap[T],v.depth));)v.heap[B]=v.heap[T],B=T,T<<=1;v.heap[B]=U}function Oe(v,S,B){var U,T,W,K,H=0;if(v.last_lit!==0)for(;U=v.pending_buf[v.d_buf+2*H]<<8|v.pending_buf[v.d_buf+2*H+1],T=v.pending_buf[v.l_buf+H],H++,U===0?J(v,T,S):(J(v,(W=h[T])+l+1,S),(K=R[W])!==0&&G(v,T-=N[W],K),J(v,W=C(--U),B),(K=j[W])!==0&&G(v,U-=q[W],K)),H<v.last_lit;);J(v,x,S)}function De(v,S){var B,U,T,W=S.dyn_tree,K=S.stat_desc.static_tree,H=S.stat_desc.has_stree,ee=S.stat_desc.elems,le=-1;for(v.heap_len=0,v.heap_max=f,B=0;B<ee;B++)W[2*B]!==0?(v.heap[++v.heap_len]=le=B,v.depth[B]=0):W[2*B+1]=0;for(;v.heap_len<2;)W[2*(T=v.heap[++v.heap_len]=le<2?++le:0)]=1,v.depth[T]=0,v.opt_len--,H&&(v.static_len-=K[2*T+1]);for(S.max_code=le,B=v.heap_len>>1;1<=B;B--)me(v,W,B);for(T=ee;B=v.heap[1],v.heap[1]=v.heap[v.heap_len--],me(v,W,1),U=v.heap[1],v.heap[--v.heap_max]=B,v.heap[--v.heap_max]=U,W[2*T]=W[2*B]+W[2*U],v.depth[T]=(v.depth[B]>=v.depth[U]?v.depth[B]:v.depth[U])+1,W[2*B+1]=W[2*U+1]=T,v.heap[1]=T++,me(v,W,1),2<=v.heap_len;);v.heap[--v.heap_max]=v.heap[1],function(ae,Ae){var Pt,je,Et,ve,Kt,nn,{dyn_tree:He,max_code:ci}=Ae,pp=Ae.stat_desc.static_tree,hp=Ae.stat_desc.has_stree,mp=Ae.stat_desc.extra_bits,ui=Ae.stat_desc.extra_base,$t=Ae.stat_desc.max_length,Yt=0;for(ve=0;ve<=g;ve++)ae.bl_count[ve]=0;for(He[2*ae.heap[ae.heap_max]+1]=0,Pt=ae.heap_max+1;Pt<f;Pt++)$t<(ve=He[2*He[2*(je=ae.heap[Pt])+1]+1]+1)&&(ve=$t,Yt++),He[2*je+1]=ve,ci<je||(ae.bl_count[ve]++,Kt=0,ui<=je&&(Kt=mp[je-ui]),nn=He[2*je],ae.opt_len+=nn*(ve+Kt),hp&&(ae.static_len+=nn*(pp[2*je+1]+Kt)));if(Yt!==0){do{for(ve=$t-1;ae.bl_count[ve]===0;)ve--;ae.bl_count[ve]--,ae.bl_count[ve+1]+=2,ae.bl_count[$t]--,Yt-=2}while(0<Yt);for(ve=$t;ve!==0;ve--)for(je=ae.bl_count[ve];je!==0;)ci<(Et=ae.heap[--Pt])||(He[2*Et+1]!==ve&&(ae.opt_len+=(ve-He[2*Et+1])*He[2*Et],He[2*Et+1]=ve),je--)}}(v,S),ke(W,le,v.bl_count)}function d(v,S,B){var U,T,W=-1,K=S[1],H=0,ee=7,le=4;for(K===0&&(ee=138,le=3),S[2*(B+1)+1]=65535,U=0;U<=B;U++)T=K,K=S[2*(U+1)+1],++H<ee&&T===K||(H<le?v.bl_tree[2*T]+=H:T!==0?(T!==W&&v.bl_tree[2*T]++,v.bl_tree[2*I]++):H<=10?v.bl_tree[2*k]++:v.bl_tree[2*P]++,W=T,le=(H=0)===K?(ee=138,3):T===K?(ee=6,3):(ee=7,4))}function D(v,S,B){var U,T,W=-1,K=S[1],H=0,ee=7,le=4;for(K===0&&(ee=138,le=3),U=0;U<=B;U++)if(T=K,K=S[2*(U+1)+1],!(++H<ee&&T===K)){if(H<le)for(;J(v,T,v.bl_tree),--H!=0;);else T!==0?(T!==W&&(J(v,T,v.bl_tree),H--),J(v,I,v.bl_tree),G(v,H-3,2)):H<=10?(J(v,k,v.bl_tree),G(v,H-3,3)):(J(v,P,v.bl_tree),G(v,H-11,7));W=T,le=(H=0)===K?(ee=138,3):T===K?(ee=6,3):(ee=7,4)}}s(q);var A=!1;function _(v,S,B,U){G(v,(a<<1)+(U?1:0),3),function(T,W,K,H){ce(T),H&&(Q(T,K),Q(T,~K)),n.arraySet(T.pending_buf,T.window,W,K,T.pending),T.pending+=K}(v,S,B,!0)}r._tr_init=function(v){A||(function(){var S,B,U,T,W,K=Array(g+1);for(T=U=0;T<c-1;T++)for(N[T]=U,S=0;S<1<<R[T];S++)h[U++]=T;for(h[U-1]=T,T=W=0;T<16;T++)for(q[T]=W,S=0;S<1<<j[T];S++)E[W++]=T;for(W>>=7;T<u;T++)for(q[T]=W<<7,S=0;S<1<<j[T]-7;S++)E[256+W++]=T;for(B=0;B<=g;B++)K[B]=0;for(S=0;S<=143;)F[2*S+1]=8,S++,K[8]++;for(;S<=255;)F[2*S+1]=9,S++,K[9]++;for(;S<=279;)F[2*S+1]=7,S++,K[7]++;for(;S<=287;)F[2*S+1]=8,S++,K[8]++;for(ke(F,p+1,K),S=0;S<u;S++)w[2*S+1]=5,w[2*S]=he(S,5);ne=new te(F,R,l+1,p,g),V=new te(w,j,0,u,g),oe=new te([],z,0,m,b)}(),A=!0),v.l_desc=new O(v.dyn_ltree,ne),v.d_desc=new O(v.dyn_dtree,V),v.bl_desc=new O(v.bl_tree,oe),v.bi_buf=0,v.bi_valid=0,ie(v)},r._tr_stored_block=_,r._tr_flush_block=function(v,S,B,U){var T,W,K=0;0<v.level?(v.strm.data_type===2&&(v.strm.data_type=function(H){var ee,le=4093624447;for(ee=0;ee<=31;ee++,le>>>=1)if(1&le&&H.dyn_ltree[2*ee]!==0)return o;if(H.dyn_ltree[18]!==0||H.dyn_ltree[20]!==0||H.dyn_ltree[26]!==0)return i;for(ee=32;ee<l;ee++)if(H.dyn_ltree[2*ee]!==0)return i;return o}(v)),De(v,v.l_desc),De(v,v.d_desc),K=function(H){var ee;for(d(H,H.dyn_ltree,H.l_desc.max_code),d(H,H.dyn_dtree,H.d_desc.max_code),De(H,H.bl_desc),ee=m-1;3<=ee&&H.bl_tree[2*L[ee]+1]===0;ee--);return H.opt_len+=3*(ee+1)+5+5+4,ee}(v),T=v.opt_len+3+7>>>3,(W=v.static_len+3+7>>>3)<=T&&(T=W)):T=W=B+5,B+4<=T&&S!==-1?_(v,S,B,U):v.strategy===4||W===T?(G(v,2+(U?1:0),3),Oe(v,F,w)):(G(v,4+(U?1:0),3),function(H,ee,le,ae){var Ae;for(G(H,ee-257,5),G(H,le-1,5),G(H,ae-4,4),Ae=0;Ae<ae;Ae++)G(H,H.bl_tree[2*L[Ae]+1],3);D(H,H.dyn_ltree,ee-1),D(H,H.dyn_dtree,le-1)}(v,v.l_desc.max_code+1,v.d_desc.max_code+1,K+1),Oe(v,v.dyn_ltree,v.dyn_dtree)),ie(v),U&&ce(v)},r._tr_tally=function(v,S,B){return v.pending_buf[v.d_buf+2*v.last_lit]=S>>>8&255,v.pending_buf[v.d_buf+2*v.last_lit+1]=255&S,v.pending_buf[v.l_buf+v.last_lit]=255&B,v.last_lit++,S===0?v.dyn_ltree[2*B]++:(v.matches++,S--,v.dyn_ltree[2*(h[B]+l+1)]++,v.dyn_dtree[2*C(S)]++),v.last_lit===v.lit_bufsize-1},r._tr_align=function(v){G(v,2,3),J(v,x,F),function(S){S.bi_valid===16?(Q(S,S.bi_buf),S.bi_buf=0,S.bi_valid=0):8<=S.bi_valid&&(S.pending_buf[S.pending++]=255&S.bi_buf,S.bi_buf>>=8,S.bi_valid-=8)}(v)}},{"../utils/common":41}],53:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(n){(function(o,i){if(!o.setImmediate){var s,a,c,l,p=1,u={},m=!1,f=o.document,g=Object.getPrototypeOf&&Object.getPrototypeOf(o);g=g&&g.setTimeout?g:o,s={}.toString.call(o.process)==="[object process]"?function(I){process.nextTick(function(){b(I)})}:function(){if(o.postMessage&&!o.importScripts){var I=!0,k=o.onmessage;return o.onmessage=function(){I=!1},o.postMessage("","*"),o.onmessage=k,I}}()?(l="setImmediate$"+Math.random()+"$",o.addEventListener?o.addEventListener("message",x,!1):o.attachEvent("onmessage",x),function(I){o.postMessage(l+I,"*")}):o.MessageChannel?((c=new MessageChannel).port1.onmessage=function(I){b(I.data)},function(I){c.port2.postMessage(I)}):f&&("onreadystatechange"in f.createElement("script"))?(a=f.documentElement,function(I){var k=f.createElement("script");k.onreadystatechange=function(){b(I),k.onreadystatechange=null,a.removeChild(k),k=null},a.appendChild(k)}):function(I){setTimeout(b,0,I)},g.setImmediate=function(I){typeof I!="function"&&(I=Function(""+I));for(var k=Array(arguments.length-1),P=0;P<k.length;P++)k[P]=arguments[P+1];var R={callback:I,args:k};return u[p]=R,s(p),p++},g.clearImmediate=y}function y(I){delete u[I]}function b(I){if(m)setTimeout(b,0,I);else{var k=u[I];if(k){m=!0;try{(function(P){var{callback:R,args:j}=P;switch(j.length){case 0:R();break;case 1:R(j[0]);break;case 2:R(j[0],j[1]);break;case 3:R(j[0],j[1],j[2]);break;default:R.apply(i,j)}})(k)}finally{y(I),m=!1}}}}function x(I){I.source===o&&typeof I.data=="string"&&I.data.indexOf(l)===0&&b(+I.data.slice(l.length))}})(typeof self>"u"?n===void 0?this:n:self)}).call(this,typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})});var be=M(function(Yn,nu){var Lt=function(e){return e&&e.Math===Math&&e};nu.exports=Lt(typeof globalThis=="object"&&globalThis)||Lt(typeof window=="object"&&window)||Lt(typeof self=="object"&&self)||Lt(typeof global=="object"&&global)||Lt(typeof Yn=="object"&&Yn)||function(){return this}()||Function("return this")()});var Ke=M(function(d1,ou){ou.exports=function(e){try{return!!e()}catch(t){return!0}}});var Ye=M(function(f1,iu){var Gh=Ke();iu.exports=!Gh(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})});var _r=M(function(p1,su){var Kh=Ke();su.exports=!Kh(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var Ut=M(function(h1,au){var Yh=_r(),wr=Function.prototype.call;au.exports=Yh?wr.bind(wr):function(){return wr.apply(wr,arguments)}});var lu=M(function(Qh){var cu={}.propertyIsEnumerable,uu=Object.getOwnPropertyDescriptor,Xh=uu&&!cu.call({1:2},1);Qh.f=Xh?function(t){var r=uu(this,t);return!!r&&r.enumerable}:cu});var Xn=M(function(g1,du){du.exports=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}});var Se=M(function(y1,hu){var fu=_r(),pu=Function.prototype,Qn=pu.call,tm=fu&&pu.bind.bind(Qn,Qn);hu.exports=fu?tm:function(e){return function(){return Qn.apply(e,arguments)}}});var Mt=M(function(b1,gu){var mu=Se(),rm=mu({}.toString),nm=mu("".slice);gu.exports=function(e){return nm(rm(e),8,-1)}});var bu=M(function(v1,yu){var om=Se(),im=Ke(),sm=Mt(),eo=Object,am=om("".split);yu.exports=im(function(){return!eo("z").propertyIsEnumerable(0)})?function(e){return sm(e)==="String"?am(e,""):eo(e)}:eo});var xr=M(function(_1,vu){vu.exports=function(e){return e===null||e===void 0}});var to=M(function(w1,_u){var cm=xr(),um=TypeError;_u.exports=function(e){if(cm(e))throw new um("Can't call method on "+e);return e}});var kr=M(function(x1,wu){var lm=bu(),dm=to();wu.exports=function(e){return lm(dm(e))}});var Ze=M(function(k1,xu){var ro=typeof document=="object"&&document.all;xu.exports=typeof ro>"u"&&ro!==void 0?function(e){return typeof e=="function"||e===ro}:function(e){return typeof e=="function"}});var ht=M(function(z1,ku){var fm=Ze();ku.exports=function(e){return typeof e=="object"?e!==null:fm(e)}});var qt=M(function(I1,zu){var no=be(),pm=Ze(),hm=function(e){return pm(e)?e:void 0};zu.exports=function(e,t){return arguments.length<2?hm(no[e]):no[e]&&no[e][t]}});var oo=M(function(S1,Iu){var mm=Se();Iu.exports=mm({}.isPrototypeOf)});var $u=M(function(P1,Eu){var gm=be(),Su=gm.navigator,Pu=Su&&Su.userAgent;Eu.exports=Pu?String(Pu):""});var so=M(function(E1,Zu){var Au=be(),io=$u(),{process:Tu,Deno:Ru}=Au,Cu=Tu&&Tu.versions||Ru&&Ru.version,Ou=Cu&&Cu.v8,Be,zr;if(Ou)Be=Ou.split("."),zr=Be[0]>0&&Be[0]<4?1:+(Be[0]+Be[1]);if(!zr&&io){if(Be=io.match(/Edge\/(\d+)/),!Be||Be[1]>=74){if(Be=io.match(/Chrome\/(\d+)/),Be)zr=+Be[1]}}Zu.exports=zr});var ao=M(function($1,Du){var Nu=so(),ym=Ke(),bm=be(),vm=bm.String;Du.exports=!!Object.getOwnPropertySymbols&&!ym(function(){var e=Symbol("symbol detection");return!vm(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Nu&&Nu<41})});var co=M(function(T1,Fu){var _m=ao();Fu.exports=_m&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var uo=M(function(R1,Bu){var wm=qt(),xm=Ze(),km=oo(),zm=co(),Im=Object;Bu.exports=zm?function(e){return typeof e=="symbol"}:function(e){var t=wm("Symbol");return xm(t)&&km(t.prototype,Im(e))}});var Lu=M(function(C1,ju){var Sm=String;ju.exports=function(e){try{return Sm(e)}catch(t){return"Object"}}});var wt=M(function(O1,Uu){var Pm=Ze(),Em=Lu(),$m=TypeError;Uu.exports=function(e){if(Pm(e))return e;throw new $m(Em(e)+" is not a function")}});var lo=M(function(A1,Mu){var Tm=wt(),Rm=xr();Mu.exports=function(e,t){var r=e[t];return Rm(r)?void 0:Tm(r)}});var Vu=M(function(Z1,qu){var fo=Ut(),po=Ze(),ho=ht(),Cm=TypeError;qu.exports=function(e,t){var r,n;if(t==="string"&&po(r=e.toString)&&!ho(n=fo(r,e)))return n;if(po(r=e.valueOf)&&!ho(n=fo(r,e)))return n;if(t!=="string"&&po(r=e.toString)&&!ho(n=fo(r,e)))return n;throw new Cm("Can't convert object to primitive value")}});var Hu=M(function(N1,Wu){Wu.exports=!1});var Ir=M(function(D1,Gu){var Ju=be(),Om=Object.defineProperty;Gu.exports=function(e,t){try{Om(Ju,e,{value:t,configurable:!0,writable:!0})}catch(r){Ju[e]=t}return t}});var Sr=M(function(F1,Xu){var Am=Hu(),Zm=be(),Nm=Ir(),Ku="__core-js_shared__",Yu=Xu.exports=Zm[Ku]||Nm(Ku,{});(Yu.versions||(Yu.versions=[])).push({version:"3.50.0",mode:Am?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"})});var mo=M(function(B1,el){var Qu=Sr(),Dm=Object.create||Object;el.exports=function(e,t){return Qu[e]||(Qu[e]=t||Dm(null))}});var rl=M(function(j1,tl){var Fm=to(),Bm=Object;tl.exports=function(e){return Bm(Fm(e))}});var Me=M(function(L1,nl){var jm=Se(),Lm=rl(),Um=jm({}.hasOwnProperty);nl.exports=Object.hasOwn||function(t,r){return Um(Lm(t),r)}});var go=M(function(U1,ol){var Mm=Se(),qm=0,Vm=Math.random(),Wm=Mm(1.1 .toString);ol.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Wm(++qm+Vm,36)}});var mt=M(function(M1,sl){var Hm=be(),Jm=mo(),il=Me(),Gm=go(),Km=ao(),Ym=co(),xt=Hm.Symbol,yo=Jm("wks"),Xm=Ym?xt.for||xt:xt&&xt.withoutSetter||Gm;sl.exports=function(e){if(!il(yo,e))yo[e]=Km&&il(xt,e)?xt[e]:Xm("Symbol."+e);return yo[e]}});var ll=M(function(q1,ul){var Qm=Ut(),al=ht(),cl=uo(),eg=lo(),tg=Vu(),rg=mt(),ng=TypeError,og=rg("toPrimitive");ul.exports=function(e,t){if(!al(e)||cl(e))return e;var r=eg(e,og),n;if(r){if(t===void 0)t="default";if(n=Qm(r,e,t),!al(n)||cl(n))return n;throw new ng("Can't convert object to primitive value")}if(t===void 0)t="number";return tg(e,t)}});var bo=M(function(V1,dl){var ig=ll(),sg=uo();dl.exports=function(e){var t=ig(e,"string");return sg(t)?t:t+""}});var hl=M(function(W1,pl){var ag=be(),fl=ht(),vo=ag.document,cg=fl(vo)&&fl(vo.createElement);pl.exports=function(e){return cg?vo.createElement(e):{}}});var _o=M(function(H1,ml){var ug=Ye(),lg=Ke(),dg=hl();ml.exports=!ug&&!lg(function(){return Object.defineProperty(dg("div"),"a",{get:function(){return 7}}).a!==7})});var Pr=M(function(_g){var fg=Ye(),pg=Ut(),hg=lu(),mg=Xn(),gg=kr(),yg=bo(),bg=Me(),vg=_o(),gl=Object.getOwnPropertyDescriptor;_g.f=fg?gl:function(t,r){if(t=gg(t),r=yg(r),vg)try{return gl(t,r)}catch(n){}if(bg(t,r))return mg(!pg(hg.f,t,r),t[r])}});var bl=M(function(G1,yl){var xg=Ye(),kg=Ke();yl.exports=xg&&kg(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})});var Er=M(function(K1,vl){var zg=ht(),Ig=String,Sg=TypeError;vl.exports=function(e){if(zg(e))return e;throw new Sg(Ig(e)+" is not an object")}});var gt=M(function(Cg){var Pg=Ye(),Eg=_o(),$g=bl(),$r=Er(),_l=bo(),Tg=TypeError,{defineProperty:wo,getOwnPropertyDescriptor:Rg}=Object,xo="enumerable",ko="configurable",zo="writable";Cg.f=Pg?$g?function(t,r,n){if($r(t),r=_l(r),$r(n),typeof t==="function"&&r==="prototype"&&"value"in n&&zo in n&&!n[zo]){var o=Rg(t,r);if(o&&o[zo])t[r]=n.value,n={configurable:ko in n?n[ko]:o[ko],enumerable:xo in n?n[xo]:o[xo],writable:!1}}return wo(t,r,n)}:wo:function(t,r,n){if($r(t),r=_l(r),$r(n),Eg)try{return wo(t,r,n)}catch(o){}if("get"in n||"set"in n)throw new Tg("Accessors not supported");if("value"in n)t[r]=n.value;return t}});var Io=M(function(X1,wl){var Ag=Ye(),Zg=gt(),Ng=Xn();wl.exports=Ag?function(e,t,r){return Zg.f(e,t,Ng(1,r))}:function(e,t,r){return e[t]=r,e}});var zl=M(function(Q1,kl){var So=Ye(),Dg=Me(),xl=Function.prototype,Fg=So&&Object.getOwnPropertyDescriptor,Po=Dg(xl,"name"),Bg=Po&&function(){}.name==="something",jg=Po&&(!So||So&&Fg(xl,"name").configurable);kl.exports={EXISTS:Po,PROPER:Bg,CONFIGURABLE:jg}});var Sl=M(function(ek,Il){var Lg=Se(),Ug=Ze(),Eo=Sr(),Mg=Lg(Function.toString);if(!Ug(Eo.inspectSource))Eo.inspectSource=function(e){return Mg(e)};Il.exports=Eo.inspectSource});var $l=M(function(tk,El){var qg=be(),Vg=Ze(),Pl=qg.WeakMap;El.exports=Vg(Pl)&&/native code/.test(String(Pl))});var Cl=M(function(rk,Rl){var Wg=mo(),Hg=go(),Tl=Wg("keys");Rl.exports=function(e){return Tl[e]||(Tl[e]=Hg(e))}});var $o=M(function(nk,Ol){Ol.exports={}});var Oo=M(function(ok,Nl){var Jg=$l(),Zl=be(),Gg=ht(),Kg=Io(),To=Me(),Ro=Sr(),Yg=Cl(),Xg=$o(),Al="Object already initialized",{TypeError:Co,WeakMap:Qg}=Zl,Tr,Vt,Rr,ey=function(e){return Rr(e)?Vt(e):Tr(e,{})},ty=function(e){return function(t){var r;if(!Gg(t)||(r=Vt(t)).type!==e)throw new Co("Incompatible receiver, "+e+" required");return r}};if(Jg||Ro.state)Ne=Ro.state||(Ro.state=new Qg),Ne.get=Ne.get,Ne.has=Ne.has,Ne.set=Ne.set,Tr=function(e,t){if(Ne.has(e))throw new Co(Al);return t.facade=e,Ne.set(e,t),t},Vt=function(e){return Ne.get(e)||{}},Rr=function(e){return Ne.has(e)};else nt=Yg("state"),Xg[nt]=!0,Tr=function(e,t){if(To(e,nt))throw new Co(Al);return t.facade=e,Kg(e,nt,t),t},Vt=function(e){return To(e,nt)?e[nt]:{}},Rr=function(e){return To(e,nt)};var Ne,nt;Nl.exports={set:Tr,get:Vt,has:Rr,enforce:ey,getterFor:ty}});var No=M(function(ik,Bl){var Zo=Se(),ry=Ke(),ny=Ze(),Cr=Me(),Ao=Ye(),oy=zl().CONFIGURABLE,iy=Sl(),Fl=Oo(),{enforce:sy,get:ay}=Fl,Dl=String,Or=Object.defineProperty,cy=Zo("".slice),uy=Zo("".replace),ly=Zo([].join),dy=Ao&&!ry(function(){return Or(function(){},"length",{value:8}).length!==8}),fy=String(String).split("String"),py=Bl.exports=function(e,t,r){if(cy(Dl(t),0,7)==="Symbol(")t="["+uy(Dl(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]";if(r&&r.getter)t="get "+t;if(r&&r.setter)t="set "+t;if(!Cr(e,"name")||oy&&e.name!==t)if(Ao)Or(e,"name",{value:t,configurable:!0});else e.name=t;if(dy&&r&&Cr(r,"arity")&&e.length!==r.arity)Or(e,"length",{value:r.arity});try{if(r&&Cr(r,"constructor")&&r.constructor){if(Ao)Or(e,"prototype",{writable:!1})}else if(e.prototype)e.prototype=void 0}catch(o){}var n=sy(e);if(!Cr(n,"source"))n.source=ly(fy,typeof t=="string"?t:"");return e};Function.prototype.toString=py(function(){return ny(this)&&ay(this).source||iy(this)},"toString")});var Ar=M(function(sk,jl){var hy=Ze(),my=gt(),gy=No(),yy=Ir();jl.exports=function(e,t,r,n){if(!n)n={};var o=n.enumerable,i=n.name!==void 0?n.name:t;if(hy(r))gy(r,i,n);if(n.global)if(o)e[t]=r;else yy(t,r);else{try{if(!n.unsafe)delete e[t];else if(e[t])o=!0}catch(s){}if(o)e[t]=r;else my.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}});var Ul=M(function(ak,Ll){var{ceil:by,floor:vy}=Math;Ll.exports=Math.trunc||function(t){var r=+t;return(r>0?vy:by)(r)}});var Do=M(function(ck,Ml){var _y=Ul();Ml.exports=function(e){var t=+e;return t!==t||t===0?0:_y(t)}});var Vl=M(function(uk,ql){var wy=Do(),{max:xy,min:ky}=Math;ql.exports=function(e,t){var r=wy(e);return r<0?xy(r+t,0):ky(r,t)}});var Hl=M(function(lk,Wl){var zy=Do(),Iy=Math.min;Wl.exports=function(e){var t=zy(e);return t>0?Iy(t,9007199254740991):0}});var Fo=M(function(dk,Jl){var Sy=Hl();Jl.exports=function(e){return Sy(e.length)}});var Yl=M(function(fk,Kl){var Py=kr(),Ey=Vl(),$y=Fo(),Gl=function(e){return function(t,r,n){var o=Py(t),i=$y(o);if(i===0)return!e&&-1;var s=Ey(n,i),a;if(e&&r!==r){while(i>s)if(a=o[s++],a!==a)return!0}else for(;i>s;s++)if((e||(s in o))&&o[s]===r)return e||s||0;return!e&&-1}};Kl.exports={includes:Gl(!0),indexOf:Gl(!1)}});var ed=M(function(pk,Ql){var Ty=Se(),Bo=Me(),Ry=kr(),Cy=Yl().indexOf,Oy=$o(),Xl=Ty([].push);Ql.exports=function(e,t){var r=Ry(e),n=0,o=[],i;for(i in r)!Bo(Oy,i)&&Bo(r,i)&&Xl(o,i);while(t.length>n)if(Bo(r,i=t[n++]))~Cy(o,i)||Xl(o,i);return o}});var rd=M(function(hk,td){td.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var nd=M(function(Dy){var Ay=ed(),Zy=rd(),Ny=Zy.concat("length","prototype");Dy.f=Object.getOwnPropertyNames||function(t){return Ay(t,Ny)}});var od=M(function(By){By.f=Object.getOwnPropertySymbols});var sd=M(function(yk,id){var Ly=qt(),Uy=Se(),My=nd(),qy=od(),Vy=Er(),Wy=Uy([].concat);id.exports=Ly("Reflect","ownKeys")||function(t){var r=My.f(Vy(t)),n=qy.f;return n?Wy(r,n(t)):r}});var ud=M(function(bk,cd){var ad=Me(),Hy=sd(),Jy=Pr(),Gy=gt();cd.exports=function(e,t,r){var n=Hy(t),o=Gy.f,i=Jy.f;for(var s=0;s<n.length;s++){var a=n[s];if(!ad(e,a)&&!(r&&ad(r,a)))o(e,a,i(t,a))}}});var dd=M(function(vk,ld){var Ky=Ke(),Yy=Ze(),Xy=/#|\.prototype\./,Wt=function(e,t){var r=eb[Qy(e)];return r===rb?!0:r===tb?!1:Yy(t)?Ky(t):!!t},Qy=Wt.normalize=function(e){return String(e).replace(Xy,".").toLowerCase()},eb=Wt.data={},tb=Wt.NATIVE="N",rb=Wt.POLYFILL="P";ld.exports=Wt});var kt=M(function(_k,fd){var Zr=be(),nb=Pr().f,ob=Io(),ib=Ar(),sb=Ir(),ab=ud(),cb=dd();fd.exports=function(e,t){var{target:r,global:n,stat:o}=e,i,s,a,c,l,p;if(n)s=Zr;else if(o)s=Zr[r]||sb(r,{});else s=Zr[r]&&Zr[r].prototype;if(s)for(a in t){if(l=t[a],e.dontCallGetSet)p=nb(s,a),c=p&&p.value;else c=s[a];if(i=cb(n?a:r+(o?".":"#")+a,e.forced),!i&&c!==void 0){if(typeof l==typeof c)continue;ab(l,c)}if(e.sham||c&&c.sham)ob(l,"sham",!0);ib(s,a,l,e)}}});var hd=M(function(wk,pd){var ub=oo(),lb=TypeError;pd.exports=function(e,t){if(ub(t,e))return e;throw new lb("Incorrect invocation")}});var gd=M(function(xk,md){var db=Ar();md.exports=function(e,t,r){for(var n in t)db(e,n,t[n],r);return e}});var vd=M(function(kk,bd){var yd=No(),fb=gt();bd.exports=function(e,t,r){if(r.get)yd(r.get,t,{getter:!0});if(r.set)yd(r.set,t,{setter:!0});return fb.f(e,t,r)}});var wd=M(function(zk,_d){var pb=Mt(),hb=Se();_d.exports=function(e){if(pb(e)==="Function")return hb(e)}});var zd=M(function(Ik,kd){var xd=wd(),mb=wt(),gb=_r(),yb=xd(xd.bind);kd.exports=function(e,t){return mb(e),t===void 0?e:gb?yb(e,t):function(){return e.apply(t,arguments)}}});var Td=M(function(Sk,$d){var bb=qt(),vb=Ut(),_b=Se(),wb=zd(),xb=Er(),kb=wt(),Pd=xr(),jo=lo(),Ed=mt(),zb=Ed("asyncDispose"),Id=Ed("dispose"),Ib=_b([].push),Sb=function(e,t){if(t==="async-dispose"){var r=jo(e,zb);if(r!==void 0)return r;if(r=jo(e,Id),r===void 0)return r;return function(){var n=this,o=bb("Promise");return new o(function(i){vb(r,n),i(void 0)})}}return jo(e,Id)},Sd=function(e,t,r){if(arguments.length<3&&!Pd(e))r=kb(Sb(xb(e),t));return r===void 0?function(){return}:wb(r,e)};$d.exports=function(e,t,r,n){var o;if(arguments.length<4){if(Pd(t)&&r==="sync-dispose")return;o=Sd(t,r)}else o=Sd(void 0,r,n);Ib(e.stack,o)}});var Fd=M(function(){var Pb=kt(),Dr=Ye(),Ad=qt(),Rd=wt(),Eb=hd(),Zd=Ar(),$b=gd(),Tb=vd(),Nd=mt(),Dd=Oo(),Lo=Td(),Cd=so(),Od=Ad("Promise"),Rb=Ad("SuppressedError"),Cb=ReferenceError,Ob=Nd("asyncDispose"),Ab=Nd("toStringTag"),Br="AsyncDisposableStack",Zb=Dd.set,Fr=Dd.getterFor(Br),Uo="async-dispose",Ht="disposed",Nb="pending",Nr=function(e){var t=Fr(e);if(t.state===Ht)throw new Cb(Br+" already disposed");return t},Mo=function(){if(Zb(Eb(this,zt),{type:Br,state:Nb,stack:[]}),!Dr)this.disposed=!1},zt=Mo.prototype;$b(zt,{disposeAsync:function(){var t=this;return new Od(function(r,n){var o=Fr(t);if(o.state===Ht)return r(void 0);if(o.state=Ht,!Dr)t.disposed=!0;var i=o.stack,s=i.length,a=!1,c,l=function(u){if(a)c=new Rb(u,c);else a=!0,c=u;p()},p=function(){if(s){var u=i[--s];i[s]=null;try{Od.resolve(u()).then(p,l)}catch(m){l(m)}}else o.stack=null,a?n(c):r(void 0)};p()})},use:function(t){return Lo(Nr(this),t,Uo),t},adopt:function(t,r){var n=Nr(this);return Rd(r),Lo(n,void 0,Uo,function(){return r(t)}),t},defer:function(t){var r=Nr(this);Rd(t),Lo(r,void 0,Uo,t)},move:function(){var t=Nr(this),r=new Mo;if(Fr(r).stack=t.stack,t.stack=[],t.state=Ht,!Dr)this.disposed=!0;return r}});if(Dr)Tb(zt,"disposed",{configurable:!0,get:function(){return Fr(this).state===Ht}});Zd(zt,Ob,zt.disposeAsync,{name:"disposeAsync"});Zd(zt,Ab,Br,{nonWritable:!0});var Db=Cd&&Cd<136;Pb({global:!0,constructor:!0,forced:Db},{AsyncDisposableStack:Mo})});var jd=M(function($k,Bd){var Fb=be();Bd.exports=Fb});var Ld=M(function(jb){var Bb=mt();jb.f=Bb});var qd=M(function(Rk,Md){var Ud=jd(),Ub=Me(),Mb=Ld(),qb=gt().f;Md.exports=function(e){var t=Ud.Symbol||(Ud.Symbol={});if(!Ub(t,e))qb(t,e,{value:Mb.f(e)})}});var Vd=M(function(){var Vb=be(),Wb=qd(),Hb=gt().f,Jb=Pr().f,qo=Vb.Symbol;Wb("asyncDispose");if(qo){if(It=Jb(qo,"asyncDispose"),It.enumerable&&It.configurable&&It.writable)Hb(qo,"asyncDispose",{value:It.value,enumerable:!1,configurable:!1,writable:!1})}var It});var Hd=M(function(Ak,Wd){var Gb=Fo();Wd.exports=function(e,t,r){var n=0,o=arguments.length>2?r:Gb(t),i=new e(o);while(o>n)i[n]=t[n++];return i}});var Vo=M(function(Zk,Jd){var Kb=ht(),Yb=String,Xb=TypeError;Jd.exports=function(e){if(e===void 0||Kb(e))return e;throw new Xb(Yb(e)+" is not an object or undefined")}});var Wo=M(function(Nk,Gd){var Qb=TypeError;Gd.exports=function(e){if(typeof e=="string")return e;throw new Qb("Argument is not a string")}});var Ho=M(function(Dk,ef){var Qd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Kd=Qd+"+/",Yd=Qd+"-_",Xd=function(e){var t={},r=0;for(;r<64;r++)t[e.charAt(r)]=r;return t};ef.exports={i2c:Kd,c2i:Xd(Kd),i2cUrl:Yd,c2iUrl:Xd(Yd)}});var Jo=M(function(Fk,tf){var ev=TypeError;tf.exports=function(e){var t=e&&e.alphabet;if(t===void 0||t==="base64"||t==="base64url")return t||"base64";throw new ev("Incorrect `alphabet` option")}});var nf=M(function(Bk,rf){rf.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"});var sf=M(function(jk,of){var tv=Se(),rv=wt();of.exports=function(e,t,r){try{return tv(rv(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(n){}}});var lf=M(function(Lk,uf){var cf=be(),nv=sf(),ov=Mt(),{ArrayBuffer:af,TypeError:iv}=cf;uf.exports=af&&nv(af.prototype,"byteLength","get")||function(e){if(ov(e)!=="ArrayBuffer")throw new iv("ArrayBuffer expected");return e.byteLength}});var ff=M(function(Uk,df){var sv=be(),av=nf(),cv=lf(),uv=sv.DataView;df.exports=function(e){if(!av||cv(e)!==0)return!1;try{return new uv(e),!1}catch(t){return!0}}});var jr=M(function(Mk,pf){var lv=ff(),dv=TypeError;pf.exports=function(e){if(lv(e))throw new dv("ArrayBuffer is detached");return e}});var gf=M(function(qk,mf){var Xo=be(),fv=Se(),pv=Vo(),hv=Wo(),mv=Me(),hf=Ho(),gv=Jo(),yv=jr(),{c2i:bv,c2iUrl:vv}=hf,{SyntaxError:ot,TypeError:_v,Array:wv}=Xo,yt=fv("".charAt),xv=Math.floor,Go=function(e,t){var r=e.length;for(;t<r;t++){var n=yt(e,t);if(n!==" "&&n!=="\t"&&n!==`
13
+ `&&n!=="\f"&&n!=="\r")break}return t},Ko=function(e,t,r){var n=e.length;if(n<4)e+=n===2?"AA":"A";var o=(t[yt(e,0)]<<18)+(t[yt(e,1)]<<12)+(t[yt(e,2)]<<6)+t[yt(e,3)],i=[o>>16&255,o>>8&255,o&255];if(n===2){if(r&&i[1]!==0)throw new ot("Extra bits");return[i[0]]}if(n===3){if(r&&i[2]!==0)throw new ot("Extra bits");return[i[0],i[1]]}return i},Yo=function(e,t,r){var n=t.length;for(var o=0;o<n;o++)e[r+o]=t[o];return r+n};mf.exports=function(e,t,r,n){hv(e),pv(t);var o=gv(t)==="base64"?bv:vv,i=t?t.lastChunkHandling:void 0;if(i===void 0)i="loose";if(i!=="loose"&&i!=="strict"&&i!=="stop-before-partial")throw new _v("Incorrect `lastChunkHandling` option");if(r)yv(r.buffer);var s=e.length,a=r||wv(xv(s*3/4)),c=0,l=0,p="",u=0;if(n)while(!0){if(u=Go(e,u),u===s){if(p.length>0){if(i==="stop-before-partial")break;if(i==="loose"){if(p.length===1)throw new ot("Malformed padding: exactly one additional character");c=Yo(a,Ko(p,o,!1),c)}else throw new ot("Missing padding")}l=s;break}var m=yt(e,u);if(++u,m==="="){if(p.length<2)throw new ot("Padding is too early");if(u=Go(e,u),p.length===2){if(u===s){if(i==="stop-before-partial")break;throw new ot("Malformed padding: only one =")}if(yt(e,u)==="=")++u,u=Go(e,u)}if(u<s)throw new ot("Unexpected character after padding");c=Yo(a,Ko(p,o,i==="strict"),c),l=s;break}if(!mv(o,m))throw new ot("Unexpected character");var f=n-c;if(f===1&&p.length===2||f===2&&p.length===3)break;if(p+=m,p.length===4){if(c=Yo(a,Ko(p,o,!1),c),p="",l=u,c===n)break}}if(!r)a.length=c;return{bytes:a,read:l,written:c}}});var yf=M(function(){var kv=kt(),zv=be(),Iv=Hd(),Sv=gf(),St=zv.Uint8Array,Pv=!St||!St.fromBase64||!function(){try{St.fromBase64("a");return}catch(e){}try{St.fromBase64("",null)}catch(e){return!0}}();if(St)kv({target:"Uint8Array",stat:!0,forced:Pv},{fromBase64:function(t){var r=Sv(t,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return Iv(St,r.bytes)}})});var wf=M(function(Hk,_f){var vf=be(),Ev=Se(),{Uint8Array:$v,SyntaxError:bf}=vf,Tv=Math.min,Rv=Ev("".match);_f.exports=function(e,t){var r=e.length;if(r%2!==0)throw new bf("String should be an even number of characters");var n=t?Tv(t.length,r/2):r/2,o=t||new $v(n),i=Rv(e,/[\S\s]{2}/g),s=0;for(;s<n;s++){var a=+("0x"+i[s]+"0");if(a!==a)throw new bf("String should only contain hex characters");o[s]=a>>4}return{bytes:o,read:s<<1}}});var xf=M(function(){var Cv=kt(),Ov=be(),Av=Wo(),Zv=wf();if(Ov.Uint8Array)Cv({target:"Uint8Array",stat:!0},{fromHex:function(t){return Zv(Av(t)).bytes}})});var If=M(function(Kk,zf){var Nv=mt(),Dv=Nv("toStringTag"),kf={};kf[Dv]="z";zf.exports=String(kf)==="[object z]"});var Pf=M(function(Yk,Sf){var Fv=If(),Bv=Ze(),Lr=Mt(),jv=mt(),Lv=jv("toStringTag"),Uv=Object,Mv=Lr(function(){return arguments}())==="Arguments",qv=function(e,t){try{return e[t]}catch(r){}};Sf.exports=Fv?Lr:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=qv(t=Uv(e),Lv))=="string"?r:Mv?Lr(t):(n=Lr(t))==="Object"&&Bv(t.callee)?"Arguments":n}});var Qo=M(function(Xk,Ef){var Vv=Pf(),Wv=TypeError;Ef.exports=function(e){if(Vv(e)==="Uint8Array")return e;throw new Wv("Argument is not an Uint8Array")}});var Cf=M(function(){var Hv=kt(),$f=be(),Tf=Se(),Jv=Vo(),Gv=Qo(),Kv=jr(),Rf=Ho(),Yv=Jo(),{i2c:Xv,i2cUrl:Qv}=Rf,{floor:e_,ceil:t_}=Math,r_=Tf("".charAt),{Uint8Array:Ur,Array:n_}=$f,o_=Tf([].join),i_=!Ur||!Ur.prototype.toBase64||!function(){try{var e=new Ur;e.toBase64(null)}catch(t){return!0}}();if(Ur)Hv({target:"Uint8Array",proto:!0,forced:i_},{toBase64:function(){var t=Gv(this),r=arguments.length?Jv(arguments[0]):void 0,n=Yv(r)==="base64"?Xv:Qv,o=!!r&&!!r.omitPadding;Kv(this.buffer);var i=0,s=t.length,a=n_(o?e_(s/3)*4+(s%3?s%3+1:0):t_(s/3)*4),c=0,l,p=function(u){return r_(n,l>>6*u&63)};for(;i+2<s;i+=3)l=(t[i]<<16)+(t[i+1]<<8)+t[i+2],a[c++]=p(3),a[c++]=p(2),a[c++]=p(1),a[c++]=p(0);if(i+2===s){if(l=(t[i]<<16)+(t[i+1]<<8),a[c++]=p(3),a[c++]=p(2),a[c++]=p(1),!o)a[c++]="="}else if(i+1===s){if(l=t[i]<<16,a[c++]=p(3),a[c++]=p(2),!o)a[c++]="=",a[c++]="="}return o_(a,"")}})});var Af=M(function(){var s_=kt(),a_=be(),Of=Se(),c_=Qo(),u_=jr(),l_=Of(1.1 .toString),d_=Of([].join),f_=Array,Mr=a_.Uint8Array,p_=!Mr||!Mr.prototype.toHex||!function(){try{var e=new Mr([255,255,255,255,255,255,255,255]);return e.toHex()==="ffffffffffffffff"}catch(t){return!1}}();if(Mr)s_({target:"Uint8Array",proto:!0,forced:p_},{toHex:function(){c_(this),u_(this.buffer);var t=f_(this.length);for(var r=0,n=this.length;r<n;r++){var o=l_(this[r],16);t[r]=o.length===1?"0"+o:o}return d_(t,"")}})});var Nf=M(function(ei){/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */var Zf;(function(e){if(typeof DO_NOT_EXPORT_CRC>"u")if(typeof ei==="object")e(ei);else if(typeof define==="function"&&define.amd)define(function(){var t={};return e(t),t});else e(Zf={});else e(Zf={})})(function(e){e.version="1.2.2";function t(){var z=0,L=Array(256);for(var F=0;F!=256;++F)z=F,z=z&1?-2097792136^z>>>1:z>>>1,z=z&1?-2097792136^z>>>1:z>>>1,z=z&1?-2097792136^z>>>1:z>>>1,z=z&1?-2097792136^z>>>1:z>>>1,z=z&1?-2097792136^z>>>1:z>>>1,z=z&1?-2097792136^z>>>1:z>>>1,z=z&1?-2097792136^z>>>1:z>>>1,z=z&1?-2097792136^z>>>1:z>>>1,L[F]=z;return typeof Int32Array<"u"?new Int32Array(L):L}var r=t();function n(z){var L=0,F=0,w=0,E=typeof Int32Array<"u"?new Int32Array(4096):Array(4096);for(w=0;w!=256;++w)E[w]=z[w];for(w=0;w!=256;++w){F=z[w];for(L=256+w;L<4096;L+=256)F=E[L]=F>>>8^z[F&255]}var h=[];for(w=1;w!=16;++w)h[w-1]=typeof Int32Array<"u"?E.subarray(w*256,w*256+256):E.slice(w*256,w*256+256);return h}var o=n(r),i=o[0],s=o[1],a=o[2],c=o[3],l=o[4],p=o[5],u=o[6],m=o[7],f=o[8],g=o[9],y=o[10],b=o[11],x=o[12],I=o[13],k=o[14];function P(z,L){var F=L^-1;for(var w=0,E=z.length;w<E;)F=F>>>8^r[(F^z.charCodeAt(w++))&255];return~F}function R(z,L){var F=L^-1,w=z.length-15,E=0;for(;E<w;)F=k[z[E++]^F&255]^I[z[E++]^F>>8&255]^x[z[E++]^F>>16&255]^b[z[E++]^F>>>24]^y[z[E++]]^g[z[E++]]^f[z[E++]]^m[z[E++]]^u[z[E++]]^p[z[E++]]^l[z[E++]]^c[z[E++]]^a[z[E++]]^s[z[E++]]^i[z[E++]]^r[z[E++]];w+=15;while(E<w)F=F>>>8^r[(F^z[E++])&255];return~F}function j(z,L){var F=L^-1;for(var w=0,E=z.length,h=0,N=0;w<E;)if(h=z.charCodeAt(w++),h<128)F=F>>>8^r[(F^h)&255];else if(h<2048)F=F>>>8^r[(F^(192|h>>6&31))&255],F=F>>>8^r[(F^(128|h&63))&255];else if(h>=55296&&h<57344)h=(h&1023)+64,N=z.charCodeAt(w++)&1023,F=F>>>8^r[(F^(240|h>>8&7))&255],F=F>>>8^r[(F^(128|h>>2&63))&255],F=F>>>8^r[(F^(128|N>>6&15|(h&3)<<4))&255],F=F>>>8^r[(F^(128|N&63))&255];else F=F>>>8^r[(F^(224|h>>12&15))&255],F=F>>>8^r[(F^(128|h>>6&63))&255],F=F>>>8^r[(F^(128|h&63))&255];return~F}e.table=r,e.bstr=P,e.buf=R,e.str=j})});var ai=Xe(fi(),1);var Pp=new Uint8Array(16);function cn(){return crypto.getRandomValues(Pp)}var ze=[];for(let e=0;e<256;++e)ze.push((e+256).toString(16).slice(1));function pi(e,t=0){return(ze[e[t+0]]+ze[e[t+1]]+ze[e[t+2]]+ze[e[t+3]]+"-"+ze[e[t+4]]+ze[e[t+5]]+"-"+ze[e[t+6]]+ze[e[t+7]]+"-"+ze[e[t+8]]+ze[e[t+9]]+"-"+ze[e[t+10]]+ze[e[t+11]]+ze[e[t+12]]+ze[e[t+13]]+ze[e[t+14]]+ze[e[t+15]]).toLowerCase()}function Ep(e,t,r){if(!t&&!e&&crypto.randomUUID)return crypto.randomUUID();return $p(e,t,r)}function $p(e,t,r){e=e||{};let n=e.random??e.rng?.()??cn();if(n.length<16)throw Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return pi(n)}var at=Ep;var hi;function Z(e,t,r){function n(a,c){if(!a._zod)Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:!1});if(a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let l=s.prototype,p=Object.keys(l);for(let u=0;u<p.length;u++){let m=p[u];if(!(m in a))a[m]=l[m].bind(a)}}let o=r?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let l=r?.Parent?new i:this;n(l,a),(c=l._zod).deferred??(c.deferred=[]);for(let p of l._zod.deferred)p();return l}return Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:(a)=>{if(r?.Parent&&a instanceof r.Parent)return!0;return a?._zod?.traits?.has(e)}}),Object.defineProperty(s,"name",{value:e}),s}var Uw=Symbol("zod_brand");class Je extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Tt extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}(hi=globalThis).__zod_globalConfig??(hi.__zod_globalConfig={});var bt=globalThis.__zod_globalConfig;function Te(e){if(e)Object.assign(bt,e);return bt}function Qt(e){let t=Object.values(e).filter((n)=>typeof n==="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}function ln(e,t="|"){return e.map((r)=>hn(r)).join(t)}function Ct(e,t){if(typeof t==="bigint")return t.toString();return t}function er(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw Error("cached value already set")}}}function tr(e){return e===null||e===void 0}function rr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function gi(e,t){let r=e/t,n=Math.round(r),o=Number.EPSILON*Math.max(Math.abs(r),1);if(Math.abs(r-n)<o)return 0;return r-n}var mi=Symbol("evaluating");function ue(e,t,r){let n=void 0;Object.defineProperty(e,t,{get(){if(n===mi)return;if(n===void 0)n=mi,n=r();return n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ct(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Qe(...e){let t={};for(let r of e){let n=Object.getOwnPropertyDescriptors(r);Object.assign(t,n)}return Object.defineProperties({},t)}function dn(e){return JSON.stringify(e)}function yi(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var fn="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Rt(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var bi=er(()=>{if(bt.jitless)return!1;if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function ut(e){if(Rt(e)===!1)return!1;let t=e.constructor;if(t===void 0)return!0;if(typeof t!=="function")return!0;let r=t.prototype;if(Rt(r)===!1)return!1;if(Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)return!1;return!0}function pn(e){if(ut(e))return{...e};if(Array.isArray(e))return[...e];if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);return e}var vi=new Set(["string","number","symbol"]);function et(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Le(e,t,r){let n=new e._zod.constr(t??e._zod.def);if(!t||r?.parent)n._zod.parent=e;return n}function X(e){let t=e;if(!t)return{};if(typeof t==="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}if(delete t.message,typeof t.error==="string")return{...t,error:()=>t.error};return t}function hn(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function _i(e){return Object.keys(e).filter((t)=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var wi={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Tp(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i=Qe(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;s[a]=r.shape[a]}return ct(this,"shape",s),s},checks:[]});return Le(e,i)}function Rp(e,t){let r=e._zod.def,n=r.checks;if(n&&n.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=Qe(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in r.shape))throw Error(`Unrecognized key: "${a}"`);if(!t[a])continue;delete s[a]}return ct(this,"shape",s),s},checks:[]});return Le(e,i)}function Cp(e,t){if(!ut(t))throw Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=Qe(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return ct(this,"shape",i),i}});return Le(e,o)}function Op(e,t){if(!ut(t))throw Error("Invalid input to safeExtend: expected a plain object");let r=Qe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return ct(this,"shape",n),n}});return Le(e,r)}function Ap(e,t){if(e._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r=Qe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return ct(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Le(e,r)}function Zp(e,t,r){let o=t._zod.def.checks;if(o&&o.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let s=Qe(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(r)for(let l in r){if(!(l in a))throw Error(`Unrecognized key: "${l}"`);if(!r[l])continue;c[l]=e?new e({type:"optional",innerType:a[l]}):a[l]}else for(let l in a)c[l]=e?new e({type:"optional",innerType:a[l]}):a[l];return ct(this,"shape",c),c},checks:[]});return Le(t,s)}function Np(e,t,r){let n=Qe(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(r)for(let s in r){if(!(s in i))throw Error(`Unrecognized key: "${s}"`);if(!r[s])continue;i[s]=new e({type:"nonoptional",innerType:o[s]})}else for(let s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return ct(this,"shape",i),i}});return Le(t,n)}function lt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function xi(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function tt(e,t){return t.map((r)=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}function Xt(e){return typeof e==="string"?e:e?.message}function Fe(e,t,r){let n=e.message?e.message:Xt(e.inst?._zod.def?.error?.(e))??Xt(t?.error?.(e))??Xt(r.customError?.(e))??Xt(r.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:s,...a}=e;if(a.path??(a.path=[]),a.message=n,t?.reportInput)a.input=s;return a}function nr(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function ki(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function dt(...e){let[t,r,n]=e;if(typeof t==="string")return{message:t,code:"custom",input:r,inst:n};return{...t}}var zi=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Ct,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},or=Z("$ZodError",zi),mn=Z("$ZodError",zi,{Parent:Error});function Ii(e,t=(r)=>r.message){let r={},n=[];for(let o of e.issues)if(o.path.length>0)r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o));else n.push(t(o));return{formErrors:n,fieldErrors:r}}function Si(e,t=(r)=>r.message){let r={_errors:[]},n=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map((a)=>n({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")n({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")n({issues:s.issues},[...i,...s.path]);else{let a=[...i,...s.path];if(a.length===0)r._errors.push(t(s));else{let c=r,l=0;while(l<a.length){let p=a[l];if(l!==a.length-1)c[p]=c[p]||{_errors:[]};else c[p]=c[p]||{_errors:[]},c[p]._errors.push(t(s));c=c[p],l++}}}};return n(e),r}var ir=(e)=>(t,r,n,o)=>{let i=n?{...n,async:!1}:{async:!1},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)throw new Je;if(s.issues.length){let a=new(o?.Err??e)(s.issues.map((c)=>Fe(c,i,Te())));throw fn(a,o?.callee),a}return s.value};var sr=(e)=>async(t,r,n,o)=>{let i=n?{...n,async:!0}:{async:!0},s=t._zod.run({value:r,issues:[]},i);if(s instanceof Promise)s=await s;if(s.issues.length){let a=new(o?.Err??e)(s.issues.map((c)=>Fe(c,i,Te())));throw fn(a,o?.callee),a}return s.value};var Ot=(e)=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)throw new Je;return i.issues.length?{success:!1,error:new(e??or)(i.issues.map((s)=>Fe(s,o,Te())))}:{success:!0,data:i.value}},Pi=Ot(mn),At=(e)=>async(t,r,n)=>{let o=n?{...n,async:!0}:{async:!0},i=t._zod.run({value:r,issues:[]},o);if(i instanceof Promise)i=await i;return i.issues.length?{success:!1,error:new e(i.issues.map((s)=>Fe(s,o,Te())))}:{success:!0,data:i.value}},Ei=At(mn),$i=(e)=>(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return ir(e)(t,r,o)};var Ti=(e)=>(t,r,n)=>ir(e)(t,r,n);var Ri=(e)=>async(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return sr(e)(t,r,o)};var Ci=(e)=>async(t,r,n)=>sr(e)(t,r,n);var Oi=(e)=>(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return Ot(e)(t,r,o)};var Ai=(e)=>(t,r,n)=>Ot(e)(t,r,n);var Zi=(e)=>async(t,r,n)=>{let o=n?{...n,direction:"backward"}:{direction:"backward"};return At(e)(t,r,o)};var Ni=(e)=>async(t,r,n)=>At(e)(t,r,n);var Di=/^[cC][0-9a-z]{6,}$/,Fi=/^[0-9a-z]+$/,Bi=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ji=/^[0-9a-vA-V]{20}$/,Li=/^[A-Za-z0-9]{27}$/,Ui=/^[a-zA-Z0-9_-]{21}$/,Mi=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;var qi=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,gn=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)};var Vi=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;var Fp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Wi(){return new RegExp(Fp,"u")}var Hi=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ji=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;var Gi=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ki=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yi=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,yn=/^[A-Za-z0-9_-]*$/;var Xi=/^https?$/,Qi=/^\+[1-9]\d{6,14}$/,es="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ts=new RegExp(`^${es}$`);function rs(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function ns(e){return new RegExp(`^${rs(e)}$`)}function os(e){let t=rs({precision:e.precision}),r=["Z"];if(e.local)r.push("");if(e.offset)r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let n=`${t}(?:${r.join("|")})`;return new RegExp(`^${es}T(?:${n})$`)}var is=(e)=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)};var ss=/^-?\d+$/,bn=/^-?\d+(?:\.\d+)?$/,as=/^(?:true|false)$/i;var cs=/^[^A-Z]*$/,us=/^[^a-z]*$/;var Ie=Z("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),ls={number:"number",bigint:"bigint",object:"date"},vn=Z("$ZodCheckLessThan",(e,t)=>{Ie.init(e,t);let r=ls[typeof t.value];e._zod.onattach.push((n)=>{let o=n._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(t.value<i)if(t.inclusive)o.maximum=t.value;else o.exclusiveMaximum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value<=t.value:n.value<t.value)return;n.issues.push({origin:r,code:"too_big",maximum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),_n=Z("$ZodCheckGreaterThan",(e,t)=>{Ie.init(e,t);let r=ls[typeof t.value];e._zod.onattach.push((n)=>{let o=n._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(t.value>i)if(t.inclusive)o.minimum=t.value;else o.exclusiveMinimum=t.value}),e._zod.check=(n)=>{if(t.inclusive?n.value>=t.value:n.value>t.value)return;n.issues.push({origin:r,code:"too_small",minimum:typeof t.value==="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ds=Z("$ZodCheckMultipleOf",(e,t)=>{Ie.init(e,t),e._zod.onattach.push((r)=>{var n;(n=r._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=(r)=>{if(typeof r.value!==typeof t.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof r.value==="bigint"?r.value%t.value===BigInt(0):gi(r.value,t.value)===0)return;r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),fs=Z("$ZodCheckNumberFormat",(e,t)=>{Ie.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,i]=wi[t.format];e._zod.onattach.push((s)=>{let a=s._zod.bag;if(a.format=t.format,a.minimum=o,a.maximum=i,r)a.pattern=ss}),e._zod.check=(s)=>{let a=s.value;if(r){if(!Number.isInteger(a)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:a,inst:e});return}if(!Number.isSafeInteger(a)){if(a>0)s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});else s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}if(a<o)s.issues.push({origin:"number",input:a,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort});if(a>i)s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}});var ps=Z("$ZodCheckMaxLength",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let o=n.value;return!tr(o)&&o.length!==void 0}),e._zod.onattach.push((n)=>{let o=n._zod.bag.maximum??Number.POSITIVE_INFINITY;if(t.maximum<o)n._zod.bag.maximum=t.maximum}),e._zod.check=(n)=>{let o=n.value;if(o.length<=t.maximum)return;let s=nr(o);n.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),hs=Z("$ZodCheckMinLength",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let o=n.value;return!tr(o)&&o.length!==void 0}),e._zod.onattach.push((n)=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(t.minimum>o)n._zod.bag.minimum=t.minimum}),e._zod.check=(n)=>{let o=n.value;if(o.length>=t.minimum)return;let s=nr(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),ms=Z("$ZodCheckLengthEquals",(e,t)=>{var r;Ie.init(e,t),(r=e._zod.def).when??(r.when=(n)=>{let o=n.value;return!tr(o)&&o.length!==void 0}),e._zod.onattach.push((n)=>{let o=n._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=(n)=>{let o=n.value,i=o.length;if(i===t.length)return;let s=nr(o),a=i>t.length;n.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Zt=Z("$ZodCheckStringFormat",(e,t)=>{var r,n;if(Ie.init(e,t),e._zod.onattach.push((o)=>{let i=o._zod.bag;if(i.format=t.format,t.pattern)i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern)}),t.pattern)(r=e._zod).check??(r.check=(o)=>{if(t.pattern.lastIndex=0,t.pattern.test(o.value))return;o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})});else(n=e._zod).check??(n.check=()=>{})}),gs=Z("$ZodCheckRegex",(e,t)=>{Zt.init(e,t),e._zod.check=(r)=>{if(t.pattern.lastIndex=0,t.pattern.test(r.value))return;r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ys=Z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=cs),Zt.init(e,t)}),bs=Z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=us),Zt.init(e,t)}),vs=Z("$ZodCheckIncludes",(e,t)=>{Ie.init(e,t);let r=et(t.includes),n=new RegExp(typeof t.position==="number"?`^.{${t.position}}${r}`:r);t.pattern=n,e._zod.onattach.push((o)=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=(o)=>{if(o.value.includes(t.includes,t.position))return;o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),_s=Z("$ZodCheckStartsWith",(e,t)=>{Ie.init(e,t);let r=new RegExp(`^${et(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.startsWith(t.prefix))return;n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ws=Z("$ZodCheckEndsWith",(e,t)=>{Ie.init(e,t);let r=new RegExp(`.*${et(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push((n)=>{let o=n._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=(n)=>{if(n.value.endsWith(t.suffix))return;n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});var xs=Z("$ZodCheckOverwrite",(e,t)=>{Ie.init(e,t),e._zod.check=(r)=>{r.value=t.tx(r.value)}});class wn{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let r=e.split(`
14
+ `).filter((i)=>i),n=Math.min(...r.map((i)=>i.length-i.trimStart().length)),o=r.map((i)=>i.slice(n)).map((i)=>" ".repeat(this.indent*2)+i);for(let i of o)this.content.push(i)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[""]).map((o)=>` ${o}`)];return new e(...t,n.join(`
15
+ `))}}var zs={major:4,minor:4,patch:3};var fe=Z("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=zs;let n=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))n.unshift(e);for(let o of n)for(let i of o._zod.onattach)i(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,a,c)=>{let l=lt(s),p;for(let u of a){if(u._zod.def.when){if(xi(s))continue;if(!u._zod.def.when(s))continue}else if(l)continue;let m=s.issues.length,f=u._zod.check(s);if(f instanceof Promise&&c?.async===!1)throw new Je;if(p||f instanceof Promise)p=(p??Promise.resolve()).then(async()=>{if(await f,s.issues.length===m)return;if(!l)l=lt(s,m)});else{if(s.issues.length===m)continue;if(!l)l=lt(s,m)}}if(p)return p.then(()=>s);return s},i=(s,a,c)=>{if(lt(s))return s.aborted=!0,s;let l=o(a,n,c);if(l instanceof Promise){if(c.async===!1)throw new Je;return l.then((p)=>e._zod.parse(p,c))}return e._zod.parse(l,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let l=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:!0});if(l instanceof Promise)return l.then((p)=>i(p,s,a));return i(l,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===!1)throw new Je;return c.then((l)=>o(l,n,a))}return o(c,n,a)}}ue(e,"~standard",()=>({validate:(o)=>{try{let i=Pi(e,o);return i.success?{value:i.data}:{issues:i.error?.issues}}catch(i){return Ei(e,o).then((s)=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}))}),lr=Z("$ZodString",(e,t)=>{fe.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??is(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch(o){}if(typeof r.value==="string")return r;return r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),de=Z("$ZodStringFormat",(e,t)=>{Zt.init(e,t),lr.init(e,t)}),Os=Z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=qi),de.init(e,t)}),As=Z("$ZodUUID",(e,t)=>{if(t.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=gn(n))}else t.pattern??(t.pattern=gn());de.init(e,t)}),Zs=Z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Vi),de.init(e,t)}),Ns=Z("$ZodURL",(e,t)=>{de.init(e,t),e._zod.check=(r)=>{try{let n=r.value.trim();if(!t.normalize&&t.protocol?.source===Xi.source){if(!/^https?:\/\//i.test(n)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}}let o=new URL(n);if(t.hostname){if(t.hostname.lastIndex=0,!t.hostname.test(o.hostname))r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})}if(t.protocol){if(t.protocol.lastIndex=0,!t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol))r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})}if(t.normalize)r.value=o.href;else r.value=n;return}catch(n){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ds=Z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Wi()),de.init(e,t)}),Fs=Z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Ui),de.init(e,t)}),Bs=Z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Di),de.init(e,t)}),js=Z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Fi),de.init(e,t)}),Ls=Z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Bi),de.init(e,t)}),Us=Z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=ji),de.init(e,t)}),Ms=Z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Li),de.init(e,t)}),qs=Z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=os(t)),de.init(e,t)}),Vs=Z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ts),de.init(e,t)}),Ws=Z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=ns(t)),de.init(e,t)}),Hs=Z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Mi),de.init(e,t)}),Js=Z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Hi),de.init(e,t),e._zod.bag.format="ipv4"}),Gs=Z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ji),de.init(e,t),e._zod.bag.format="ipv6",e._zod.check=(r)=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}});var Ks=Z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Gi),de.init(e,t)}),Ys=Z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Ki),de.init(e,t),e._zod.check=(r)=>{let n=r.value.split("/");try{if(n.length!==2)throw Error();let[o,i]=n;if(!i)throw Error();let s=Number(i);if(`${s}`!==i)throw Error();if(s<0||s>128)throw Error();new URL(`http://[${o}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Xs(e){if(e==="")return!0;if(/\s/.test(e))return!1;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Qs=Z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Yi),de.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=(r)=>{if(Xs(r.value))return;r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function Bp(e){if(!yn.test(e))return!1;let t=e.replace(/[-_]/g,(n)=>n==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return Xs(r)}var ea=Z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=yn),de.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=(r)=>{if(Bp(r.value))return;r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),ta=Z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Qi),de.init(e,t)});function jp(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[n]=r;if(!n)return!1;let o=JSON.parse(atob(n));if("typ"in o&&o?.typ!=="JWT")return!1;if(!o.alg)return!1;if(t&&(!("alg"in o)||o.alg!==t))return!1;return!0}catch{return!1}}var ra=Z("$ZodJWT",(e,t)=>{de.init(e,t),e._zod.check=(r)=>{if(jp(r.value,t.alg))return;r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}});var kn=Z("$ZodNumber",(e,t)=>{fe.init(e,t),e._zod.pattern=e._zod.bag.pattern??bn,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch(s){}let o=r.value;if(typeof o==="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let i=typeof o==="number"?Number.isNaN(o)?"NaN":!Number.isFinite(o)?"Infinity":void 0:void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...i?{received:i}:{}}),r}}),na=Z("$ZodNumberFormat",(e,t)=>{fs.init(e,t),kn.init(e,t)}),oa=Z("$ZodBoolean",(e,t)=>{fe.init(e,t),e._zod.pattern=as,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Boolean(r.value)}catch(i){}let o=r.value;if(typeof o==="boolean")return r;return r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}});var ia=Z("$ZodUnknown",(e,t)=>{fe.init(e,t),e._zod.parse=(r)=>r}),sa=Z("$ZodNever",(e,t)=>{fe.init(e,t),e._zod.parse=(r,n)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)});function Is(e,t,r){if(e.issues.length)t.issues.push(...tt(r,e.issues));t.value[r]=e.value}var aa=Z("$ZodArray",(e,t)=>{fe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let i=[];for(let s=0;s<o.length;s++){let a=o[s],c=t.element._zod.run({value:a,issues:[]},n);if(c instanceof Promise)i.push(c.then((l)=>Is(l,r,s)));else Is(c,r,s)}if(i.length)return Promise.all(i).then(()=>r);return r}});function ur(e,t,r,n,o,i){let s=r in n;if(e.issues.length){if(o&&i&&!s)return;t.issues.push(...tt(r,e.issues))}if(!s&&!o){if(!e.issues.length)t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}if(e.value===void 0){if(s)t.value[r]=void 0}else t.value[r]=e.value}function ca(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let r=_i(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function ua(e,t,r,n,o,i){let s=[],a=o.keySet,c=o.catchall._zod,l=c.def.type,p=c.optin==="optional",u=c.optout==="optional";for(let m in t){if(m==="__proto__")continue;if(a.has(m))continue;if(l==="never"){s.push(m);continue}let f=c.run({value:t[m],issues:[]},n);if(f instanceof Promise)e.push(f.then((g)=>ur(g,r,m,t,p,u)));else ur(f,r,m,t,p,u)}if(s.length)r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i});if(!e.length)return r;return Promise.all(e).then(()=>r)}var Lp=Z("$ZodObject",(e,t)=>{if(fe.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}})}let n=er(()=>ca(t));ue(e._zod,"propValues",()=>{let a=t.shape,c={};for(let l in a){let p=a[l]._zod;if(p.values){c[l]??(c[l]=new Set);for(let u of p.values)c[l].add(u)}}return c});let o=Rt,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=n.value);let l=a.value;if(!o(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),a;a.value={};let p=[],u=s.shape;for(let m of s.keys){let f=u[m],g=f._zod.optin==="optional",y=f._zod.optout==="optional",b=f._zod.run({value:l[m],issues:[]},c);if(b instanceof Promise)p.push(b.then((x)=>ur(x,a,m,l,g,y)));else ur(b,a,m,l,g,y)}if(!i)return p.length?Promise.all(p).then(()=>a):a;return ua(p,l,a,c,n.value,e)}}),la=Z("$ZodObjectJIT",(e,t)=>{Lp.init(e,t);let r=e._zod.parse,n=er(()=>ca(t)),o=(m)=>{let f=new wn(["shape","payload","ctx"]),g=n.value,y=(k)=>{let P=dn(k);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};f.write("const input = payload.value;");let b=Object.create(null),x=0;for(let k of g.keys)b[k]=`key_${x++}`;f.write("const newResult = {};");for(let k of g.keys){let P=b[k],R=dn(k),j=m[k],z=j?._zod?.optin==="optional",L=j?._zod?.optout==="optional";if(f.write(`const ${P} = ${y(k)};`),z&&L)f.write(`
16
+ if (${P}.issues.length) {
17
+ if (${R} in input) {
18
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
20
19
  ...iss,
21
- path: iss.path ? [${U}, ...iss.path] : [${U}]
20
+ path: iss.path ? [${R}, ...iss.path] : [${R}]
22
21
  })));
23
22
  }
24
23
  }
25
24
 
26
- if (${E}.value === undefined) {
27
- if (${U} in input) {
28
- newResult[${U}] = undefined;
25
+ if (${P}.value === undefined) {
26
+ if (${R} in input) {
27
+ newResult[${R}] = undefined;
29
28
  }
30
29
  } else {
31
- newResult[${U}] = ${E}.value;
30
+ newResult[${R}] = ${P}.value;
32
31
  }
33
32
 
34
- `);else if(!I)f.write(`
35
- const ${E}_present = ${U} in input;
36
- if (${E}.issues.length) {
37
- payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
33
+ `);else if(!z)f.write(`
34
+ const ${P}_present = ${R} in input;
35
+ if (${P}.issues.length) {
36
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
38
37
  ...iss,
39
- path: iss.path ? [${U}, ...iss.path] : [${U}]
38
+ path: iss.path ? [${R}, ...iss.path] : [${R}]
40
39
  })));
41
40
  }
42
- if (!${E}_present && !${E}.issues.length) {
41
+ if (!${P}_present && !${P}.issues.length) {
43
42
  payload.issues.push({
44
43
  code: "invalid_type",
45
44
  expected: "nonoptional",
46
45
  input: undefined,
47
- path: [${U}]
46
+ path: [${R}]
48
47
  });
49
48
  }
50
49
 
51
- if (${E}_present) {
52
- if (${E}.value === undefined) {
53
- newResult[${U}] = undefined;
50
+ if (${P}_present) {
51
+ if (${P}.value === undefined) {
52
+ newResult[${R}] = undefined;
54
53
  } else {
55
- newResult[${U}] = ${E}.value;
54
+ newResult[${R}] = ${P}.value;
56
55
  }
57
56
  }
58
57
 
59
58
  `);else f.write(`
60
- if (${E}.issues.length) {
61
- payload.issues = payload.issues.concat(${E}.issues.map(iss => ({
59
+ if (${P}.issues.length) {
60
+ payload.issues = payload.issues.concat(${P}.issues.map(iss => ({
62
61
  ...iss,
63
- path: iss.path ? [${U}, ...iss.path] : [${U}]
62
+ path: iss.path ? [${R}, ...iss.path] : [${R}]
64
63
  })));
65
64
  }
66
65
 
67
- if (${E}.value === undefined) {
68
- if (${U} in input) {
69
- newResult[${U}] = undefined;
66
+ if (${P}.value === undefined) {
67
+ if (${R} in input) {
68
+ newResult[${R}] = undefined;
70
69
  }
71
70
  } else {
72
- newResult[${U}] = ${E}.value;
71
+ newResult[${R}] = ${P}.value;
73
72
  }
74
73
 
75
- `)}f.write("payload.value = newResult;"),f.write("return payload;");let P=f.compile();return(k,E)=>P(h,k,E)},i,a=jt,s=!Et.jitless,c=s&&Ko.value,d=r.catchall,l;e._zod.parse=(h,f)=>{l??(l=o.value);let g=h.value;if(!a(g))return h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h;if(s&&c&&f?.async===!1&&f.jitless!==!0){if(!i)i=t(r.shape);if(h=i(h,f),!d)return h;return Am([],g,h,f,l,e)}return n(h,f)}});function xm(e,r,n,o){for(let i of e)if(i.issues.length===0)return r.value=i.value,r;let t=e.filter((i)=>!bt(i));if(t.length===1)return r.value=t[0].value,t[0];return r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map((i)=>i.issues.map((a)=>Ue(a,o,we())))}),r}var Vr=z("$ZodUnion",(e,r)=>{se.init(e,r),de(e._zod,"optin",()=>r.options.some((o)=>o._zod.optin==="optional")?"optional":void 0),de(e._zod,"optout",()=>r.options.some((o)=>o._zod.optout==="optional")?"optional":void 0),de(e._zod,"values",()=>{if(r.options.every((o)=>o._zod.values))return new Set(r.options.flatMap((o)=>Array.from(o._zod.values)));return}),de(e._zod,"pattern",()=>{if(r.options.every((o)=>o._zod.pattern)){let o=r.options.map((t)=>t._zod.pattern);return new RegExp(`^(${o.map((t)=>Dr(t.source)).join("|")})$`)}return});let n=r.options.length===1?r.options[0]._zod.run:null;e._zod.parse=(o,t)=>{if(n)return n(o,t);let i=!1,a=[];for(let s of r.options){let u=s._zod.run({value:o.value,issues:[]},t);if(u instanceof Promise)a.push(u),i=!0;else{if(u.issues.length===0)return u;a.push(u)}}if(!i)return xm(a,o,e,t);return Promise.all(a).then((s)=>xm(s,o,e,t))}});function $m(e,r,n,o){let t=e.filter((i)=>i.issues.length===0);if(t.length===1)return r.value=t[0].value,r;if(t.length===0)r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map((i)=>i.issues.map((a)=>Ue(a,o,we())))});else r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:[],inclusive:!1});return r}var Ls=z("$ZodXor",(e,r)=>{Vr.init(e,r),r.inclusive=!1;let n=r.options.length===1?r.options[0]._zod.run:null;e._zod.parse=(o,t)=>{if(n)return n(o,t);let i=!1,a=[];for(let s of r.options){let u=s._zod.run({value:o.value,issues:[]},t);if(u instanceof Promise)a.push(u),i=!0;else a.push(u)}if(!i)return $m(a,o,e,t);return Promise.all(a).then((s)=>$m(s,o,e,t))}}),Fs=z("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,Vr.init(e,r);let n=e._zod.parse;de(e._zod,"propValues",()=>{let t={};for(let i of r.options){let a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw Error(`Invalid discriminated union option at index "${r.options.indexOf(i)}"`);for(let[s,u]of Object.entries(a)){if(!t[s])t[s]=new Set;for(let c of u)t[s].add(c)}}return t});let o=qt(()=>{let t=r.options,i=new Map;for(let a of t){let s=a._zod.propValues?.[r.discriminator];if(!s||s.size===0)throw Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(let u of s){if(i.has(u))throw Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,a)}}return i});e._zod.parse=(t,i)=>{let a=t.value;if(!jt(a))return t.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),t;let s=o.value.get(a?.[r.discriminator]);if(s)return s._zod.run(t,i);if(r.unionFallback||i.direction==="backward")return n(t,i);return t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,options:Array.from(o.value.keys()),input:a,path:[r.discriminator],inst:e}),t}}),Bs=z("$ZodIntersection",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{let t=n.value,i=r.left._zod.run({value:t,issues:[]},o),a=r.right._zod.run({value:t,issues:[]},o);if(i instanceof Promise||a instanceof Promise)return Promise.all([i,a]).then(([u,c])=>wm(n,u,c));return wm(n,i,a)}});function ts(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e===+r)return{valid:!0,data:e};if(yt(e)&&yt(r)){let n=Object.keys(r),o=Object.keys(e).filter((i)=>n.indexOf(i)!==-1),t={...e,...r};for(let i of o){let a=ts(e[i],r[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};t[i]=a.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let t=e[o],i=r[o],a=ts(t,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function wm(e,r,n){let o=new Map,t;for(let s of r.issues)if(s.code==="unrecognized_keys"){t??(t=s);for(let u of s.keys){if(!o.has(u))o.set(u,{});o.get(u).l=!0}}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let u of s.keys){if(!o.has(u))o.set(u,{});o.get(u).r=!0}else e.issues.push(s);let i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&t)e.issues.push({...t,keys:i});if(bt(e))return e;let a=ts(r.value,n.value);if(!a.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Wn=z("$ZodTuple",(e,r)=>{se.init(e,r);let n=r.items;e._zod.parse=(o,t)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],s=km(n,"optin"),u=km(n,"optout");if(!r.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),o;if(i.length>n.length)o.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}let c=Array(n.length);for(let d=0;d<n.length;d++){let l=n[d]._zod.run({value:i[d],issues:[]},t);if(l instanceof Promise)a.push(l.then((h)=>{c[d]=h}));else c[d]=l}if(r.rest){let d=n.length-1,l=i.slice(n.length);for(let h of l){d++;let f=r.rest._zod.run({value:h,issues:[]},t);if(f instanceof Promise)a.push(f.then((g)=>Im(g,o,d)));else Im(f,o,d)}}if(a.length)return Promise.all(a).then(()=>Sm(c,o,n,i,u));return Sm(c,o,n,i,u)}});function km(e,r){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[r]!=="optional")return n+1;return 0}function Im(e,r,n){if(e.issues.length)r.issues.push(...Ae(n,e.issues));r.value[n]=e.value}function Sm(e,r,n,o,t){for(let i=0;i<n.length;i++){let a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=t){r.value.length=i;break}r.issues.push(...Ae(i,a.issues))}r.value[i]=a.value}for(let i=r.value.length-1;i>=o.length;i--)if(n[i]._zod.optout==="optional"&&r.value[i]===void 0)r.value.length=i;else break;return r}var Ms=z("$ZodRecord",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(!yt(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let i=[],a=r.keyType._zod.values;if(a){n.value={};let s=new Set;for(let c of a)if(typeof c==="string"||typeof c==="number"||typeof c==="symbol"){s.add(typeof c==="number"?c.toString():c);let d=r.keyType._zod.run({value:c,issues:[]},o);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map((f)=>Ue(f,o,we())),input:c,path:[c],inst:e});continue}let l=d.value,h=r.valueType._zod.run({value:t[c],issues:[]},o);if(h instanceof Promise)i.push(h.then((f)=>{if(f.issues.length)n.issues.push(...Ae(c,f.issues));n.value[l]=f.value}));else{if(h.issues.length)n.issues.push(...Ae(c,h.issues));n.value[l]=h.value}}let u;for(let c in t)if(!s.has(c))u=u??[],u.push(c);if(u&&u.length>0)n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:u})}else{n.value={};for(let s of Reflect.ownKeys(t)){if(s==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(t,s))continue;let u=r.keyType._zod.run({value:s,issues:[]},o);if(u instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof s==="string"&&Lr.test(s)&&u.issues.length){let l=r.keyType._zod.run({value:Number(s),issues:[]},o);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(l.issues.length===0)u=l}if(u.issues.length){if(r.mode==="loose")n.value[s]=t[s];else n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map((l)=>Ue(l,o,we())),input:s,path:[s],inst:e});continue}let d=r.valueType._zod.run({value:t[s],issues:[]},o);if(d instanceof Promise)i.push(d.then((l)=>{if(l.issues.length)n.issues.push(...Ae(s,l.issues));n.value[u.value]=l.value}));else{if(d.issues.length)n.issues.push(...Ae(s,d.issues));n.value[u.value]=d.value}}}if(i.length)return Promise.all(i).then(()=>n);return n}}),Vs=z("$ZodMap",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let i=[];n.value=new Map;for(let[a,s]of t){let u=r.keyType._zod.run({value:a,issues:[]},o),c=r.valueType._zod.run({value:s,issues:[]},o);if(u instanceof Promise||c instanceof Promise)i.push(Promise.all([u,c]).then(([d,l])=>{zm(d,l,n,a,t,e,o)}));else zm(u,c,n,a,t,e,o)}if(i.length)return Promise.all(i).then(()=>n);return n}});function zm(e,r,n,o,t,i,a){if(e.issues.length)if(Ur.has(typeof o))n.issues.push(...Ae(o,e.issues));else n.issues.push({code:"invalid_key",origin:"map",input:t,inst:i,issues:e.issues.map((s)=>Ue(s,a,we()))});if(r.issues.length)if(Ur.has(typeof o))n.issues.push(...Ae(o,r.issues));else n.issues.push({origin:"map",code:"invalid_element",input:t,inst:i,key:o,issues:r.issues.map((s)=>Ue(s,a,we()))});n.value.set(e.value,r.value)}var qs=z("$ZodSet",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let a of t){let s=r.valueType._zod.run({value:a,issues:[]},o);if(s instanceof Promise)i.push(s.then((u)=>Pm(u,n)));else Pm(s,n)}if(i.length)return Promise.all(i).then(()=>n);return n}});function Pm(e,r){if(e.issues.length)r.issues.push(...e.issues);r.value.add(e.value)}var Js=z("$ZodEnum",(e,r)=>{se.init(e,r);let n=jr(r.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter((t)=>Ur.has(typeof t)).map((t)=>typeof t==="string"?Je(t):t.toString()).join("|")})$`),e._zod.parse=(t,i)=>{let a=t.value;if(o.has(a))return t;return t.issues.push({code:"invalid_value",values:n,input:a,inst:e}),t}}),Ws=z("$ZodLiteral",(e,r)=>{if(se.init(e,r),r.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(r.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.values.map((o)=>typeof o==="string"?Je(o):o?Je(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,t)=>{let i=o.value;if(n.has(i))return o;return o.issues.push({code:"invalid_value",values:r.values,input:i,inst:e}),o}}),Gs=z("$ZodFile",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{let t=n.value;if(t instanceof File)return n;return n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),Hs=z("$ZodTransform",(e,r)=>{se.init(e,r),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Ot(e.constructor.name);let t=r.transform(n.value,n);if(o.async)return(t instanceof Promise?t:Promise.resolve(t)).then((a)=>(n.value=a,n.fallback=!0,n));if(t instanceof Promise)throw new Qe;return n.value=t,n.fallback=!0,n}});function Tm(e,r){if(r===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var Gn=z("$ZodOptional",(e,r)=>{se.init(e,r),e._zod.optin="optional",e._zod.optout="optional",de(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),de(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${Dr(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(r.innerType._zod.optin==="optional"){let t=n.value,i=r.innerType._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Tm(a,t));return Tm(i,t)}if(n.value===void 0)return n;return r.innerType._zod.run(n,o)}}),Ks=z("$ZodExactOptional",(e,r)=>{Gn.init(e,r),de(e._zod,"values",()=>r.innerType._zod.values),de(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(n,o)=>r.innerType._zod.run(n,o)}),Xs=z("$ZodNullable",(e,r)=>{se.init(e,r),de(e._zod,"optin",()=>r.innerType._zod.optin),de(e._zod,"optout",()=>r.innerType._zod.optout),de(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${Dr(n.source)}|null)$`):void 0}),de(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>{if(n.value===null)return n;return r.innerType._zod.run(n,o)}}),Ys=z("$ZodDefault",(e,r)=>{se.init(e,r),e._zod.optin="optional",de(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return r.innerType._zod.run(n,o);if(n.value===void 0)return n.value=r.defaultValue,n;let t=r.innerType._zod.run(n,o);if(t instanceof Promise)return t.then((i)=>Em(i,r));return Em(t,r)}});function Em(e,r){if(e.value===void 0)e.value=r.defaultValue;return e}var Qs=z("$ZodPrefault",(e,r)=>{se.init(e,r),e._zod.optin="optional",de(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return r.innerType._zod.run(n,o);if(n.value===void 0)n.value=r.defaultValue;return r.innerType._zod.run(n,o)}}),eu=z("$ZodNonOptional",(e,r)=>{se.init(e,r),de(e._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let t=r.innerType._zod.run(n,o);if(t instanceof Promise)return t.then((i)=>Om(i,e));return Om(t,e)}});function Om(e,r){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r});return e}var tu=z("$ZodSuccess",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Ot("ZodSuccess");let t=r.innerType._zod.run(n,o);if(t instanceof Promise)return t.then((i)=>(n.value=i.issues.length===0,n));return n.value=t.issues.length===0,n}}),ru=z("$ZodCatch",(e,r)=>{se.init(e,r),e._zod.optin="optional",de(e._zod,"optout",()=>r.innerType._zod.optout),de(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return r.innerType._zod.run(n,o);let t=r.innerType._zod.run(n,o);if(t instanceof Promise)return t.then((i)=>{if(n.value=i.value,i.issues.length)n.value=r.catchValue({...n,error:{issues:i.issues.map((a)=>Ue(a,o,we()))},input:n.value}),n.issues=[],n.fallback=!0;return n});if(n.value=t.value,t.issues.length)n.value=r.catchValue({...n,error:{issues:t.issues.map((i)=>Ue(i,o,we()))},input:n.value}),n.issues=[],n.fallback=!0;return n}}),nu=z("$ZodNaN",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>{if(typeof n.value!=="number"||!Number.isNaN(n.value))return n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n;return n}}),Hn=z("$ZodPipe",(e,r)=>{se.init(e,r),de(e._zod,"values",()=>r.in._zod.values),de(e._zod,"optin",()=>r.in._zod.optin),de(e._zod,"optout",()=>r.out._zod.optout),de(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=r.out._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Fn(a,r.in,o));return Fn(i,r.in,o)}let t=r.in._zod.run(n,o);if(t instanceof Promise)return t.then((i)=>Fn(i,r.out,o));return Fn(t,r.out,o)}});function Fn(e,r,n){if(e.issues.length)return e.aborted=!0,e;return r._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var qr=z("$ZodCodec",(e,r)=>{se.init(e,r),de(e._zod,"values",()=>r.in._zod.values),de(e._zod,"optin",()=>r.in._zod.optin),de(e._zod,"optout",()=>r.out._zod.optout),de(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=r.in._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Bn(a,r,o));return Bn(i,r,o)}else{let i=r.out._zod.run(n,o);if(i instanceof Promise)return i.then((a)=>Bn(a,r,o));return Bn(i,r,o)}}});function Bn(e,r,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let t=r.transform(e.value,e);if(t instanceof Promise)return t.then((i)=>Mn(e,i,r.out,n));return Mn(e,t,r.out,n)}else{let t=r.reverseTransform(e.value,e);if(t instanceof Promise)return t.then((i)=>Mn(e,i,r.in,n));return Mn(e,t,r.in,n)}}function Mn(e,r,n,o){if(e.issues.length)return e.aborted=!0,e;return n._zod.run({value:r,issues:e.issues},o)}var iu=z("$ZodPreprocess",(e,r)=>{Hn.init(e,r)}),ou=z("$ZodReadonly",(e,r)=>{se.init(e,r),de(e._zod,"propValues",()=>r.innerType._zod.propValues),de(e._zod,"values",()=>r.innerType._zod.values),de(e._zod,"optin",()=>r.innerType?._zod?.optin),de(e._zod,"optout",()=>r.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return r.innerType._zod.run(n,o);let t=r.innerType._zod.run(n,o);if(t instanceof Promise)return t.then(jm);return jm(t)}});function jm(e){return e.value=Object.freeze(e.value),e}var au=z("$ZodTemplateLiteral",(e,r)=>{se.init(e,r);let n=[];for(let o of r.parts)if(typeof o==="object"&&o!==null){if(!o._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let t=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${o._zod.traits}`);let i=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(i,a))}else if(o===null||Yo.has(typeof o))n.push(Je(`${o}`));else throw Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,t)=>{if(typeof o.value!=="string")return o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o;if(e._zod.pattern.lastIndex=0,!e._zod.pattern.test(o.value))return o.issues.push({input:o.value,inst:e,code:"invalid_format",format:r.format??"template_literal",pattern:e._zod.pattern.source}),o;return o}}),su=z("$ZodFunction",(e,r)=>(se.init(e,r),e._def=r,e._zod.def=r,e.implement=(n)=>{if(typeof n!=="function")throw Error("implement() must be called with a function");return function(...o){let t=e._def.input?zn(e._def.input,o):o,i=Reflect.apply(n,this,t);if(e._def.output)return zn(e._def.output,i);return i}},e.implementAsync=(n)=>{if(typeof n!=="function")throw Error("implementAsync() must be called with a function");return async function(...o){let t=e._def.input?await Pn(e._def.input,o):o,i=await Reflect.apply(n,this,t);if(e._def.output)return await Pn(e._def.output,i);return i}},e._zod.parse=(n,o)=>{if(typeof n.value!=="function")return n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n;if(e._def.output&&e._def.output._zod.def.type==="promise")n.value=e.implementAsync(n.value);else n.value=e.implement(n.value);return n},e.input=(...n)=>{let o=e.constructor;if(Array.isArray(n[0]))return new o({type:"function",input:new Wn({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output});return new o({type:"function",input:n[0],output:e._def.output})},e.output=(n)=>new e.constructor({type:"function",input:e._def.input,output:n}),e)),uu=z("$ZodPromise",(e,r)=>{se.init(e,r),e._zod.parse=(n,o)=>Promise.resolve(n.value).then((t)=>r.innerType._zod.run({value:t,issues:[]},o))}),cu=z("$ZodLazy",(e,r)=>{se.init(e,r),de(e._zod,"innerType",()=>{let n=r;if(!n._cachedInner)n._cachedInner=r.getter();return n._cachedInner}),de(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),de(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),de(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),de(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o)}),lu=z("$ZodCustom",(e,r)=>{ye.init(e,r),se.init(e,r),e._zod.parse=(n,o)=>n,e._zod.check=(n)=>{let o=n.value,t=r.fn(o);if(t instanceof Promise)return t.then((i)=>Dm(i,n,o,e));Dm(t,n,o,e);return}});function Dm(e,r,n,o){if(!e){let t={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)t.params=o._zod.def.params;r.issues.push(Jt(t))}}var Kr={};ct(Kr,{ar:()=>du,az:()=>fu,be:()=>mu,bg:()=>pu,ca:()=>hu,cs:()=>gu,da:()=>vu,de:()=>yu,el:()=>bu,en:()=>Jr,eo:()=>_u,es:()=>xu,fa:()=>$u,fi:()=>wu,fr:()=>ku,frCA:()=>Iu,he:()=>Su,hr:()=>zu,hu:()=>Pu,hy:()=>Tu,id:()=>Eu,is:()=>Ou,it:()=>ju,ja:()=>Du,ka:()=>Uu,kh:()=>Ru,km:()=>Wr,ko:()=>Cu,lt:()=>Au,mk:()=>Nu,ms:()=>Zu,nl:()=>Lu,no:()=>Fu,ota:()=>Bu,pl:()=>Vu,ps:()=>Mu,pt:()=>qu,ro:()=>Ju,ru:()=>Wu,sl:()=>Gu,sv:()=>Hu,ta:()=>Ku,th:()=>Xu,tr:()=>Yu,ua:()=>Qu,uk:()=>Hr,ur:()=>ec,uz:()=>tc,vi:()=>rc,yo:()=>oc,zhCN:()=>nc,zhTW:()=>ic});var M_=()=>{let e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function r(t){return e[t]??null}let n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`مدخلات غير مقبولة: يفترض إدخال instanceof ${t.expected}، ولكن تم إدخال ${s}`;return`مدخلات غير مقبولة: يفترض إدخال ${i}، ولكن تم إدخال ${s}`}case"invalid_value":if(t.values.length===1)return`مدخلات غير مقبولة: يفترض إدخال ${M(t.values[0])}`;return`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return` أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${i} ${t.maximum.toString()} ${a.unit??"عنصر"}`;return`أكبر من اللازم: يفترض أن تكون ${t.origin??"القيمة"} ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${i} ${t.minimum.toString()} ${a.unit}`;return`أصغر من اللازم: يفترض لـ ${t.origin} أن يكون ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`نَص غير مقبول: يجب أن يبدأ بـ "${t.prefix}"`;if(i.format==="ends_with")return`نَص غير مقبول: يجب أن ينتهي بـ "${i.suffix}"`;if(i.format==="includes")return`نَص غير مقبول: يجب أن يتضمَّن "${i.includes}"`;if(i.format==="regex")return`نَص غير مقبول: يجب أن يطابق النمط ${i.pattern}`;return`${n[i.format]??t.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${t.divisor}`;case"unrecognized_keys":return`معرف${t.keys.length>1?"ات":""} غريب${t.keys.length>1?"ة":""}: ${D(t.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${t.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${t.origin}`;default:return"مدخل غير مقبول"}}};function du(){return{localeError:M_()}}var V_=()=>{let e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function r(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Yanlış dəyər: gözlənilən instanceof ${t.expected}, daxil olan ${s}`;return`Yanlış dəyər: gözlənilən ${i}, daxil olan ${s}`}case"invalid_value":if(t.values.length===1)return`Yanlış dəyər: gözlənilən ${M(t.values[0])}`;return`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${i}${t.maximum.toString()} ${a.unit??"element"}`;return`Çox böyük: gözlənilən ${t.origin??"dəyər"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Çox kiçik: gözlənilən ${t.origin} ${i}${t.minimum.toString()} ${a.unit}`;return`Çox kiçik: gözlənilən ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Yanlış mətn: "${i.prefix}" ilə başlamalıdır`;if(i.format==="ends_with")return`Yanlış mətn: "${i.suffix}" ilə bitməlidir`;if(i.format==="includes")return`Yanlış mətn: "${i.includes}" daxil olmalıdır`;if(i.format==="regex")return`Yanlış mətn: ${i.pattern} şablonuna uyğun olmalıdır`;return`Yanlış ${n[i.format]??t.format}`}case"not_multiple_of":return`Yanlış ədəd: ${t.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${t.keys.length>1?"lar":""}: ${D(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${t.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function fu(){return{localeError:V_()}}function Zm(e,r,n,o){let t=Math.abs(e),i=t%10,a=t%100;if(a>=11&&a<=19)return o;if(i===1)return r;if(i>=2&&i<=4)return n;return o}var q_=()=>{let e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function r(t){return e[t]??null}let n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},o={nan:"NaN",number:"лік",array:"масіў"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Няправільны ўвод: чакаўся instanceof ${t.expected}, атрымана ${s}`;return`Няправільны ўвод: чакаўся ${i}, атрымана ${s}`}case"invalid_value":if(t.values.length===1)return`Няправільны ўвод: чакалася ${M(t.values[0])}`;return`Няправільны варыянт: чакаўся адзін з ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),u=Zm(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна ${a.verb} ${i}${t.maximum.toString()} ${u}`}return`Занадта вялікі: чакалася, што ${t.origin??"значэнне"} павінна быць ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),u=Zm(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${t.origin} павінна ${a.verb} ${i}${t.minimum.toString()} ${u}`}return`Занадта малы: чакалася, што ${t.origin} павінна быць ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Няправільны радок: павінен пачынацца з "${i.prefix}"`;if(i.format==="ends_with")return`Няправільны радок: павінен заканчвацца на "${i.suffix}"`;if(i.format==="includes")return`Няправільны радок: павінен змяшчаць "${i.includes}"`;if(i.format==="regex")return`Няправільны радок: павінен адпавядаць шаблону ${i.pattern}`;return`Няправільны ${n[i.format]??t.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${t.keys.length>1?"ключы":"ключ"}: ${D(t.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${t.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${t.origin}`;default:return"Няправільны ўвод"}}};function mu(){return{localeError:q_()}}var J_=()=>{let e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function r(t){return e[t]??null}let n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},o={nan:"NaN",number:"число",array:"масив"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Невалиден вход: очакван instanceof ${t.expected}, получен ${s}`;return`Невалиден вход: очакван ${i}, получен ${s}`}case"invalid_value":if(t.values.length===1)return`Невалиден вход: очакван ${M(t.values[0])}`;return`Невалидна опция: очаквано едно от ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Твърде голямо: очаква се ${t.origin??"стойност"} да съдържа ${i}${t.maximum.toString()} ${a.unit??"елемента"}`;return`Твърде голямо: очаква се ${t.origin??"стойност"} да бъде ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Твърде малко: очаква се ${t.origin} да съдържа ${i}${t.minimum.toString()} ${a.unit}`;return`Твърде малко: очаква се ${t.origin} да бъде ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Невалиден низ: трябва да започва с "${i.prefix}"`;if(i.format==="ends_with")return`Невалиден низ: трябва да завършва с "${i.suffix}"`;if(i.format==="includes")return`Невалиден низ: трябва да включва "${i.includes}"`;if(i.format==="regex")return`Невалиден низ: трябва да съвпада с ${i.pattern}`;let a="Невалиден";if(i.format==="emoji")a="Невалидно";if(i.format==="datetime")a="Невалидно";if(i.format==="date")a="Невалидна";if(i.format==="time")a="Невалидно";if(i.format==="duration")a="Невалидна";return`${a} ${n[i.format]??t.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${t.divisor}`;case"unrecognized_keys":return`Неразпознат${t.keys.length>1?"и":""} ключ${t.keys.length>1?"ове":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${t.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${t.origin}`;default:return"Невалиден вход"}}};function pu(){return{localeError:J_()}}var W_=()=>{let e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){return e[t]??null}let n={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Tipus invàlid: s'esperava instanceof ${t.expected}, s'ha rebut ${s}`;return`Tipus invàlid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":if(t.values.length===1)return`Valor invàlid: s'esperava ${M(t.values[0])}`;return`Opció invàlida: s'esperava una de ${D(t.values," o ")}`;case"too_big":{let i=t.inclusive?"com a màxim":"menys de",a=r(t.origin);if(a)return`Massa gran: s'esperava que ${t.origin??"el valor"} contingués ${i} ${t.maximum.toString()} ${a.unit??"elements"}`;return`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"com a mínim":"més de",a=r(t.origin);if(a)return`Massa petit: s'esperava que ${t.origin} contingués ${i} ${t.minimum.toString()} ${a.unit}`;return`Massa petit: s'esperava que ${t.origin} fos ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Format invàlid: ha de començar amb "${i.prefix}"`;if(i.format==="ends_with")return`Format invàlid: ha d'acabar amb "${i.suffix}"`;if(i.format==="includes")return`Format invàlid: ha d'incloure "${i.includes}"`;if(i.format==="regex")return`Format invàlid: ha de coincidir amb el patró ${i.pattern}`;return`Format invàlid per a ${n[i.format]??t.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${t.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${t.origin}`;default:return"Entrada invàlida"}}};function hu(){return{localeError:W_()}}var G_=()=>{let e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function r(t){return e[t]??null}let n={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Neplatný vstup: očekáváno instanceof ${t.expected}, obdrženo ${s}`;return`Neplatný vstup: očekáváno ${i}, obdrženo ${s}`}case"invalid_value":if(t.values.length===1)return`Neplatný vstup: očekáváno ${M(t.values[0])}`;return`Neplatná možnost: očekávána jedna z hodnot ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Hodnota je příliš velká: ${t.origin??"hodnota"} musí mít ${i}${t.maximum.toString()} ${a.unit??"prvků"}`;return`Hodnota je příliš velká: ${t.origin??"hodnota"} musí být ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Hodnota je příliš malá: ${t.origin??"hodnota"} musí mít ${i}${t.minimum.toString()} ${a.unit??"prvků"}`;return`Hodnota je příliš malá: ${t.origin??"hodnota"} musí být ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Neplatný řetězec: musí začínat na "${i.prefix}"`;if(i.format==="ends_with")return`Neplatný řetězec: musí končit na "${i.suffix}"`;if(i.format==="includes")return`Neplatný řetězec: musí obsahovat "${i.includes}"`;if(i.format==="regex")return`Neplatný řetězec: musí odpovídat vzoru ${i.pattern}`;return`Neplatný formát ${n[i.format]??t.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${t.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${D(t.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${t.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${t.origin}`;default:return"Neplatný vstup"}}};function gu(){return{localeError:G_()}}var H_=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function r(t){return e[t]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Ugyldigt input: forventede instanceof ${t.expected}, fik ${s}`;return`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":if(t.values.length===1)return`Ugyldig værdi: forventede ${M(t.values[0])}`;return`Ugyldigt valg: forventede en af følgende ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin),s=o[t.origin]??t.origin;if(a)return`For stor: forventede ${s??"value"} ${a.verb} ${i} ${t.maximum.toString()} ${a.unit??"elementer"}`;return`For stor: forventede ${s??"value"} havde ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin),s=o[t.origin]??t.origin;if(a)return`For lille: forventede ${s} ${a.verb} ${i} ${t.minimum.toString()} ${a.unit}`;return`For lille: forventede ${s} havde ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Ugyldig streng: skal starte med "${i.prefix}"`;if(i.format==="ends_with")return`Ugyldig streng: skal ende med "${i.suffix}"`;if(i.format==="includes")return`Ugyldig streng: skal indeholde "${i.includes}"`;if(i.format==="regex")return`Ugyldig streng: skal matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${D(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${t.origin}`;default:return"Ugyldigt input"}}};function vu(){return{localeError:H_()}}var K_=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){return e[t]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Ungültige Eingabe: erwartet instanceof ${t.expected}, erhalten ${s}`;return`Ungültige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":if(t.values.length===1)return`Ungültige Eingabe: erwartet ${M(t.values[0])}`;return`Ungültige Option: erwartet eine von ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Zu groß: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ${a.unit??"Elemente"} hat`;return`Zu groß: erwartet, dass ${t.origin??"Wert"} ${i}${t.maximum.toString()} ist`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ${a.unit} hat`;return`Zu klein: erwartet, dass ${t.origin} ${i}${t.minimum.toString()} ist`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Ungültiger String: muss mit "${i.prefix}" beginnen`;if(i.format==="ends_with")return`Ungültiger String: muss mit "${i.suffix}" enden`;if(i.format==="includes")return`Ungültiger String: muss "${i.includes}" enthalten`;if(i.format==="regex")return`Ungültiger String: muss dem Muster ${i.pattern} entsprechen`;return`Ungültig: ${n[i.format]??t.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${D(t.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${t.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${t.origin}`;default:return"Ungültige Eingabe"}}};function yu(){return{localeError:K_()}}var X_=()=>{let e={string:{unit:"χαρακτήρες",verb:"να έχει"},file:{unit:"bytes",verb:"να έχει"},array:{unit:"στοιχεία",verb:"να έχει"},set:{unit:"στοιχεία",verb:"να έχει"},map:{unit:"καταχωρήσεις",verb:"να έχει"}};function r(t){return e[t]??null}let n={regex:"είσοδος",email:"διεύθυνση email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ημερομηνία και ώρα",date:"ISO ημερομηνία",time:"ISO ώρα",duration:"ISO διάρκεια",ipv4:"διεύθυνση IPv4",ipv6:"διεύθυνση IPv6",mac:"διεύθυνση MAC",cidrv4:"εύρος IPv4",cidrv6:"εύρος IPv6",base64:"συμβολοσειρά κωδικοποιημένη σε base64",base64url:"συμβολοσειρά κωδικοποιημένη σε base64url",json_string:"συμβολοσειρά JSON",e164:"αριθμός E.164",jwt:"JWT",template_literal:"είσοδος"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(typeof t.expected==="string"&&/^[A-Z]/.test(t.expected))return`Μη έγκυρη είσοδος: αναμενόταν instanceof ${t.expected}, λήφθηκε ${s}`;return`Μη έγκυρη είσοδος: αναμενόταν ${i}, λήφθηκε ${s}`}case"invalid_value":if(t.values.length===1)return`Μη έγκυρη είσοδος: αναμενόταν ${M(t.values[0])}`;return`Μη έγκυρη επιλογή: αναμενόταν ένα από ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Πολύ μεγάλο: αναμενόταν ${t.origin??"τιμή"} να έχει ${i}${t.maximum.toString()} ${a.unit??"στοιχεία"}`;return`Πολύ μεγάλο: αναμενόταν ${t.origin??"τιμή"} να είναι ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Πολύ μικρό: αναμενόταν ${t.origin} να έχει ${i}${t.minimum.toString()} ${a.unit}`;return`Πολύ μικρό: αναμενόταν ${t.origin} να είναι ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${i.prefix}"`;if(i.format==="ends_with")return`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${i.suffix}"`;if(i.format==="includes")return`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${i.includes}"`;if(i.format==="regex")return`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${i.pattern}`;return`Μη έγκυρο: ${n[i.format]??t.format}`}case"not_multiple_of":return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${t.divisor}`;case"unrecognized_keys":return`Άγνωστ${t.keys.length>1?"α":"ο"} κλειδ${t.keys.length>1?"ιά":"ί"}: ${D(t.keys,", ")}`;case"invalid_key":return`Μη έγκυρο κλειδί στο ${t.origin}`;case"invalid_union":return"Μη έγκυρη είσοδος";case"invalid_element":return`Μη έγκυρη τιμή στο ${t.origin}`;default:return"Μη έγκυρη είσοδος"}}};function bu(){return{localeError:X_()}}var Y_=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function r(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":if(t.values.length===1)return`Invalid input: expected ${M(t.values[0])}`;return`Invalid option: expected one of ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Too big: expected ${t.origin??"value"} to have ${i}${t.maximum.toString()} ${a.unit??"elements"}`;return`Too big: expected ${t.origin??"value"} to be ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Too small: expected ${t.origin} to have ${i}${t.minimum.toString()} ${a.unit}`;return`Too small: expected ${t.origin} to be ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Invalid string: must start with "${i.prefix}"`;if(i.format==="ends_with")return`Invalid string: must end with "${i.suffix}"`;if(i.format==="includes")return`Invalid string: must include "${i.includes}"`;if(i.format==="regex")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${n[i.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":if(t.options&&Array.isArray(t.options)&&t.options.length>0)return`Invalid discriminator value. Expected ${t.options.map((a)=>`'${a}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function Jr(){return{localeError:Y_()}}var Q_=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(t){return e[t]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Nevalida enigo: atendiĝis instanceof ${t.expected}, riceviĝis ${s}`;return`Nevalida enigo: atendiĝis ${i}, riceviĝis ${s}`}case"invalid_value":if(t.values.length===1)return`Nevalida enigo: atendiĝis ${M(t.values[0])}`;return`Nevalida opcio: atendiĝis unu el ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${i}${t.maximum.toString()} ${a.unit??"elementojn"}`;return`Tro granda: atendiĝis ke ${t.origin??"valoro"} havu ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Tro malgranda: atendiĝis ke ${t.origin} havu ${i}${t.minimum.toString()} ${a.unit}`;return`Tro malgranda: atendiĝis ke ${t.origin} estu ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Nevalida karaktraro: devas komenciĝi per "${i.prefix}"`;if(i.format==="ends_with")return`Nevalida karaktraro: devas finiĝi per "${i.suffix}"`;if(i.format==="includes")return`Nevalida karaktraro: devas inkluzivi "${i.includes}"`;if(i.format==="regex")return`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`;return`Nevalida ${n[i.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} ŝlosilo${t.keys.length>1?"j":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function _u(){return{localeError:Q_()}}var ex=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function r(t){return e[t]??null}let n={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Entrada inválida: se esperaba instanceof ${t.expected}, recibido ${s}`;return`Entrada inválida: se esperaba ${i}, recibido ${s}`}case"invalid_value":if(t.values.length===1)return`Entrada inválida: se esperaba ${M(t.values[0])}`;return`Opción inválida: se esperaba una de ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin),s=o[t.origin]??t.origin;if(a)return`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${t.maximum.toString()} ${a.unit??"elementos"}`;return`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin),s=o[t.origin]??t.origin;if(a)return`Demasiado pequeño: se esperaba que ${s} tuviera ${i}${t.minimum.toString()} ${a.unit}`;return`Demasiado pequeño: se esperaba que ${s} fuera ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Cadena inválida: debe comenzar con "${i.prefix}"`;if(i.format==="ends_with")return`Cadena inválida: debe terminar en "${i.suffix}"`;if(i.format==="includes")return`Cadena inválida: debe incluir "${i.includes}"`;if(i.format==="regex")return`Cadena inválida: debe coincidir con el patrón ${i.pattern}`;return`Inválido ${n[i.format]??t.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Llave inválida en ${o[t.origin]??t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${o[t.origin]??t.origin}`;default:return"Entrada inválida"}}};function xu(){return{localeError:ex()}}var tx=()=>{let e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function r(t){return e[t]??null}let n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},o={nan:"NaN",number:"عدد",array:"آرایه"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`ورودی نامعتبر: می‌بایست instanceof ${t.expected} می‌بود، ${s} دریافت شد`;return`ورودی نامعتبر: می‌بایست ${i} می‌بود، ${s} دریافت شد`}case"invalid_value":if(t.values.length===1)return`ورودی نامعتبر: می‌بایست ${M(t.values[0])} می‌بود`;return`گزینه نامعتبر: می‌بایست یکی از ${D(t.values,"|")} می‌بود`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`خیلی بزرگ: ${t.origin??"مقدار"} باید ${i}${t.maximum.toString()} ${a.unit??"عنصر"} باشد`;return`خیلی بزرگ: ${t.origin??"مقدار"} باید ${i}${t.maximum.toString()} باشد`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`خیلی کوچک: ${t.origin} باید ${i}${t.minimum.toString()} ${a.unit} باشد`;return`خیلی کوچک: ${t.origin} باید ${i}${t.minimum.toString()} باشد`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`رشته نامعتبر: باید با "${i.prefix}" شروع شود`;if(i.format==="ends_with")return`رشته نامعتبر: باید با "${i.suffix}" تمام شود`;if(i.format==="includes")return`رشته نامعتبر: باید شامل "${i.includes}" باشد`;if(i.format==="regex")return`رشته نامعتبر: باید با الگوی ${i.pattern} مطابقت داشته باشد`;return`${n[i.format]??t.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${t.divisor} باشد`;case"unrecognized_keys":return`کلید${t.keys.length>1?"های":""} ناشناس: ${D(t.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${t.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${t.origin}`;default:return"ورودی نامعتبر"}}};function $u(){return{localeError:tx()}}var rx=()=>{let e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function r(t){return e[t]??null}let n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${s}`;return`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":if(t.values.length===1)return`Virheellinen syöte: täytyy olla ${M(t.values[0])}`;return`Virheellinen valinta: täytyy olla yksi seuraavista: ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Liian suuri: ${a.subject} täytyy olla ${i}${t.maximum.toString()} ${a.unit}`.trim();return`Liian suuri: arvon täytyy olla ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Liian pieni: ${a.subject} täytyy olla ${i}${t.minimum.toString()} ${a.unit}`.trim();return`Liian pieni: arvon täytyy olla ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Virheellinen syöte: täytyy alkaa "${i.prefix}"`;if(i.format==="ends_with")return`Virheellinen syöte: täytyy loppua "${i.suffix}"`;if(i.format==="includes")return`Virheellinen syöte: täytyy sisältää "${i.includes}"`;if(i.format==="regex")return`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${i.pattern}`;return`Virheellinen ${n[i.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${D(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function wu(){return{localeError:rx()}}var nx=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function r(t){return e[t]??null}let n={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={string:"chaîne",number:"nombre",int:"entier",boolean:"booléen",bigint:"grand entier",symbol:"symbole",undefined:"indéfini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Entrée invalide : instanceof ${t.expected} attendu, ${s} reçu`;return`Entrée invalide : ${i} attendu, ${s} reçu`}case"invalid_value":if(t.values.length===1)return`Entrée invalide : ${M(t.values[0])} attendu`;return`Option invalide : une valeur parmi ${D(t.values,"|")} attendue`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Trop grand : ${o[t.origin]??"valeur"} doit ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"élément(s)"}`;return`Trop grand : ${o[t.origin]??"valeur"} doit être ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Trop petit : ${o[t.origin]??"valeur"} doit ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`;return`Trop petit : ${o[t.origin]??"valeur"} doit être ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Chaîne invalide : doit commencer par "${i.prefix}"`;if(i.format==="ends_with")return`Chaîne invalide : doit se terminer par "${i.suffix}"`;if(i.format==="includes")return`Chaîne invalide : doit inclure "${i.includes}"`;if(i.format==="regex")return`Chaîne invalide : doit correspondre au modèle ${i.pattern}`;return`${n[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${D(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function ku(){return{localeError:nx()}}var ix=()=>{let e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function r(t){return e[t]??null}let n={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Entrée invalide : attendu instanceof ${t.expected}, reçu ${s}`;return`Entrée invalide : attendu ${i}, reçu ${s}`}case"invalid_value":if(t.values.length===1)return`Entrée invalide : attendu ${M(t.values[0])}`;return`Option invalide : attendu l'une des valeurs suivantes ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"≤":"<",a=r(t.origin);if(a)return`Trop grand : attendu que ${t.origin??"la valeur"} ait ${i}${t.maximum.toString()} ${a.unit}`;return`Trop grand : attendu que ${t.origin??"la valeur"} soit ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"≥":">",a=r(t.origin);if(a)return`Trop petit : attendu que ${t.origin} ait ${i}${t.minimum.toString()} ${a.unit}`;return`Trop petit : attendu que ${t.origin} soit ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Chaîne invalide : doit commencer par "${i.prefix}"`;if(i.format==="ends_with")return`Chaîne invalide : doit se terminer par "${i.suffix}"`;if(i.format==="includes")return`Chaîne invalide : doit inclure "${i.includes}"`;if(i.format==="regex")return`Chaîne invalide : doit correspondre au motif ${i.pattern}`;return`${n[i.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${t.divisor}`;case"unrecognized_keys":return`Clé${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${D(t.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${t.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entrée invalide"}}};function Iu(){return{localeError:ix()}}var ox=()=>{let e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},r={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=(c)=>c?e[c]:void 0,o=(c)=>{let d=n(c);if(d)return d.label;return c??e.unknown.label},t=(c)=>`ה${o(c)}`,i=(c)=>(n(c)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",a=(c)=>{if(!c)return null;return r[c]??null},s={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},u={nan:"NaN"};return(c)=>{switch(c.code){case"invalid_type":{let d=c.expected,l=u[d??""]??o(d),h=q(c.input),f=u[h]??e[h]?.label??h;if(/^[A-Z]/.test(c.expected))return`קלט לא תקין: צריך להיות instanceof ${c.expected}, התקבל ${f}`;return`קלט לא תקין: צריך להיות ${l}, התקבל ${f}`}case"invalid_value":{if(c.values.length===1)return`ערך לא תקין: הערך חייב להיות ${M(c.values[0])}`;let d=c.values.map((f)=>M(f));if(c.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;let l=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${l}`}case"too_big":{let d=a(c.origin),l=t(c.origin??"value");if(c.origin==="string")return`${d?.longLabel??"ארוך"} מדי: ${l} צריכה להכיל ${c.maximum.toString()} ${d?.unit??""} ${c.inclusive?"או פחות":"לכל היותר"}`.trim();if(c.origin==="number"){let g=c.inclusive?`קטן או שווה ל-${c.maximum}`:`קטן מ-${c.maximum}`;return`גדול מדי: ${l} צריך להיות ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"צריכה":"צריך",v=c.inclusive?`${c.maximum} ${d?.unit??""} או פחות`:`פחות מ-${c.maximum} ${d?.unit??""}`;return`גדול מדי: ${l} ${g} להכיל ${v}`.trim()}let h=c.inclusive?"<=":"<",f=i(c.origin??"value");if(d?.unit)return`${d.longLabel} מדי: ${l} ${f} ${h}${c.maximum.toString()} ${d.unit}`;return`${d?.longLabel??"גדול"} מדי: ${l} ${f} ${h}${c.maximum.toString()}`}case"too_small":{let d=a(c.origin),l=t(c.origin??"value");if(c.origin==="string")return`${d?.shortLabel??"קצר"} מדי: ${l} צריכה להכיל ${c.minimum.toString()} ${d?.unit??""} ${c.inclusive?"או יותר":"לפחות"}`.trim();if(c.origin==="number"){let g=c.inclusive?`גדול או שווה ל-${c.minimum}`:`גדול מ-${c.minimum}`;return`קטן מדי: ${l} צריך להיות ${g}`}if(c.origin==="array"||c.origin==="set"){let g=c.origin==="set"?"צריכה":"צריך";if(c.minimum===1&&c.inclusive){let y=c.origin==="set"?"לפחות פריט אחד":"לפחות פריט אחד";return`קטן מדי: ${l} ${g} להכיל ${y}`}let v=c.inclusive?`${c.minimum} ${d?.unit??""} או יותר`:`יותר מ-${c.minimum} ${d?.unit??""}`;return`קטן מדי: ${l} ${g} להכיל ${v}`.trim()}let h=c.inclusive?">=":">",f=i(c.origin??"value");if(d?.unit)return`${d.shortLabel} מדי: ${l} ${f} ${h}${c.minimum.toString()} ${d.unit}`;return`${d?.shortLabel??"קטן"} מדי: ${l} ${f} ${h}${c.minimum.toString()}`}case"invalid_format":{let d=c;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;let l=s[d.format],h=l?.label??d.format,g=(l?.gender??"m")==="f"?"תקינה":"תקין";return`${h} לא ${g}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${c.divisor}`;case"unrecognized_keys":return`מפתח${c.keys.length>1?"ות":""} לא מזוה${c.keys.length>1?"ים":"ה"}: ${D(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${t(c.origin??"array")}`;default:return"קלט לא תקין"}}};function Su(){return{localeError:ox()}}var ax=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function r(t){return e[t]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Neispravan unos: očekuje se instanceof ${t.expected}, a primljeno je ${s}`;return`Neispravan unos: očekuje se ${i}, a primljeno je ${s}`}case"invalid_value":if(t.values.length===1)return`Neispravna vrijednost: očekivano ${M(t.values[0])}`;return`Neispravna opcija: očekivano jedno od ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin),s=o[t.origin]??t.origin;if(a)return`Preveliko: očekivano da ${s??"vrijednost"} ima ${i}${t.maximum.toString()} ${a.unit??"elemenata"}`;return`Preveliko: očekivano da ${s??"vrijednost"} bude ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin),s=o[t.origin]??t.origin;if(a)return`Premalo: očekivano da ${s} ima ${i}${t.minimum.toString()} ${a.unit}`;return`Premalo: očekivano da ${s} bude ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Neispravan tekst: mora započinjati s "${i.prefix}"`;if(i.format==="ends_with")return`Neispravan tekst: mora završavati s "${i.suffix}"`;if(i.format==="includes")return`Neispravan tekst: mora sadržavati "${i.includes}"`;if(i.format==="regex")return`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`;return`Neispravna ${n[i.format]??t.format}`}case"not_multiple_of":return`Neispravan broj: mora biti višekratnik od ${t.divisor}`;case"unrecognized_keys":return`Neprepoznat${t.keys.length>1?"i ključevi":" ključ"}: ${D(t.keys,", ")}`;case"invalid_key":return`Neispravan ključ u ${o[t.origin]??t.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[t.origin]??t.origin}`;default:return"Neispravan unos"}}};function zu(){return{localeError:ax()}}var sx=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){return e[t]??null}let n={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"szám",array:"tömb"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Érvénytelen bemenet: a várt érték instanceof ${t.expected}, a kapott érték ${s}`;return`Érvénytelen bemenet: a várt érték ${i}, a kapott érték ${s}`}case"invalid_value":if(t.values.length===1)return`Érvénytelen bemenet: a várt érték ${M(t.values[0])}`;return`Érvénytelen opció: valamelyik érték várt ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Túl nagy: ${t.origin??"érték"} mérete túl nagy ${i}${t.maximum.toString()} ${a.unit??"elem"}`;return`Túl nagy: a bemeneti érték ${t.origin??"érték"} túl nagy: ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Túl kicsi: a bemeneti érték ${t.origin} mérete túl kicsi ${i}${t.minimum.toString()} ${a.unit}`;return`Túl kicsi: a bemeneti érték ${t.origin} túl kicsi ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Érvénytelen string: "${i.prefix}" értékkel kell kezdődnie`;if(i.format==="ends_with")return`Érvénytelen string: "${i.suffix}" értékkel kell végződnie`;if(i.format==="includes")return`Érvénytelen string: "${i.includes}" értéket kell tartalmaznia`;if(i.format==="regex")return`Érvénytelen string: ${i.pattern} mintának kell megfelelnie`;return`Érvénytelen ${n[i.format]??t.format}`}case"not_multiple_of":return`Érvénytelen szám: ${t.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${t.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${t.origin}`;default:return"Érvénytelen bemenet"}}};function Pu(){return{localeError:sx()}}function Lm(e,r,n){return Math.abs(e)===1?r:n}function Yt(e){if(!e)return"";let r=["ա","ե","ը","ի","ո","ու","օ"],n=e[e.length-1];return e+(r.includes(n)?"ն":"ը")}var ux=()=>{let e={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function r(t){return e[t]??null}let n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},o={nan:"NaN",number:"թիվ",array:"զանգված"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Սխալ մուտքագրում․ սպասվում էր instanceof ${t.expected}, ստացվել է ${s}`;return`Սխալ մուտքագրում․ սպասվում էր ${i}, ստացվել է ${s}`}case"invalid_value":if(t.values.length===1)return`Սխալ մուտքագրում․ սպասվում էր ${M(t.values[1])}`;return`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),u=Lm(s,a.unit.one,a.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Yt(t.origin??"արժեք")} կունենա ${i}${t.maximum.toString()} ${u}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Yt(t.origin??"արժեք")} լինի ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),u=Lm(s,a.unit.one,a.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Yt(t.origin)} կունենա ${i}${t.minimum.toString()} ${u}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Yt(t.origin)} լինի ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Սխալ տող․ պետք է սկսվի "${i.prefix}"-ով`;if(i.format==="ends_with")return`Սխալ տող․ պետք է ավարտվի "${i.suffix}"-ով`;if(i.format==="includes")return`Սխալ տող․ պետք է պարունակի "${i.includes}"`;if(i.format==="regex")return`Սխալ տող․ պետք է համապատասխանի ${i.pattern} ձևաչափին`;return`Սխալ ${n[i.format]??t.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${t.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${t.keys.length>1?"ներ":""}. ${D(t.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${Yt(t.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${Yt(t.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function Tu(){return{localeError:ux()}}var cx=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){return e[t]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${s}`;return`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":if(t.values.length===1)return`Input tidak valid: diharapkan ${M(t.values[0])}`;return`Pilihan tidak valid: diharapkan salah satu dari ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${i}${t.maximum.toString()} ${a.unit??"elemen"}`;return`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Terlalu kecil: diharapkan ${t.origin} memiliki ${i}${t.minimum.toString()} ${a.unit}`;return`Terlalu kecil: diharapkan ${t.origin} menjadi ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`String tidak valid: harus dimulai dengan "${i.prefix}"`;if(i.format==="ends_with")return`String tidak valid: harus berakhir dengan "${i.suffix}"`;if(i.format==="includes")return`String tidak valid: harus menyertakan "${i.includes}"`;if(i.format==="regex")return`String tidak valid: harus sesuai pola ${i.pattern}`;return`${n[i.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function Eu(){return{localeError:cx()}}var lx=()=>{let e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function r(t){return e[t]??null}let n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"númer",array:"fylki"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Rangt gildi: Þú slóst inn ${s} þar sem á að vera instanceof ${t.expected}`;return`Rangt gildi: Þú slóst inn ${s} þar sem á að vera ${i}`}case"invalid_value":if(t.values.length===1)return`Rangt gildi: gert ráð fyrir ${M(t.values[0])}`;return`Ógilt val: má vera eitt af eftirfarandi ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} hafi ${i}${t.maximum.toString()} ${a.unit??"hluti"}`;return`Of stórt: gert er ráð fyrir að ${t.origin??"gildi"} sé ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Of lítið: gert er ráð fyrir að ${t.origin} hafi ${i}${t.minimum.toString()} ${a.unit}`;return`Of lítið: gert er ráð fyrir að ${t.origin} sé ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Ógildur strengur: verður að byrja á "${i.prefix}"`;if(i.format==="ends_with")return`Ógildur strengur: verður að enda á "${i.suffix}"`;if(i.format==="includes")return`Ógildur strengur: verður að innihalda "${i.includes}"`;if(i.format==="regex")return`Ógildur strengur: verður að fylgja mynstri ${i.pattern}`;return`Rangt ${n[i.format]??t.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`Óþekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${D(t.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${t.origin}`;default:return"Rangt gildi"}}};function Ou(){return{localeError:lx()}}var dx=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){return e[t]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Input non valido: atteso instanceof ${t.expected}, ricevuto ${s}`;return`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":if(t.values.length===1)return`Input non valido: atteso ${M(t.values[0])}`;return`Opzione non valida: atteso uno tra ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Troppo grande: ${t.origin??"valore"} deve avere ${i}${t.maximum.toString()} ${a.unit??"elementi"}`;return`Troppo grande: ${t.origin??"valore"} deve essere ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Troppo piccolo: ${t.origin} deve avere ${i}${t.minimum.toString()} ${a.unit}`;return`Troppo piccolo: ${t.origin} deve essere ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Stringa non valida: deve iniziare con "${i.prefix}"`;if(i.format==="ends_with")return`Stringa non valida: deve terminare con "${i.suffix}"`;if(i.format==="includes")return`Stringa non valida: deve includere "${i.includes}"`;if(i.format==="regex")return`Stringa non valida: deve corrispondere al pattern ${i.pattern}`;return`Input non valido: ${n[i.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${D(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function ju(){return{localeError:dx()}}var fx=()=>{let e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function r(t){return e[t]??null}let n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},o={nan:"NaN",number:"数値",array:"配列"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`無効な入力: instanceof ${t.expected}が期待されましたが、${s}が入力されました`;return`無効な入力: ${i}が期待されましたが、${s}が入力されました`}case"invalid_value":if(t.values.length===1)return`無効な入力: ${M(t.values[0])}が期待されました`;return`無効な選択: ${D(t.values,"、")}のいずれかである必要があります`;case"too_big":{let i=t.inclusive?"以下である":"より小さい",a=r(t.origin);if(a)return`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${a.unit??"要素"}${i}必要があります`;return`大きすぎる値: ${t.origin??"値"}は${t.maximum.toString()}${i}必要があります`}case"too_small":{let i=t.inclusive?"以上である":"より大きい",a=r(t.origin);if(a)return`小さすぎる値: ${t.origin}は${t.minimum.toString()}${a.unit}${i}必要があります`;return`小さすぎる値: ${t.origin}は${t.minimum.toString()}${i}必要があります`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`無効な文字列: "${i.prefix}"で始まる必要があります`;if(i.format==="ends_with")return`無効な文字列: "${i.suffix}"で終わる必要があります`;if(i.format==="includes")return`無効な文字列: "${i.includes}"を含む必要があります`;if(i.format==="regex")return`無効な文字列: パターン${i.pattern}に一致する必要があります`;return`無効な${n[i.format]??t.format}`}case"not_multiple_of":return`無効な数値: ${t.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${t.keys.length>1?"群":""}: ${D(t.keys,"、")}`;case"invalid_key":return`${t.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${t.origin}内の無効な値`;default:return"無効な入力"}}};function Du(){return{localeError:fx()}}var mx=()=>{let e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function r(t){return e[t]??null}let n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული ველი",base64url:"base64url-კოდირებული ველი",json_string:"JSON ველი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},o={nan:"NaN",number:"რიცხვი",string:"ველი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`არასწორი შეყვანა: მოსალოდნელი instanceof ${t.expected}, მიღებული ${s}`;return`არასწორი შეყვანა: მოსალოდნელი ${i}, მიღებული ${s}`}case"invalid_value":if(t.values.length===1)return`არასწორი შეყვანა: მოსალოდნელი ${M(t.values[0])}`;return`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${D(t.values,"|")}-დან`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit}`;return`ზედმეტად დიდი: მოსალოდნელი ${t.origin??"მნიშვნელობა"} იყოს ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`ზედმეტად პატარა: მოსალოდნელი ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`;return`ზედმეტად პატარა: მოსალოდნელი ${t.origin} იყოს ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`არასწორი ველი: უნდა იწყებოდეს "${i.prefix}"-ით`;if(i.format==="ends_with")return`არასწორი ველი: უნდა მთავრდებოდეს "${i.suffix}"-ით`;if(i.format==="includes")return`არასწორი ველი: უნდა შეიცავდეს "${i.includes}"-ს`;if(i.format==="regex")return`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${i.pattern}`;return`არასწორი ${n[i.format]??t.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${t.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${t.keys.length>1?"ები":"ი"}: ${D(t.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${t.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${t.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Uu(){return{localeError:mx()}}var px=()=>{let e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function r(t){return e[t]??null}let n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},o={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${t.expected} ប៉ុន្តែទទួលបាន ${s}`;return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${i} ប៉ុន្តែទទួលបាន ${s}`}case"invalid_value":if(t.values.length===1)return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${M(t.values[0])}`;return`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${i} ${t.maximum.toString()} ${a.unit??"ធាតុ"}`;return`ធំពេក៖ ត្រូវការ ${t.origin??"តម្លៃ"} ${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`តូចពេក៖ ត្រូវការ ${t.origin} ${i} ${t.minimum.toString()} ${a.unit}`;return`តូចពេក៖ ត្រូវការ ${t.origin} ${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${i.prefix}"`;if(i.format==="ends_with")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${i.suffix}"`;if(i.format==="includes")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${i.includes}"`;if(i.format==="regex")return`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${i.pattern}`;return`មិនត្រឹមត្រូវ៖ ${n[i.format]??t.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${t.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${D(t.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${t.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Wr(){return{localeError:px()}}function Ru(){return Wr()}var hx=()=>{let e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function r(t){return e[t]??null}let n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`잘못된 입력: 예상 타입은 instanceof ${t.expected}, 받은 타입은 ${s}입니다`;return`잘못된 입력: 예상 타입은 ${i}, 받은 타입은 ${s}입니다`}case"invalid_value":if(t.values.length===1)return`잘못된 입력: 값은 ${M(t.values[0])} 이어야 합니다`;return`잘못된 옵션: ${D(t.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let i=t.inclusive?"이하":"미만",a=i==="미만"?"이어야 합니다":"여야 합니다",s=r(t.origin),u=s?.unit??"요소";if(s)return`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()}${u} ${i}${a}`;return`${t.origin??"값"}이 너무 큽니다: ${t.maximum.toString()} ${i}${a}`}case"too_small":{let i=t.inclusive?"이상":"초과",a=i==="이상"?"이어야 합니다":"여야 합니다",s=r(t.origin),u=s?.unit??"요소";if(s)return`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()}${u} ${i}${a}`;return`${t.origin??"값"}이 너무 작습니다: ${t.minimum.toString()} ${i}${a}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`잘못된 문자열: "${i.prefix}"(으)로 시작해야 합니다`;if(i.format==="ends_with")return`잘못된 문자열: "${i.suffix}"(으)로 끝나야 합니다`;if(i.format==="includes")return`잘못된 문자열: "${i.includes}"을(를) 포함해야 합니다`;if(i.format==="regex")return`잘못된 문자열: 정규식 ${i.pattern} 패턴과 일치해야 합니다`;return`잘못된 ${n[i.format]??t.format}`}case"not_multiple_of":return`잘못된 숫자: ${t.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${D(t.keys,", ")}`;case"invalid_key":return`잘못된 키: ${t.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${t.origin}`;default:return"잘못된 입력"}}};function Cu(){return{localeError:hx()}}var Gr=(e)=>e.charAt(0).toUpperCase()+e.slice(1);function Fm(e){let r=Math.abs(e),n=r%10,o=r%100;if(o>=11&&o<=19||n===0)return"many";if(n===1)return"one";return"few"}var gx=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function r(t,i,a,s){let u=e[t]??null;if(u===null)return u;return{unit:u.unit[i],verb:u.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},o={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Gautas tipas ${s}, o tikėtasi - instanceof ${t.expected}`;return`Gautas tipas ${s}, o tikėtasi - ${i}`}case"invalid_value":if(t.values.length===1)return`Privalo būti ${M(t.values[0])}`;return`Privalo būti vienas iš ${D(t.values,"|")} pasirinkimų`;case"too_big":{let i=o[t.origin]??t.origin,a=r(t.origin,Fm(Number(t.maximum)),t.inclusive??!1,"smaller");if(a?.verb)return`${Gr(i??t.origin??"reikšmė")} ${a.verb} ${t.maximum.toString()} ${a.unit??"elementų"}`;let s=t.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Gr(i??t.origin??"reikšmė")} turi būti ${s} ${t.maximum.toString()} ${a?.unit}`}case"too_small":{let i=o[t.origin]??t.origin,a=r(t.origin,Fm(Number(t.minimum)),t.inclusive??!1,"bigger");if(a?.verb)return`${Gr(i??t.origin??"reikšmė")} ${a.verb} ${t.minimum.toString()} ${a.unit??"elementų"}`;let s=t.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Gr(i??t.origin??"reikšmė")} turi būti ${s} ${t.minimum.toString()} ${a?.unit}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Eilutė privalo prasidėti "${i.prefix}"`;if(i.format==="ends_with")return`Eilutė privalo pasibaigti "${i.suffix}"`;if(i.format==="includes")return`Eilutė privalo įtraukti "${i.includes}"`;if(i.format==="regex")return`Eilutė privalo atitikti ${i.pattern}`;return`Neteisingas ${n[i.format]??t.format}`}case"not_multiple_of":return`Skaičius privalo būti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${D(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let i=o[t.origin]??t.origin;return`${Gr(i??t.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Au(){return{localeError:gx()}}var vx=()=>{let e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function r(t){return e[t]??null}let n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},o={nan:"NaN",number:"број",array:"низа"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Грешен внес: се очекува instanceof ${t.expected}, примено ${s}`;return`Грешен внес: се очекува ${i}, примено ${s}`}case"invalid_value":if(t.values.length===1)return`Invalid input: expected ${M(t.values[0])}`;return`Грешана опција: се очекува една ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Премногу голем: се очекува ${t.origin??"вредноста"} да има ${i}${t.maximum.toString()} ${a.unit??"елементи"}`;return`Премногу голем: се очекува ${t.origin??"вредноста"} да биде ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Премногу мал: се очекува ${t.origin} да има ${i}${t.minimum.toString()} ${a.unit}`;return`Премногу мал: се очекува ${t.origin} да биде ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Неважечка низа: мора да започнува со "${i.prefix}"`;if(i.format==="ends_with")return`Неважечка низа: мора да завршува со "${i.suffix}"`;if(i.format==="includes")return`Неважечка низа: мора да вклучува "${i.includes}"`;if(i.format==="regex")return`Неважечка низа: мора да одгоара на патернот ${i.pattern}`;return`Invalid ${n[i.format]??t.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${D(t.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${t.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${t.origin}`;default:return"Грешен внес"}}};function Nu(){return{localeError:vx()}}var yx=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){return e[t]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${s}`;return`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":if(t.values.length===1)return`Input tidak sah: dijangka ${M(t.values[0])}`;return`Pilihan tidak sah: dijangka salah satu daripada ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Terlalu besar: dijangka ${t.origin??"nilai"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"elemen"}`;return`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Terlalu kecil: dijangka ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`;return`Terlalu kecil: dijangka ${t.origin} adalah ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`String tidak sah: mesti bermula dengan "${i.prefix}"`;if(i.format==="ends_with")return`String tidak sah: mesti berakhir dengan "${i.suffix}"`;if(i.format==="includes")return`String tidak sah: mesti mengandungi "${i.includes}"`;if(i.format==="regex")return`String tidak sah: mesti sepadan dengan corak ${i.pattern}`;return`${n[i.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${D(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function Zu(){return{localeError:yx()}}var bx=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function r(t){return e[t]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${s}`;return`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":if(t.values.length===1)return`Ongeldige invoer: verwacht ${M(t.values[0])}`;return`Ongeldige optie: verwacht één van ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin),s=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";if(a)return`Te ${s}: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`;return`Te ${s}: verwacht dat ${t.origin??"waarde"} ${i}${t.maximum.toString()} is`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin),s=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";if(a)return`Te ${s}: verwacht dat ${t.origin} ${i}${t.minimum.toString()} ${a.unit} ${a.verb}`;return`Te ${s}: verwacht dat ${t.origin} ${i}${t.minimum.toString()} is`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Ongeldige tekst: moet met "${i.prefix}" beginnen`;if(i.format==="ends_with")return`Ongeldige tekst: moet op "${i.suffix}" eindigen`;if(i.format==="includes")return`Ongeldige tekst: moet "${i.includes}" bevatten`;if(i.format==="regex")return`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`;return`Ongeldig: ${n[i.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function Lu(){return{localeError:bx()}}var _x=()=>{let e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function r(t){return e[t]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Ugyldig input: forventet instanceof ${t.expected}, fikk ${s}`;return`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":if(t.values.length===1)return`Ugyldig verdi: forventet ${M(t.values[0])}`;return`Ugyldig valg: forventet en av ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`For stor(t): forventet ${t.origin??"value"} til å ha ${i}${t.maximum.toString()} ${a.unit??"elementer"}`;return`For stor(t): forventet ${t.origin??"value"} til å ha ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`For lite(n): forventet ${t.origin} til å ha ${i}${t.minimum.toString()} ${a.unit}`;return`For lite(n): forventet ${t.origin} til å ha ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Ugyldig streng: må starte med "${i.prefix}"`;if(i.format==="ends_with")return`Ugyldig streng: må ende med "${i.suffix}"`;if(i.format==="includes")return`Ugyldig streng: må inneholde "${i.includes}"`;if(i.format==="regex")return`Ugyldig streng: må matche mønsteret ${i.pattern}`;return`Ugyldig ${n[i.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${D(t.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function Fu(){return{localeError:_x()}}var xx=()=>{let e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function r(t){return e[t]??null}let n={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Fâsit giren: umulan instanceof ${t.expected}, alınan ${s}`;return`Fâsit giren: umulan ${i}, alınan ${s}`}case"invalid_value":if(t.values.length===1)return`Fâsit giren: umulan ${M(t.values[0])}`;return`Fâsit tercih: mûteberler ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Fazla büyük: ${t.origin??"value"}, ${i}${t.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`;return`Fazla büyük: ${t.origin??"value"}, ${i}${t.maximum.toString()} olmalıydı.`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Fazla küçük: ${t.origin}, ${i}${t.minimum.toString()} ${a.unit} sahip olmalıydı.`;return`Fazla küçük: ${t.origin}, ${i}${t.minimum.toString()} olmalıydı.`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Fâsit metin: "${i.prefix}" ile başlamalı.`;if(i.format==="ends_with")return`Fâsit metin: "${i.suffix}" ile bitmeli.`;if(i.format==="includes")return`Fâsit metin: "${i.includes}" ihtivâ etmeli.`;if(i.format==="regex")return`Fâsit metin: ${i.pattern} nakşına uymalı.`;return`Fâsit ${n[i.format]??t.format}`}case"not_multiple_of":return`Fâsit sayı: ${t.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${t.keys.length>1?"s":""}: ${D(t.keys,", ")}`;case"invalid_key":return`${t.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${t.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Bu(){return{localeError:xx()}}var $x=()=>{let e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function r(t){return e[t]??null}let n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},o={nan:"NaN",number:"عدد",array:"ارې"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`ناسم ورودي: باید instanceof ${t.expected} وای, مګر ${s} ترلاسه شو`;return`ناسم ورودي: باید ${i} وای, مګر ${s} ترلاسه شو`}case"invalid_value":if(t.values.length===1)return`ناسم ورودي: باید ${M(t.values[0])} وای`;return`ناسم انتخاب: باید یو له ${D(t.values,"|")} څخه وای`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`ډیر لوی: ${t.origin??"ارزښت"} باید ${i}${t.maximum.toString()} ${a.unit??"عنصرونه"} ولري`;return`ډیر لوی: ${t.origin??"ارزښت"} باید ${i}${t.maximum.toString()} وي`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`ډیر کوچنی: ${t.origin} باید ${i}${t.minimum.toString()} ${a.unit} ولري`;return`ډیر کوچنی: ${t.origin} باید ${i}${t.minimum.toString()} وي`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`ناسم متن: باید د "${i.prefix}" سره پیل شي`;if(i.format==="ends_with")return`ناسم متن: باید د "${i.suffix}" سره پای ته ورسيږي`;if(i.format==="includes")return`ناسم متن: باید "${i.includes}" ولري`;if(i.format==="regex")return`ناسم متن: باید د ${i.pattern} سره مطابقت ولري`;return`${n[i.format]??t.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${t.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${t.keys.length>1?"کلیډونه":"کلیډ"}: ${D(t.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${t.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${t.origin} کې`;default:return"ناسمه ورودي"}}};function Mu(){return{localeError:$x()}}var wx=()=>{let e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function r(t){return e[t]??null}let n={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},o={nan:"NaN",number:"liczba",array:"tablica"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${t.expected}, otrzymano ${s}`;return`Nieprawidłowe dane wejściowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":if(t.values.length===1)return`Nieprawidłowe dane wejściowe: oczekiwano ${M(t.values[0])}`;return`Nieprawidłowa opcja: oczekiwano jednej z wartości ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Za duża wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${i}${t.maximum.toString()} ${a.unit??"elementów"}`;return`Zbyt duż(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Za mała wartość: oczekiwano, że ${t.origin??"wartość"} będzie mieć ${i}${t.minimum.toString()} ${a.unit??"elementów"}`;return`Zbyt mał(y/a/e): oczekiwano, że ${t.origin??"wartość"} będzie wynosić ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Nieprawidłowy ciąg znaków: musi zaczynać się od "${i.prefix}"`;if(i.format==="ends_with")return`Nieprawidłowy ciąg znaków: musi kończyć się na "${i.suffix}"`;if(i.format==="includes")return`Nieprawidłowy ciąg znaków: musi zawierać "${i.includes}"`;if(i.format==="regex")return`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${i.pattern}`;return`Nieprawidłow(y/a/e) ${n[i.format]??t.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${t.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${t.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Vu(){return{localeError:wx()}}var kx=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){return e[t]??null}let n={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"número",null:"nulo"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Tipo inválido: esperado instanceof ${t.expected}, recebido ${s}`;return`Tipo inválido: esperado ${i}, recebido ${s}`}case"invalid_value":if(t.values.length===1)return`Entrada inválida: esperado ${M(t.values[0])}`;return`Opção inválida: esperada uma das ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Muito grande: esperado que ${t.origin??"valor"} tivesse ${i}${t.maximum.toString()} ${a.unit??"elementos"}`;return`Muito grande: esperado que ${t.origin??"valor"} fosse ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Muito pequeno: esperado que ${t.origin} tivesse ${i}${t.minimum.toString()} ${a.unit}`;return`Muito pequeno: esperado que ${t.origin} fosse ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Texto inválido: deve começar com "${i.prefix}"`;if(i.format==="ends_with")return`Texto inválido: deve terminar com "${i.suffix}"`;if(i.format==="includes")return`Texto inválido: deve incluir "${i.includes}"`;if(i.format==="regex")return`Texto inválido: deve corresponder ao padrão ${i.pattern}`;return`${n[i.format]??t.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Chave inválida em ${t.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${t.origin}`;default:return"Campo inválido"}}};function qu(){return{localeError:kx()}}var Ix=()=>{let e={string:{unit:"caractere",verb:"să aibă"},file:{unit:"octeți",verb:"să aibă"},array:{unit:"elemente",verb:"să aibă"},set:{unit:"elemente",verb:"să aibă"},map:{unit:"intrări",verb:"să aibă"}};function r(t){return e[t]??null}let n={regex:"intrare",email:"adresă de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dată și oră ISO",date:"dată ISO",time:"oră ISO",duration:"durată ISO",ipv4:"adresă IPv4",ipv6:"adresă IPv6",mac:"adresă MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"șir codat base64",base64url:"șir codat base64url",json_string:"șir JSON",e164:"număr E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"șir",number:"număr",boolean:"boolean",function:"funcție",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"număr mare",void:"void",never:"never",map:"hartă",set:"set"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;return`Intrare invalidă: așteptat ${i}, primit ${s}`}case"invalid_value":if(t.values.length===1)return`Intrare invalidă: așteptat ${M(t.values[0])}`;return`Opțiune invalidă: așteptat una dintre ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Prea mare: așteptat ca ${t.origin??"valoarea"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"elemente"}`;return`Prea mare: așteptat ca ${t.origin??"valoarea"} să fie ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Prea mic: așteptat ca ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`;return`Prea mic: așteptat ca ${t.origin} să fie ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Șir invalid: trebuie să înceapă cu "${i.prefix}"`;if(i.format==="ends_with")return`Șir invalid: trebuie să se termine cu "${i.suffix}"`;if(i.format==="includes")return`Șir invalid: trebuie să includă "${i.includes}"`;if(i.format==="regex")return`Șir invalid: trebuie să se potrivească cu modelul ${i.pattern}`;return`Format invalid: ${n[i.format]??t.format}`}case"not_multiple_of":return`Număr invalid: trebuie să fie multiplu de ${t.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${D(t.keys,", ")}`;case"invalid_key":return`Cheie invalidă în ${t.origin}`;case"invalid_union":return"Intrare invalidă";case"invalid_element":return`Valoare invalidă în ${t.origin}`;default:return"Intrare invalidă"}}};function Ju(){return{localeError:Ix()}}function Bm(e,r,n,o){let t=Math.abs(e),i=t%10,a=t%100;if(a>=11&&a<=19)return o;if(i===1)return r;if(i>=2&&i<=4)return n;return o}var Sx=()=>{let e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function r(t){return e[t]??null}let n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},o={nan:"NaN",number:"число",array:"массив"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Неверный ввод: ожидалось instanceof ${t.expected}, получено ${s}`;return`Неверный ввод: ожидалось ${i}, получено ${s}`}case"invalid_value":if(t.values.length===1)return`Неверный ввод: ожидалось ${M(t.values[0])}`;return`Неверный вариант: ожидалось одно из ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),u=Bm(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет иметь ${i}${t.maximum.toString()} ${u}`}return`Слишком большое значение: ожидалось, что ${t.origin??"значение"} будет ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),u=Bm(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${t.origin} будет иметь ${i}${t.minimum.toString()} ${u}`}return`Слишком маленькое значение: ожидалось, что ${t.origin} будет ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Неверная строка: должна начинаться с "${i.prefix}"`;if(i.format==="ends_with")return`Неверная строка: должна заканчиваться на "${i.suffix}"`;if(i.format==="includes")return`Неверная строка: должна содержать "${i.includes}"`;if(i.format==="regex")return`Неверная строка: должна соответствовать шаблону ${i.pattern}`;return`Неверный ${n[i.format]??t.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${t.divisor}`;case"unrecognized_keys":return`Нераспознанн${t.keys.length>1?"ые":"ый"} ключ${t.keys.length>1?"и":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${t.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${t.origin}`;default:return"Неверные входные данные"}}};function Wu(){return{localeError:Sx()}}var zx=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){return e[t]??null}let n={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"število",array:"tabela"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Neveljaven vnos: pričakovano instanceof ${t.expected}, prejeto ${s}`;return`Neveljaven vnos: pričakovano ${i}, prejeto ${s}`}case"invalid_value":if(t.values.length===1)return`Neveljaven vnos: pričakovano ${M(t.values[0])}`;return`Neveljavna možnost: pričakovano eno izmed ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} imelo ${i}${t.maximum.toString()} ${a.unit??"elementov"}`;return`Preveliko: pričakovano, da bo ${t.origin??"vrednost"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Premajhno: pričakovano, da bo ${t.origin} imelo ${i}${t.minimum.toString()} ${a.unit}`;return`Premajhno: pričakovano, da bo ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Neveljaven niz: mora se začeti z "${i.prefix}"`;if(i.format==="ends_with")return`Neveljaven niz: mora se končati z "${i.suffix}"`;if(i.format==="includes")return`Neveljaven niz: mora vsebovati "${i.includes}"`;if(i.format==="regex")return`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`;return`Neveljaven ${n[i.format]??t.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i ključi":" ključ"}: ${D(t.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Gu(){return{localeError:zx()}}var Px=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function r(t){return e[t]??null}let n={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Ogiltig inmatning: förväntat instanceof ${t.expected}, fick ${s}`;return`Ogiltig inmatning: förväntat ${i}, fick ${s}`}case"invalid_value":if(t.values.length===1)return`Ogiltig inmatning: förväntat ${M(t.values[0])}`;return`Ogiltigt val: förväntade en av ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`För stor(t): förväntade ${t.origin??"värdet"} att ha ${i}${t.maximum.toString()} ${a.unit??"element"}`;return`För stor(t): förväntat ${t.origin??"värdet"} att ha ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`För lite(t): förväntade ${t.origin??"värdet"} att ha ${i}${t.minimum.toString()} ${a.unit}`;return`För lite(t): förväntade ${t.origin??"värdet"} att ha ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Ogiltig sträng: måste börja med "${i.prefix}"`;if(i.format==="ends_with")return`Ogiltig sträng: måste sluta med "${i.suffix}"`;if(i.format==="includes")return`Ogiltig sträng: måste innehålla "${i.includes}"`;if(i.format==="regex")return`Ogiltig sträng: måste matcha mönstret "${i.pattern}"`;return`Ogiltig(t) ${n[i.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${D(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${t.origin??"värdet"}`;default:return"Ogiltig input"}}};function Hu(){return{localeError:Px()}}var Tx=()=>{let e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function r(t){return e[t]??null}let n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${t.expected}, பெறப்பட்டது ${s}`;return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${i}, பெறப்பட்டது ${s}`}case"invalid_value":if(t.values.length===1)return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${M(t.values[0])}`;return`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${D(t.values,"|")} இல் ஒன்று`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${i}${t.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`;return`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${t.origin??"மதிப்பு"} ${i}${t.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${i}${t.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`;return`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${t.origin} ${i}${t.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`தவறான சரம்: "${i.prefix}" இல் தொடங்க வேண்டும்`;if(i.format==="ends_with")return`தவறான சரம்: "${i.suffix}" இல் முடிவடைய வேண்டும்`;if(i.format==="includes")return`தவறான சரம்: "${i.includes}" ஐ உள்ளடக்க வேண்டும்`;if(i.format==="regex")return`தவறான சரம்: ${i.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`;return`தவறான ${n[i.format]??t.format}`}case"not_multiple_of":return`தவறான எண்: ${t.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${t.keys.length>1?"கள்":""}: ${D(t.keys,", ")}`;case"invalid_key":return`${t.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${t.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function Ku(){return{localeError:Tx()}}var Ex=()=>{let e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function r(t){return e[t]??null}let n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},o={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${t.expected} แต่ได้รับ ${s}`;return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${i} แต่ได้รับ ${s}`}case"invalid_value":if(t.values.length===1)return`ค่าไม่ถูกต้อง: ควรเป็น ${M(t.values[0])}`;return`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"ไม่เกิน":"น้อยกว่า",a=r(t.origin);if(a)return`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${i} ${t.maximum.toString()} ${a.unit??"รายการ"}`;return`เกินกำหนด: ${t.origin??"ค่า"} ควรมี${i} ${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?"อย่างน้อย":"มากกว่า",a=r(t.origin);if(a)return`น้อยกว่ากำหนด: ${t.origin} ควรมี${i} ${t.minimum.toString()} ${a.unit}`;return`น้อยกว่ากำหนด: ${t.origin} ควรมี${i} ${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${i.prefix}"`;if(i.format==="ends_with")return`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${i.suffix}"`;if(i.format==="includes")return`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${i.includes}" อยู่ในข้อความ`;if(i.format==="regex")return`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${i.pattern}`;return`รูปแบบไม่ถูกต้อง: ${n[i.format]??t.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${t.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${D(t.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${t.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${t.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function Xu(){return{localeError:Ex()}}var Ox=()=>{let e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function r(t){return e[t]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Geçersiz değer: beklenen instanceof ${t.expected}, alınan ${s}`;return`Geçersiz değer: beklenen ${i}, alınan ${s}`}case"invalid_value":if(t.values.length===1)return`Geçersiz değer: beklenen ${M(t.values[0])}`;return`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Çok büyük: beklenen ${t.origin??"değer"} ${i}${t.maximum.toString()} ${a.unit??"öğe"}`;return`Çok büyük: beklenen ${t.origin??"değer"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Çok küçük: beklenen ${t.origin} ${i}${t.minimum.toString()} ${a.unit}`;return`Çok küçük: beklenen ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Geçersiz metin: "${i.prefix}" ile başlamalı`;if(i.format==="ends_with")return`Geçersiz metin: "${i.suffix}" ile bitmeli`;if(i.format==="includes")return`Geçersiz metin: "${i.includes}" içermeli`;if(i.format==="regex")return`Geçersiz metin: ${i.pattern} desenine uymalı`;return`Geçersiz ${n[i.format]??t.format}`}case"not_multiple_of":return`Geçersiz sayı: ${t.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${t.keys.length>1?"lar":""}: ${D(t.keys,", ")}`;case"invalid_key":return`${t.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${t.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function Yu(){return{localeError:Ox()}}var jx=()=>{let e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function r(t){return e[t]??null}let n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},o={nan:"NaN",number:"число",array:"масив"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Неправильні вхідні дані: очікується instanceof ${t.expected}, отримано ${s}`;return`Неправильні вхідні дані: очікується ${i}, отримано ${s}`}case"invalid_value":if(t.values.length===1)return`Неправильні вхідні дані: очікується ${M(t.values[0])}`;return`Неправильна опція: очікується одне з ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Занадто велике: очікується, що ${t.origin??"значення"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"елементів"}`;return`Занадто велике: очікується, що ${t.origin??"значення"} буде ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Занадто мале: очікується, що ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`;return`Занадто мале: очікується, що ${t.origin} буде ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Неправильний рядок: повинен починатися з "${i.prefix}"`;if(i.format==="ends_with")return`Неправильний рядок: повинен закінчуватися на "${i.suffix}"`;if(i.format==="includes")return`Неправильний рядок: повинен містити "${i.includes}"`;if(i.format==="regex")return`Неправильний рядок: повинен відповідати шаблону ${i.pattern}`;return`Неправильний ${n[i.format]??t.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${t.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${t.keys.length>1?"і":""}: ${D(t.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${t.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${t.origin}`;default:return"Неправильні вхідні дані"}}};function Hr(){return{localeError:jx()}}function Qu(){return Hr()}var Dx=()=>{let e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function r(t){return e[t]??null}let n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},o={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`غلط ان پٹ: instanceof ${t.expected} متوقع تھا، ${s} موصول ہوا`;return`غلط ان پٹ: ${i} متوقع تھا، ${s} موصول ہوا`}case"invalid_value":if(t.values.length===1)return`غلط ان پٹ: ${M(t.values[0])} متوقع تھا`;return`غلط آپشن: ${D(t.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`بہت بڑا: ${t.origin??"ویلیو"} کے ${i}${t.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`;return`بہت بڑا: ${t.origin??"ویلیو"} کا ${i}${t.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`بہت چھوٹا: ${t.origin} کے ${i}${t.minimum.toString()} ${a.unit} ہونے متوقع تھے`;return`بہت چھوٹا: ${t.origin} کا ${i}${t.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`غلط سٹرنگ: "${i.prefix}" سے شروع ہونا چاہیے`;if(i.format==="ends_with")return`غلط سٹرنگ: "${i.suffix}" پر ختم ہونا چاہیے`;if(i.format==="includes")return`غلط سٹرنگ: "${i.includes}" شامل ہونا چاہیے`;if(i.format==="regex")return`غلط سٹرنگ: پیٹرن ${i.pattern} سے میچ ہونا چاہیے`;return`غلط ${n[i.format]??t.format}`}case"not_multiple_of":return`غلط نمبر: ${t.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${t.keys.length>1?"ز":""}: ${D(t.keys,"، ")}`;case"invalid_key":return`${t.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${t.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function ec(){return{localeError:Dx()}}var Ux=()=>{let e={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"},map:{unit:"yozuv",verb:"bo‘lishi kerak"}};function r(t){return e[t]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Noto‘g‘ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${s}`;return`Noto‘g‘ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":if(t.values.length===1)return`Noto‘g‘ri kirish: kutilgan ${M(t.values[0])}`;return`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Juda katta: kutilgan ${t.origin??"qiymat"} ${i}${t.maximum.toString()} ${a.unit} ${a.verb}`;return`Juda katta: kutilgan ${t.origin??"qiymat"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Juda kichik: kutilgan ${t.origin} ${i}${t.minimum.toString()} ${a.unit} ${a.verb}`;return`Juda kichik: kutilgan ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Noto‘g‘ri satr: "${i.prefix}" bilan boshlanishi kerak`;if(i.format==="ends_with")return`Noto‘g‘ri satr: "${i.suffix}" bilan tugashi kerak`;if(i.format==="includes")return`Noto‘g‘ri satr: "${i.includes}" ni o‘z ichiga olishi kerak`;if(i.format==="regex")return`Noto‘g‘ri satr: ${i.pattern} shabloniga mos kelishi kerak`;return`Noto‘g‘ri ${n[i.format]??t.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${t.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${t.keys.length>1?"lar":""}: ${D(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${t.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function tc(){return{localeError:Ux()}}var Rx=()=>{let e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function r(t){return e[t]??null}let n={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},o={nan:"NaN",number:"số",array:"mảng"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Đầu vào không hợp lệ: mong đợi instanceof ${t.expected}, nhận được ${s}`;return`Đầu vào không hợp lệ: mong đợi ${i}, nhận được ${s}`}case"invalid_value":if(t.values.length===1)return`Đầu vào không hợp lệ: mong đợi ${M(t.values[0])}`;return`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Quá lớn: mong đợi ${t.origin??"giá trị"} ${a.verb} ${i}${t.maximum.toString()} ${a.unit??"phần tử"}`;return`Quá lớn: mong đợi ${t.origin??"giá trị"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Quá nhỏ: mong đợi ${t.origin} ${a.verb} ${i}${t.minimum.toString()} ${a.unit}`;return`Quá nhỏ: mong đợi ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Chuỗi không hợp lệ: phải bắt đầu bằng "${i.prefix}"`;if(i.format==="ends_with")return`Chuỗi không hợp lệ: phải kết thúc bằng "${i.suffix}"`;if(i.format==="includes")return`Chuỗi không hợp lệ: phải bao gồm "${i.includes}"`;if(i.format==="regex")return`Chuỗi không hợp lệ: phải khớp với mẫu ${i.pattern}`;return`${n[i.format]??t.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${t.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${D(t.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${t.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${t.origin}`;default:return"Đầu vào không hợp lệ"}}};function rc(){return{localeError:Rx()}}var Cx=()=>{let e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function r(t){return e[t]??null}let n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},o={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`无效输入:期望 instanceof ${t.expected},实际接收 ${s}`;return`无效输入:期望 ${i},实际接收 ${s}`}case"invalid_value":if(t.values.length===1)return`无效输入:期望 ${M(t.values[0])}`;return`无效选项:期望以下之一 ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`数值过大:期望 ${t.origin??"值"} ${i}${t.maximum.toString()} ${a.unit??"个元素"}`;return`数值过大:期望 ${t.origin??"值"} ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`数值过小:期望 ${t.origin} ${i}${t.minimum.toString()} ${a.unit}`;return`数值过小:期望 ${t.origin} ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`无效字符串:必须以 "${i.prefix}" 开头`;if(i.format==="ends_with")return`无效字符串:必须以 "${i.suffix}" 结尾`;if(i.format==="includes")return`无效字符串:必须包含 "${i.includes}"`;if(i.format==="regex")return`无效字符串:必须满足正则表达式 ${i.pattern}`;return`无效${n[i.format]??t.format}`}case"not_multiple_of":return`无效数字:必须是 ${t.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${D(t.keys,", ")}`;case"invalid_key":return`${t.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${t.origin} 中包含无效值(value)`;default:return"无效输入"}}};function nc(){return{localeError:Cx()}}var Ax=()=>{let e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function r(t){return e[t]??null}let n={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},o={nan:"NaN"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`無效的輸入值:預期為 instanceof ${t.expected},但收到 ${s}`;return`無效的輸入值:預期為 ${i},但收到 ${s}`}case"invalid_value":if(t.values.length===1)return`無效的輸入值:預期為 ${M(t.values[0])}`;return`無效的選項:預期為以下其中之一 ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`數值過大:預期 ${t.origin??"值"} 應為 ${i}${t.maximum.toString()} ${a.unit??"個元素"}`;return`數值過大:預期 ${t.origin??"值"} 應為 ${i}${t.maximum.toString()}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`數值過小:預期 ${t.origin} 應為 ${i}${t.minimum.toString()} ${a.unit}`;return`數值過小:預期 ${t.origin} 應為 ${i}${t.minimum.toString()}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`無效的字串:必須以 "${i.prefix}" 開頭`;if(i.format==="ends_with")return`無效的字串:必須以 "${i.suffix}" 結尾`;if(i.format==="includes")return`無效的字串:必須包含 "${i.includes}"`;if(i.format==="regex")return`無效的字串:必須符合格式 ${i.pattern}`;return`無效的 ${n[i.format]??t.format}`}case"not_multiple_of":return`無效的數字:必須為 ${t.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${t.keys.length>1?"們":""}:${D(t.keys,"、")}`;case"invalid_key":return`${t.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${t.origin} 中有無效的值`;default:return"無效的輸入值"}}};function ic(){return{localeError:Ax()}}var Nx=()=>{let e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function r(t){return e[t]??null}let n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},o={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return(t)=>{switch(t.code){case"invalid_type":{let i=o[t.expected]??t.expected,a=q(t.input),s=o[a]??a;if(/^[A-Z]/.test(t.expected))return`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${t.expected}, àmọ̀ a rí ${s}`;return`Ìbáwọlé aṣìṣe: a ní láti fi ${i}, àmọ̀ a rí ${s}`}case"invalid_value":if(t.values.length===1)return`Ìbáwọlé aṣìṣe: a ní láti fi ${M(t.values[0])}`;return`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${D(t.values,"|")}`;case"too_big":{let i=t.inclusive?"<=":"<",a=r(t.origin);if(a)return`Tó pọ̀ jù: a ní láti jẹ́ pé ${t.origin??"iye"} ${a.verb} ${i}${t.maximum} ${a.unit}`;return`Tó pọ̀ jù: a ní láti jẹ́ ${i}${t.maximum}`}case"too_small":{let i=t.inclusive?">=":">",a=r(t.origin);if(a)return`Kéré ju: a ní láti jẹ́ pé ${t.origin} ${a.verb} ${i}${t.minimum} ${a.unit}`;return`Kéré ju: a ní láti jẹ́ ${i}${t.minimum}`}case"invalid_format":{let i=t;if(i.format==="starts_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${i.prefix}"`;if(i.format==="ends_with")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${i.suffix}"`;if(i.format==="includes")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${i.includes}"`;if(i.format==="regex")return`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${i.pattern}`;return`Aṣìṣe: ${n[i.format]??t.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${t.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${D(t.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${t.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${t.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function oc(){return{localeError:Nx()}}var Mm,ac=Symbol("ZodOutput"),sc=Symbol("ZodInput");class uc{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let n=r[0];if(this._map.set(e,n),n&&typeof n==="object"&&"id"in n)this._idmap.set(n.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);if(r&&typeof r==="object"&&"id"in r)this._idmap.delete(r.id);return this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Kn(){return new uc}(Mm=globalThis).__zod_globalRegistry??(Mm.__zod_globalRegistry=Kn());var Te=globalThis.__zod_globalRegistry;function cc(e,r){return new e({type:"string",...X(r)})}function lc(e,r){return new e({type:"string",coerce:!0,...X(r)})}function Xn(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...X(r)})}function Xr(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...X(r)})}function Yn(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...X(r)})}function Qn(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...X(r)})}function ei(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...X(r)})}function ti(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...X(r)})}function Yr(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...X(r)})}function ri(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...X(r)})}function ni(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...X(r)})}function ii(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...X(r)})}function oi(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...X(r)})}function ai(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...X(r)})}function si(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...X(r)})}function ui(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...X(r)})}function ci(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...X(r)})}function li(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...X(r)})}function dc(e,r){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...X(r)})}function di(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...X(r)})}function fi(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...X(r)})}function mi(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...X(r)})}function pi(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...X(r)})}function hi(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...X(r)})}function gi(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...X(r)})}var fc={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function mc(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...X(r)})}function pc(e,r){return new e({type:"string",format:"date",check:"string_format",...X(r)})}function hc(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...X(r)})}function gc(e,r){return new e({type:"string",format:"duration",check:"string_format",...X(r)})}function vc(e,r){return new e({type:"number",checks:[],...X(r)})}function yc(e,r){return new e({type:"number",coerce:!0,checks:[],...X(r)})}function bc(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...X(r)})}function _c(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...X(r)})}function xc(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...X(r)})}function $c(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...X(r)})}function wc(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...X(r)})}function kc(e,r){return new e({type:"boolean",...X(r)})}function Ic(e,r){return new e({type:"boolean",coerce:!0,...X(r)})}function Sc(e,r){return new e({type:"bigint",...X(r)})}function zc(e,r){return new e({type:"bigint",coerce:!0,...X(r)})}function Pc(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...X(r)})}function Tc(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...X(r)})}function Ec(e,r){return new e({type:"symbol",...X(r)})}function Oc(e,r){return new e({type:"undefined",...X(r)})}function jc(e,r){return new e({type:"null",...X(r)})}function Dc(e){return new e({type:"any"})}function Uc(e){return new e({type:"unknown"})}function Rc(e,r){return new e({type:"never",...X(r)})}function Cc(e,r){return new e({type:"void",...X(r)})}function Ac(e,r){return new e({type:"date",...X(r)})}function Nc(e,r){return new e({type:"date",coerce:!0,...X(r)})}function Zc(e,r){return new e({type:"nan",...X(r)})}function et(e,r){return new Nn({check:"less_than",...X(r),value:e,inclusive:!1})}function Be(e,r){return new Nn({check:"less_than",...X(r),value:e,inclusive:!0})}function tt(e,r){return new Zn({check:"greater_than",...X(r),value:e,inclusive:!1})}function Re(e,r){return new Zn({check:"greater_than",...X(r),value:e,inclusive:!0})}function vi(e){return tt(0,e)}function yi(e){return et(0,e)}function bi(e){return Be(0,e)}function _i(e){return Re(0,e)}function _t(e,r){return new Ca({check:"multiple_of",...X(r),value:e})}function xt(e,r){return new Za({check:"max_size",...X(r),maximum:e})}function rt(e,r){return new La({check:"min_size",...X(r),minimum:e})}function Rt(e,r){return new Fa({check:"size_equals",...X(r),size:e})}function Ct(e,r){return new Ba({check:"max_length",...X(r),maximum:e})}function dt(e,r){return new Ma({check:"min_length",...X(r),minimum:e})}function At(e,r){return new Va({check:"length_equals",...X(r),length:e})}function Qt(e,r){return new qa({check:"string_format",format:"regex",...X(r),pattern:e})}function er(e){return new Ja({check:"string_format",format:"lowercase",...X(e)})}function tr(e){return new Wa({check:"string_format",format:"uppercase",...X(e)})}function rr(e,r){return new Ga({check:"string_format",format:"includes",...X(r),includes:e})}function nr(e,r){return new Ha({check:"string_format",format:"starts_with",...X(r),prefix:e})}function ir(e,r){return new Ka({check:"string_format",format:"ends_with",...X(r),suffix:e})}function xi(e,r,n){return new Xa({check:"property",property:e,schema:r,...X(n)})}function or(e,r){return new Ya({check:"mime_type",mime:e,...X(r)})}function Ke(e){return new Qa({check:"overwrite",tx:e})}function ar(e){return Ke((r)=>r.normalize(e))}function sr(){return Ke((e)=>e.trim())}function ur(){return Ke((e)=>e.toLowerCase())}function cr(){return Ke((e)=>e.toUpperCase())}function lr(){return Ke((e)=>Ho(e))}function Lc(e,r,n){return new e({type:"array",element:r,...X(n)})}function Lx(e,r,n){return new e({type:"union",options:r,...X(n)})}function Fx(e,r,n){return new e({type:"union",options:r,inclusive:!1,...X(n)})}function Bx(e,r,n,o){return new e({type:"union",options:n,discriminator:r,...X(o)})}function Mx(e,r,n){return new e({type:"intersection",left:r,right:n})}function Vx(e,r,n,o){let t=n instanceof se;return new e({type:"tuple",items:r,rest:t?n:null,...X(t?o:n)})}function qx(e,r,n,o){return new e({type:"record",keyType:r,valueType:n,...X(o)})}function Jx(e,r,n,o){return new e({type:"map",keyType:r,valueType:n,...X(o)})}function Wx(e,r,n){return new e({type:"set",valueType:r,...X(n)})}function Gx(e,r,n){let o=Array.isArray(r)?Object.fromEntries(r.map((t)=>[t,t])):r;return new e({type:"enum",entries:o,...X(n)})}function Hx(e,r,n){return new e({type:"enum",entries:r,...X(n)})}function Kx(e,r,n){return new e({type:"literal",values:Array.isArray(r)?r:[r],...X(n)})}function Fc(e,r){return new e({type:"file",...X(r)})}function Xx(e,r){return new e({type:"transform",transform:r})}function Yx(e,r){return new e({type:"optional",innerType:r})}function Qx(e,r){return new e({type:"nullable",innerType:r})}function e$(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n==="function"?n():Xo(n)}})}function t$(e,r,n){return new e({type:"nonoptional",innerType:r,...X(n)})}function r$(e,r){return new e({type:"success",innerType:r})}function n$(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n==="function"?n:()=>n})}function i$(e,r,n){return new e({type:"pipe",in:r,out:n})}function o$(e,r){return new e({type:"readonly",innerType:r})}function a$(e,r,n){return new e({type:"template_literal",parts:r,...X(n)})}function s$(e,r){return new e({type:"lazy",getter:r})}function u$(e,r){return new e({type:"promise",innerType:r})}function Bc(e,r,n){let o=X(n);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:r,...o})}function Mc(e,r,n){return new e({type:"custom",check:"custom",fn:r,...X(n)})}function Vc(e,r){let n=Vm((o)=>(o.addIssue=(t)=>{if(typeof t==="string")o.issues.push(Jt(t,o.value,n._zod.def));else{let i=t;if(i.fatal)i.continue=!1;i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(Jt(i))}},e(o.value,o)),r);return n}function Vm(e,r){let n=new ye({check:"custom",...X(r)});return n._zod.check=e,n}function qc(e){let r=new ye({check:"describe"});return r._zod.onattach=[(n)=>{let o=Te.get(n)??{};Te.add(n,{...o,description:e})}],r._zod.check=()=>{},r}function Jc(e){let r=new ye({check:"meta"});return r._zod.onattach=[(n)=>{let o=Te.get(n)??{};Te.add(n,{...o,...e})}],r._zod.check=()=>{},r}function Wc(e,r){let n=X(r),o=n.truthy??["true","1","yes","on","y","enabled"],t=n.falsy??["false","0","no","off","n","disabled"];if(n.case!=="sensitive")o=o.map((f)=>typeof f==="string"?f.toLowerCase():f),t=t.map((f)=>typeof f==="string"?f.toLowerCase():f);let i=new Set(o),a=new Set(t),s=e.Codec??qr,u=e.Boolean??Mr,d=new(e.String??Ut)({type:"string",error:n.error}),l=new u({type:"boolean",error:n.error}),h=new s({type:"pipe",in:d,out:l,transform:(f,g)=>{let v=f;if(n.case!=="sensitive")v=v.toLowerCase();if(i.has(v))return!0;else if(a.has(v))return!1;else return g.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:g.value,inst:h,continue:!1}),{}},reverseTransform:(f,g)=>{if(f===!0)return o[0]||"true";else return t[0]||"false"},error:n.error});return h}function dr(e,r,n,o={}){let t=X(o),i={...X(o),check:"string_format",type:"string",format:r,fn:typeof n==="function"?n:(s)=>n.test(s),...t};if(n instanceof RegExp)i.pattern=n;return new e(i)}function $t(e){let r=e?.target??"draft-2020-12";if(r==="draft-4")r="draft-04";if(r==="draft-7")r="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??Te,target:r,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function he(e,r,n={path:[],schemaPath:[]}){var o;let t=e._zod.def,i=r.seen.get(e);if(i){if(i.count++,n.schemaPath.includes(e))i.cycle=n.path;return i.schema}let a={schema:{},count:1,cycle:void 0,path:n.path};r.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,a.schema,d);else{let h=a.schema,f=r.processors[t.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);f(e,r,h,d)}let l=e._zod.parent;if(l){if(!a.ref)a.ref=l;he(l,r,d),r.seen.get(l).isParent=!0}}let u=r.metadataRegistry.get(e);if(u)Object.assign(a.schema,u);if(r.io==="input"&&Ce(e))delete a.schema.examples,delete a.schema.default;if(r.io==="input"&&"_prefault"in a.schema)(o=a.schema).default??(o.default=a.schema._prefault);return delete a.schema._prefault,r.seen.get(e).schema}function wt(e,r){let n=e.seen.get(r);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let u=o.get(s);if(u&&u!==a[0])throw Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(s,a[0])}}let t=(a)=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let l=e.external.registry.get(a[0])?.id,h=e.external.uri??((g)=>g);if(l)return{ref:h(l)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${h("__shared")}#/${s}/${f}`}}if(a[1]===n)return{ref:"#"};let c=`${"#"}/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:c+d}},i=(a)=>{if(a[1].schema.$ref)return;let s=a[1],{ref:u,defId:c}=t(a);if(s.def={...s.schema},c)s.defId=c;let d=s.schema;for(let l in d)delete d[l];d.$ref=u};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
74
+ `)}f.write("payload.value = newResult;"),f.write("return payload;");let I=f.compile();return(k,P)=>I(m,k,P)},i,s=Rt,a=!bt.jitless,l=a&&bi.value,p=t.catchall,u;e._zod.parse=(m,f)=>{u??(u=n.value);let g=m.value;if(!s(g))return m.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),m;if(a&&l&&f?.async===!1&&f.jitless!==!0){if(!i)i=o(t.shape);if(m=i(m,f),!p)return m;return ua([],g,m,f,u,e)}return r(m,f)}});function Ss(e,t,r,n){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let o=e.filter((i)=>!lt(i));if(o.length===1)return t.value=o[0].value,o[0];return t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map((i)=>i.issues.map((s)=>Fe(s,n,Te())))}),t}var da=Z("$ZodUnion",(e,t)=>{fe.init(e,t),ue(e._zod,"optin",()=>t.options.some((n)=>n._zod.optin==="optional")?"optional":void 0),ue(e._zod,"optout",()=>t.options.some((n)=>n._zod.optout==="optional")?"optional":void 0),ue(e._zod,"values",()=>{if(t.options.every((n)=>n._zod.values))return new Set(t.options.flatMap((n)=>Array.from(n._zod.values)));return}),ue(e._zod,"pattern",()=>{if(t.options.every((n)=>n._zod.pattern)){let n=t.options.map((o)=>o._zod.pattern);return new RegExp(`^(${n.map((o)=>rr(o.source)).join("|")})$`)}return});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(n,o)=>{if(r)return r(n,o);let i=!1,s=[];for(let a of t.options){let c=a._zod.run({value:n.value,issues:[]},o);if(c instanceof Promise)s.push(c),i=!0;else{if(c.issues.length===0)return c;s.push(c)}}if(!i)return Ss(s,n,e,o);return Promise.all(s).then((a)=>Ss(a,n,e,o))}});var fa=Z("$ZodIntersection",(e,t)=>{fe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value,i=t.left._zod.run({value:o,issues:[]},n),s=t.right._zod.run({value:o,issues:[]},n);if(i instanceof Promise||s instanceof Promise)return Promise.all([i,s]).then(([c,l])=>Ps(r,c,l));return Ps(r,i,s)}});function xn(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(ut(e)&&ut(t)){let r=Object.keys(t),n=Object.keys(e).filter((i)=>r.indexOf(i)!==-1),o={...e,...t};for(let i of n){let s=xn(e[i],t[i]);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};o[i]=s.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let n=0;n<e.length;n++){let o=e[n],i=t[n],s=xn(o,i);if(!s.valid)return{valid:!1,mergeErrorPath:[n,...s.mergeErrorPath]};r.push(s.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Ps(e,t,r){let n=new Map,o;for(let a of t.issues)if(a.code==="unrecognized_keys"){o??(o=a);for(let c of a.keys){if(!n.has(c))n.set(c,{});n.get(c).l=!0}}else e.issues.push(a);for(let a of r.issues)if(a.code==="unrecognized_keys")for(let c of a.keys){if(!n.has(c))n.set(c,{});n.get(c).r=!0}else e.issues.push(a);let i=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&o)e.issues.push({...o,keys:i});if(lt(e))return e;let s=xn(t.value,r.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var pa=Z("$ZodRecord",(e,t)=>{fe.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!ut(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let i=[],s=t.keyType._zod.values;if(s){r.value={};let a=new Set;for(let l of s)if(typeof l==="string"||typeof l==="number"||typeof l==="symbol"){a.add(typeof l==="number"?l.toString():l);let p=t.keyType._zod.run({value:l,issues:[]},n);if(p instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(p.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map((f)=>Fe(f,n,Te())),input:l,path:[l],inst:e});continue}let u=p.value,m=t.valueType._zod.run({value:o[l],issues:[]},n);if(m instanceof Promise)i.push(m.then((f)=>{if(f.issues.length)r.issues.push(...tt(l,f.issues));r.value[u]=f.value}));else{if(m.issues.length)r.issues.push(...tt(l,m.issues));r.value[u]=m.value}}let c;for(let l in o)if(!a.has(l))c=c??[],c.push(l);if(c&&c.length>0)r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c})}else{r.value={};for(let a of Reflect.ownKeys(o)){if(a==="__proto__")continue;if(!Object.prototype.propertyIsEnumerable.call(o,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},n);if(c instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof a==="string"&&bn.test(a)&&c.issues.length){let u=t.keyType._zod.run({value:Number(a),issues:[]},n);if(u instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(u.issues.length===0)c=u}if(c.issues.length){if(t.mode==="loose")r.value[a]=o[a];else r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map((u)=>Fe(u,n,Te())),input:a,path:[a],inst:e});continue}let p=t.valueType._zod.run({value:o[a],issues:[]},n);if(p instanceof Promise)i.push(p.then((u)=>{if(u.issues.length)r.issues.push(...tt(a,u.issues));r.value[c.value]=u.value}));else{if(p.issues.length)r.issues.push(...tt(a,p.issues));r.value[c.value]=p.value}}}if(i.length)return Promise.all(i).then(()=>r);return r}});var ha=Z("$ZodEnum",(e,t)=>{fe.init(e,t);let r=Qt(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter((o)=>vi.has(typeof o)).map((o)=>typeof o==="string"?et(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{let s=o.value;if(n.has(s))return o;return o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),ma=Z("$ZodLiteral",(e,t)=>{if(fe.init(e,t),t.values.length===0)throw Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map((n)=>typeof n==="string"?et(n):n?et(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let i=n.value;if(r.has(i))return n;return n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}});var ga=Z("$ZodTransform",(e,t)=>{fe.init(e,t),e._zod.optin="optional",e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Tt(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then((s)=>(r.value=s,r.fallback=!0,r));if(o instanceof Promise)throw new Je;return r.value=o,r.fallback=!0,r}});function Es(e,t){if(t===void 0&&(e.issues.length||e.fallback))return{issues:[],value:void 0};return e}var zn=Z("$ZodOptional",(e,t)=>{fe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ue(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ue(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${rr(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=r.value,i=t.innerType._zod.run(r,n);if(i instanceof Promise)return i.then((s)=>Es(s,o));return Es(i,o)}if(r.value===void 0)return r;return t.innerType._zod.run(r,n)}}),ya=Z("$ZodExactOptional",(e,t)=>{zn.init(e,t),ue(e._zod,"values",()=>t.innerType._zod.values),ue(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,n)=>t.innerType._zod.run(r,n)}),ba=Z("$ZodNullable",(e,t)=>{fe.init(e,t),ue(e._zod,"optin",()=>t.innerType._zod.optin),ue(e._zod,"optout",()=>t.innerType._zod.optout),ue(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${rr(r.source)}|null)$`):void 0}),ue(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>{if(r.value===null)return r;return t.innerType._zod.run(r,n)}}),va=Z("$ZodDefault",(e,t)=>{fe.init(e,t),e._zod.optin="optional",ue(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)return r.value=t.defaultValue,r;let o=t.innerType._zod.run(r,n);if(o instanceof Promise)return o.then((i)=>$s(i,t));return $s(o,t)}});function $s(e,t){if(e.value===void 0)e.value=t.defaultValue;return e}var _a=Z("$ZodPrefault",(e,t)=>{fe.init(e,t),e._zod.optin="optional",ue(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);if(r.value===void 0)r.value=t.defaultValue;return t.innerType._zod.run(r,n)}}),wa=Z("$ZodNonOptional",(e,t)=>{fe.init(e,t),ue(e._zod,"values",()=>{let r=t.innerType._zod.values;return r?new Set([...r].filter((n)=>n!==void 0)):void 0}),e._zod.parse=(r,n)=>{let o=t.innerType._zod.run(r,n);if(o instanceof Promise)return o.then((i)=>Ts(i,e));return Ts(o,e)}});function Ts(e,t){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t});return e}var xa=Z("$ZodCatch",(e,t)=>{fe.init(e,t),e._zod.optin="optional",ue(e._zod,"optout",()=>t.innerType._zod.optout),ue(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);if(o instanceof Promise)return o.then((i)=>{if(r.value=i.value,i.issues.length)r.value=t.catchValue({...r,error:{issues:i.issues.map((s)=>Fe(s,n,Te()))},input:r.value}),r.issues=[],r.fallback=!0;return r});if(r.value=o.value,o.issues.length)r.value=t.catchValue({...r,error:{issues:o.issues.map((i)=>Fe(i,n,Te()))},input:r.value}),r.issues=[],r.fallback=!0;return r}});var ka=Z("$ZodPipe",(e,t)=>{fe.init(e,t),ue(e._zod,"values",()=>t.in._zod.values),ue(e._zod,"optin",()=>t.in._zod.optin),ue(e._zod,"optout",()=>t.out._zod.optout),ue(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let i=t.out._zod.run(r,n);if(i instanceof Promise)return i.then((s)=>cr(s,t.in,n));return cr(i,t.in,n)}let o=t.in._zod.run(r,n);if(o instanceof Promise)return o.then((i)=>cr(i,t.out,n));return cr(o,t.out,n)}});function cr(e,t,r){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}var za=Z("$ZodReadonly",(e,t)=>{fe.init(e,t),ue(e._zod,"propValues",()=>t.innerType._zod.propValues),ue(e._zod,"values",()=>t.innerType._zod.values),ue(e._zod,"optin",()=>t.innerType?._zod?.optin),ue(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,n)=>{if(n.direction==="backward")return t.innerType._zod.run(r,n);let o=t.innerType._zod.run(r,n);if(o instanceof Promise)return o.then(Rs);return Rs(o)}});function Rs(e){return e.value=Object.freeze(e.value),e}var Ia=Z("$ZodCustom",(e,t)=>{Ie.init(e,t),fe.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=(r)=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then((i)=>Cs(i,r,n,e));Cs(o,r,n,e);return}});function Cs(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};if(n._zod.def.params)o.params=n._zod.def.params;t.issues.push(dt(o))}}var Up=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},n={nan:"NaN"};return(o)=>{switch(o.code){case"invalid_type":{let i=n[o.expected]??o.expected,s=ki(o.input),a=n[s]??s;return`Invalid input: expected ${i}, received ${a}`}case"invalid_value":if(o.values.length===1)return`Invalid input: expected ${hn(o.values[0])}`;return`Invalid option: expected one of ${ln(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s)return`Too big: expected ${o.origin??"value"} to have ${i}${o.maximum.toString()} ${s.unit??"elements"}`;return`Too big: expected ${o.origin??"value"} to be ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s)return`Too small: expected ${o.origin} to have ${i}${o.minimum.toString()} ${s.unit}`;return`Too small: expected ${o.origin} to be ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`Invalid string: must start with "${i.prefix}"`;if(i.format==="ends_with")return`Invalid string: must end with "${i.suffix}"`;if(i.format==="includes")return`Invalid string: must include "${i.includes}"`;if(i.format==="regex")return`Invalid string: must match pattern ${i.pattern}`;return`Invalid ${r[i.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${ln(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":if(o.options&&Array.isArray(o.options)&&o.options.length>0)return`Invalid discriminator value. Expected ${o.options.map((s)=>`'${s}'`).join(" | ")}`;return"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function In(){return{localeError:Up()}}var Sa,lx=Symbol("ZodOutput"),dx=Symbol("ZodInput");class Pa{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let r=t[0];if(this._map.set(e,r),r&&typeof r==="object"&&"id"in r)this._idmap.set(r.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);if(t&&typeof t==="object"&&"id"in t)this._idmap.delete(t.id);return this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let r={...this.get(t)??{}};delete r.id;let n={...r,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Mp(){return new Pa}(Sa=globalThis).__zod_globalRegistry??(Sa.__zod_globalRegistry=Mp());var ft=globalThis.__zod_globalRegistry;function Ea(e,t){return new e({type:"string",...X(t)})}function $a(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...X(t)})}function Sn(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...X(t)})}function Ta(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...X(t)})}function Ra(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...X(t)})}function Ca(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...X(t)})}function Oa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...X(t)})}function Aa(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...X(t)})}function Za(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...X(t)})}function Na(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...X(t)})}function Da(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...X(t)})}function Fa(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...X(t)})}function Ba(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...X(t)})}function ja(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...X(t)})}function La(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...X(t)})}function Ua(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...X(t)})}function Ma(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...X(t)})}function qa(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...X(t)})}function Va(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...X(t)})}function Wa(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...X(t)})}function Ha(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...X(t)})}function Ja(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...X(t)})}function Ga(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...X(t)})}function Ka(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...X(t)})}function Ya(e,t){return new e({type:"string",format:"date",check:"string_format",...X(t)})}function Xa(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...X(t)})}function Qa(e,t){return new e({type:"string",format:"duration",check:"string_format",...X(t)})}function ec(e,t){return new e({type:"number",checks:[],...X(t)})}function tc(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...X(t)})}function rc(e,t){return new e({type:"boolean",...X(t)})}function nc(e){return new e({type:"unknown"})}function oc(e,t){return new e({type:"never",...X(t)})}function dr(e,t){return new vn({check:"less_than",...X(t),value:e,inclusive:!1})}function Nt(e,t){return new vn({check:"less_than",...X(t),value:e,inclusive:!0})}function fr(e,t){return new _n({check:"greater_than",...X(t),value:e,inclusive:!1})}function Dt(e,t){return new _n({check:"greater_than",...X(t),value:e,inclusive:!0})}function pr(e,t){return new ds({check:"multiple_of",...X(t),value:e})}function hr(e,t){return new ps({check:"max_length",...X(t),maximum:e})}function vt(e,t){return new hs({check:"min_length",...X(t),minimum:e})}function mr(e,t){return new ms({check:"length_equals",...X(t),length:e})}function Pn(e,t){return new gs({check:"string_format",format:"regex",...X(t),pattern:e})}function En(e){return new ys({check:"string_format",format:"lowercase",...X(e)})}function $n(e){return new bs({check:"string_format",format:"uppercase",...X(e)})}function Tn(e,t){return new vs({check:"string_format",format:"includes",...X(t),includes:e})}function Rn(e,t){return new _s({check:"string_format",format:"starts_with",...X(t),prefix:e})}function Cn(e,t){return new ws({check:"string_format",format:"ends_with",...X(t),suffix:e})}function rt(e){return new xs({check:"overwrite",tx:e})}function On(e){return rt((t)=>t.normalize(e))}function An(){return rt((e)=>e.trim())}function Zn(){return rt((e)=>e.toLowerCase())}function Nn(){return rt((e)=>e.toUpperCase())}function Dn(){return rt((e)=>yi(e))}function ic(e,t,r){return new e({type:"array",element:t,...X(r)})}function sc(e,t,r){return new e({type:"custom",check:"custom",fn:t,...X(r)})}function ac(e,t){let r=qp((n)=>(n.addIssue=(o)=>{if(typeof o==="string")n.issues.push(dt(o,n.value,r._zod.def));else{let i=o;if(i.fatal)i.continue=!1;i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),n.issues.push(dt(i))}},e(n.value,n)),t);return r}function qp(e,t){let r=new Ie({check:"custom",...X(t)});return r._zod.check=e,r}function Fn(e){let t=e?.target??"draft-2020-12";if(t==="draft-4")t="draft-04";if(t==="draft-7")t="draft-07";return{processors:e.processors??{},metadataRegistry:e?.metadata??ft,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function _e(e,t,r={path:[],schemaPath:[]}){var n;let o=e._zod.def,i=t.seen.get(e);if(i){if(i.count++,r.schemaPath.includes(e))i.cycle=r.path;return i.schema}let s={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else{let p={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,p);else{let m=s.schema,f=t.processors[o.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);f(e,t,m,p)}let u=e._zod.parent;if(u){if(!s.ref)s.ref=u;_e(u,t,p),t.seen.get(u).isParent=!0}}let c=t.metadataRegistry.get(e);if(c)Object.assign(s.schema,c);if(t.io==="input"&&Ee(e))delete s.schema.examples,delete s.schema.default;if(t.io==="input"&&"_prefault"in s.schema)(n=s.schema).default??(n.default=s.schema._prefault);return delete s.schema._prefault,t.seen.get(e).schema}function Bn(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let n=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=n.get(a);if(c&&c!==s[0])throw Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(a,s[0])}}let o=(s)=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let u=e.external.registry.get(s[0])?.id,m=e.external.uri??((g)=>g);if(u)return{ref:m(u)};let f=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=f,{defId:f,ref:`${m("__shared")}#/${a}/${f}`}}if(s[1]===r)return{ref:"#"};let l=`${"#"}/${a}/`,p=s[1].schema.id??`__schema${e.counter++}`;return{defId:p,ref:l+p}},i=(s)=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:l}=o(s);if(a.def={...a.schema},l)a.defId=l;let p=a.schema;for(let u in p)delete p[u];p.$ref=c};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
76
75
 
77
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(r===a[0]){i(a);continue}if(e.external){let c=e.external.registry.get(a[0])?.id;if(r!==a[0]&&c){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1){if(e.reused==="ref"){i(a);continue}}}}function kt(e,r){let n=e.seen.get(r);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let o=(s)=>{let u=e.seen.get(s);if(u.ref===null)return;let c=u.def??u.schema,d={...c},l=u.ref;if(u.ref=null,l){o(l);let f=e.seen.get(l),g=f.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))c.allOf=c.allOf??[],c.allOf.push(g);else Object.assign(c,g);if(Object.assign(c,d),s._zod.parent===l)for(let y in c){if(y==="$ref"||y==="allOf")continue;if(!(y in d))delete c[y]}if(g.$ref&&f.def)for(let y in c){if(y==="$ref"||y==="allOf")continue;if(y in f.def&&JSON.stringify(c[y])===JSON.stringify(f.def[y]))delete c[y]}}let h=s._zod.parent;if(h&&h!==l){o(h);let f=e.seen.get(h);if(f?.schema.$ref){if(c.$ref=f.schema.$ref,f.def)for(let g in c){if(g==="$ref"||g==="allOf")continue;if(g in f.def&&JSON.stringify(c[g])===JSON.stringify(f.def[g]))delete c[g]}}}e.override({zodSchema:s,jsonSchema:c,path:u.path??[]})};for(let s of[...e.seen.entries()].reverse())o(s[0]);let t={};if(e.target==="draft-2020-12")t.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")t.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")t.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let s=e.external.registry.get(r)?.id;if(!s)throw Error("Schema is missing an `id` property");t.$id=e.external.uri(s)}Object.assign(t,n.def??n.schema);let i=e.metadataRegistry.get(r)?.id;if(i!==void 0&&t.id===i)delete t.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let u=s[1];if(u.def&&u.defId){if(u.def.id===u.defId)delete u.def.id;a[u.defId]=u.def}}if(e.external);else if(Object.keys(a).length>0)if(e.target==="draft-2020-12")t.$defs=a;else t.definitions=a;try{let s=JSON.parse(JSON.stringify(t));return Object.defineProperty(s,"~standard",{value:{...r["~standard"],jsonSchema:{input:fr(r,"input",e.processors),output:fr(r,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch(s){throw Error("Error converting schema to JSON.")}}function Ce(e,r){let n=r??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Ce(o.element,n);if(o.type==="set")return Ce(o.valueType,n);if(o.type==="lazy")return Ce(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Ce(o.innerType,n);if(o.type==="intersection")return Ce(o.left,n)||Ce(o.right,n);if(o.type==="record"||o.type==="map")return Ce(o.keyType,n)||Ce(o.valueType,n);if(o.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return Ce(o.in,n)||Ce(o.out,n)}if(o.type==="object"){for(let t in o.shape)if(Ce(o.shape[t],n))return!0;return!1}if(o.type==="union"){for(let t of o.options)if(Ce(t,n))return!0;return!1}if(o.type==="tuple"){for(let t of o.items)if(Ce(t,n))return!0;if(o.rest&&Ce(o.rest,n))return!0;return!1}return!1}var Gc=(e,r={})=>(n)=>{let o=$t({...n,processors:r});return he(e,o),wt(o,e),kt(o,e)},fr=(e,r,n={})=>(o)=>{let{libraryOptions:t,target:i}=o??{},a=$t({...t??{},target:i,io:r,processors:n});return he(e,a),wt(a,e),kt(a,e)};var c$={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Hc=(e,r,n,o)=>{let t=n;t.type="string";let{minimum:i,maximum:a,format:s,patterns:u,contentEncoding:c}=e._zod.bag;if(typeof i==="number")t.minLength=i;if(typeof a==="number")t.maxLength=a;if(s){if(t.format=c$[s]??s,t.format==="")delete t.format;if(s==="time")delete t.format}if(c)t.contentEncoding=c;if(u&&u.size>0){let d=[...u];if(d.length===1)t.pattern=d[0].source;else if(d.length>1)t.allOf=[...d.map((l)=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:l.source}))]}},Kc=(e,r,n,o)=>{let t=n,{minimum:i,maximum:a,format:s,multipleOf:u,exclusiveMaximum:c,exclusiveMinimum:d}=e._zod.bag;if(typeof s==="string"&&s.includes("int"))t.type="integer";else t.type="number";let l=typeof d==="number"&&d>=(i??Number.NEGATIVE_INFINITY),h=typeof c==="number"&&c<=(a??Number.POSITIVE_INFINITY),f=r.target==="draft-04"||r.target==="openapi-3.0";if(l)if(f)t.minimum=d,t.exclusiveMinimum=!0;else t.exclusiveMinimum=d;else if(typeof i==="number")t.minimum=i;if(h)if(f)t.maximum=c,t.exclusiveMaximum=!0;else t.exclusiveMaximum=c;else if(typeof a==="number")t.maximum=a;if(typeof u==="number")t.multipleOf=u},Xc=(e,r,n,o)=>{n.type="boolean"},Yc=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Qc=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},el=(e,r,n,o)=>{if(r.target==="openapi-3.0")n.type="string",n.nullable=!0,n.enum=[null];else n.type="null"},tl=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},rl=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},nl=(e,r,n,o)=>{n.not={}},il=(e,r,n,o)=>{},ol=(e,r,n,o)=>{},al=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},sl=(e,r,n,o)=>{let t=e._zod.def,i=jr(t.entries);if(i.every((a)=>typeof a==="number"))n.type="number";if(i.every((a)=>typeof a==="string"))n.type="string";n.enum=i},ul=(e,r,n,o)=>{let t=e._zod.def,i=[];for(let a of t.values)if(a===void 0){if(r.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a==="bigint")if(r.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else i.push(Number(a));else i.push(a);if(i.length===0);else if(i.length===1){let a=i[0];if(n.type=a===null?"null":typeof a,r.target==="draft-04"||r.target==="openapi-3.0")n.enum=[a];else n.const=a}else{if(i.every((a)=>typeof a==="number"))n.type="number";if(i.every((a)=>typeof a==="string"))n.type="string";if(i.every((a)=>typeof a==="boolean"))n.type="boolean";if(i.every((a)=>a===null))n.type="null";n.enum=i}},cl=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},ll=(e,r,n,o)=>{let t=n,i=e._zod.pattern;if(!i)throw Error("Pattern not found in template literal");t.type="string",t.pattern=i.source},dl=(e,r,n,o)=>{let t=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:u}=e._zod.bag;if(a!==void 0)i.minLength=a;if(s!==void 0)i.maxLength=s;if(u)if(u.length===1)i.contentMediaType=u[0],Object.assign(t,i);else Object.assign(t,i),t.anyOf=u.map((c)=>({contentMediaType:c}));else Object.assign(t,i)},fl=(e,r,n,o)=>{n.type="boolean"},ml=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},pl=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},hl=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},gl=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},vl=(e,r,n,o)=>{if(r.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},yl=(e,r,n,o)=>{let t=n,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;if(typeof a==="number")t.minItems=a;if(typeof s==="number")t.maxItems=s;t.type="array",t.items=he(i.element,r,{...o,path:[...o.path,"items"]})},bl=(e,r,n,o)=>{let t=n,i=e._zod.def;t.type="object",t.properties={};let a=i.shape;for(let c in a)t.properties[c]=he(a[c],r,{...o,path:[...o.path,"properties",c]});let s=new Set(Object.keys(a)),u=new Set([...s].filter((c)=>{let d=i.shape[c]._zod;if(r.io==="input")return d.optin===void 0;else return d.optout===void 0}));if(u.size>0)t.required=Array.from(u);if(i.catchall?._zod.def.type==="never")t.additionalProperties=!1;else if(!i.catchall){if(r.io==="output")t.additionalProperties=!1}else if(i.catchall)t.additionalProperties=he(i.catchall,r,{...o,path:[...o.path,"additionalProperties"]})},wi=(e,r,n,o)=>{let t=e._zod.def,i=t.inclusive===!1,a=t.options.map((s,u)=>he(s,r,{...o,path:[...o.path,i?"oneOf":"anyOf",u]}));if(i)n.oneOf=a;else n.anyOf=a},_l=(e,r,n,o)=>{let t=e._zod.def,i=he(t.left,r,{...o,path:[...o.path,"allOf",0]}),a=he(t.right,r,{...o,path:[...o.path,"allOf",1]}),s=(c)=>("allOf"in c)&&Object.keys(c).length===1,u=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];n.allOf=u},xl=(e,r,n,o)=>{let t=n,i=e._zod.def;t.type="array";let a=r.target==="draft-2020-12"?"prefixItems":"items",s=r.target==="draft-2020-12"?"items":r.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((h,f)=>he(h,r,{...o,path:[...o.path,a,f]})),c=i.rest?he(i.rest,r,{...o,path:[...o.path,s,...r.target==="openapi-3.0"?[i.items.length]:[]]}):null;if(r.target==="draft-2020-12"){if(t.prefixItems=u,c)t.items=c}else if(r.target==="openapi-3.0"){if(t.items={anyOf:u},c)t.items.anyOf.push(c);if(t.minItems=u.length,!c)t.maxItems=u.length}else if(t.items=u,c)t.additionalItems=c;let{minimum:d,maximum:l}=e._zod.bag;if(typeof d==="number")t.minItems=d;if(typeof l==="number")t.maxItems=l},$l=(e,r,n,o)=>{let t=n,i=e._zod.def;t.type="object";let a=i.keyType,u=a._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){let d=he(i.valueType,r,{...o,path:[...o.path,"patternProperties","*"]});t.patternProperties={};for(let l of u)t.patternProperties[l.source]=d}else{if(r.target==="draft-07"||r.target==="draft-2020-12")t.propertyNames=he(i.keyType,r,{...o,path:[...o.path,"propertyNames"]});t.additionalProperties=he(i.valueType,r,{...o,path:[...o.path,"additionalProperties"]})}let c=a._zod.values;if(c){let d=[...c].filter((l)=>typeof l==="string"||typeof l==="number");if(d.length>0)t.required=d}},wl=(e,r,n,o)=>{let t=e._zod.def,i=he(t.innerType,r,o),a=r.seen.get(e);if(r.target==="openapi-3.0")a.ref=t.innerType,n.nullable=!0;else n.anyOf=[i,{type:"null"}]},kl=(e,r,n,o)=>{let t=e._zod.def;he(t.innerType,r,o);let i=r.seen.get(e);i.ref=t.innerType},Il=(e,r,n,o)=>{let t=e._zod.def;he(t.innerType,r,o);let i=r.seen.get(e);i.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},Sl=(e,r,n,o)=>{let t=e._zod.def;he(t.innerType,r,o);let i=r.seen.get(e);if(i.ref=t.innerType,r.io==="input")n._prefault=JSON.parse(JSON.stringify(t.defaultValue))},zl=(e,r,n,o)=>{let t=e._zod.def;he(t.innerType,r,o);let i=r.seen.get(e);i.ref=t.innerType;let a;try{a=t.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},Pl=(e,r,n,o)=>{let t=e._zod.def,i=t.in._zod.traits.has("$ZodTransform"),a=r.io==="input"?i?t.out:t.in:t.out;he(a,r,o);let s=r.seen.get(e);s.ref=a},Tl=(e,r,n,o)=>{let t=e._zod.def;he(t.innerType,r,o);let i=r.seen.get(e);i.ref=t.innerType,n.readOnly=!0},El=(e,r,n,o)=>{let t=e._zod.def;he(t.innerType,r,o);let i=r.seen.get(e);i.ref=t.innerType},ki=(e,r,n,o)=>{let t=e._zod.def;he(t.innerType,r,o);let i=r.seen.get(e);i.ref=t.innerType},Ol=(e,r,n,o)=>{let t=e._zod.innerType;he(t,r,o);let i=r.seen.get(e);i.ref=t},$i={string:Hc,number:Kc,boolean:Xc,bigint:Yc,symbol:Qc,null:el,undefined:tl,void:rl,never:nl,any:il,unknown:ol,date:al,enum:sl,literal:ul,nan:cl,template_literal:ll,file:dl,success:fl,custom:ml,function:pl,transform:hl,map:gl,set:vl,array:yl,object:bl,union:wi,intersection:_l,tuple:xl,record:$l,nullable:wl,nonoptional:kl,default:Il,prefault:Sl,catch:zl,pipe:Pl,readonly:Tl,promise:El,optional:ki,lazy:Ol};function Ii(e,r){if("_idmap"in e){let o=e,t=$t({...r,processors:$i}),i={};for(let u of o._idmap.entries()){let[c,d]=u;he(d,t)}let a={},s={registry:o,uri:r?.uri,defs:i};t.external=s;for(let u of o._idmap.entries()){let[c,d]=u;wt(t,d),a[c]=kt(t,d)}if(Object.keys(i).length>0){let u=t.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:i}}return{schemas:a}}let n=$t({...r,processors:$i});return he(e,n),wt(n,e),kt(n,e)}class jl{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";if(r==="draft-4")r="draft-04";if(r==="draft-7")r="draft-07";this.ctx=$t({processors:$i,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return he(e,this.ctx,r)}emit(e,r){if(r){if(r.cycles)this.ctx.cycles=r.cycles;if(r.reused)this.ctx.reused=r.reused;if(r.external)this.ctx.external=r.external}wt(this.ctx,e);let n=kt(this.ctx,e),{"~standard":o,...t}=n;return t}}var qm={};var Qr={};ct(Qr,{ZodAny:()=>rd,ZodArray:()=>ad,ZodBase64:()=>Ji,ZodBase64URL:()=>Wi,ZodBigInt:()=>_r,ZodBigIntFormat:()=>Ki,ZodBoolean:()=>br,ZodCIDRv4:()=>Vi,ZodCIDRv6:()=>qi,ZodCUID:()=>Ai,ZodCUID2:()=>Ni,ZodCatch:()=>Pd,ZodCodec:()=>fn,ZodCustom:()=>mn,ZodCustomStringFormat:()=>vr,ZodDate:()=>sn,ZodDefault:()=>$d,ZodDiscriminatedUnion:()=>ud,ZodE164:()=>Gi,ZodEmail:()=>Ui,ZodEmoji:()=>Ri,ZodEnum:()=>hr,ZodExactOptional:()=>bd,ZodFile:()=>vd,ZodFunction:()=>Nd,ZodGUID:()=>tn,ZodIPv4:()=>Bi,ZodIPv6:()=>Mi,ZodIntersection:()=>cd,ZodJWT:()=>Hi,ZodKSUID:()=>Fi,ZodLazy:()=>Rd,ZodLiteral:()=>gd,ZodMAC:()=>Hl,ZodMap:()=>pd,ZodNaN:()=>Ed,ZodNanoID:()=>Ci,ZodNever:()=>id,ZodNonOptional:()=>ro,ZodNull:()=>ed,ZodNullable:()=>xd,ZodNumber:()=>yr,ZodNumberFormat:()=>Zt,ZodObject:()=>cn,ZodOptional:()=>to,ZodPipe:()=>dn,ZodPrefault:()=>kd,ZodPreprocess:()=>Od,ZodPromise:()=>Ad,ZodReadonly:()=>jd,ZodRecord:()=>pr,ZodSet:()=>hd,ZodString:()=>gr,ZodStringFormat:()=>ve,ZodSuccess:()=>zd,ZodSymbol:()=>Yl,ZodTemplateLiteral:()=>Ud,ZodTransform:()=>yd,ZodTuple:()=>dd,ZodType:()=>le,ZodULID:()=>Zi,ZodURL:()=>an,ZodUUID:()=>nt,ZodUndefined:()=>Ql,ZodUnion:()=>ln,ZodUnknown:()=>nd,ZodVoid:()=>od,ZodXID:()=>Li,ZodXor:()=>sd,_ZodString:()=>Di,_default:()=>wd,_function:()=>eh,any:()=>Op,array:()=>un,base64:()=>pp,base64url:()=>hp,bigint:()=>Sp,boolean:()=>Xl,catch:()=>Td,check:()=>th,cidrv4:()=>fp,cidrv6:()=>mp,codec:()=>Kp,cuid:()=>ip,cuid2:()=>op,custom:()=>rh,date:()=>Dp,describe:()=>nh,discriminatedUnion:()=>Zp,e164:()=>gp,email:()=>Gm,emoji:()=>rp,enum:()=>Qi,exactOptional:()=>_d,file:()=>Jp,float32:()=>$p,float64:()=>wp,function:()=>eh,guid:()=>Hm,hash:()=>xp,hex:()=>_p,hostname:()=>bp,httpUrl:()=>tp,instanceof:()=>oh,int:()=>Oi,int32:()=>kp,int64:()=>zp,intersection:()=>ld,invertCodec:()=>Xp,ipv4:()=>cp,ipv6:()=>dp,json:()=>sh,jwt:()=>vp,keyof:()=>Up,ksuid:()=>up,lazy:()=>Cd,literal:()=>qp,looseObject:()=>Ap,looseRecord:()=>Fp,mac:()=>lp,map:()=>Bp,meta:()=>ih,nan:()=>Hp,nanoid:()=>np,nativeEnum:()=>Vp,never:()=>Xi,nonoptional:()=>Sd,null:()=>td,nullable:()=>nn,nullish:()=>Wp,number:()=>Kl,object:()=>Rp,optional:()=>rn,partialRecord:()=>Lp,pipe:()=>ji,prefault:()=>Id,preprocess:()=>uh,promise:()=>Qp,readonly:()=>Dd,record:()=>md,refine:()=>Zd,set:()=>Mp,strictObject:()=>Cp,string:()=>en,stringFormat:()=>yp,stringbool:()=>ah,success:()=>Gp,superRefine:()=>Ld,symbol:()=>Tp,templateLiteral:()=>Yp,transform:()=>eo,tuple:()=>fd,uint32:()=>Ip,uint64:()=>Pp,ulid:()=>ap,undefined:()=>Ep,union:()=>Yi,unknown:()=>Nt,url:()=>ep,uuid:()=>Km,uuidv4:()=>Xm,uuidv6:()=>Ym,uuidv7:()=>Qm,void:()=>jp,xid:()=>sp,xor:()=>Np});var Si={};ct(Si,{endsWith:()=>ir,gt:()=>tt,gte:()=>Re,includes:()=>rr,length:()=>At,lowercase:()=>er,lt:()=>et,lte:()=>Be,maxLength:()=>Ct,maxSize:()=>xt,mime:()=>or,minLength:()=>dt,minSize:()=>rt,multipleOf:()=>_t,negative:()=>yi,nonnegative:()=>_i,nonpositive:()=>bi,normalize:()=>ar,overwrite:()=>Ke,positive:()=>vi,property:()=>xi,regex:()=>Qt,size:()=>Rt,slugify:()=>lr,startsWith:()=>nr,toLowerCase:()=>ur,toUpperCase:()=>cr,trim:()=>sr,uppercase:()=>tr});var mr={};ct(mr,{ZodISODate:()=>Pi,ZodISODateTime:()=>zi,ZodISODuration:()=>Ei,ZodISOTime:()=>Ti,date:()=>Ul,datetime:()=>Dl,duration:()=>Cl,time:()=>Rl});var zi=z("ZodISODateTime",(e,r)=>{ms.init(e,r),ve.init(e,r)});function Dl(e){return mc(zi,e)}var Pi=z("ZodISODate",(e,r)=>{ps.init(e,r),ve.init(e,r)});function Ul(e){return pc(Pi,e)}var Ti=z("ZodISOTime",(e,r)=>{hs.init(e,r),ve.init(e,r)});function Rl(e){return hc(Ti,e)}var Ei=z("ZodISODuration",(e,r)=>{gs.init(e,r),ve.init(e,r)});function Cl(e){return gc(Ei,e)}var Jm=(e,r)=>{Ar.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:(n)=>Zr(e,n)},flatten:{value:(n)=>Nr(e,n)},addIssue:{value:(n)=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Vt,2)}},addIssues:{value:(n)=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Vt,2)}},isEmpty:{get(){return e.issues.length===0}}})},d$=z("ZodError",Jm),Ze=z("ZodError",Jm,{Parent:Error});var Al=Wt(Ze),Nl=Gt(Ze),Zl=Ht(Ze),Ll=Kt(Ze),Fl=Tn(Ze),Bl=En(Ze),Ml=On(Ze),Vl=jn(Ze),ql=Dn(Ze),Jl=Un(Ze),Wl=Rn(Ze),Gl=Cn(Ze);var Wm=new WeakMap;function on(e,r,n){let o=Object.getPrototypeOf(e),t=Wm.get(o);if(!t)t=new Set,Wm.set(o,t);if(t.has(r))return;t.add(r);for(let i in n){let a=n[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}var le=z("ZodType",(e,r)=>(se.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:fr(e,"input"),output:fr(e,"output")}}),e.toJSONSchema=Gc(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.parse=(n,o)=>Al(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Zl(e,n,o),e.parseAsync=async(n,o)=>Nl(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Ll(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Fl(e,n,o),e.decode=(n,o)=>Bl(e,n,o),e.encodeAsync=async(n,o)=>Ml(e,n,o),e.decodeAsync=async(n,o)=>Vl(e,n,o),e.safeEncode=(n,o)=>ql(e,n,o),e.safeDecode=(n,o)=>Jl(e,n,o),e.safeEncodeAsync=async(n,o)=>Wl(e,n,o),e.safeDecodeAsync=async(n,o)=>Gl(e,n,o),on(e,"ZodType",{check(...n){let o=this.def;return this.clone(W.mergeDefs(o,{checks:[...o.checks??[],...n.map((t)=>typeof t==="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,o){return De(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(Zd(n,o))},superRefine(n,o){return this.check(Ld(n,o))},overwrite(n){return this.check(Ke(n))},optional(){return rn(this)},exactOptional(){return _d(this)},nullable(){return nn(this)},nullish(){return rn(nn(this))},nonoptional(n){return Sd(this,n)},array(){return un(this)},or(n){return Yi([this,n])},and(n){return ld(this,n)},transform(n){return ji(this,eo(n))},default(n){return wd(this,n)},prefault(n){return Id(this,n)},catch(n){return Td(this,n)},pipe(n){return ji(this,n)},readonly(){return Dd(this)},describe(n){let o=this.clone();return Te.add(o,{description:n}),o},meta(...n){if(n.length===0)return Te.get(this);let o=this.clone();return Te.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Te.get(e)?.description},configurable:!0}),e)),Di=z("_ZodString",(e,r)=>{Ut.init(e,r),le.init(e,r),e._zod.processJSONSchema=(o,t,i)=>Hc(e,o,t,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,on(e,"_ZodString",{regex(...o){return this.check(Qt(...o))},includes(...o){return this.check(rr(...o))},startsWith(...o){return this.check(nr(...o))},endsWith(...o){return this.check(ir(...o))},min(...o){return this.check(dt(...o))},max(...o){return this.check(Ct(...o))},length(...o){return this.check(At(...o))},nonempty(...o){return this.check(dt(1,...o))},lowercase(o){return this.check(er(o))},uppercase(o){return this.check(tr(o))},trim(){return this.check(sr())},normalize(...o){return this.check(ar(...o))},toLowerCase(){return this.check(ur())},toUpperCase(){return this.check(cr())},slugify(){return this.check(lr())}})}),gr=z("ZodString",(e,r)=>{Ut.init(e,r),Di.init(e,r),e.email=(n)=>e.check(Xn(Ui,n)),e.url=(n)=>e.check(Yr(an,n)),e.jwt=(n)=>e.check(gi(Hi,n)),e.emoji=(n)=>e.check(ri(Ri,n)),e.guid=(n)=>e.check(Xr(tn,n)),e.uuid=(n)=>e.check(Yn(nt,n)),e.uuidv4=(n)=>e.check(Qn(nt,n)),e.uuidv6=(n)=>e.check(ei(nt,n)),e.uuidv7=(n)=>e.check(ti(nt,n)),e.nanoid=(n)=>e.check(ni(Ci,n)),e.guid=(n)=>e.check(Xr(tn,n)),e.cuid=(n)=>e.check(ii(Ai,n)),e.cuid2=(n)=>e.check(oi(Ni,n)),e.ulid=(n)=>e.check(ai(Zi,n)),e.base64=(n)=>e.check(mi(Ji,n)),e.base64url=(n)=>e.check(pi(Wi,n)),e.xid=(n)=>e.check(si(Li,n)),e.ksuid=(n)=>e.check(ui(Fi,n)),e.ipv4=(n)=>e.check(ci(Bi,n)),e.ipv6=(n)=>e.check(li(Mi,n)),e.cidrv4=(n)=>e.check(di(Vi,n)),e.cidrv6=(n)=>e.check(fi(qi,n)),e.e164=(n)=>e.check(hi(Gi,n)),e.datetime=(n)=>e.check(Dl(n)),e.date=(n)=>e.check(Ul(n)),e.time=(n)=>e.check(Rl(n)),e.duration=(n)=>e.check(Cl(n))});function en(e){return cc(gr,e)}var ve=z("ZodStringFormat",(e,r)=>{ge.init(e,r),Di.init(e,r)}),Ui=z("ZodEmail",(e,r)=>{is.init(e,r),ve.init(e,r)});function Gm(e){return Xn(Ui,e)}var tn=z("ZodGUID",(e,r)=>{rs.init(e,r),ve.init(e,r)});function Hm(e){return Xr(tn,e)}var nt=z("ZodUUID",(e,r)=>{ns.init(e,r),ve.init(e,r)});function Km(e){return Yn(nt,e)}function Xm(e){return Qn(nt,e)}function Ym(e){return ei(nt,e)}function Qm(e){return ti(nt,e)}var an=z("ZodURL",(e,r)=>{os.init(e,r),ve.init(e,r)});function ep(e){return Yr(an,e)}function tp(e){return Yr(an,{protocol:Fe.httpProtocol,hostname:Fe.domain,...W.normalizeParams(e)})}var Ri=z("ZodEmoji",(e,r)=>{as.init(e,r),ve.init(e,r)});function rp(e){return ri(Ri,e)}var Ci=z("ZodNanoID",(e,r)=>{ss.init(e,r),ve.init(e,r)});function np(e){return ni(Ci,e)}var Ai=z("ZodCUID",(e,r)=>{us.init(e,r),ve.init(e,r)});function ip(e){return ii(Ai,e)}var Ni=z("ZodCUID2",(e,r)=>{cs.init(e,r),ve.init(e,r)});function op(e){return oi(Ni,e)}var Zi=z("ZodULID",(e,r)=>{ls.init(e,r),ve.init(e,r)});function ap(e){return ai(Zi,e)}var Li=z("ZodXID",(e,r)=>{ds.init(e,r),ve.init(e,r)});function sp(e){return si(Li,e)}var Fi=z("ZodKSUID",(e,r)=>{fs.init(e,r),ve.init(e,r)});function up(e){return ui(Fi,e)}var Bi=z("ZodIPv4",(e,r)=>{vs.init(e,r),ve.init(e,r)});function cp(e){return ci(Bi,e)}var Hl=z("ZodMAC",(e,r)=>{bs.init(e,r),ve.init(e,r)});function lp(e){return dc(Hl,e)}var Mi=z("ZodIPv6",(e,r)=>{ys.init(e,r),ve.init(e,r)});function dp(e){return li(Mi,e)}var Vi=z("ZodCIDRv4",(e,r)=>{_s.init(e,r),ve.init(e,r)});function fp(e){return di(Vi,e)}var qi=z("ZodCIDRv6",(e,r)=>{xs.init(e,r),ve.init(e,r)});function mp(e){return fi(qi,e)}var Ji=z("ZodBase64",(e,r)=>{ws.init(e,r),ve.init(e,r)});function pp(e){return mi(Ji,e)}var Wi=z("ZodBase64URL",(e,r)=>{ks.init(e,r),ve.init(e,r)});function hp(e){return pi(Wi,e)}var Gi=z("ZodE164",(e,r)=>{Is.init(e,r),ve.init(e,r)});function gp(e){return hi(Gi,e)}var Hi=z("ZodJWT",(e,r)=>{Ss.init(e,r),ve.init(e,r)});function vp(e){return gi(Hi,e)}var vr=z("ZodCustomStringFormat",(e,r)=>{zs.init(e,r),ve.init(e,r)});function yp(e,r,n={}){return dr(vr,e,r,n)}function bp(e){return dr(vr,"hostname",Fe.hostname,e)}function _p(e){return dr(vr,"hex",Fe.hex,e)}function xp(e,r){let n=r?.enc??"hex",o=`${e}_${n}`,t=Fe[o];if(!t)throw Error(`Unrecognized hash format: ${o}`);return dr(vr,o,t,r)}var yr=z("ZodNumber",(e,r)=>{qn.init(e,r),le.init(e,r),e._zod.processJSONSchema=(o,t,i)=>Kc(e,o,t,i),on(e,"ZodNumber",{gt(o,t){return this.check(tt(o,t))},gte(o,t){return this.check(Re(o,t))},min(o,t){return this.check(Re(o,t))},lt(o,t){return this.check(et(o,t))},lte(o,t){return this.check(Be(o,t))},max(o,t){return this.check(Be(o,t))},int(o){return this.check(Oi(o))},safe(o){return this.check(Oi(o))},positive(o){return this.check(tt(0,o))},nonnegative(o){return this.check(Re(0,o))},negative(o){return this.check(et(0,o))},nonpositive(o){return this.check(Be(0,o))},multipleOf(o,t){return this.check(_t(o,t))},step(o,t){return this.check(_t(o,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??0.5),e.isFinite=!0,e.format=n.format??null});function Kl(e){return vc(yr,e)}var Zt=z("ZodNumberFormat",(e,r)=>{Ps.init(e,r),yr.init(e,r)});function Oi(e){return bc(Zt,e)}function $p(e){return _c(Zt,e)}function wp(e){return xc(Zt,e)}function kp(e){return $c(Zt,e)}function Ip(e){return wc(Zt,e)}var br=z("ZodBoolean",(e,r)=>{Mr.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>Xc(e,n,o,t)});function Xl(e){return kc(br,e)}var _r=z("ZodBigInt",(e,r)=>{Jn.init(e,r),le.init(e,r),e._zod.processJSONSchema=(o,t,i)=>Yc(e,o,t,i),e.gte=(o,t)=>e.check(Re(o,t)),e.min=(o,t)=>e.check(Re(o,t)),e.gt=(o,t)=>e.check(tt(o,t)),e.gte=(o,t)=>e.check(Re(o,t)),e.min=(o,t)=>e.check(Re(o,t)),e.lt=(o,t)=>e.check(et(o,t)),e.lte=(o,t)=>e.check(Be(o,t)),e.max=(o,t)=>e.check(Be(o,t)),e.positive=(o)=>e.check(tt(BigInt(0),o)),e.negative=(o)=>e.check(et(BigInt(0),o)),e.nonpositive=(o)=>e.check(Be(BigInt(0),o)),e.nonnegative=(o)=>e.check(Re(BigInt(0),o)),e.multipleOf=(o,t)=>e.check(_t(o,t));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Sp(e){return Sc(_r,e)}var Ki=z("ZodBigIntFormat",(e,r)=>{Ts.init(e,r),_r.init(e,r)});function zp(e){return Pc(Ki,e)}function Pp(e){return Tc(Ki,e)}var Yl=z("ZodSymbol",(e,r)=>{Es.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>Qc(e,n,o,t)});function Tp(e){return Ec(Yl,e)}var Ql=z("ZodUndefined",(e,r)=>{Os.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>tl(e,n,o,t)});function Ep(e){return Oc(Ql,e)}var ed=z("ZodNull",(e,r)=>{js.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>el(e,n,o,t)});function td(e){return jc(ed,e)}var rd=z("ZodAny",(e,r)=>{Ds.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>il(e,n,o,t)});function Op(){return Dc(rd)}var nd=z("ZodUnknown",(e,r)=>{Us.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>ol(e,n,o,t)});function Nt(){return Uc(nd)}var id=z("ZodNever",(e,r)=>{Rs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>nl(e,n,o,t)});function Xi(e){return Rc(id,e)}var od=z("ZodVoid",(e,r)=>{Cs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>rl(e,n,o,t)});function jp(e){return Cc(od,e)}var sn=z("ZodDate",(e,r)=>{As.init(e,r),le.init(e,r),e._zod.processJSONSchema=(o,t,i)=>al(e,o,t,i),e.min=(o,t)=>e.check(Re(o,t)),e.max=(o,t)=>e.check(Be(o,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Dp(e){return Ac(sn,e)}var ad=z("ZodArray",(e,r)=>{Ns.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>yl(e,n,o,t),e.element=r.element,on(e,"ZodArray",{min(n,o){return this.check(dt(n,o))},nonempty(n){return this.check(dt(1,n))},max(n,o){return this.check(Ct(n,o))},length(n,o){return this.check(At(n,o))},unwrap(){return this.element}})});function un(e,r){return Lc(ad,e,r)}function Up(e){let r=e._zod.def.shape;return Qi(Object.keys(r))}var cn=z("ZodObject",(e,r)=>{Zs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>bl(e,n,o,t),W.defineLazy(e,"shape",()=>r.shape),on(e,"ZodObject",{keyof(){return Qi(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Nt()})},loose(){return this.clone({...this._zod.def,catchall:Nt()})},strict(){return this.clone({...this._zod.def,catchall:Xi()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return W.extend(this,n)},safeExtend(n){return W.safeExtend(this,n)},merge(n){return W.merge(this,n)},pick(n){return W.pick(this,n)},omit(n){return W.omit(this,n)},partial(...n){return W.partial(to,this,n[0])},required(...n){return W.required(ro,this,n[0])}})});function Rp(e,r){let n={type:"object",shape:e??{},...W.normalizeParams(r)};return new cn(n)}function Cp(e,r){return new cn({type:"object",shape:e,catchall:Xi(),...W.normalizeParams(r)})}function Ap(e,r){return new cn({type:"object",shape:e,catchall:Nt(),...W.normalizeParams(r)})}var ln=z("ZodUnion",(e,r)=>{Vr.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>wi(e,n,o,t),e.options=r.options});function Yi(e,r){return new ln({type:"union",options:e,...W.normalizeParams(r)})}var sd=z("ZodXor",(e,r)=>{ln.init(e,r),Ls.init(e,r),e._zod.processJSONSchema=(n,o,t)=>wi(e,n,o,t),e.options=r.options});function Np(e,r){return new sd({type:"union",options:e,inclusive:!1,...W.normalizeParams(r)})}var ud=z("ZodDiscriminatedUnion",(e,r)=>{ln.init(e,r),Fs.init(e,r)});function Zp(e,r,n){return new ud({type:"union",options:r,discriminator:e,...W.normalizeParams(n)})}var cd=z("ZodIntersection",(e,r)=>{Bs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>_l(e,n,o,t)});function ld(e,r){return new cd({type:"intersection",left:e,right:r})}var dd=z("ZodTuple",(e,r)=>{Wn.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>xl(e,n,o,t),e.rest=(n)=>e.clone({...e._zod.def,rest:n})});function fd(e,r,n){let o=r instanceof se,t=o?n:r;return new dd({type:"tuple",items:e,rest:o?r:null,...W.normalizeParams(t)})}var pr=z("ZodRecord",(e,r)=>{Ms.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>$l(e,n,o,t),e.keyType=r.keyType,e.valueType=r.valueType});function md(e,r,n){if(!r||!r._zod)return new pr({type:"record",keyType:en(),valueType:e,...W.normalizeParams(r)});return new pr({type:"record",keyType:e,valueType:r,...W.normalizeParams(n)})}function Lp(e,r,n){let o=De(e);return o._zod.values=void 0,new pr({type:"record",keyType:o,valueType:r,...W.normalizeParams(n)})}function Fp(e,r,n){return new pr({type:"record",keyType:e,valueType:r,mode:"loose",...W.normalizeParams(n)})}var pd=z("ZodMap",(e,r)=>{Vs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>gl(e,n,o,t),e.keyType=r.keyType,e.valueType=r.valueType,e.min=(...n)=>e.check(rt(...n)),e.nonempty=(n)=>e.check(rt(1,n)),e.max=(...n)=>e.check(xt(...n)),e.size=(...n)=>e.check(Rt(...n))});function Bp(e,r,n){return new pd({type:"map",keyType:e,valueType:r,...W.normalizeParams(n)})}var hd=z("ZodSet",(e,r)=>{qs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>vl(e,n,o,t),e.min=(...n)=>e.check(rt(...n)),e.nonempty=(n)=>e.check(rt(1,n)),e.max=(...n)=>e.check(xt(...n)),e.size=(...n)=>e.check(Rt(...n))});function Mp(e,r){return new hd({type:"set",valueType:e,...W.normalizeParams(r)})}var hr=z("ZodEnum",(e,r)=>{Js.init(e,r),le.init(e,r),e._zod.processJSONSchema=(o,t,i)=>sl(e,o,t,i),e.enum=r.entries,e.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));e.extract=(o,t)=>{let i={};for(let a of o)if(n.has(a))i[a]=r.entries[a];else throw Error(`Key ${a} not found in enum`);return new hr({...r,checks:[],...W.normalizeParams(t),entries:i})},e.exclude=(o,t)=>{let i={...r.entries};for(let a of o)if(n.has(a))delete i[a];else throw Error(`Key ${a} not found in enum`);return new hr({...r,checks:[],...W.normalizeParams(t),entries:i})}});function Qi(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new hr({type:"enum",entries:n,...W.normalizeParams(r)})}function Vp(e,r){return new hr({type:"enum",entries:e,...W.normalizeParams(r)})}var gd=z("ZodLiteral",(e,r)=>{Ws.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>ul(e,n,o,t),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function qp(e,r){return new gd({type:"literal",values:Array.isArray(e)?e:[e],...W.normalizeParams(r)})}var vd=z("ZodFile",(e,r)=>{Gs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>dl(e,n,o,t),e.min=(n,o)=>e.check(rt(n,o)),e.max=(n,o)=>e.check(xt(n,o)),e.mime=(n,o)=>e.check(or(Array.isArray(n)?n:[n],o))});function Jp(e){return Fc(vd,e)}var yd=z("ZodTransform",(e,r)=>{Hs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>hl(e,n,o,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Ot(e.constructor.name);n.addIssue=(i)=>{if(typeof i==="string")n.issues.push(W.issue(i,n.value,r));else{let a=i;if(a.fatal)a.continue=!1;a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(W.issue(a))}};let t=r.transform(n.value,n);if(t instanceof Promise)return t.then((i)=>(n.value=i,n.fallback=!0,n));return n.value=t,n.fallback=!0,n}});function eo(e){return new yd({type:"transform",transform:e})}var to=z("ZodOptional",(e,r)=>{Gn.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>ki(e,n,o,t),e.unwrap=()=>e._zod.def.innerType});function rn(e){return new to({type:"optional",innerType:e})}var bd=z("ZodExactOptional",(e,r)=>{Ks.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>ki(e,n,o,t),e.unwrap=()=>e._zod.def.innerType});function _d(e){return new bd({type:"optional",innerType:e})}var xd=z("ZodNullable",(e,r)=>{Xs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>wl(e,n,o,t),e.unwrap=()=>e._zod.def.innerType});function nn(e){return new xd({type:"nullable",innerType:e})}function Wp(e){return rn(nn(e))}var $d=z("ZodDefault",(e,r)=>{Ys.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>Il(e,n,o,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function wd(e,r){return new $d({type:"default",innerType:e,get defaultValue(){return typeof r==="function"?r():W.shallowClone(r)}})}var kd=z("ZodPrefault",(e,r)=>{Qs.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>Sl(e,n,o,t),e.unwrap=()=>e._zod.def.innerType});function Id(e,r){return new kd({type:"prefault",innerType:e,get defaultValue(){return typeof r==="function"?r():W.shallowClone(r)}})}var ro=z("ZodNonOptional",(e,r)=>{eu.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>kl(e,n,o,t),e.unwrap=()=>e._zod.def.innerType});function Sd(e,r){return new ro({type:"nonoptional",innerType:e,...W.normalizeParams(r)})}var zd=z("ZodSuccess",(e,r)=>{tu.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>fl(e,n,o,t),e.unwrap=()=>e._zod.def.innerType});function Gp(e){return new zd({type:"success",innerType:e})}var Pd=z("ZodCatch",(e,r)=>{ru.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>zl(e,n,o,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Td(e,r){return new Pd({type:"catch",innerType:e,catchValue:typeof r==="function"?r:()=>r})}var Ed=z("ZodNaN",(e,r)=>{nu.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>cl(e,n,o,t)});function Hp(e){return Zc(Ed,e)}var dn=z("ZodPipe",(e,r)=>{Hn.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>Pl(e,n,o,t),e.in=r.in,e.out=r.out});function ji(e,r){return new dn({type:"pipe",in:e,out:r})}var fn=z("ZodCodec",(e,r)=>{dn.init(e,r),qr.init(e,r)});function Kp(e,r,n){return new fn({type:"pipe",in:e,out:r,transform:n.decode,reverseTransform:n.encode})}function Xp(e){let r=e._zod.def;return new fn({type:"pipe",in:r.out,out:r.in,transform:r.reverseTransform,reverseTransform:r.transform})}var Od=z("ZodPreprocess",(e,r)=>{dn.init(e,r),iu.init(e,r)}),jd=z("ZodReadonly",(e,r)=>{ou.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>Tl(e,n,o,t),e.unwrap=()=>e._zod.def.innerType});function Dd(e){return new jd({type:"readonly",innerType:e})}var Ud=z("ZodTemplateLiteral",(e,r)=>{au.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>ll(e,n,o,t)});function Yp(e,r){return new Ud({type:"template_literal",parts:e,...W.normalizeParams(r)})}var Rd=z("ZodLazy",(e,r)=>{cu.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>Ol(e,n,o,t),e.unwrap=()=>e._zod.def.getter()});function Cd(e){return new Rd({type:"lazy",getter:e})}var Ad=z("ZodPromise",(e,r)=>{uu.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>El(e,n,o,t),e.unwrap=()=>e._zod.def.innerType});function Qp(e){return new Ad({type:"promise",innerType:e})}var Nd=z("ZodFunction",(e,r)=>{su.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>pl(e,n,o,t)});function eh(e){return new Nd({type:"function",input:Array.isArray(e?.input)?fd(e?.input):e?.input??un(Nt()),output:e?.output??Nt()})}var mn=z("ZodCustom",(e,r)=>{lu.init(e,r),le.init(e,r),e._zod.processJSONSchema=(n,o,t)=>ml(e,n,o,t)});function th(e){let r=new ye({check:"custom"});return r._zod.check=e,r}function rh(e,r){return Bc(mn,e??(()=>!0),r)}function Zd(e,r={}){return Mc(mn,e,r)}function Ld(e,r){return Vc(e,r)}var nh=qc,ih=Jc;function oh(e,r={}){let n=new mn({type:"custom",check:"custom",fn:(o)=>o instanceof e,abort:!0,...W.normalizeParams(r)});return n._zod.bag.Class=e,n._zod.check=(o)=>{if(!(o.value instanceof e))o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]})},n}var ah=(...e)=>Wc({Codec:fn,Boolean:br,String:gr},...e);function sh(e){let r=Cd(()=>Yi([en(e),Kl(),Xl(),td(),un(r),md(en(),r)]));return r}function uh(e,r){return new Od({type:"pipe",in:eo(e),out:r})}var m$={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function p$(e){we({customError:e})}function h$(){return we().customError}var Fd;(function(e){})(Fd||(Fd={}));var te={...Qr,...Si,iso:mr},g$=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function v$(e,r){let n=e.$schema;if(n==="https://json-schema.org/draft/2020-12/schema")return"draft-2020-12";if(n==="http://json-schema.org/draft-07/schema#")return"draft-7";if(n==="http://json-schema.org/draft-04/schema#")return"draft-4";return r??"draft-2020-12"}function y$(e,r){if(!e.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return r.rootSchema;let o=r.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let t=n[1];if(!t||!r.defs[t])throw Error(`Reference not found: ${e}`);return r.defs[t]}throw Error(`Reference not found: ${e}`)}function ch(e,r){if(e.not!==void 0){if(typeof e.not==="object"&&Object.keys(e.not).length===0)return te.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(r.refs.has(t))return r.refs.get(t);if(r.processing.has(t))return te.lazy(()=>{if(!r.refs.has(t))throw Error(`Circular reference not resolved: ${t}`);return r.refs.get(t)});r.processing.add(t);let i=y$(t,r),a=Oe(i,r);return r.refs.set(t,a),r.processing.delete(t),a}if(e.enum!==void 0){let t=e.enum;if(r.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return te.null();if(t.length===0)return te.never();if(t.length===1)return te.literal(t[0]);if(t.every((a)=>typeof a==="string"))return te.enum(t);let i=t.map((a)=>te.literal(a));if(i.length<2)return i[0];return te.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return te.literal(e.const);let n=e.type;if(Array.isArray(n)){let t=n.map((i)=>{let a={...e,type:i};return ch(a,r)});if(t.length===0)return te.never();if(t.length===1)return t[0];return te.union(t)}if(!n)return te.any();let o;switch(n){case"string":{let t=te.string();if(e.format){let i=e.format;if(i==="email")t=t.check(te.email());else if(i==="uri"||i==="uri-reference")t=t.check(te.url());else if(i==="uuid"||i==="guid")t=t.check(te.uuid());else if(i==="date-time")t=t.check(te.iso.datetime());else if(i==="date")t=t.check(te.iso.date());else if(i==="time")t=t.check(te.iso.time());else if(i==="duration")t=t.check(te.iso.duration());else if(i==="ipv4")t=t.check(te.ipv4());else if(i==="ipv6")t=t.check(te.ipv6());else if(i==="mac")t=t.check(te.mac());else if(i==="cidr")t=t.check(te.cidrv4());else if(i==="cidr-v6")t=t.check(te.cidrv6());else if(i==="base64")t=t.check(te.base64());else if(i==="base64url")t=t.check(te.base64url());else if(i==="e164")t=t.check(te.e164());else if(i==="jwt")t=t.check(te.jwt());else if(i==="emoji")t=t.check(te.emoji());else if(i==="nanoid")t=t.check(te.nanoid());else if(i==="cuid")t=t.check(te.cuid());else if(i==="cuid2")t=t.check(te.cuid2());else if(i==="ulid")t=t.check(te.ulid());else if(i==="xid")t=t.check(te.xid());else if(i==="ksuid")t=t.check(te.ksuid())}if(typeof e.minLength==="number")t=t.min(e.minLength);if(typeof e.maxLength==="number")t=t.max(e.maxLength);if(e.pattern)t=t.regex(new RegExp(e.pattern));o=t;break}case"number":case"integer":{let t=n==="integer"?te.number().int():te.number();if(typeof e.minimum==="number")t=t.min(e.minimum);if(typeof e.maximum==="number")t=t.max(e.maximum);if(typeof e.exclusiveMinimum==="number")t=t.gt(e.exclusiveMinimum);else if(e.exclusiveMinimum===!0&&typeof e.minimum==="number")t=t.gt(e.minimum);if(typeof e.exclusiveMaximum==="number")t=t.lt(e.exclusiveMaximum);else if(e.exclusiveMaximum===!0&&typeof e.maximum==="number")t=t.lt(e.maximum);if(typeof e.multipleOf==="number")t=t.multipleOf(e.multipleOf);o=t;break}case"boolean":{o=te.boolean();break}case"null":{o=te.null();break}case"object":{let t={},i=e.properties||{},a=new Set(e.required||[]);for(let[u,c]of Object.entries(i)){let d=Oe(c,r);t[u]=a.has(u)?d:d.optional()}if(e.propertyNames){let u=Oe(e.propertyNames,r),c=e.additionalProperties&&typeof e.additionalProperties==="object"?Oe(e.additionalProperties,r):te.any();if(Object.keys(t).length===0){o=te.record(u,c);break}let d=te.object(t).passthrough(),l=te.looseRecord(u,c);o=te.intersection(d,l);break}if(e.patternProperties){let u=e.patternProperties,c=Object.keys(u),d=[];for(let h of c){let f=Oe(u[h],r),g=te.string().regex(new RegExp(h));d.push(te.looseRecord(g,f))}let l=[];if(Object.keys(t).length>0)l.push(te.object(t).passthrough());if(l.push(...d),l.length===0)o=te.object({}).passthrough();else if(l.length===1)o=l[0];else{let h=te.intersection(l[0],l[1]);for(let f=2;f<l.length;f++)h=te.intersection(h,l[f]);o=h}break}let s=te.object(t);if(e.additionalProperties===!1)o=s.strict();else if(typeof e.additionalProperties==="object")o=s.catchall(Oe(e.additionalProperties,r));else o=s.passthrough();break}case"array":{let{prefixItems:t,items:i}=e;if(t&&Array.isArray(t)){let a=t.map((u)=>Oe(u,r)),s=i&&typeof i==="object"&&!Array.isArray(i)?Oe(i,r):void 0;if(s)o=te.tuple(a).rest(s);else o=te.tuple(a);if(typeof e.minItems==="number")o=o.check(te.minLength(e.minItems));if(typeof e.maxItems==="number")o=o.check(te.maxLength(e.maxItems))}else if(Array.isArray(i)){let a=i.map((u)=>Oe(u,r)),s=e.additionalItems&&typeof e.additionalItems==="object"?Oe(e.additionalItems,r):void 0;if(s)o=te.tuple(a).rest(s);else o=te.tuple(a);if(typeof e.minItems==="number")o=o.check(te.minLength(e.minItems));if(typeof e.maxItems==="number")o=o.check(te.maxLength(e.maxItems))}else if(i!==void 0){let a=Oe(i,r),s=te.array(a);if(typeof e.minItems==="number")s=s.min(e.minItems);if(typeof e.maxItems==="number")s=s.max(e.maxItems);o=s}else o=te.array(te.any());break}default:throw Error(`Unsupported type: ${n}`)}return o}function Oe(e,r){if(typeof e==="boolean")return e?te.any():te.never();let n=ch(e,r),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map((c)=>Oe(c,r)),u=te.union(s);n=o?te.intersection(n,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map((c)=>Oe(c,r)),u=te.xor(s);n=o?te.intersection(n,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:te.any();else{let s=o?n:Oe(e.allOf[0],r),u=o?0:1;for(let c=u;c<e.allOf.length;c++)s=te.intersection(s,Oe(e.allOf[c],r));n=s}if(e.nullable===!0&&r.version==="openapi-3.0")n=te.nullable(n);if(e.readOnly===!0)n=te.readonly(n);if(e.default!==void 0)n=n.default(e.default);let t={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of i)if(s in e)t[s]=e[s];let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)if(s in e)t[s]=e[s];for(let s of Object.keys(e))if(!g$.has(s))t[s]=e[s];if(Object.keys(t).length>0)r.registry.add(n,t);if(e.description)n=n.describe(e.description);return n}function lh(e,r){if(typeof e==="boolean")return e?te.any():te.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=v$(n,r?.defaultTarget),t=n.$defs||n.definitions||{},i={version:o,defs:t,refs:new Map,processing:new Set,rootSchema:n,registry:r?.registry??Te};return Oe(n,i)}var Bd={};ct(Bd,{bigint:()=>$$,boolean:()=>x$,date:()=>w$,number:()=>_$,string:()=>b$});function b$(e){return lc(gr,e)}function _$(e){return yc(yr,e)}function x$(e){return Ic(br,e)}function $$(e){return zc(_r,e)}function w$(e){return Nc(sn,e)}we(Jr());class Me extends Error{field;regex;constructor(e,r,n){super(n);this.field=e,this.regex=r}}class xr extends Error{hash;constructor(e){super(`'${e}' not found in the root hash`);this.hash=e}}class Md extends Map{#t;#e=0;constructor(e,r=[]){super();this.#t=e;for(let[n,o]of r)this.set(n,o)}get(e){let r=super.get(e);if(r!==void 0)super.delete(e),super.set(e,r);return r}set(e,r){let n=super.get(e);if(n===void 0)this.#e+=e.length;else if(n!==null)this.#e-=n.byteLength;if(r!==null)this.#e+=r.byteLength;super.delete(e);let o;while(this.#e>this.#t&&(o=this.entries().next().value)){let[t,i]=o;if(super.delete(t),this.#e-=t.length,i!==null)this.#e-=i.byteLength}return super.set(e,r),this}delete(e){let r=super.get(e);if(r===void 0)return!1;if(super.delete(e),r!==null)this.#e-=r.byteLength;return this.#e-=e.length,!0}clear(){super.clear(),this.#e=0}}var pT=ht(Jv(),1),hT=ht(Qv(),1),gT=ht(ky(),1),vT=ht(Ty(),1),yT=ht(Zy(),1),bT=ht(Fy(),1),sb=ht(My(),1);var Po=S.literal([0,1,2,3,4,5,6,7,8,12,13,14,15,16,17,18,21,23],{error:"unknown pen code"}),MS={0:"brush",12:"brush",1:"pencil",14:"pencil",2:"ballpoint",15:"ballpoint",3:"marker",16:"marker",4:"fineliner",17:"fineliner",5:"highlighter",18:"highlighter",6:"eraser",7:"mechanicalPencil",13:"mechanicalPencil",8:"eraseArea",21:"calligraphy",23:"shader"},xn=S.literal([0,1,2,3,4,5,6,7,8,9,10,11,12,13],{error:"unknown color code"}),VS={0:"black",1:"gray",2:"white",3:"yellow",4:"green",5:"pink",6:"blue",7:"red",8:"grayOverlap",9:"highlight",10:"green",11:"cyan",12:"magenta",13:"yellow"};var zt=43,To="reMarkable .lines file, version=";function Vy(e,r){let n=new DataView(e.buffer,e.byteOffset,e.byteLength),o=zt,t=()=>{let u=n.getInt32(o,!0);return o+=4,u},i=()=>{let u=n.getFloat32(o,!0);return o+=4,u},a=t(),s=[];for(let u=0;u<a;u++){let c=t(),d=[];for(let l=0;l<c;l++){let h=Po.parse(t()),f=xn.parse(t()),g=t(),v=i(),y=r===5?t():void 0,w=t(),P=Array(w);for(let E=0;E<w;E++)P[E]={x:i(),y:i(),speed:i(),direction:i(),width:i(),pressure:i()};let k={brushType:h,color:f,padding:g,brushBaseSize:v,points:P};if(y!==void 0)k.unknown=y;d.push(k)}s.push({lines:d})}return{version:r,layers:s}}function qy(e){let{version:r}=e;if(r!==3&&r!==5)throw Error(`rendering version ${r} .lines files is not supported (only 3 and 5)`);let n=r===5?24:20,o=zt+4;for(let d of e.layers){o+=4;for(let l of d.lines)o+=n+l.points.length*24}let t=new Uint8Array(o),i=new DataView(t.buffer),a=`${To}${r}`.padEnd(zt," ");for(let d=0;d<zt;d++)t[d]=a.charCodeAt(d);let s=zt,u=(d)=>{i.setInt32(s,d,!0),s+=4},c=(d)=>{i.setFloat32(s,d,!0),s+=4};u(e.layers.length);for(let d of e.layers){u(d.lines.length);for(let l of d.lines){if(u(l.brushType),u(l.color),u(l.padding??0),c(l.brushBaseSize),r===5)u(l.unknown??0);u(l.points.length);for(let h of l.points)c(h.x),c(h.y),c(h.speed),c(h.direction),c(h.width),c(h.pressure)}}return t}var Jy={authorId:0,counter:1},Gy={authorId:0,counter:0};function je(e){return`${e.authorId}:${e.counter}`}var Gf=43,Hy="reMarkable .lines file, version=6",Oo=1,ot=4,Ky=8,Pt=12,jo=15;class Xy{#t;#e;#r;#n=[];constructor(e,r){this.#t=new DataView(e.buffer,e.byteOffset,e.byteLength),this.#e=r,this.#r=e.byteLength}get offset(){return this.#e}get atFileEnd(){return this.#e>=this.#r}#a(){return this.#n.length>0?this.#n[this.#n.length-1]:this.#r}bytesRemaining(){return this.#a()-this.#e}u8(){let e=this.#t.getUint8(this.#e);return this.#e+=1,e}u16(){let e=this.#t.getUint16(this.#e,!0);return this.#e+=2,e}u32(){let e=this.#t.getUint32(this.#e,!0);return this.#e+=4,e}f32(){let e=this.#t.getFloat32(this.#e,!0);return this.#e+=4,e}f64(){let e=this.#t.getFloat64(this.#e,!0);return this.#e+=8,e}varuint(){let e=0,r=0,n;do n=this.u8(),e+=(n&127)*2**r,r+=7;while(n&128);return e}crdtId(){return{authorId:this.u8(),counter:this.varuint()}}bytes(e){let r=this.#t.byteOffset+this.#e,n=new Uint8Array(this.#t.buffer,r,e);return this.#e+=e,n.slice()}peekTag(){if(this.#e>=this.#a())return;let e=this.#e,r=this.varuint();return this.#e=e,[Math.floor(r/16),r%16]}hasTag(e,r){let n=this.peekTag();return n!==void 0&&n[0]===e&&n[1]===r}#i(e,r){let n=this.varuint();if(Math.floor(n/16)!==e||n%16!==r)throw Error(`unexpected v6 tag ${n} (wanted ${e}/${r})`)}readInt(e){return this.#i(e,ot),this.u32()}readFloat(e){return this.#i(e,ot),this.f32()}readDouble(e){return this.#i(e,Ky),this.f64()}readId(e){return this.#i(e,jo),this.crdtId()}readBool(e){return this.#i(e,Oo),this.u8()!==0}readByte(e){return this.#i(e,Oo),this.u8()}subblock(e,r){this.#i(e,Pt);let n=this.u32(),o=this.#e+n;this.#n.push(o);try{let t=r();if(this.#e!==o)throw Error(`subblock ${e} left ${o-this.#e} bytes unread`);return t}finally{this.#n.pop(),this.#e=o}}seek(e){this.#e=e}bounded(e,r){this.#n.push(e);try{let n=r();if(this.#e>e)throw Error("block body overran its declared length");return[n,this.bytes(e-this.#e)]}finally{this.#n.pop(),this.#e=e}}readLww(e,r){return this.subblock(e,()=>{let n=this.readId(1),o=r();return{timestamp:n,value:o}})}readString(e){return this.subblock(e,()=>{let r=this.varuint();return this.u8(),new TextDecoder().decode(this.bytes(r))})}readStringWithFormat(e){return this.subblock(e,()=>{let r=this.varuint();this.u8();let n=new TextDecoder().decode(this.bytes(r));if(this.hasTag(2,ot))return this.readInt(2);else return n})}}class Yy{#t=new Uint8Array(4096);#e=new DataView(this.#t.buffer);#r=0;#n(e){if(this.#r+e<=this.#t.length)return;let r=this.#t.length;while(r<this.#r+e)r*=2;let n=new Uint8Array(r);n.set(this.#t),this.#t=n,this.#e=new DataView(n.buffer)}get length(){return this.#r}u8(e){this.#n(1),this.#e.setUint8(this.#r,e),this.#r+=1}u16(e){this.#n(2),this.#e.setUint16(this.#r,e,!0),this.#r+=2}u32(e){this.#n(4),this.#e.setUint32(this.#r,e,!0),this.#r+=4}f32(e){this.#n(4),this.#e.setFloat32(this.#r,e,!0),this.#r+=4}f64(e){this.#n(8),this.#e.setFloat64(this.#r,e,!0),this.#r+=8}varuint(e){let r=e;do{let n=r%128;if(r=Math.floor(r/128),r>0)n|=128;this.u8(n)}while(r>0)}crdtId(e){this.u8(e.authorId),this.varuint(e.counter)}bytes(e){this.#n(e.length),this.#t.set(e,this.#r),this.#r+=e.length}patchU32(e,r){this.#e.setUint32(e,r,!0)}finish(){return this.#t.slice(0,this.#r)}tag(e,r){this.varuint(e*16+r)}writeInt(e,r){this.tag(e,ot),this.u32(r)}writeFloat(e,r){this.tag(e,ot),this.f32(r)}writeDouble(e,r){this.tag(e,Ky),this.f64(r)}writeId(e,r){this.tag(e,jo),this.crdtId(r)}writeBool(e,r){this.tag(e,Oo),this.u8(r?1:0)}writeByte(e,r){this.tag(e,Oo),this.u8(r)}subblock(e,r){this.tag(e,Pt);let n=this.length;this.u32(0),r(),this.patchU32(n,this.length-n-4)}writeLww(e,r,n){this.subblock(e,()=>{this.writeId(1,r.timestamp),n(r.value)})}writeString(e,r){this.subblock(e,()=>{let n=new TextEncoder().encode(r);this.varuint(n.length),this.u8(1),this.bytes(n)})}}function $n(e,r){let n=e.readId(1),o=e.readId(2),t=e.readId(3),i=e.readId(4),a=e.readInt(5),s;if(e.hasTag(6,Pt))s=e.subblock(6,()=>{let u=e.u8();return r(u)});return{parentId:n,item:{itemId:o,leftId:t,rightId:i,deletedLength:a,value:s}}}function qS(e,r){let n=Po.parse(e.readInt(1)),o=xn.parse(e.readInt(2)),t=e.readDouble(3),i=e.readFloat(4),a=e.subblock(5,()=>{let u=r===1?24:14,c=e.bytesRemaining(),d=Math.floor(c/u),l=Array(d);for(let h=0;h<d;h++){let f=e.f32(),g=e.f32();if(r===1)l[h]={x:f,y:g,speed:e.f32()*4,direction:e.f32()*255/(2*Math.PI),width:e.f32()*4,pressure:e.f32()*255};else{let v=e.u16(),y=e.u16(),w=e.u8(),P=e.u8();l[h]={x:f,y:g,speed:v,width:y,direction:w,pressure:P}}}return l}),s={tool:n,color:o,thicknessScale:t,startingLength:i,points:a};if(e.hasTag(6,jo))s.timestampId=e.readId(6);if(e.hasTag(7,jo))s.moveId=e.readId(7);if(e.hasTag(8,ot))s.colorRgba=e.readInt(8);return s}function JS(e){let r=e.hasTag(2,ot)?e.readInt(2):void 0,n=e.hasTag(3,ot)?e.readInt(3):void 0,o=xn.parse(e.readInt(4)),t=e.readString(5),i=e.subblock(6,()=>{let s=e.varuint(),u=Array(s);for(let c=0;c<s;c++)u[c]={x:e.f64(),y:e.f64(),w:e.f64(),h:e.f64()};return u}),a={length:n??t.length,color:o,text:t,rectangles:i};if(r!==void 0)a.start=r;if(e.hasTag(10,ot))a.colorRgba=e.readInt(10);return a}function WS(e){let r=[],n=new Map;e.subblock(2,()=>{e.subblock(1,()=>{e.subblock(1,()=>{let a=e.varuint();for(let s=0;s<a;s++)r.push(e.subblock(0,()=>{let u=e.readId(2),c=e.readId(3),d=e.readId(4),l=e.readInt(5),h=e.hasTag(6,Pt)?e.readStringWithFormat(6):"";return{itemId:u,leftId:c,rightId:d,deletedLength:l,value:h}}))})}),e.subblock(2,()=>{e.subblock(1,()=>{let a=e.varuint();for(let s=0;s<a;s++){let u=e.crdtId(),c=e.readId(1),d=e.subblock(2,()=>(e.u8(),e.u8()));n.set(je(u),{timestamp:c,value:d})}})})});let[o,t]=e.subblock(3,()=>[e.f64(),e.f64()]),i=e.readFloat(4);return{items:r,styles:n,posX:o,posY:t,width:i}}function GS(e,r,n){switch(r){case 0:return{type:"migrationInfo",migrationId:e.readId(1),isDevice:e.readBool(2)};case 1:return{type:"sceneTree",treeId:e.readId(1),nodeId:e.readId(2),isUpdate:e.readBool(3),parentId:e.subblock(4,()=>e.readId(1))};case 2:{let o=e.readId(1),t=e.readLww(2,()=>e.readString(2)),i=e.readLww(3,()=>e.readBool(2)),a={type:"treeNode",nodeId:o,label:t,visible:i};if(e.bytesRemaining()>0&&e.hasTag(7,Pt))a.anchor={id:e.readLww(7,()=>e.readId(2)),type:e.readLww(8,()=>e.readByte(2)),threshold:e.readLww(9,()=>e.readFloat(2)),originX:e.readLww(10,()=>e.readFloat(2))};return a}case 3:return{type:"sceneGlyphItem",...$n(e,(o)=>o===1?JS(e):void 0)};case 4:return{type:"sceneGroupItem",...$n(e,(o)=>o===2?e.readId(2):void 0)};case 5:return{type:"sceneLineItem",...$n(e,(o)=>o===3?qS(e,n):void 0)};case 6:return{type:"sceneTextItem",...$n(e,()=>{return})};case 7:return{type:"rootText",blockId:e.readId(1),text:WS(e)};case 8:return{type:"sceneTombstone",...$n(e,()=>{return})};case 9:{let o=new Map,t=e.varuint();for(let i=0;i<t;i++)e.subblock(0,()=>{let a=e.varuint(),s=e.bytes(a),u=e.u16();o.set(u,KS(s))});return{type:"authorIds",authors:o}}case 10:{let o={type:"pageInfo",loadsCount:e.readInt(1),mergesCount:e.readInt(2),textCharsCount:e.readInt(3),textLinesCount:e.readInt(4)};if(e.hasTag(5,ot))o.typeFolioUseCount=e.readInt(5);return o}case 13:{let o={type:"sceneInfo",currentLayer:e.readLww(1,()=>e.readId(2))};if(e.hasTag(2,Pt))o.backgroundVisible=e.readLww(2,()=>e.readBool(2));if(e.hasTag(3,Pt))o.rootDocumentVisible=e.readLww(3,()=>e.readBool(2));if(e.hasTag(5,Pt))o.paperSize=e.subblock(5,()=>[e.u32(),e.u32()]);return o}default:throw Error(`unknown v6 block type 0x${r.toString(16)}`)}}var HS=[3,2,1,0,5,4,7,6,8,9,10,11,12,13,14,15];function Qy(e){let r=new Uint8Array(16);for(let n=0;n<16;n++)r[n]=e[HS[n]]??0;return r}function KS(e){let r=Qy(e).toHex();return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function XS(e){let r=new TextDecoder().decode(e.subarray(0,Gf));if(!r.startsWith(Hy))throw Error(`not a version 6 .lines file: ${JSON.stringify(r)}`);let n=new Xy(e,Gf),o=[];while(!n.atFileEnd){if(n.bytesRemaining()<8)break;let t=n.u32(),i=n.u8(),a=n.u8(),s=n.u8(),u=n.u8(),c=n.offset;if(t>n.bytesRemaining()){o.push({type:"unknown",blockType:u,data:n.bytes(n.bytesRemaining()),declaredLength:t,reserved:i,minVersion:a,currentVersion:s,extraData:new Uint8Array});break}let d=c+t,l;try{let[h,f]=n.bounded(d,()=>GS(n,u,s));l={...h,reserved:i,minVersion:a,currentVersion:s,extraData:f}}catch{n.seek(c),l={type:"unknown",blockType:u,data:n.bytes(t),reserved:i,minVersion:a,currentVersion:s,extraData:new Uint8Array}}n.seek(d),o.push(l)}return o}function YS(e,r){let[n,o]=e,[t,i]=r;return n-t||o-i}function Wy(e){if(e.length<=1)return[...e];let r="\x00start",n="\x00end",o=new Set(e.map((f)=>je(f.itemId))),t=new Map([[r,[]],[n,[]]]),i=new Map([[r,0],[n,0]]);for(let f of e)t.set(je(f.itemId),[]),i.set(je(f.itemId),0);let a=(f,g)=>{let v=je(f);return v===je(Gy)||!o.has(v)?g:v},s=(f,g)=>{t.get(f).push(g),i.set(g,(i.get(g)??0)+1)};for(let f of e)s(a(f.leftId,r),je(f.itemId)),s(je(f.itemId),a(f.rightId,n));let u=new Map(e.map((f)=>[je(f.itemId),f])),c=(f)=>{if(f===r)return[-1/0,-1/0];if(f===n)return[1/0,1/0];let g=u.get(f);return[-g.itemId.authorId,g.itemId.counter]},d=new Set;for(let[f,g]of i)if(g===0)d.add(f);let l=[],h=new Set;while(d.size>0){let f;for(let v of d)if(f===void 0||YS(c(v),c(f))<0)f=v;d.delete(f),h.add(f);let g=u.get(f);if(g)l.push(g);for(let v of t.get(f)??[])if(i.set(v,i.get(v)-1),i.get(v)===0)d.add(v)}if(l.length<e.length){for(let f of e)if(!h.has(je(f.itemId)))l.push(f)}return l}class eb{version=6;blocks;authors;paperSize;#t=new Map;#e;constructor(e){this.blocks=e,this.authors=new Map;let r=(n)=>{let o=this.#t.get(je(n));if(o===void 0)o={id:n,parentId:Gy,children:[]},this.#t.set(je(n),o);return o};r(Jy);for(let n of e)if(n.type==="sceneTree")r(n.treeId).parentId=n.parentId;else if(n.type==="treeNode"){let o=r(n.nodeId);o.label=n.label.value,o.visible=n.visible.value}else if(n.type==="sceneGroupItem"&&n.item.value)r(n.parentId).children.push({...n.item,value:{kind:"group",id:n.item.value}});else if(n.type==="sceneLineItem"&&n.item.value)r(n.parentId).children.push({...n.item,value:{kind:"line",line:n.item.value}});else if(n.type==="sceneGlyphItem"&&n.item.value)r(n.parentId).children.push({...n.item,value:{kind:"glyph",glyph:n.item.value}});else if(n.type==="rootText")this.#e=n.text;else if(n.type==="authorIds")for(let[o,t]of n.authors)this.authors.set(o,t);else if(n.type==="sceneInfo"&&n.paperSize)this.paperSize=n.paperSize}#r(e){let r=[];for(let o of Wy(e.children))if(o.value.kind==="group"){let t=this.#t.get(je(o.value.id));if(t)r.push({kind:"layer",layer:this.#r(t)})}else if(o.value.kind==="line")r.push({kind:"line",line:o.value.line});else r.push({kind:"glyph",glyph:o.value.glyph});let n={id:e.id,items:r};if(e.label!==void 0)n.label=e.label;if(e.visible!==void 0)n.visible=e.visible;return n}layers(){let e=this.#t.get(je(Jy));if(e===void 0)return[];let r=[];for(let n of Wy(e.children))if(n.value.kind==="group"){let o=this.#t.get(je(n.value.id));if(o)r.push(this.#r(o))}return r}strokes(){let e=[],r=(n)=>{for(let o of n.items)if(o.kind==="line")e.push(o.line);else if(o.kind==="layer")r(o.layer)};for(let n of this.layers())r(n);return e}text(){return this.#e}}function Eo(e,r,n,o,t){e.writeId(1,r),e.writeId(2,n.itemId),e.writeId(3,n.leftId),e.writeId(4,n.rightId),e.writeInt(5,n.deletedLength);let{value:i}=n;if(i!==void 0)e.subblock(6,()=>{e.u8(o),t(i)})}function QS(e,r,n){if(e.writeInt(1,r.tool),e.writeInt(2,r.color),e.writeDouble(3,r.thicknessScale),e.writeFloat(4,r.startingLength),e.subblock(5,()=>{for(let o of r.points)if(e.f32(o.x),e.f32(o.y),n===1)e.f32(o.speed/4),e.f32(o.direction*2*Math.PI/255),e.f32(o.width/4),e.f32(o.pressure/255);else e.u16(o.speed),e.u16(o.width),e.u8(o.direction),e.u8(o.pressure)}),r.timestampId!==void 0)e.writeId(6,r.timestampId);if(r.moveId!==void 0)e.writeId(7,r.moveId);if(r.colorRgba!==void 0)e.writeInt(8,r.colorRgba)}function e1(e,r){if(r.start!==void 0)e.writeInt(2,r.start);if(e.writeInt(3,r.length),e.writeInt(4,r.color),e.writeString(5,r.text),e.subblock(6,()=>{e.varuint(r.rectangles.length);for(let n of r.rectangles)e.f64(n.x),e.f64(n.y),e.f64(n.w),e.f64(n.h)}),r.colorRgba!==void 0)e.writeInt(10,r.colorRgba)}function t1(e,r){e.subblock(2,()=>{e.subblock(1,()=>{e.subblock(1,()=>{e.varuint(r.items.length);for(let n of r.items)e.subblock(0,()=>{e.writeId(2,n.itemId),e.writeId(3,n.leftId),e.writeId(4,n.rightId),e.writeInt(5,n.deletedLength);let{value:o}=n;if(o!==""&&o!==void 0)e.subblock(6,()=>{if(typeof o==="number")e.varuint(0),e.u8(1),e.writeInt(2,o);else{let t=new TextEncoder().encode(o);e.varuint(t.length),e.u8(1),e.bytes(t)}})})})}),e.subblock(2,()=>{e.subblock(1,()=>{e.varuint(r.styles.size);for(let[n,o]of r.styles){let[t,i]=n.split(":");e.crdtId({authorId:Number(t),counter:Number(i)}),e.writeId(1,o.timestamp),e.subblock(2,()=>{e.u8(17),e.u8(o.value)})}})})}),e.subblock(3,()=>{e.f64(r.posX),e.f64(r.posY)}),e.writeFloat(4,r.width)}function r1(e){return Qy(Uint8Array.fromHex(e.replaceAll("-","")))}var n1={migrationInfo:0,sceneTree:1,treeNode:2,sceneGlyphItem:3,sceneGroupItem:4,sceneLineItem:5,sceneTextItem:6,rootText:7,sceneTombstone:8,authorIds:9,pageInfo:10,sceneInfo:13};function i1(e,r){switch(r.type){case"migrationInfo":e.writeId(1,r.migrationId),e.writeBool(2,r.isDevice);break;case"sceneTree":e.writeId(1,r.treeId),e.writeId(2,r.nodeId),e.writeBool(3,r.isUpdate),e.subblock(4,()=>e.writeId(1,r.parentId));break;case"treeNode":if(e.writeId(1,r.nodeId),e.writeLww(2,r.label,(n)=>e.writeString(2,n)),e.writeLww(3,r.visible,(n)=>e.writeBool(2,n)),r.anchor!==void 0){let{id:n,type:o,threshold:t,originX:i}=r.anchor;e.writeLww(7,n,(a)=>e.writeId(2,a)),e.writeLww(8,o,(a)=>e.writeByte(2,a)),e.writeLww(9,t,(a)=>e.writeFloat(2,a)),e.writeLww(10,i,(a)=>e.writeFloat(2,a))}break;case"sceneGlyphItem":Eo(e,r.parentId,r.item,1,(n)=>e1(e,n));break;case"sceneGroupItem":Eo(e,r.parentId,r.item,2,(n)=>e.writeId(2,n));break;case"sceneLineItem":Eo(e,r.parentId,r.item,3,(n)=>QS(e,n,r.currentVersion));break;case"sceneTextItem":case"sceneTombstone":Eo(e,r.parentId,r.item,0,()=>{return});break;case"rootText":e.writeId(1,r.blockId),t1(e,r.text);break;case"authorIds":e.varuint(r.authors.size);for(let[n,o]of r.authors)e.subblock(0,()=>{let t=r1(o);e.varuint(t.length),e.bytes(t),e.u16(n)});break;case"pageInfo":if(e.writeInt(1,r.loadsCount),e.writeInt(2,r.mergesCount),e.writeInt(3,r.textCharsCount),e.writeInt(4,r.textLinesCount),r.typeFolioUseCount!==void 0)e.writeInt(5,r.typeFolioUseCount);break;case"sceneInfo":if(e.writeLww(1,r.currentLayer,(n)=>e.writeId(2,n)),r.backgroundVisible!==void 0)e.writeLww(2,r.backgroundVisible,(n)=>e.writeBool(2,n));if(r.rootDocumentVisible!==void 0)e.writeLww(3,r.rootDocumentVisible,(n)=>e.writeBool(2,n));if(r.paperSize!==void 0)e.subblock(5,()=>{e.u32(r.paperSize[0]),e.u32(r.paperSize[1])});break;case"unknown":e.bytes(r.data);break}}function tb(e){let r=new Yy,n=Hy.padEnd(Gf," ");r.bytes(new TextEncoder().encode(n));for(let o of e.blocks){let t=r.length;r.u32(0),r.u8(o.reserved),r.u8(o.minVersion),r.u8(o.currentVersion),r.u8(o.type==="unknown"?o.blockType:n1[o.type]);let i=r.length;if(i1(r,o),o.type!=="unknown")r.bytes(o.extraData);r.patchU32(t,o.type==="unknown"&&o.declaredLength!==void 0?o.declaredLength:r.length-i)}return r.finish()}function rb(e){return new eb(XS(e))}function nb(e){let r=e.reduce((t,i)=>t+i.length,0),n=new Uint8Array(r),o=0;for(let t of e)n.set(t,o),o+=t.length;return n}var Do=/^[0-9a-f]{64}$/,Uo=2,Ro="t",Co="b";function o1(e){if(e.length<zt)throw Error("data is too short to be a reMarkable .lines file");let r=new TextDecoder().decode(e.subarray(0,zt));if(!r.startsWith(To))throw Error(`unrecognized .lines header: ${JSON.stringify(r)}`);let n=r.charAt(To.length);if(n==="6")return rb(e);else if(n==="3"||n==="5")return Vy(e,n==="3"?3:5);else throw Error(`unsupported .lines version '${n}'`)}function a1(e){return e.version===6?tb(e):qy(e)}var ub=S.object({name:S.string(),timestamp:S.number()}).loose(),s1=S.object({name:S.string(),pageId:S.string(),timestamp:S.number()}).loose(),u1=S.object({authors:S.array(S.string()).optional(),title:S.string().optional(),publicationDate:S.string().optional(),publisher:S.string().optional()}).loose(),c1=S.object({id:S.string(),idx:S.object({timestamp:S.string(),value:S.string()}).loose(),template:S.object({timestamp:S.string(),value:S.string()}).loose().optional(),redir:S.object({timestamp:S.string(),value:S.number().int()}).loose().optional(),scrollTime:S.object({timestamp:S.string(),value:S.iso.datetime({offset:!0})}).loose().optional(),verticalScroll:S.object({timestamp:S.string(),value:S.number()}).loose().optional(),deleted:S.object({timestamp:S.string(),value:S.number().int()}).loose().optional(),modifed:S.string().optional()}).loose(),l1=S.object({lastOpened:S.object({timestamp:S.string(),value:S.string()}).loose(),original:S.object({timestamp:S.string(),value:S.number().int()}).loose(),pages:S.array(c1),uuids:S.array(S.object({first:S.string(),second:S.number().int().nonnegative()}).loose()).nullable()}).loose(),d1=S.object({tags:S.array(ub).optional()}).strict(),f1=S.object({tags:S.array(S.string()).optional()}).strict(),m1={coverPageNumber:S.number().int(),documentMetadata:u1,extraMetadata:S.record(S.string(),S.string()),fileType:S.enum(["epub","notebook","pdf"]),fontName:S.string(),lineHeight:S.number().int(),orientation:S.enum(["portrait","landscape"]),pageCount:S.number().int().nonnegative(),textAlignment:S.enum(["","justify","left"]),textScale:S.number()},p1={cPages:l1.optional(),customZoomCenterX:S.number().optional(),customZoomCenterY:S.number().optional(),customZoomOrientation:S.enum(["portrait","landscape"]).optional(),customZoomPageHeight:S.number().optional(),customZoomPageWidth:S.number().optional(),customZoomScale:S.number().optional(),dummyDocument:S.boolean().optional(),formatVersion:S.number().int().nonnegative().optional(),keyboardMetadata:S.object({count:S.number().int().nonnegative(),timestamp:S.number()}).loose().optional(),lastOpenedPage:S.number().int().optional(),margins:S.number().int().nonnegative().optional(),originalPageCount:S.number().int().optional(),pages:S.array(S.string()).nullable().optional(),pageTags:S.array(s1).optional(),redirectionPageMap:S.array(S.number().int()).optional(),sizeInBytes:S.string().optional(),transform:S.object({m11:S.number().optional(),m12:S.number().optional(),m13:S.number().optional(),m21:S.number().optional(),m22:S.number().optional(),m23:S.number().optional(),m31:S.number().optional(),m32:S.number().optional(),m33:S.number().optional()}).loose().optional(),viewBackgroundFilter:S.enum(["off","fullpage"]).optional(),zoomMode:S.enum(["bestFit","customFit","fitToHeight","fitToWidth"]).optional()},cb=S.object({...m1,...p1}).loose(),h1=cb.extend({tags:S.array(ub).optional()}).loose(),g1=cb.extend({tags:S.array(S.string()).optional()}).loose(),lb=S.object({id:S.string().optional(),name:S.string(),author:S.string(),iconData:S.string(),categories:S.array(S.string()),labels:S.array(S.string()).optional(),orientation:S.enum(["portrait","landscape"]),templateVersion:S.string(),supportedScreens:S.array(S.enum(["rm2","rmPP"])).optional(),constants:S.array(S.record(S.string(),S.union([S.number(),S.string()]))).optional(),items:S.array(S.unknown()),formatVersion:S.number().int().nonnegative().optional()}).loose(),v1=S.union([d1,f1,lb,h1,g1]),ib=/\.highlights\/[^/]+\.json$/,y1=S.object({highlights:S.array(S.array(S.object({text:S.string(),color:S.number().int(),start:S.number().int(),length:S.number().int(),rects:S.array(S.object({x:S.number(),y:S.number(),width:S.number(),height:S.number()}).loose())}).loose()))}).loose(),ob=/\/[^/]+-metadata\.json$/,b1=S.object({layers:S.array(S.object({name:S.string()}).loose())}).loose(),db=S.object({lastModified:S.string().optional(),parent:S.string(),pinned:S.boolean(),type:S.enum(["DocumentType","CollectionType","TemplateType"]),visibleName:S.string(),lastOpened:S.string().optional(),lastOpenedPage:S.number().int().optional(),createdTime:S.string().optional(),deleted:S.boolean().nullish(),metadatamodified:S.boolean().nullish(),modified:S.boolean().nullish(),synced:S.boolean().nullish(),version:S.number().int().nonnegative().optional(),new:S.boolean().optional(),source:S.string().optional()}).loose();function fb(e){let r=JSON.parse(e);return db.parse(r)}var _1=S.object({hash:S.string(),generation:S.number()}).loose(),x1=S.object({hash:S.string(),generation:S.number(),schemaVersion:S.number().int().nonnegative()}).loose(),$1=S.object({docID:S.string(),hash:S.string()}).loose();async function Hf(e){let r=await crypto.subtle.digest("SHA-256",e);return new Uint8Array(r).toHex()}function ab(e){let[r,n,o,t,i]=e.split(":");if(r===void 0||n===void 0||o===void 0||t===void 0||i===void 0)throw Error(`line '${e}' was not formatted correctly`);else if(n==="80000000"||n==="0")return{hash:r,type:n==="0"?0:80000000,id:o,subfiles:parseInt(t,10),size:parseInt(i,10)};else throw Error(`line '${e}' was not formatted correctly`)}class Kf{#t;#e;#r;#n;#a;#i;constructor(e,r,n,o,t,i){this.#t=e,this.#e=r,this.#a=n,this.#r=o,this.#n=t,this.#i=i}async getRootHash(){let r=await(await this.#t("GET",`${this.#r}/sync/v4/root`)).text(),n=JSON.parse(r),{hash:o,generation:t,schemaVersion:i}=x1.parse(n);if(i!==3&&i!==4)throw Error(`schema version ${i} not supported`);else if(!Number.isSafeInteger(t))throw Error(`generation ${t} was not a safe integer; please file a bug report`);else return[o,t,i]}async#c(e,r){if(!Do.test(r))throw new Me(r,Do,"hash was not a valid hash");let o=await(await this.#t("GET",`${this.#r}/sync/v3/files/${r}`,{headers:{"rm-filename":e}})).arrayBuffer();return new Uint8Array(o)}async getHash({id:e,hash:r}){let n=this.#a.get(r);if(n!=null)return n.slice();else{let o=await this.#c(e,r);return this.#a.set(r,o.byteLength<=this.#i?o.slice():null),o}}async getText(e){return new TextDecoder().decode(await this.getHash(e))}async getEntries({id:e,hash:r}){let n=await this.getText({id:`${e}.docSchema`,hash:r}),[o,...t]=n.slice(0,-1).split(`
78
- `);if(o==="3")return{entries:t.map(ab)};else if(o==="4"){let[i,...a]=t;if(!i)throw Error("missing info line for schema version 4");let[s,u,c,d]=i.split(":");if(s!=="0"||u===void 0||c===void 0||d===void 0)throw Error(`schema 4 info line '${i}' was not formatted correctly`);let l=a.map(ab);if(parseInt(c,10)!==l.length)throw Error(`schema 4 expected ${c} entries, but found ${l.length}`);else return{entries:l,id:u,size:parseInt(d,10)}}else throw Error(`schema version ${o} not supported`)}async getContent(e){let r=await this.getText(e),n=JSON.parse(r);return v1.parse(n)}async getMetadata(e){let r=await this.getText(e),n=JSON.parse(r);return db.parse(n)}async getRm(e){let r=await this.getHash(e);return o1(r)}async getHighlights(e){let r=await this.getText(e),n=JSON.parse(r);return y1.parse(n).highlights}async getTemplate(e){let r=await this.getText(e),n=JSON.parse(r);return lb.parse(n)}async getPageMetadata(e){let r=await this.getText(e),n=JSON.parse(r);return b1.parse(n)}async putRm(e,r){if(!e.endsWith(".rm"))throw Error(`fileName ${e} did not end with '.rm'`);else return await this.putFile(e,a1(r))}async putRootHash(e,r,n=!0){if(!Number.isSafeInteger(r))throw Error(`generation ${r} was not a safe integer`);else if(!Do.test(e))throw new Me(e,Do,"rootHash was not a valid hash");let o=JSON.stringify({hash:e,generation:r,broadcast:n}),i=await(await this.#t("PUT",`${this.#r}/sync/v3/root`,{body:o})).text(),a=JSON.parse(i),{hash:s,generation:u}=_1.parse(a);if(Number.isSafeInteger(u))return[s,u];else throw Error(`new generation ${u} was not a safe integer; please file a bug report`)}async#l(e,r,n){if(!this.#a.has(r)){let o=sb.default.buf(n,0),t=new ArrayBuffer(4);new DataView(t).setInt32(0,o,!1);let i=new Uint8Array(t).toBase64();await this.#t("PUT",`${this.#r}/sync/v3/files/${r}`,{body:n,headers:{"rm-filename":e,"x-goog-hash":`crc32c=${i}`}}),this.#a.set(r,n.byteLength<=this.#i?n.slice():null)}}async putFile(e,r){let n=await Hf(r),o=this.#l(e,n,r);return o.catch(()=>{}),{id:e,hash:n,type:0,subfiles:0,size:r.length,async[Symbol.asyncDispose](){await o}}}async#o(e,r){return await this.putFile(e,new TextEncoder().encode(r))}async putContent(e,r){if(!e.endsWith(".content"))throw Error(`fileName ${e} did not end with '.content'`);else return await this.#o(e,JSON.stringify(r))}async putPagedata(e,r){if(!e.endsWith(".pagedata"))throw Error(`fileName ${e} did not end with '.pagedata'`);else return await this.#o(e,`${r.join(`
76
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let l=e.external.registry.get(s[0])?.id;if(t!==s[0]&&l){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1){if(e.reused==="ref"){i(s);continue}}}}function jn(e,t){let r=e.seen.get(t);if(!r)throw Error("Unprocessed schema. This is a bug in Zod.");let n=(a)=>{let c=e.seen.get(a);if(c.ref===null)return;let l=c.def??c.schema,p={...l},u=c.ref;if(c.ref=null,u){n(u);let f=e.seen.get(u),g=f.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"))l.allOf=l.allOf??[],l.allOf.push(g);else Object.assign(l,g);if(Object.assign(l,p),a._zod.parent===u)for(let b in l){if(b==="$ref"||b==="allOf")continue;if(!(b in p))delete l[b]}if(g.$ref&&f.def)for(let b in l){if(b==="$ref"||b==="allOf")continue;if(b in f.def&&JSON.stringify(l[b])===JSON.stringify(f.def[b]))delete l[b]}}let m=a._zod.parent;if(m&&m!==u){n(m);let f=e.seen.get(m);if(f?.schema.$ref){if(l.$ref=f.schema.$ref,f.def)for(let g in l){if(g==="$ref"||g==="allOf")continue;if(g in f.def&&JSON.stringify(l[g])===JSON.stringify(f.def[g]))delete l[g]}}}e.override({zodSchema:a,jsonSchema:l,path:c.path??[]})};for(let a of[...e.seen.entries()].reverse())n(a[0]);let o={};if(e.target==="draft-2020-12")o.$schema="https://json-schema.org/draft/2020-12/schema";else if(e.target==="draft-07")o.$schema="http://json-schema.org/draft-07/schema#";else if(e.target==="draft-04")o.$schema="http://json-schema.org/draft-04/schema#";else if(e.target==="openapi-3.0");if(e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw Error("Schema is missing an `id` property");o.$id=e.external.uri(a)}Object.assign(o,r.def??r.schema);let i=e.metadataRegistry.get(t)?.id;if(i!==void 0&&o.id===i)delete o.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];if(c.def&&c.defId){if(c.def.id===c.defId)delete c.def.id;s[c.defId]=c.def}}if(e.external);else if(Object.keys(s).length>0)if(e.target==="draft-2020-12")o.$defs=s;else o.definitions=s;try{let a=JSON.parse(JSON.stringify(o));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:Ft(t,"input",e.processors),output:Ft(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch(a){throw Error("Error converting schema to JSON.")}}function Ee(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let n=e._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Ee(n.element,r);if(n.type==="set")return Ee(n.valueType,r);if(n.type==="lazy")return Ee(n.getter(),r);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Ee(n.innerType,r);if(n.type==="intersection")return Ee(n.left,r)||Ee(n.right,r);if(n.type==="record"||n.type==="map")return Ee(n.keyType,r)||Ee(n.valueType,r);if(n.type==="pipe"){if(e._zod.traits.has("$ZodCodec"))return!0;return Ee(n.in,r)||Ee(n.out,r)}if(n.type==="object"){for(let o in n.shape)if(Ee(n.shape[o],r))return!0;return!1}if(n.type==="union"){for(let o of n.options)if(Ee(o,r))return!0;return!1}if(n.type==="tuple"){for(let o of n.items)if(Ee(o,r))return!0;if(n.rest&&Ee(n.rest,r))return!0;return!1}return!1}var cc=(e,t={})=>(r)=>{let n=Fn({...r,processors:t});return _e(e,n),Bn(n,e),jn(n,e)},Ft=(e,t,r={})=>(n)=>{let{libraryOptions:o,target:i}=n??{},s=Fn({...o??{},target:i,io:t,processors:r});return _e(e,s),Bn(s,e),jn(s,e)};var Vp={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},uc=(e,t,r,n)=>{let o=r;o.type="string";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof i==="number")o.minLength=i;if(typeof s==="number")o.maxLength=s;if(a){if(o.format=Vp[a]??a,o.format==="")delete o.format;if(a==="time")delete o.format}if(l)o.contentEncoding=l;if(c&&c.size>0){let p=[...c];if(p.length===1)o.pattern=p[0].source;else if(p.length>1)o.allOf=[...p.map((u)=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:u.source}))]}},lc=(e,t,r,n)=>{let o=r,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:p}=e._zod.bag;if(typeof a==="string"&&a.includes("int"))o.type="integer";else o.type="number";let u=typeof p==="number"&&p>=(i??Number.NEGATIVE_INFINITY),m=typeof l==="number"&&l<=(s??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";if(u)if(f)o.minimum=p,o.exclusiveMinimum=!0;else o.exclusiveMinimum=p;else if(typeof i==="number")o.minimum=i;if(m)if(f)o.maximum=l,o.exclusiveMaximum=!0;else o.exclusiveMaximum=l;else if(typeof s==="number")o.maximum=s;if(typeof c==="number")o.multipleOf=c},dc=(e,t,r,n)=>{r.type="boolean"};var fc=(e,t,r,n)=>{r.not={}};var pc=(e,t,r,n)=>{};var hc=(e,t,r,n)=>{let o=e._zod.def,i=Qt(o.entries);if(i.every((s)=>typeof s==="number"))r.type="number";if(i.every((s)=>typeof s==="string"))r.type="string";r.enum=i},mc=(e,t,r,n)=>{let o=e._zod.def,i=[];for(let s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s==="bigint")if(t.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else i.push(Number(s));else i.push(s);if(i.length===0);else if(i.length===1){let s=i[0];if(r.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0")r.enum=[s];else r.const=s}else{if(i.every((s)=>typeof s==="number"))r.type="number";if(i.every((s)=>typeof s==="string"))r.type="string";if(i.every((s)=>typeof s==="boolean"))r.type="boolean";if(i.every((s)=>s===null))r.type="null";r.enum=i}};var gc=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")};var yc=(e,t,r,n)=>{if(t.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")};var bc=(e,t,r,n)=>{let o=r,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;if(typeof s==="number")o.minItems=s;if(typeof a==="number")o.maxItems=a;o.type="array",o.items=_e(i.element,t,{...n,path:[...n.path,"items"]})},vc=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object",o.properties={};let s=i.shape;for(let l in s)o.properties[l]=_e(s[l],t,{...n,path:[...n.path,"properties",l]});let a=new Set(Object.keys(s)),c=new Set([...a].filter((l)=>{let p=i.shape[l]._zod;if(t.io==="input")return p.optin===void 0;else return p.optout===void 0}));if(c.size>0)o.required=Array.from(c);if(i.catchall?._zod.def.type==="never")o.additionalProperties=!1;else if(!i.catchall){if(t.io==="output")o.additionalProperties=!1}else if(i.catchall)o.additionalProperties=_e(i.catchall,t,{...n,path:[...n.path,"additionalProperties"]})},_c=(e,t,r,n)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((a,c)=>_e(a,t,{...n,path:[...n.path,i?"oneOf":"anyOf",c]}));if(i)r.oneOf=s;else r.anyOf=s},wc=(e,t,r,n)=>{let o=e._zod.def,i=_e(o.left,t,{...n,path:[...n.path,"allOf",0]}),s=_e(o.right,t,{...n,path:[...n.path,"allOf",1]}),a=(l)=>("allOf"in l)&&Object.keys(l).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];r.allOf=c};var xc=(e,t,r,n)=>{let o=r,i=e._zod.def;o.type="object";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let p=_e(i.valueType,t,{...n,path:[...n.path,"patternProperties","*"]});o.patternProperties={};for(let u of c)o.patternProperties[u.source]=p}else{if(t.target==="draft-07"||t.target==="draft-2020-12")o.propertyNames=_e(i.keyType,t,{...n,path:[...n.path,"propertyNames"]});o.additionalProperties=_e(i.valueType,t,{...n,path:[...n.path,"additionalProperties"]})}let l=s._zod.values;if(l){let p=[...l].filter((u)=>typeof u==="string"||typeof u==="number");if(p.length>0)o.required=p}},kc=(e,t,r,n)=>{let o=e._zod.def,i=_e(o.innerType,t,n),s=t.seen.get(e);if(t.target==="openapi-3.0")s.ref=o.innerType,r.nullable=!0;else r.anyOf=[i,{type:"null"}]},zc=(e,t,r,n)=>{let o=e._zod.def;_e(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType},Ic=(e,t,r,n)=>{let o=e._zod.def;_e(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.default=JSON.parse(JSON.stringify(o.defaultValue))},Sc=(e,t,r,n)=>{let o=e._zod.def;_e(o.innerType,t,n);let i=t.seen.get(e);if(i.ref=o.innerType,t.io==="input")r._prefault=JSON.parse(JSON.stringify(o.defaultValue))},Pc=(e,t,r,n)=>{let o=e._zod.def;_e(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}r.default=s},Ec=(e,t,r,n)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;_e(s,t,n);let a=t.seen.get(e);a.ref=s},$c=(e,t,r,n)=>{let o=e._zod.def;_e(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType,r.readOnly=!0};var Ln=(e,t,r,n)=>{let o=e._zod.def;_e(o.innerType,t,n);let i=t.seen.get(e);i.ref=o.innerType};var gr={};zp(gr,{ZodISODate:()=>Rc,ZodISODateTime:()=>Tc,ZodISODuration:()=>Oc,ZodISOTime:()=>Cc,date:()=>Mn,datetime:()=>Un,duration:()=>Vn,time:()=>qn});var Tc=Z("ZodISODateTime",(e,t)=>{qs.init(e,t),pe.init(e,t)});function Un(e){return Ka(Tc,e)}var Rc=Z("ZodISODate",(e,t)=>{Vs.init(e,t),pe.init(e,t)});function Mn(e){return Ya(Rc,e)}var Cc=Z("ZodISOTime",(e,t)=>{Ws.init(e,t),pe.init(e,t)});function qn(e){return Xa(Cc,e)}var Oc=Z("ZodISODuration",(e,t)=>{Hs.init(e,t),pe.init(e,t)});function Vn(e){return Qa(Oc,e)}var eh=(e,t)=>{or.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:(r)=>Si(e,r)},flatten:{value:(r)=>Ii(e,r)},addIssue:{value:(r)=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Ct,2)}},addIssues:{value:(r)=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Ct,2)}},isEmpty:{get(){return e.issues.length===0}}})};var Re=Z("ZodError",eh,{Parent:Error});var Ac=ir(Re),Zc=sr(Re),Nc=Ot(Re),Dc=At(Re),Fc=$i(Re),Bc=Ti(Re),jc=Ri(Re),Lc=Ci(Re),Uc=Oi(Re),Mc=Ai(Re),qc=Zi(Re),Vc=Ni(Re);var Wc=new WeakMap;function jt(e,t,r){let n=Object.getPrototypeOf(e),o=Wc.get(n);if(!o)o=new Set,Wc.set(n,o);if(o.has(t))return;o.add(t);for(let i in r){let s=r[i];Object.defineProperty(n,i,{configurable:!0,enumerable:!1,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:a})}})}}var ge=Z("ZodType",(e,t)=>(fe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Ft(e,"input"),output:Ft(e,"output")}}),e.toJSONSchema=cc(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,n)=>Ac(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Nc(e,r,n),e.parseAsync=async(r,n)=>Zc(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Dc(e,r,n),e.spa=e.safeParseAsync,e.encode=(r,n)=>Fc(e,r,n),e.decode=(r,n)=>Bc(e,r,n),e.encodeAsync=async(r,n)=>jc(e,r,n),e.decodeAsync=async(r,n)=>Lc(e,r,n),e.safeEncode=(r,n)=>Uc(e,r,n),e.safeDecode=(r,n)=>Mc(e,r,n),e.safeEncodeAsync=async(r,n)=>qc(e,r,n),e.safeDecodeAsync=async(r,n)=>Vc(e,r,n),jt(e,"ZodType",{check(...r){let n=this.def;return this.clone(Qe(n,{checks:[...n.checks??[],...r.map((o)=>typeof o==="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,n){return Le(this,r,n)},brand(){return this},register(r,n){return r.add(this,n),this},refine(r,n){return this.check(Hh(r,n))},superRefine(r,n){return this.check(Jh(r,n))},overwrite(r){return this.check(rt(r))},optional(){return Kc(this)},exactOptional(){return Ah(this)},nullable(){return Yc(this)},nullish(){return Kc(Yc(this))},nonoptional(r){return jh(this,r)},array(){return xe(this)},or(r){return Jn([this,r])},and(r){return $h(this,r)},transform(r){return Xc(this,Ch(r))},default(r){return Dh(this,r)},prefault(r){return Bh(this,r)},catch(r){return Uh(this,r)},pipe(r){return Xc(this,r)},readonly(){return Vh(this)},describe(r){let n=this.clone();return ft.add(n,{description:r}),n},meta(...r){if(r.length===0)return ft.get(this);let n=this.clone();return ft.add(n,r[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return ft.get(e)?.description},configurable:!0}),e)),Qc=Z("_ZodString",(e,t)=>{lr.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,i)=>uc(e,n,o,i);let r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,jt(e,"_ZodString",{regex(...n){return this.check(Pn(...n))},includes(...n){return this.check(Tn(...n))},startsWith(...n){return this.check(Rn(...n))},endsWith(...n){return this.check(Cn(...n))},min(...n){return this.check(vt(...n))},max(...n){return this.check(hr(...n))},length(...n){return this.check(mr(...n))},nonempty(...n){return this.check(vt(1,...n))},lowercase(n){return this.check(En(n))},uppercase(n){return this.check($n(n))},trim(){return this.check(An())},normalize(...n){return this.check(On(...n))},toLowerCase(){return this.check(Zn())},toUpperCase(){return this.check(Nn())},slugify(){return this.check(Dn())}})}),rh=Z("ZodString",(e,t)=>{lr.init(e,t),Qc.init(e,t),e.email=(r)=>e.check($a(nh,r)),e.url=(r)=>e.check(Aa(oh,r)),e.jwt=(r)=>e.check(Ga(vh,r)),e.emoji=(r)=>e.check(Za(ih,r)),e.guid=(r)=>e.check(Sn(Hc,r)),e.uuid=(r)=>e.check(Ta(yr,r)),e.uuidv4=(r)=>e.check(Ra(yr,r)),e.uuidv6=(r)=>e.check(Ca(yr,r)),e.uuidv7=(r)=>e.check(Oa(yr,r)),e.nanoid=(r)=>e.check(Na(sh,r)),e.guid=(r)=>e.check(Sn(Hc,r)),e.cuid=(r)=>e.check(Da(ah,r)),e.cuid2=(r)=>e.check(Fa(ch,r)),e.ulid=(r)=>e.check(Ba(uh,r)),e.base64=(r)=>e.check(Wa(gh,r)),e.base64url=(r)=>e.check(Ha(yh,r)),e.xid=(r)=>e.check(ja(lh,r)),e.ksuid=(r)=>e.check(La(dh,r)),e.ipv4=(r)=>e.check(Ua(fh,r)),e.ipv6=(r)=>e.check(Ma(ph,r)),e.cidrv4=(r)=>e.check(qa(hh,r)),e.cidrv6=(r)=>e.check(Va(mh,r)),e.e164=(r)=>e.check(Ja(bh,r)),e.datetime=(r)=>e.check(Un(r)),e.date=(r)=>e.check(Mn(r)),e.time=(r)=>e.check(qn(r)),e.duration=(r)=>e.check(Vn(r))});function Y(e){return Ea(rh,e)}var pe=Z("ZodStringFormat",(e,t)=>{de.init(e,t),Qc.init(e,t)}),nh=Z("ZodEmail",(e,t)=>{Zs.init(e,t),pe.init(e,t)});var Hc=Z("ZodGUID",(e,t)=>{Os.init(e,t),pe.init(e,t)});var yr=Z("ZodUUID",(e,t)=>{As.init(e,t),pe.init(e,t)});var oh=Z("ZodURL",(e,t)=>{Ns.init(e,t),pe.init(e,t)});var ih=Z("ZodEmoji",(e,t)=>{Ds.init(e,t),pe.init(e,t)});var sh=Z("ZodNanoID",(e,t)=>{Fs.init(e,t),pe.init(e,t)});var ah=Z("ZodCUID",(e,t)=>{Bs.init(e,t),pe.init(e,t)});var ch=Z("ZodCUID2",(e,t)=>{js.init(e,t),pe.init(e,t)});var uh=Z("ZodULID",(e,t)=>{Ls.init(e,t),pe.init(e,t)});var lh=Z("ZodXID",(e,t)=>{Us.init(e,t),pe.init(e,t)});var dh=Z("ZodKSUID",(e,t)=>{Ms.init(e,t),pe.init(e,t)});var fh=Z("ZodIPv4",(e,t)=>{Js.init(e,t),pe.init(e,t)});var ph=Z("ZodIPv6",(e,t)=>{Gs.init(e,t),pe.init(e,t)});var hh=Z("ZodCIDRv4",(e,t)=>{Ks.init(e,t),pe.init(e,t)});var mh=Z("ZodCIDRv6",(e,t)=>{Ys.init(e,t),pe.init(e,t)});var gh=Z("ZodBase64",(e,t)=>{Qs.init(e,t),pe.init(e,t)});var yh=Z("ZodBase64URL",(e,t)=>{ea.init(e,t),pe.init(e,t)});var bh=Z("ZodE164",(e,t)=>{ta.init(e,t),pe.init(e,t)});var vh=Z("ZodJWT",(e,t)=>{ra.init(e,t),pe.init(e,t)});var eu=Z("ZodNumber",(e,t)=>{kn.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,i)=>lc(e,n,o,i),jt(e,"ZodNumber",{gt(n,o){return this.check(fr(n,o))},gte(n,o){return this.check(Dt(n,o))},min(n,o){return this.check(Dt(n,o))},lt(n,o){return this.check(dr(n,o))},lte(n,o){return this.check(Nt(n,o))},max(n,o){return this.check(Nt(n,o))},int(n){return this.check(Jc(n))},safe(n){return this.check(Jc(n))},positive(n){return this.check(fr(0,n))},nonnegative(n){return this.check(Dt(0,n))},negative(n){return this.check(dr(0,n))},nonpositive(n){return this.check(Nt(0,n))},multipleOf(n,o){return this.check(pr(n,o))},step(n,o){return this.check(pr(n,o))},finite(){return this}});let r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??0.5),e.isFinite=!0,e.format=r.format??null});function re(e){return ec(eu,e)}var _h=Z("ZodNumberFormat",(e,t)=>{na.init(e,t),eu.init(e,t)});function Jc(e){return tc(_h,e)}var wh=Z("ZodBoolean",(e,t)=>{oa.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>dc(e,r,n,o)});function pt(e){return rc(wh,e)}var xh=Z("ZodUnknown",(e,t)=>{ia.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>pc(e,r,n,o)});function Wn(){return nc(xh)}var kh=Z("ZodNever",(e,t)=>{sa.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>fc(e,r,n,o)});function zh(e){return oc(kh,e)}var Ih=Z("ZodArray",(e,t)=>{aa.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>bc(e,r,n,o),e.element=t.element,jt(e,"ZodArray",{min(r,n){return this.check(vt(r,n))},nonempty(r){return this.check(vt(1,r))},max(r,n){return this.check(hr(r,n))},length(r,n){return this.check(mr(r,n))},unwrap(){return this.element}})});function xe(e,t){return ic(Ih,e,t)}var Sh=Z("ZodObject",(e,t)=>{la.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>vc(e,r,n,o),ue(e,"shape",()=>t.shape),jt(e,"ZodObject",{keyof(){return Ue(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:Wn()})},loose(){return this.clone({...this._zod.def,catchall:Wn()})},strict(){return this.clone({...this._zod.def,catchall:zh()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Cp(this,r)},safeExtend(r){return Op(this,r)},merge(r){return Ap(this,r)},pick(r){return Tp(this,r)},omit(r){return Rp(this,r)},partial(...r){return Zp(tu,this,r[0])},required(...r){return Np(ru,this,r[0])}})});function se(e,t){let r={type:"object",shape:e??{},...X(t)};return new Sh(r)}var Ph=Z("ZodUnion",(e,t)=>{da.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>_c(e,r,n,o),e.options=t.options});function Jn(e,t){return new Ph({type:"union",options:e,...X(t)})}var Eh=Z("ZodIntersection",(e,t)=>{fa.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>wc(e,r,n,o)});function $h(e,t){return new Eh({type:"intersection",left:e,right:t})}var Gc=Z("ZodRecord",(e,t)=>{pa.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>xc(e,r,n,o),e.keyType=t.keyType,e.valueType=t.valueType});function Gn(e,t,r){if(!t||!t._zod)return new Gc({type:"record",keyType:Y(),valueType:e,...X(t)});return new Gc({type:"record",keyType:e,valueType:t,...X(r)})}var Hn=Z("ZodEnum",(e,t)=>{ha.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(n,o,i)=>hc(e,n,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let r=new Set(Object.keys(t.entries));e.extract=(n,o)=>{let i={};for(let s of n)if(r.has(s))i[s]=t.entries[s];else throw Error(`Key ${s} not found in enum`);return new Hn({...t,checks:[],...X(o),entries:i})},e.exclude=(n,o)=>{let i={...t.entries};for(let s of n)if(r.has(s))delete i[s];else throw Error(`Key ${s} not found in enum`);return new Hn({...t,checks:[],...X(o),entries:i})}});function Ue(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map((n)=>[n,n])):e;return new Hn({type:"enum",entries:r,...X(t)})}var Th=Z("ZodLiteral",(e,t)=>{ma.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>mc(e,r,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function br(e,t){return new Th({type:"literal",values:Array.isArray(e)?e:[e],...X(t)})}var Rh=Z("ZodTransform",(e,t)=>{ga.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>yc(e,r,n,o),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Tt(e.constructor.name);r.addIssue=(i)=>{if(typeof i==="string")r.issues.push(dt(i,r.value,t));else{let s=i;if(s.fatal)s.continue=!1;s.code??(s.code="custom"),s.input??(s.input=r.value),s.inst??(s.inst=e),r.issues.push(dt(s))}};let o=t.transform(r.value,r);if(o instanceof Promise)return o.then((i)=>(r.value=i,r.fallback=!0,r));return r.value=o,r.fallback=!0,r}});function Ch(e){return new Rh({type:"transform",transform:e})}var tu=Z("ZodOptional",(e,t)=>{zn.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ln(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Kc(e){return new tu({type:"optional",innerType:e})}var Oh=Z("ZodExactOptional",(e,t)=>{ya.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ln(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Ah(e){return new Oh({type:"optional",innerType:e})}var Zh=Z("ZodNullable",(e,t)=>{ba.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>kc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Yc(e){return new Zh({type:"nullable",innerType:e})}var Nh=Z("ZodDefault",(e,t)=>{va.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ic(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Dh(e,t){return new Nh({type:"default",innerType:e,get defaultValue(){return typeof t==="function"?t():pn(t)}})}var Fh=Z("ZodPrefault",(e,t)=>{_a.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Sc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Bh(e,t){return new Fh({type:"prefault",innerType:e,get defaultValue(){return typeof t==="function"?t():pn(t)}})}var ru=Z("ZodNonOptional",(e,t)=>{wa.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>zc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function jh(e,t){return new ru({type:"nonoptional",innerType:e,...X(t)})}var Lh=Z("ZodCatch",(e,t)=>{xa.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Pc(e,r,n,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Uh(e,t){return new Lh({type:"catch",innerType:e,catchValue:typeof t==="function"?t:()=>t})}var Mh=Z("ZodPipe",(e,t)=>{ka.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>Ec(e,r,n,o),e.in=t.in,e.out=t.out});function Xc(e,t){return new Mh({type:"pipe",in:e,out:t})}var qh=Z("ZodReadonly",(e,t)=>{za.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>$c(e,r,n,o),e.unwrap=()=>e._zod.def.innerType});function Vh(e){return new qh({type:"readonly",innerType:e})}var Wh=Z("ZodCustom",(e,t)=>{Ia.init(e,t),ge.init(e,t),e._zod.processJSONSchema=(r,n,o)=>gc(e,r,n,o)});function Hh(e,t={}){return sc(Wh,e,t)}function Jh(e,t){return ac(e,t)}Te(In());class Ce extends Error{field;regex;constructor(e,t,r){super(r);this.field=e,this.regex=t}}class _t extends Error{hash;constructor(e){super(`'${e}' not found in the root hash`);this.hash=e}}class Kn extends Map{#t;#e=0;constructor(e,t=[]){super();this.#t=e;for(let[r,n]of t)this.set(r,n)}get(e){let t=super.get(e);if(t!==void 0)super.delete(e),super.set(e,t);return t}set(e,t){let r=super.get(e);if(r===void 0)this.#e+=e.length;else if(r!==null)this.#e-=r.byteLength;if(t!==null)this.#e+=t.byteLength;super.delete(e);let n;while(this.#e>this.#t&&(n=this.entries().next().value)){let[o,i]=n;if(super.delete(o),this.#e-=o.length,i!==null)this.#e-=i.byteLength}return super.set(e,t),this}delete(e){let t=super.get(e);if(t===void 0)return!1;if(super.delete(e),t!==null)this.#e-=t.byteLength;return this.#e-=e.length,!0}clear(){super.clear(),this.#e=0}}var dz=Xe(Fd(),1),fz=Xe(Vd(),1),pz=Xe(yf(),1),hz=Xe(xf(),1),mz=Xe(Cf(),1),gz=Xe(Af(),1),ep=Xe(Nf(),1);var qr=br([0,1,2,3,4,5,6,7,8,12,13,14,15,16,17,18,21,23],{error:"unknown pen code"}),h_={0:"brush",12:"brush",1:"pencil",14:"pencil",2:"ballpoint",15:"ballpoint",3:"marker",16:"marker",4:"fineliner",17:"fineliner",5:"highlighter",18:"highlighter",6:"eraser",7:"mechanicalPencil",13:"mechanicalPencil",8:"eraseArea",21:"calligraphy",23:"shader"},Jt=br([0,1,2,3,4,5,6,7,8,9,10,11,12,13],{error:"unknown color code"}),m_={0:"black",1:"gray",2:"white",3:"yellow",4:"green",5:"pink",6:"blue",7:"red",8:"grayOverlap",9:"highlight",10:"green",11:"cyan",12:"magenta",13:"yellow"};var it=43,Vr="reMarkable .lines file, version=";function Df(e,t){let r=new DataView(e.buffer,e.byteOffset,e.byteLength),n=it,o=()=>{let c=r.getInt32(n,!0);return n+=4,c},i=()=>{let c=r.getFloat32(n,!0);return n+=4,c},s=o(),a=[];for(let c=0;c<s;c++){let l=o(),p=[];for(let u=0;u<l;u++){let m=qr.parse(o()),f=Jt.parse(o()),g=o(),y=i(),b=t===5?o():void 0,x=o(),I=Array(x);for(let P=0;P<x;P++)I[P]={x:i(),y:i(),speed:i(),direction:i(),width:i(),pressure:i()};let k={brushType:m,color:f,padding:g,brushBaseSize:y,points:I};if(b!==void 0)k.unknown=b;p.push(k)}a.push({lines:p})}return{version:t,layers:a}}function Ff(e){let{version:t}=e;if(t!==3&&t!==5)throw Error(`rendering version ${t} .lines files is not supported (only 3 and 5)`);let r=t===5?24:20,n=it+4;for(let p of e.layers){n+=4;for(let u of p.lines)n+=r+u.points.length*24}let o=new Uint8Array(n),i=new DataView(o.buffer),s=`${Vr}${t}`.padEnd(it," ");for(let p=0;p<it;p++)o[p]=s.charCodeAt(p);let a=it,c=(p)=>{i.setInt32(a,p,!0),a+=4},l=(p)=>{i.setFloat32(a,p,!0),a+=4};c(e.layers.length);for(let p of e.layers){c(p.lines.length);for(let u of p.lines){if(c(u.brushType),c(u.color),c(u.padding??0),l(u.brushBaseSize),t===5)c(u.unknown??0);c(u.points.length);for(let m of u.points)l(m.x),l(m.y),l(m.speed),l(m.direction),l(m.width),l(m.pressure)}}return o}var Bf={authorId:0,counter:1},Lf={authorId:0,counter:0};function Pe(e){return`${e.authorId}:${e.counter}`}var ti=43,Uf="reMarkable .lines file, version=6",Hr=1,qe=4,Mf=8,st=12,Jr=15;class qf{#t;#e;#r;#n=[];constructor(e,t){this.#t=new DataView(e.buffer,e.byteOffset,e.byteLength),this.#e=t,this.#r=e.byteLength}get offset(){return this.#e}get atFileEnd(){return this.#e>=this.#r}#s(){return this.#n.length>0?this.#n[this.#n.length-1]:this.#r}bytesRemaining(){return this.#s()-this.#e}u8(){let e=this.#t.getUint8(this.#e);return this.#e+=1,e}u16(){let e=this.#t.getUint16(this.#e,!0);return this.#e+=2,e}u32(){let e=this.#t.getUint32(this.#e,!0);return this.#e+=4,e}f32(){let e=this.#t.getFloat32(this.#e,!0);return this.#e+=4,e}f64(){let e=this.#t.getFloat64(this.#e,!0);return this.#e+=8,e}varuint(){let e=0,t=0,r;do r=this.u8(),e+=(r&127)*2**t,t+=7;while(r&128);return e}crdtId(){return{authorId:this.u8(),counter:this.varuint()}}bytes(e){let t=this.#t.byteOffset+this.#e,r=new Uint8Array(this.#t.buffer,t,e);return this.#e+=e,r.slice()}peekTag(){if(this.#e>=this.#s())return;let e=this.#e,t=this.varuint();return this.#e=e,[Math.floor(t/16),t%16]}hasTag(e,t){let r=this.peekTag();return r!==void 0&&r[0]===e&&r[1]===t}#o(e,t){let r=this.varuint();if(Math.floor(r/16)!==e||r%16!==t)throw Error(`unexpected v6 tag ${r} (wanted ${e}/${t})`)}readInt(e){return this.#o(e,qe),this.u32()}readFloat(e){return this.#o(e,qe),this.f32()}readDouble(e){return this.#o(e,Mf),this.f64()}readId(e){return this.#o(e,Jr),this.crdtId()}readBool(e){return this.#o(e,Hr),this.u8()!==0}readByte(e){return this.#o(e,Hr),this.u8()}subblock(e,t){this.#o(e,st);let r=this.u32(),n=this.#e+r;this.#n.push(n);try{let o=t();if(this.#e!==n)throw Error(`subblock ${e} left ${n-this.#e} bytes unread`);return o}finally{this.#n.pop(),this.#e=n}}seek(e){this.#e=e}bounded(e,t){this.#n.push(e);try{let r=t();if(this.#e>e)throw Error("block body overran its declared length");return[r,this.bytes(e-this.#e)]}finally{this.#n.pop(),this.#e=e}}readLww(e,t){return this.subblock(e,()=>{let r=this.readId(1),n=t();return{timestamp:r,value:n}})}readString(e){return this.subblock(e,()=>{let t=this.varuint();return this.u8(),new TextDecoder().decode(this.bytes(t))})}readStringWithFormat(e){return this.subblock(e,()=>{let t=this.varuint();this.u8();let r=new TextDecoder().decode(this.bytes(t));if(this.hasTag(2,qe))return this.readInt(2);else return r})}}class Vf{#t=new Uint8Array(4096);#e=new DataView(this.#t.buffer);#r=0;#n(e){if(this.#r+e<=this.#t.length)return;let t=this.#t.length;while(t<this.#r+e)t*=2;let r=new Uint8Array(t);r.set(this.#t),this.#t=r,this.#e=new DataView(r.buffer)}get length(){return this.#r}u8(e){this.#n(1),this.#e.setUint8(this.#r,e),this.#r+=1}u16(e){this.#n(2),this.#e.setUint16(this.#r,e,!0),this.#r+=2}u32(e){this.#n(4),this.#e.setUint32(this.#r,e,!0),this.#r+=4}f32(e){this.#n(4),this.#e.setFloat32(this.#r,e,!0),this.#r+=4}f64(e){this.#n(8),this.#e.setFloat64(this.#r,e,!0),this.#r+=8}varuint(e){let t=e;do{let r=t%128;if(t=Math.floor(t/128),t>0)r|=128;this.u8(r)}while(t>0)}crdtId(e){this.u8(e.authorId),this.varuint(e.counter)}bytes(e){this.#n(e.length),this.#t.set(e,this.#r),this.#r+=e.length}patchU32(e,t){this.#e.setUint32(e,t,!0)}finish(){return this.#t.slice(0,this.#r)}tag(e,t){this.varuint(e*16+t)}writeInt(e,t){this.tag(e,qe),this.u32(t)}writeFloat(e,t){this.tag(e,qe),this.f32(t)}writeDouble(e,t){this.tag(e,Mf),this.f64(t)}writeId(e,t){this.tag(e,Jr),this.crdtId(t)}writeBool(e,t){this.tag(e,Hr),this.u8(t?1:0)}writeByte(e,t){this.tag(e,Hr),this.u8(t)}subblock(e,t){this.tag(e,st);let r=this.length;this.u32(0),t(),this.patchU32(r,this.length-r-4)}writeLww(e,t,r){this.subblock(e,()=>{this.writeId(1,t.timestamp),r(t.value)})}writeString(e,t){this.subblock(e,()=>{let r=new TextEncoder().encode(t);this.varuint(r.length),this.u8(1),this.bytes(r)})}}function Gt(e,t){let r=e.readId(1),n=e.readId(2),o=e.readId(3),i=e.readId(4),s=e.readInt(5),a;if(e.hasTag(6,st))a=e.subblock(6,()=>{let c=e.u8();return t(c)});return{parentId:r,item:{itemId:n,leftId:o,rightId:i,deletedLength:s,value:a}}}function g_(e,t){let r=qr.parse(e.readInt(1)),n=Jt.parse(e.readInt(2)),o=e.readDouble(3),i=e.readFloat(4),s=e.subblock(5,()=>{let c=t===1?24:14,l=e.bytesRemaining(),p=Math.floor(l/c),u=Array(p);for(let m=0;m<p;m++){let f=e.f32(),g=e.f32();if(t===1)u[m]={x:f,y:g,speed:e.f32()*4,direction:e.f32()*255/(2*Math.PI),width:e.f32()*4,pressure:e.f32()*255};else{let y=e.u16(),b=e.u16(),x=e.u8(),I=e.u8();u[m]={x:f,y:g,speed:y,width:b,direction:x,pressure:I}}}return u}),a={tool:r,color:n,thicknessScale:o,startingLength:i,points:s};if(e.hasTag(6,Jr))a.timestampId=e.readId(6);if(e.hasTag(7,Jr))a.moveId=e.readId(7);if(e.hasTag(8,qe))a.colorRgba=e.readInt(8);return a}function y_(e){let t=e.hasTag(2,qe)?e.readInt(2):void 0,r=e.hasTag(3,qe)?e.readInt(3):void 0,n=Jt.parse(e.readInt(4)),o=e.readString(5),i=e.subblock(6,()=>{let a=e.varuint(),c=Array(a);for(let l=0;l<a;l++)c[l]={x:e.f64(),y:e.f64(),w:e.f64(),h:e.f64()};return c}),s={length:r??o.length,color:n,text:o,rectangles:i};if(t!==void 0)s.start=t;if(e.hasTag(10,qe))s.colorRgba=e.readInt(10);return s}function b_(e){let t=[],r=new Map;e.subblock(2,()=>{e.subblock(1,()=>{e.subblock(1,()=>{let s=e.varuint();for(let a=0;a<s;a++)t.push(e.subblock(0,()=>{let c=e.readId(2),l=e.readId(3),p=e.readId(4),u=e.readInt(5),m=e.hasTag(6,st)?e.readStringWithFormat(6):"";return{itemId:c,leftId:l,rightId:p,deletedLength:u,value:m}}))})}),e.subblock(2,()=>{e.subblock(1,()=>{let s=e.varuint();for(let a=0;a<s;a++){let c=e.crdtId(),l=e.readId(1),p=e.subblock(2,()=>(e.u8(),e.u8()));r.set(Pe(c),{timestamp:l,value:p})}})})});let[n,o]=e.subblock(3,()=>[e.f64(),e.f64()]),i=e.readFloat(4);return{items:t,styles:r,posX:n,posY:o,width:i}}function v_(e,t,r){switch(t){case 0:return{type:"migrationInfo",migrationId:e.readId(1),isDevice:e.readBool(2)};case 1:return{type:"sceneTree",treeId:e.readId(1),nodeId:e.readId(2),isUpdate:e.readBool(3),parentId:e.subblock(4,()=>e.readId(1))};case 2:{let n=e.readId(1),o=e.readLww(2,()=>e.readString(2)),i=e.readLww(3,()=>e.readBool(2)),s={type:"treeNode",nodeId:n,label:o,visible:i};if(e.bytesRemaining()>0&&e.hasTag(7,st))s.anchor={id:e.readLww(7,()=>e.readId(2)),type:e.readLww(8,()=>e.readByte(2)),threshold:e.readLww(9,()=>e.readFloat(2)),originX:e.readLww(10,()=>e.readFloat(2))};return s}case 3:return{type:"sceneGlyphItem",...Gt(e,(n)=>n===1?y_(e):void 0)};case 4:return{type:"sceneGroupItem",...Gt(e,(n)=>n===2?e.readId(2):void 0)};case 5:return{type:"sceneLineItem",...Gt(e,(n)=>n===3?g_(e,r):void 0)};case 6:return{type:"sceneTextItem",...Gt(e,()=>{return})};case 7:return{type:"rootText",blockId:e.readId(1),text:b_(e)};case 8:return{type:"sceneTombstone",...Gt(e,()=>{return})};case 9:{let n=new Map,o=e.varuint();for(let i=0;i<o;i++)e.subblock(0,()=>{let s=e.varuint(),a=e.bytes(s),c=e.u16();n.set(c,w_(a))});return{type:"authorIds",authors:n}}case 10:{let n={type:"pageInfo",loadsCount:e.readInt(1),mergesCount:e.readInt(2),textCharsCount:e.readInt(3),textLinesCount:e.readInt(4)};if(e.hasTag(5,qe))n.typeFolioUseCount=e.readInt(5);return n}case 13:{let n={type:"sceneInfo",currentLayer:e.readLww(1,()=>e.readId(2))};if(e.hasTag(2,st))n.backgroundVisible=e.readLww(2,()=>e.readBool(2));if(e.hasTag(3,st))n.rootDocumentVisible=e.readLww(3,()=>e.readBool(2));if(e.hasTag(5,st))n.paperSize=e.subblock(5,()=>[e.u32(),e.u32()]);return n}default:throw Error(`unknown v6 block type 0x${t.toString(16)}`)}}var __=[3,2,1,0,5,4,7,6,8,9,10,11,12,13,14,15];function Wf(e){let t=new Uint8Array(16);for(let r=0;r<16;r++)t[r]=e[__[r]]??0;return t}function w_(e){let t=Wf(e).toHex();return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}function x_(e){let t=new TextDecoder().decode(e.subarray(0,ti));if(!t.startsWith(Uf))throw Error(`not a version 6 .lines file: ${JSON.stringify(t)}`);let r=new qf(e,ti),n=[];while(!r.atFileEnd){if(r.bytesRemaining()<8)break;let o=r.u32(),i=r.u8(),s=r.u8(),a=r.u8(),c=r.u8(),l=r.offset;if(o>r.bytesRemaining()){n.push({type:"unknown",blockType:c,data:r.bytes(r.bytesRemaining()),declaredLength:o,reserved:i,minVersion:s,currentVersion:a,extraData:new Uint8Array});break}let p=l+o,u;try{let[m,f]=r.bounded(p,()=>v_(r,c,a));u={...m,reserved:i,minVersion:s,currentVersion:a,extraData:f}}catch{r.seek(l),u={type:"unknown",blockType:c,data:r.bytes(o),reserved:i,minVersion:s,currentVersion:a,extraData:new Uint8Array}}r.seek(p),n.push(u)}return n}function k_(e,t){let[r,n]=e,[o,i]=t;return r-o||n-i}function jf(e){if(e.length<=1)return[...e];let t="\x00start",r="\x00end",n=new Set(e.map((f)=>Pe(f.itemId))),o=new Map([[t,[]],[r,[]]]),i=new Map([[t,0],[r,0]]);for(let f of e)o.set(Pe(f.itemId),[]),i.set(Pe(f.itemId),0);let s=(f,g)=>{let y=Pe(f);return y===Pe(Lf)||!n.has(y)?g:y},a=(f,g)=>{o.get(f).push(g),i.set(g,(i.get(g)??0)+1)};for(let f of e)a(s(f.leftId,t),Pe(f.itemId)),a(Pe(f.itemId),s(f.rightId,r));let c=new Map(e.map((f)=>[Pe(f.itemId),f])),l=(f)=>{if(f===t)return[-1/0,-1/0];if(f===r)return[1/0,1/0];let g=c.get(f);return[-g.itemId.authorId,g.itemId.counter]},p=new Set;for(let[f,g]of i)if(g===0)p.add(f);let u=[],m=new Set;while(p.size>0){let f;for(let y of p)if(f===void 0||k_(l(y),l(f))<0)f=y;p.delete(f),m.add(f);let g=c.get(f);if(g)u.push(g);for(let y of o.get(f)??[])if(i.set(y,i.get(y)-1),i.get(y)===0)p.add(y)}if(u.length<e.length){for(let f of e)if(!m.has(Pe(f.itemId)))u.push(f)}return u}class Hf{version=6;blocks;authors;paperSize;#t=new Map;#e;constructor(e){this.blocks=e,this.authors=new Map;let t=(r)=>{let n=this.#t.get(Pe(r));if(n===void 0)n={id:r,parentId:Lf,children:[]},this.#t.set(Pe(r),n);return n};t(Bf);for(let r of e)if(r.type==="sceneTree")t(r.treeId).parentId=r.parentId;else if(r.type==="treeNode"){let n=t(r.nodeId);n.label=r.label.value,n.visible=r.visible.value}else if(r.type==="sceneGroupItem"&&r.item.value)t(r.parentId).children.push({...r.item,value:{kind:"group",id:r.item.value}});else if(r.type==="sceneLineItem"&&r.item.value)t(r.parentId).children.push({...r.item,value:{kind:"line",line:r.item.value}});else if(r.type==="sceneGlyphItem"&&r.item.value)t(r.parentId).children.push({...r.item,value:{kind:"glyph",glyph:r.item.value}});else if(r.type==="rootText")this.#e=r.text;else if(r.type==="authorIds")for(let[n,o]of r.authors)this.authors.set(n,o);else if(r.type==="sceneInfo"&&r.paperSize)this.paperSize=r.paperSize}#r(e){let t=[];for(let n of jf(e.children))if(n.value.kind==="group"){let o=this.#t.get(Pe(n.value.id));if(o)t.push({kind:"layer",layer:this.#r(o)})}else if(n.value.kind==="line")t.push({kind:"line",line:n.value.line});else t.push({kind:"glyph",glyph:n.value.glyph});let r={id:e.id,items:t};if(e.label!==void 0)r.label=e.label;if(e.visible!==void 0)r.visible=e.visible;return r}layers(){let e=this.#t.get(Pe(Bf));if(e===void 0)return[];let t=[];for(let r of jf(e.children))if(r.value.kind==="group"){let n=this.#t.get(Pe(r.value.id));if(n)t.push(this.#r(n))}return t}strokes(){let e=[],t=(r)=>{for(let n of r.items)if(n.kind==="line")e.push(n.line);else if(n.kind==="layer")t(n.layer)};for(let r of this.layers())t(r);return e}text(){return this.#e}}function Wr(e,t,r,n,o){e.writeId(1,t),e.writeId(2,r.itemId),e.writeId(3,r.leftId),e.writeId(4,r.rightId),e.writeInt(5,r.deletedLength);let{value:i}=r;if(i!==void 0)e.subblock(6,()=>{e.u8(n),o(i)})}function z_(e,t,r){if(e.writeInt(1,t.tool),e.writeInt(2,t.color),e.writeDouble(3,t.thicknessScale),e.writeFloat(4,t.startingLength),e.subblock(5,()=>{for(let n of t.points)if(e.f32(n.x),e.f32(n.y),r===1)e.f32(n.speed/4),e.f32(n.direction*2*Math.PI/255),e.f32(n.width/4),e.f32(n.pressure/255);else e.u16(n.speed),e.u16(n.width),e.u8(n.direction),e.u8(n.pressure)}),t.timestampId!==void 0)e.writeId(6,t.timestampId);if(t.moveId!==void 0)e.writeId(7,t.moveId);if(t.colorRgba!==void 0)e.writeInt(8,t.colorRgba)}function I_(e,t){if(t.start!==void 0)e.writeInt(2,t.start);if(e.writeInt(3,t.length),e.writeInt(4,t.color),e.writeString(5,t.text),e.subblock(6,()=>{e.varuint(t.rectangles.length);for(let r of t.rectangles)e.f64(r.x),e.f64(r.y),e.f64(r.w),e.f64(r.h)}),t.colorRgba!==void 0)e.writeInt(10,t.colorRgba)}function S_(e,t){e.subblock(2,()=>{e.subblock(1,()=>{e.subblock(1,()=>{e.varuint(t.items.length);for(let r of t.items)e.subblock(0,()=>{e.writeId(2,r.itemId),e.writeId(3,r.leftId),e.writeId(4,r.rightId),e.writeInt(5,r.deletedLength);let{value:n}=r;if(n!==""&&n!==void 0)e.subblock(6,()=>{if(typeof n==="number")e.varuint(0),e.u8(1),e.writeInt(2,n);else{let o=new TextEncoder().encode(n);e.varuint(o.length),e.u8(1),e.bytes(o)}})})})}),e.subblock(2,()=>{e.subblock(1,()=>{e.varuint(t.styles.size);for(let[r,n]of t.styles){let[o,i]=r.split(":");e.crdtId({authorId:Number(o),counter:Number(i)}),e.writeId(1,n.timestamp),e.subblock(2,()=>{e.u8(17),e.u8(n.value)})}})})}),e.subblock(3,()=>{e.f64(t.posX),e.f64(t.posY)}),e.writeFloat(4,t.width)}function P_(e){return Wf(Uint8Array.fromHex(e.replaceAll("-","")))}var E_={migrationInfo:0,sceneTree:1,treeNode:2,sceneGlyphItem:3,sceneGroupItem:4,sceneLineItem:5,sceneTextItem:6,rootText:7,sceneTombstone:8,authorIds:9,pageInfo:10,sceneInfo:13};function $_(e,t){switch(t.type){case"migrationInfo":e.writeId(1,t.migrationId),e.writeBool(2,t.isDevice);break;case"sceneTree":e.writeId(1,t.treeId),e.writeId(2,t.nodeId),e.writeBool(3,t.isUpdate),e.subblock(4,()=>e.writeId(1,t.parentId));break;case"treeNode":if(e.writeId(1,t.nodeId),e.writeLww(2,t.label,(r)=>e.writeString(2,r)),e.writeLww(3,t.visible,(r)=>e.writeBool(2,r)),t.anchor!==void 0){let{id:r,type:n,threshold:o,originX:i}=t.anchor;e.writeLww(7,r,(s)=>e.writeId(2,s)),e.writeLww(8,n,(s)=>e.writeByte(2,s)),e.writeLww(9,o,(s)=>e.writeFloat(2,s)),e.writeLww(10,i,(s)=>e.writeFloat(2,s))}break;case"sceneGlyphItem":Wr(e,t.parentId,t.item,1,(r)=>I_(e,r));break;case"sceneGroupItem":Wr(e,t.parentId,t.item,2,(r)=>e.writeId(2,r));break;case"sceneLineItem":Wr(e,t.parentId,t.item,3,(r)=>z_(e,r,t.currentVersion));break;case"sceneTextItem":case"sceneTombstone":Wr(e,t.parentId,t.item,0,()=>{return});break;case"rootText":e.writeId(1,t.blockId),S_(e,t.text);break;case"authorIds":e.varuint(t.authors.size);for(let[r,n]of t.authors)e.subblock(0,()=>{let o=P_(n);e.varuint(o.length),e.bytes(o),e.u16(r)});break;case"pageInfo":if(e.writeInt(1,t.loadsCount),e.writeInt(2,t.mergesCount),e.writeInt(3,t.textCharsCount),e.writeInt(4,t.textLinesCount),t.typeFolioUseCount!==void 0)e.writeInt(5,t.typeFolioUseCount);break;case"sceneInfo":if(e.writeLww(1,t.currentLayer,(r)=>e.writeId(2,r)),t.backgroundVisible!==void 0)e.writeLww(2,t.backgroundVisible,(r)=>e.writeBool(2,r));if(t.rootDocumentVisible!==void 0)e.writeLww(3,t.rootDocumentVisible,(r)=>e.writeBool(2,r));if(t.paperSize!==void 0)e.subblock(5,()=>{e.u32(t.paperSize[0]),e.u32(t.paperSize[1])});break;case"unknown":e.bytes(t.data);break}}function Jf(e){let t=new Vf,r=Uf.padEnd(ti," ");t.bytes(new TextEncoder().encode(r));for(let n of e.blocks){let o=t.length;t.u32(0),t.u8(n.reserved),t.u8(n.minVersion),t.u8(n.currentVersion),t.u8(n.type==="unknown"?n.blockType:E_[n.type]);let i=t.length;if($_(t,n),n.type!=="unknown")t.bytes(n.extraData);t.patchU32(o,n.type==="unknown"&&n.declaredLength!==void 0?n.declaredLength:t.length-i)}return t.finish()}function Gf(e){return new Hf(x_(e))}function Kf(e){let t=e.reduce((o,i)=>o+i.length,0),r=new Uint8Array(t),n=0;for(let o of e)r.set(o,n),n+=o.length;return r}var Gr=/^[0-9a-f]{64}$/,Kr=2,Yr="t",Xr="b";function T_(e){if(e.length<it)throw Error("data is too short to be a reMarkable .lines file");let t=new TextDecoder().decode(e.subarray(0,it));if(!t.startsWith(Vr))throw Error(`unrecognized .lines header: ${JSON.stringify(t)}`);let r=t.charAt(Vr.length);if(r==="6")return Gf(e);else if(r==="3"||r==="5")return Df(e,r==="3"?3:5);else throw Error(`unsupported .lines version '${r}'`)}function R_(e){return e.version===6?Jf(e):Ff(e)}var tp=se({name:Y(),timestamp:re()}).loose(),C_=se({name:Y(),pageId:Y(),timestamp:re()}).loose(),O_=se({authors:xe(Y()).optional(),title:Y().optional(),publicationDate:Y().optional(),publisher:Y().optional()}).loose(),A_=se({id:Y(),idx:se({timestamp:Y(),value:Y()}).loose(),template:se({timestamp:Y(),value:Y()}).loose().optional(),redir:se({timestamp:Y(),value:re().int()}).loose().optional(),scrollTime:se({timestamp:Y(),value:gr.datetime({offset:!0})}).loose().optional(),verticalScroll:se({timestamp:Y(),value:re()}).loose().optional(),deleted:se({timestamp:Y(),value:re().int()}).loose().optional(),modifed:Y().optional()}).loose(),Z_=se({lastOpened:se({timestamp:Y(),value:Y()}).loose(),original:se({timestamp:Y(),value:re().int()}).loose(),pages:xe(A_),uuids:xe(se({first:Y(),second:re().int().nonnegative()}).loose()).nullable()}).loose(),N_=se({tags:xe(tp).optional()}).strict(),D_=se({tags:xe(Y()).optional()}).strict(),F_={coverPageNumber:re().int(),documentMetadata:O_,extraMetadata:Gn(Y(),Y()),fileType:Ue(["epub","notebook","pdf"]),fontName:Y(),lineHeight:re().int(),orientation:Ue(["portrait","landscape"]),pageCount:re().int().nonnegative(),textAlignment:Ue(["","justify","left"]),textScale:re()},B_={cPages:Z_.optional(),customZoomCenterX:re().optional(),customZoomCenterY:re().optional(),customZoomOrientation:Ue(["portrait","landscape"]).optional(),customZoomPageHeight:re().optional(),customZoomPageWidth:re().optional(),customZoomScale:re().optional(),dummyDocument:pt().optional(),formatVersion:re().int().nonnegative().optional(),keyboardMetadata:se({count:re().int().nonnegative(),timestamp:re()}).loose().optional(),lastOpenedPage:re().int().optional(),margins:re().int().nonnegative().optional(),originalPageCount:re().int().optional(),pages:xe(Y()).nullable().optional(),pageTags:xe(C_).optional(),redirectionPageMap:xe(re().int()).optional(),sizeInBytes:Y().optional(),transform:se({m11:re().optional(),m12:re().optional(),m13:re().optional(),m21:re().optional(),m22:re().optional(),m23:re().optional(),m31:re().optional(),m32:re().optional(),m33:re().optional()}).loose().optional(),viewBackgroundFilter:Ue(["off","fullpage"]).optional(),zoomMode:Ue(["bestFit","customFit","fitToHeight","fitToWidth"]).optional()},rp=se({...F_,...B_}).loose(),j_=rp.extend({tags:xe(tp).optional()}).loose(),L_=rp.extend({tags:xe(Y()).optional()}).loose(),np=se({id:Y().optional(),name:Y(),author:Y(),iconData:Y(),categories:xe(Y()),labels:xe(Y()).optional(),orientation:Ue(["portrait","landscape"]),templateVersion:Y(),supportedScreens:xe(Ue(["rm2","rmPP"])).optional(),constants:xe(Gn(Y(),Jn([re(),Y()]))).optional(),items:xe(Wn()),formatVersion:re().int().nonnegative().optional()}).loose(),U_=Jn([N_,D_,np,j_,L_]),Yf=/\.highlights\/[^/]+\.json$/,M_=se({highlights:xe(xe(se({text:Y(),color:re().int(),start:re().int(),length:re().int(),rects:xe(se({x:re(),y:re(),width:re(),height:re()}).loose())}).loose()))}).loose(),Xf=/\/[^/]+-metadata\.json$/,q_=se({layers:xe(se({name:Y()}).loose())}).loose(),op=se({lastModified:Y().optional(),parent:Y(),pinned:pt(),type:Ue(["DocumentType","CollectionType","TemplateType"]),visibleName:Y(),lastOpened:Y().optional(),lastOpenedPage:re().int().optional(),createdTime:Y().optional(),deleted:pt().nullish(),metadatamodified:pt().nullish(),modified:pt().nullish(),synced:pt().nullish(),version:re().int().nonnegative().optional(),new:pt().optional(),source:Y().optional()}).loose();function ip(e){let t=JSON.parse(e);return op.parse(t)}var V_=se({hash:Y(),generation:re()}).loose(),W_=se({hash:Y(),generation:re(),schemaVersion:re().int().nonnegative()}).loose(),H_=se({docID:Y(),hash:Y()}).loose();async function ri(e){let t=await crypto.subtle.digest("SHA-256",e);return new Uint8Array(t).toHex()}function Qf(e){let[t,r,n,o,i]=e.split(":");if(t===void 0||r===void 0||n===void 0||o===void 0||i===void 0)throw Error(`line '${e}' was not formatted correctly`);else if(r==="80000000"||r==="0")return{hash:t,type:r==="0"?0:80000000,id:n,subfiles:parseInt(o,10),size:parseInt(i,10)};else throw Error(`line '${e}' was not formatted correctly`)}class ni{#t;#e;#r;#n;#s;#o;constructor(e,t,r,n,o,i){this.#t=e,this.#e=t,this.#s=r,this.#r=n,this.#n=o,this.#o=i}async getRootHash(){let t=await(await this.#t("GET",`${this.#r}/sync/v4/root`)).text(),r=JSON.parse(t),{hash:n,generation:o,schemaVersion:i}=W_.parse(r);if(i!==3&&i!==4)throw Error(`schema version ${i} not supported`);else if(!Number.isSafeInteger(o))throw Error(`generation ${o} was not a safe integer; please file a bug report`);else return[n,o,i]}async#u(e,t){if(!Gr.test(t))throw new Ce(t,Gr,"hash was not a valid hash");let n=await(await this.#t("GET",`${this.#r}/sync/v3/files/${t}`,{headers:{"rm-filename":e}})).arrayBuffer();return new Uint8Array(n)}async getHash({id:e,hash:t}){let r=this.#s.get(t);if(r!=null)return r.slice();else{let n=await this.#u(e,t);return this.#s.set(t,n.byteLength<=this.#o?n.slice():null),n}}async getText(e){return new TextDecoder().decode(await this.getHash(e))}async getEntries({id:e,hash:t}){let r=await this.getText({id:`${e}.docSchema`,hash:t}),[n,...o]=r.slice(0,-1).split(`
77
+ `);if(n==="3")return{entries:o.map(Qf)};else if(n==="4"){let[i,...s]=o;if(!i)throw Error("missing info line for schema version 4");let[a,c,l,p]=i.split(":");if(a!=="0"||c===void 0||l===void 0||p===void 0)throw Error(`schema 4 info line '${i}' was not formatted correctly`);let u=s.map(Qf);if(parseInt(l,10)!==u.length)throw Error(`schema 4 expected ${l} entries, but found ${u.length}`);else return{entries:u,id:c,size:parseInt(p,10)}}else throw Error(`schema version ${n} not supported`)}async getContent(e){let t=await this.getText(e),r=JSON.parse(t);return U_.parse(r)}async getMetadata(e){let t=await this.getText(e),r=JSON.parse(t);return op.parse(r)}async getRm(e){let t=await this.getHash(e);return T_(t)}async getHighlights(e){let t=await this.getText(e),r=JSON.parse(t);return M_.parse(r).highlights}async getTemplate(e){let t=await this.getText(e),r=JSON.parse(t);return np.parse(r)}async getPageMetadata(e){let t=await this.getText(e),r=JSON.parse(t);return q_.parse(r)}async putRm(e,t){if(!e.endsWith(".rm"))throw Error(`fileName ${e} did not end with '.rm'`);else return await this.putFile(e,R_(t))}async putRootHash(e,t,r=!0){if(!Number.isSafeInteger(t))throw Error(`generation ${t} was not a safe integer`);else if(!Gr.test(e))throw new Ce(e,Gr,"rootHash was not a valid hash");let n=JSON.stringify({hash:e,generation:t,broadcast:r}),i=await(await this.#t("PUT",`${this.#r}/sync/v3/root`,{body:n})).text(),s=JSON.parse(i),{hash:a,generation:c}=V_.parse(s);if(Number.isSafeInteger(c))return[a,c];else throw Error(`new generation ${c} was not a safe integer; please file a bug report`)}async#l(e,t,r){if(!this.#s.has(t)){let n=ep.default.buf(r,0),o=new ArrayBuffer(4);new DataView(o).setInt32(0,n,!1);let i=new Uint8Array(o).toBase64();await this.#t("PUT",`${this.#r}/sync/v3/files/${t}`,{body:r,headers:{"rm-filename":e,"x-goog-hash":`crc32c=${i}`}}),this.#s.set(t,r.byteLength<=this.#o?r.slice():null)}}async putFile(e,t){let r=await ri(t),n=this.#l(e,r,t);return n.catch(()=>{}),{id:e,hash:r,type:0,subfiles:0,size:t.length,async[Symbol.asyncDispose](){await n}}}async#i(e,t){return await this.putFile(e,new TextEncoder().encode(t))}async putContent(e,t){if(!e.endsWith(".content"))throw Error(`fileName ${e} did not end with '.content'`);else return await this.#i(e,JSON.stringify(t))}async putPagedata(e,t){if(!e.endsWith(".pagedata"))throw Error(`fileName ${e} did not end with '.pagedata'`);else return await this.#i(e,`${t.join(`
79
78
  `)}
80
- `)}async putPageMetadata(e,r){if(!ob.test(e))throw new Me(e,ob,"fileName was not of the form '<docid>/<pageid>-metadata.json'");else return await this.#o(e,JSON.stringify(r))}async putTemplate(e,r){if(!e.endsWith(".template"))throw Error(`fileName ${e} did not end with '.template'`);else return await this.#o(e,JSON.stringify(r))}async putMetadata(e,r){if(!e.endsWith(".metadata"))throw Error(`fileName ${e} did not end with '.metadata'`);else return await this.#o(e,JSON.stringify(r))}async putHighlights(e,r){if(!ib.test(e))throw new Me(e,ib,"fileName was not of the form '<docid>.highlights/<pageid>.json'");else return await this.#o(e,JSON.stringify({highlights:r}))}async putEntries(e,r,n){if(e==="root"&&n===3)console.warn('writing a schema 3 root index, which reMarkable rejects with a 400 "Software must be updated" error; write the root index with schema version 4 instead');let o=[...r].sort((d,l)=>d.id.localeCompare(l.id)),t=o.reduce((d,l)=>d+l.size,0),i=[`${n}
81
- `];if(n===4){let d=e==="root"?".":e;i.push(`0:${d}:${o.length}:${t}
82
- `)}for(let{hash:d,type:l,id:h,subfiles:f,size:g}of o){let v=n===4?0:l;i.push(`${d}:${v}:${h}:${f}:${g}
83
- `)}let s=new TextEncoder().encode(i.join("")),u;if(n===3){let d=[];for(let{hash:l}of o)d.push(Uint8Array.fromHex(l));u=await Hf(nb(d))}else if(n===4)u=await Hf(s);else throw Error(`unsupported schema version ${n}`);let c=this.#l(`${e}.docSchema`,u,s);return c.catch(()=>{}),{id:e,hash:u,type:n>3?0:80000000,subfiles:o.length,size:t,async[Symbol.asyncDispose](){await c}}}async uploadFile(e,r,n){let t=new TextEncoder().encode(JSON.stringify({file_name:e})).toBase64(),a=await(await this.#t("POST",`${this.#n}/doc/v2/files`,{body:r,headers:{"Content-Type":n,"rm-meta":t,"rm-source":"RoR-Browser"}})).json(),{docID:s,hash:u}=$1.parse(a);return{id:s,hash:u}}notifications(){let e=this.#r.replace(/^http/,"ws");return this.#e(`${e}/notifications/ws/json/1`)}dumpCache(){let e={},r=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});for(let[n,o]of this.#a){if(o===null){e[n]=null;continue}try{e[n]=`${Ro}${r.decode(o)}`}catch{e[n]=`${Co}${o.toBase64()}`}}return JSON.stringify({version:Uo,entries:e})}clearCache(){this.#a.clear()}}var w1={RM100:{name:"reMarkable 1",width:1404,height:1872,dpi:226},RM110:{name:"reMarkable 2",width:1404,height:1872,dpi:226},RM02A:{name:"reMarkable Paper Pro",width:1620,height:2160,dpi:229},RM03A:{name:"reMarkable Paper Pro Move",width:954,height:1696,dpi:264},RM102:{name:"reMarkable Paper Pure",width:1404,height:1872,dpi:226}};var hb="https://webapp-prod.cloud.remarkable.engineering",k1="https://eu.tectonic.remarkable.com",I1="https://internal.cloud.remarkable.com",mb="",Xf="trash",at="root",Yf=200,S1=25;function Ao(e){return new Promise((r)=>{setTimeout(r,e).unref?.()})}function No(e,r){let n=Math.min(r*2**e,30000);return Math.random()*n}class gb{#t=Promise.resolve();async lock(){let e=this.#t,r;return this.#t=new Promise((n)=>{r=n}),await e,{async[Symbol.asyncDispose](){r()}}}}function Qf(e){if("cPages"in e&&e.cPages)return e.cPages.pages.filter((r)=>r.deleted===void 0).map((r)=>r.id);else if("pages"in e&&e.pages)return e.pages;else return[]}var st=/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}||trash)$/;class Zo extends Error{constructor(){super("root generation was stale; try put again")}}class tm extends Error{status;statusText;constructor(e,r,n){super(n);this.status=e,this.statusText=r}}async function jT(e,{deviceDesc:r="browser-chrome",uuid:n=Tt(),authHost:o=hb}={}){if(e.length!==8)throw Error(`code should be length 8, but was ${e.length}`);let t=await fetch(`${o}/token/json/2/device/new`,{method:"POST",headers:{Authorization:"Bearer"},body:JSON.stringify({code:e,deviceDesc:r,deviceID:n})});if(!t.ok)throw new tm(t.status,t.statusText,"couldn't register api");else return await t.text()}var z1=S.object({"device-id":S.string()}).loose();function P1(e){let[,r]=e.split(".",2);if(r===void 0)throw Error("token wasn't a jwt, so it had no device id");let n=Uint8Array.fromBase64(r,{alphabet:"base64url",lastChunkHandling:"loose"}),o=new TextDecoder().decode(n);return z1.parse(JSON.parse(o))["device-id"]}var T1=S.object({message:S.object({attributes:S.object({event:S.string()}).loose()}).loose()}).loose(),E1=S.object({attributes:S.object({event:S.literal("SyncComplete"),sourceDeviceID:S.string(),auth0UserID:S.string(),userID:S.string().optional(),eventType:S.string().optional(),eventVersion:S.string().optional(),orgID:S.string().optional()}).loose(),messageid:S.string().optional()}).loose();class vb{#t;#e;raw;#r;#n;#a;#i;#c;#l=new gb;constructor(e,r,n,o,t,i,a){this.#t=e,this.#r=P1(e),this.#e=o,this.#n=t,this.#a=i,this.raw=new Kf((s,u,{body:c,headers:d}={})=>this.#k(u,{method:s,body:c,headers:d}),(s)=>new WebSocket(s,{headers:{Authorization:`Bearer ${this.#t}`}}),o,r,n,a)}get deviceId(){return this.#r}async#o(e=!1){if(e||this.#i===void 0){let[r,n,o]=await this.raw.getRootHash();if(this.#i===void 0||n>=this.#i[1])this.#i=[r,n],this.#c=o}return[...this.#i,this.#c]}async#d(e,r){try{let[n,o]=await this.raw.putRootHash(e,r);this.#i=[n,o]}catch(n){if(n instanceof Zo)this.#i=void 0;throw n}}async#s(e){let n=[];try{const r=$e(n,await this.#l.lock(),1);for(let s=0;;s++)try{return await e()}catch(u){if(u instanceof Zo&&s<this.#n)await Ao(No(s,S1));else throw u}}catch(o){var t=o,i=1}finally{var a=Le(n,t,i);a&&await a}}async#f(e){await this.#s(async()=>{let[r,n]=await this.#o(),{entries:o}=await this.raw.getEntries({id:at,hash:r});o.push(e),await this.#m(o,n)})}async#m(e,r){let n;{let o=[];try{const u=$e(o,await this.raw.putEntries(at,e,4),1);n=u.hash}catch(t){var i=t,a=1}finally{var s=Le(o,i,a);s&&await s}}await this.#d(n,r)}async#k(e,{body:r,method:n="POST",headers:o={}}){let t=n==="PUT"&&e.endsWith("/sync/v3/root")?0:this.#a;for(let i=0;;i++){let a;try{a=await fetch(e,{method:n,headers:{Authorization:`Bearer ${this.#t}`,...o},body:r})}catch(u){if(i<t){await Ao(No(i,Yf));continue}throw u}if(a.ok)return a;let s=await a.text();if(s===`{"message":"precondition failed"}
84
- `)throw new Zo;else if((a.status>=500||a.status===429)&&i<t)await Ao(No(i,Yf));else throw new tm(a.status,a.statusText,`failed reMarkable request: ${s}`)}}async#I(e){let{id:r,hash:n}=e,{entries:o}=await this.raw.getEntries(e),t=o.find((v)=>v.id.endsWith(".metadata")),i=o.find((v)=>v.id.endsWith(".content"));if(t===void 0)throw Error(`couldn't find metadata for hash ${n}`);let[{visibleName:a,lastModified:s,pinned:u,parent:c,lastOpened:d,createdTime:l,new:h,source:f},g]=await Promise.all([this.raw.getMetadata(t),i===void 0?Promise.resolve({fileType:void 0,tags:void 0}):this.raw.getContent(i)]);if("templateVersion"in g)return{id:r,hash:n,visibleName:a,lastModified:s,new:h,pinned:u,source:f,parent:c,createdTime:l,type:"TemplateType"};else if(g.fileType===void 0)return{id:r,hash:n,visibleName:a,lastModified:s,pinned:u,parent:c,tags:g.tags,type:"CollectionType"};else return{id:r,hash:n,visibleName:a,lastModified:s,pinned:u,parent:c,tags:g.tags,lastOpened:d??"",fileType:g.fileType,type:"DocumentType"}}async listItems(e=!1){let r=await this.listRefs(e);return await Promise.all(r.map((n)=>this.#I(n)))}async listRefs(e=!1){let[r]=await this.#o(e),{entries:n}=await this.raw.getEntries({id:at,hash:r});return n.map(({id:o,hash:t})=>({id:o,hash:t}))}async getContent(e){let{hash:r}=e,{entries:n}=await this.raw.getEntries(e),o=n.find((t)=>t.id.endsWith(".content"));if(o===void 0)throw Error(`couldn't find contents for hash ${r}`);else return await this.raw.getContent(o)}async getMetadata(e){let{hash:r}=e,{entries:n}=await this.raw.getEntries(e),o=n.find((t)=>t.id.endsWith(".metadata"));if(o===void 0)throw Error(`couldn't find metadata for hash ${r}`);else return await this.raw.getMetadata(o)}async getPdf(e){let{hash:r}=e,{entries:n}=await this.raw.getEntries(e),o=n.find((t)=>t.id.endsWith(".pdf"));if(o===void 0)throw Error(`couldn't find pdf for hash ${r}`);else return await this.raw.getHash(o)}async getEpub(e){let{hash:r}=e,{entries:n}=await this.raw.getEntries(e),o=n.find((t)=>t.id.endsWith(".epub"));if(o===void 0)throw Error(`couldn't find epub for hash ${r}`);else return await this.raw.getHash(o)}#p={name:(e,r)=>`${e}/${r}.rm`,read:(e)=>this.raw.getRm(e),write:(e,r)=>this.raw.putRm(e,r)};#h={name:(e,r)=>`${e}.highlights/${r}.json`,read:(e)=>this.raw.getHighlights(e),write:(e,r)=>this.raw.putHighlights(e,r)};#g={name:(e,r)=>`${e}/${r}-metadata.json`,read:(e)=>this.raw.getPageMetadata(e),write:(e,r)=>this.raw.putPageMetadata(e,r)};async#v(e,r,n){let{id:o}=e,{entries:t}=await this.raw.getEntries(e),i=await this.getContent(e);if(!Qf(i).includes(r))throw Error(`document ${o} has no page ${r}`);let a=t.find((s)=>s.id===n.name(o,r));if(a===void 0)return;else return await n.read(a)}async#y(e,r){let{id:n}=e,{entries:o}=await this.raw.getEntries(e),t=await this.getContent(e),i=new Map(o.map((u)=>[u.id,u])),a=Qf(t).map((u)=>[u,i.get(r.name(n,u))]).filter((u)=>u[1]!==void 0),s=await Promise.all(a.map(([,u])=>r.read(u)));return new Map(a.map(([u],c)=>[u,s[c]]))}async#S(e,r,n,o){let h=[];try{let{id:t,hash:i}=e;let{entries:a}=await this.raw.getEntries(e);let s=a.find((w)=>w.id.endsWith(".content"));if(s===void 0)throw Error(`couldn't find contents for hash ${i}`);let u=await this.raw.getContent(s);let c=new Set(Qf(u));for(let w of r.keys())if(!c.has(w))throw Error(`document ${t} has no page ${w}`);const d=$e(h,new AsyncDisposableStack,1);let l=await Promise.all([...r].map(([w,P])=>n.write(n.name(t,w),P)));for(let w of l){d.use(w);let P=a.findIndex((k)=>k.id===w.id);if(P===-1)a.push(w);else a[P]=w}return await this.raw.putEntries(t,a,o)}catch(f){var g=f,v=1}finally{var y=Le(h,g,v);y&&await y}}async#b(e,r,n,o){if(r.size===0)return e;else return await this.#u(e,o,(t,i)=>this.#S(t,r,n,i))}async getRmPage(e,r){return await this.#v(e,r,this.#p)}async getRmPages(e){return await this.#y(e,this.#p)}async putRmPage(e,r,n,o=!1){return await this.putRmPages(e,new Map([[r,n]]),o)}async putRmPages(e,r,n=!1){return await this.#b(e,r,this.#p,n)}async getHighlights(e,r){return await this.#v(e,r,this.#h)}async getHighlightPages(e){return await this.#y(e,this.#h)}async putHighlights(e,r,n,o=!1){return await this.putHighlightPages(e,new Map([[r,n]]),o)}async putHighlightPages(e,r,n=!1){return await this.#b(e,r,this.#h,n)}async getTemplate(e){let{id:r}=e,{entries:n}=await this.raw.getEntries(e),o=n.find((t)=>t.id===`${r}.template`);if(o===void 0)return;else return await this.raw.getTemplate(o)}async putTemplate(e,r,n=!1){return await this.#u(e,n,async(o,t)=>{let c=[];try{let{id:i}=o;let{entries:a}=await this.raw.getEntries(o);const s=$e(c,await this.raw.putTemplate(`${i}.template`,r),1);let u=a.findIndex((g)=>g.id===s.id);if(u===-1)a.push(s);else a[u]=s;return await this.raw.putEntries(i,a,t)}catch(d){var l=d,h=1}finally{var f=Le(c,l,h);f&&await f}})}async getPagedata(e){let{id:r}=e,{entries:n}=await this.raw.getEntries(e),o=n.find((t)=>t.id===`${r}.pagedata`);if(o===void 0)return;else{let t=(await this.raw.getText(o)).split(`
85
- `);if(t.at(-1)==="")t.pop();return t}}async putPagedata(e,r,n=!1){return await this.#u(e,n,async(o,t)=>{let c=[];try{let{id:i}=o;let{entries:a}=await this.raw.getEntries(o);const s=$e(c,await this.raw.putPagedata(`${i}.pagedata`,r),1);let u=a.findIndex((g)=>g.id===s.id);if(u===-1)a.push(s);else a[u]=s;return await this.raw.putEntries(i,a,t)}catch(d){var l=d,h=1}finally{var f=Le(c,l,h);f&&await f}})}async getPageMetadata(e,r){return await this.#v(e,r,this.#g)}async getPageMetadataPages(e){return await this.#y(e,this.#g)}async putPageMetadata(e,r,n,o=!1){return await this.putPageMetadataPages(e,new Map([[r,n]]),o)}async putPageMetadataPages(e,r,n=!1){return await this.#b(e,r,this.#g,n)}async getDocumentArchive(e){let{entries:r}=await this.raw.getEntries(e),n=new em.default;for(let o of r)n.file(o.id,this.raw.getHash(o));return n.generateAsync({type:"uint8array"})}async putDocumentArchive(e,{refresh:r=!1,parent:n,visibleName:o}={}){if(n!==void 0&&n&&!st.test(n))throw new Me(n,st,"parent must be a valid document id");let t=await em.default.loadAsync(e),i=Object.keys(t.files).filter((E)=>!t.files[E].dir),a=i.find((E)=>E.endsWith(".metadata"));if(a===void 0)throw Error("archive did not contain a .metadata file");let s=a.slice(0,-9);if(s.includes("/"))throw Error(`unexpected nested .metadata path '${a}'`);let u=Tt(),c=new TextEncoder,d=new TextDecoder,l=Date.now().toFixed(),[,,h]=await this.#o(r),f=await Promise.all(i.map(async(E)=>{if(!E.startsWith(s))throw Error(`archived file '${E}' did not start with '${s}'`);let U=`${u}${E.slice(s.length)}`,B=await t.files[E].async("uint8array");if(E===a){let I=fb(d.decode(B));if(n!==void 0)I.parent=n;if(o!==void 0)I.visibleName=o;I.lastModified=l,B=c.encode(JSON.stringify(I))}return this.raw.putFile(U,B)})),g;{let v=[];try{const E=$e(v,new AsyncDisposableStack,1);for(let B of f)E.use(B);const U=$e(v,await this.raw.putEntries(u,f,h),1);g=U}catch(y){var w=y,P=1}finally{var k=Le(v,w,P);k&&await k}}return await this.#f(g),{id:u,hash:g.hash}}async#$(e,r,n,{refresh:o,parent:t=mb,pinned:i=!1,zoomMode:a="bestFit",viewBackgroundFilter:s,textScale:u=1,textAlignment:c="justify",fontName:d="",coverPageNumber:l=-1,authors:h,title:f,publicationDate:g,publisher:v,extraMetadata:y={},lineHeight:w=-1,margins:P=125,orientation:k="portrait",tags:E,customZoomScale:U,customZoomCenterX:B,customZoomCenterY:I,customZoomPageWidth:V,customZoomPageHeight:L,customZoomOrientation:x}){if(t&&!st.test(t))throw new Me(t,st,"parent must be a valid document id");let O=Tt(),p=new Date,N={parent:t,pinned:i,lastModified:(+p).toFixed(),createdTime:(+p).toFixed(),type:"DocumentType",visibleName:e,lastOpened:"0",lastOpenedPage:0},ue={coverPageNumber:l,documentMetadata:{authors:h,title:f,publicationDate:g,publisher:v},extraMetadata:y,lineHeight:w,margins:P,orientation:k,fileType:r,formatVersion:1,tags:E?.map((re)=>({name:re,timestamp:+p}))??[],fontName:d,textAlignment:c,textScale:u,zoomMode:a,customZoomScale:U,customZoomCenterX:B,customZoomCenterY:I,customZoomPageWidth:V,customZoomPageHeight:L,customZoomOrientation:x,viewBackgroundFilter:s,originalPageCount:1,pageCount:1,pageTags:[],pages:[Tt()],redirectionPageMap:[0],sizeInBytes:n.length.toFixed()},[,,K]=await this.#o(o),ce;{let H=[];try{let re=this.raw.putContent(`${O}.content`,ue);let ee=this.raw.putMetadata(`${O}.metadata`,N);let _e=this.raw.putFile(`${O}.pagedata`,new TextEncoder().encode(`
86
- `));let ze=this.raw.putFile(`${O}.${r}`,n);const fe=$e(H,await re,1);const pe=$e(H,await ee,1);const Se=$e(H,await _e,1);const xe=$e(H,await ze,1);const Ve=$e(H,await this.raw.putEntries(O,[fe,pe,Se,xe],K),1);ce=Ve}catch(ae){var C=ae,R=1}finally{var ie=Le(H,C,R);ie&&await ie}}return await this.#f(ce),{id:O,hash:ce.hash}}async putPdf(e,r,n={}){return await this.#$(e,"pdf",r,n)}async putEpub(e,r,n={}){return await this.#$(e,"epub",r,n)}async putFolder(e,{parent:r=mb}={},n=!1){if(r&&!st.test(r))throw new Me(r,st,"parent must be a valid document id");let o=Tt(),t=new Date,i={tags:[]},a={lastModified:(+t).toFixed(),createdTime:(+t).toFixed(),parent:r,pinned:!1,type:"CollectionType",visibleName:e},[,,s]=await this.#o(n),u;{let c=[];try{let g=this.raw.putContent(`${o}.content`,i);let v=this.raw.putMetadata(`${o}.metadata`,a);const y=$e(c,await g,1);const w=$e(c,await v,1);const P=$e(c,await this.raw.putEntries(o,[y,w],s),1);u=P}catch(d){var l=d,h=1}finally{var f=Le(c,l,h);f&&await f}}return await this.#f(u),{id:o,hash:u.hash}}async uploadEpub(e,r){return await this.raw.uploadFile(e,r,"application/epub+zip")}async uploadPdf(e,r){return await this.raw.uploadFile(e,r,"application/pdf")}async uploadFolder(e){return await this.raw.uploadFile(e,new Uint8Array(0),"folder")}async#z(e,r,n){let c=[];try{let{id:o}=e;let{entries:t}=await this.raw.getEntries(e);let i=t.findIndex((g)=>g.id.endsWith(".content"));let a=t[i];if(a===void 0)throw Error("internal error: couldn't find content in entry hash");let s=await this.raw.getContent(a);Object.assign(s,r);const u=$e(c,await this.raw.putContent(a.id,s),1);t[i]=u;return await this.raw.putEntries(o,t,n)}catch(d){var l=d,h=1}finally{var f=Le(c,l,h);f&&await f}}async#u(e,r,n){return await this.#s(async()=>{let[o,t,i]=await this.#o(r),{entries:a}=await this.raw.getEntries({id:at,hash:o}),s=a.findIndex((y)=>y.id===e.id&&y.hash===e.hash),u=a[s];if(u===void 0)throw new xr(e.hash);let c,d;{let l=[];try{const y=$e(l,await n({id:u.id,hash:e.hash},i),1);a[s]=y;const w=$e(l,await this.raw.putEntries(at,a,4),1);c=w.hash;d=y.hash}catch(h){var f=h,g=1}finally{var v=Le(l,f,g);v&&await v}}return await this.#d(c,t),{id:u.id,hash:d}})}async#_(e,r,n,o){return await this.#u(e,o,async(t,i)=>{let[a,s]=await Promise.all([this.#z(t,r,i),this.getMetadata(t)]);if(s.type!==n)throw Error(`expected type ${n} but got ${s.type} for hash ${t.hash}`);return a})}async updateDocument(e,r,n=!1){return await this.#_(e,r,"DocumentType",n)}async updateCollection(e,r,n=!1){return await this.#_(e,r,"CollectionType",n)}async updateTemplate(e,r,n=!1){return await this.#_(e,r,"TemplateType",n)}async#w(e,r,n){let c=[];try{let{id:o}=e;let{entries:t}=await this.raw.getEntries(e);let i=t.findIndex((g)=>g.id.endsWith(".metadata"));let a=t[i];if(a===void 0)throw Error("internal error: couldn't find metadata in entry hash");let s=await this.raw.getMetadata(a);Object.assign(s,r);s.version=(s.version??0)+1;s.metadatamodified=!0;const u=$e(c,await this.raw.putMetadata(a.id,s),1);t[i]=u;return await this.raw.putEntries(o,t,n)}catch(d){var l=d,h=1}finally{var f=Le(c,l,h);f&&await f}}async#x(e,r,n=!1){return await this.#u(e,n,(o,t)=>this.#w(o,r,t))}async move(e,r,n=!1){if(!st.test(r))throw new Me(r,st,"parent must be a valid document id");return await this.#x(e,{parent:r},n)}async delete(e,r=!1){return await this.move(e,Xf,r)}async purge(e,r=!1){await this.bulkPurge([e],r)}async rename(e,r,n=!1){return await this.#x(e,{visibleName:r},n)}async star(e,r,n=!1){return await this.#x(e,{pinned:r},n)}async bulkMove(e,r,n=!1){if(!st.test(r))throw new Me(r,st,"parent must be a valid document id");return await this.#s(async()=>{let[o,t,i]=await this.#o(n),{entries:a}=await this.raw.getEntries({id:at,hash:o}),s=new Set(e.map((k)=>`${k.id}\x00${k.hash}`)),u=new Set,c=[],d=[];for(let k of a){let E=`${k.id}\x00${k.hash}`;if(s.has(E))c.push(k),u.add(E);else d.push(k)}for(let k of e)if(!u.has(`${k.id}\x00${k.hash}`))throw new xr(k.hash);let l=await Promise.all(c.map((k)=>this.#w(k,{parent:r},i))),h=[];for(let[k,E]of l.entries())d.push(E),h.push({id:c[k].id,hash:E.hash});let f;{let g=[];try{const k=$e(g,new AsyncDisposableStack,1);for(let U of l)k.use(U);const E=$e(g,await this.raw.putEntries(at,d,4),1);f=E.hash}catch(v){var y=v,w=1}finally{var P=Le(g,y,w);P&&await P}}return await this.#d(f,t),h})}async bulkDelete(e,r=!1){return await this.bulkMove(e,Xf,r)}async bulkPurge(e,r=!1){if(!e.length)return;await this.#s(async()=>{let[n,o]=await this.#o(r),{entries:t}=await this.raw.getEntries({id:at,hash:n}),i=new Set(e.map((u)=>`${u.id}\x00${u.hash}`)),a=new Set,s=[];for(let u of t){let c=`${u.id}\x00${u.hash}`;if(i.has(c))a.add(c);else s.push(u)}for(let u of e)if(!a.has(`${u.id}\x00${u.hash}`))throw new xr(u.hash);await this.#m(s,o)})}async purgeTrash(e=!1){return await this.#s(async()=>{let[r,n]=await this.#o(e),{entries:o}=await this.raw.getEntries({id:at,hash:r}),t=await Promise.all(o.map(async(d)=>(await this.getMetadata(d)).parent)),i=new Map;for(let[d,l]of o.entries()){let h=i.get(t[d]);if(h===void 0)i.set(t[d],[l]);else h.push(l)}let a=new Set,s=i.get(Xf)??[];while(s.length){let d=[];for(let{id:l}of s)if(!a.has(l))a.add(l),d.push(...i.get(l)??[]);s=d}if(!a.size)return[];let u=[],c=[];for(let d of o)if(a.has(d.id))u.push({id:d.id,hash:d.hash});else c.push(d);return await this.#m(c,n),u})}listen(){let e=new AbortController,r=this.#P(e.signal),{return:n}=r;return r.return=async(o)=>(e.abort(),await n.call(r,o)),r}async*#P(e){for(let r=0;;){let n=this.raw.notifications(),o=()=>{n.close()};e.addEventListener("abort",o,{once:!0});let t=[],i=()=>{},a=!1,s=!1;n.addEventListener("open",()=>{a=!0}),n.addEventListener("message",({data:u})=>{t.push(u),i()}),n.addEventListener("error",()=>{s=!0,i()}),n.addEventListener("close",()=>{s=!0,i()});try{while(!s||t.length){let u=t.shift();if(u===void 0)await new Promise((c)=>{i=c});else{let{message:c}=T1.parse(JSON.parse(u));if(c.attributes.event==="SyncComplete")yield E1.parse(c)}}}finally{e.removeEventListener("abort",o),n.close()}if(e.aborted)return;else if(a)r=0;else if(r<this.#a)r++;else throw Error("couldn't open the reMarkable notification socket; the session token may have expired");await Ao(No(r,Yf))}}dumpCache(){return this.raw.dumpCache()}async pruneCache(e){let[r]=await this.#o(e),n=new Set(this.#e.keys());n.delete(r);let t=[(await this.raw.getEntries({id:at,hash:r})).entries],i=[];while(t.length){for(let s of t)for(let u of s)if(n.delete(u.hash),u.subfiles>0)i.push(this.raw.getEntries(u));t=(await Promise.all(i)).map((s)=>s.entries),i=[]}for(let a of n)this.#e.delete(a)}clearCache(){this.raw.clearCache()}}var O1=1048576,pb=S.record(S.string(),S.string().nullable()),j1=S.object({version:S.literal(Uo),entries:pb}).or(pb.transform((e)=>({version:void 0,entries:e})));function D1(e){let r=j1.safeParse(e);if(!r.success)throw Error(`cache was neither a version ${Uo} dump nor the original mapping of hashes to text. Either construct the api without a cache, or fix its format.`);let{version:n,entries:o}=r.data,t=new TextEncoder;return Object.entries(o).map(([i,a])=>{if(a===null)return[i,null];else if(n===void 0)return[i,t.encode(a)];else if(a.startsWith(Co))return[i,Uint8Array.fromBase64(a.slice(1))];else if(a.startsWith(Ro))return[i,t.encode(a.slice(1))];else throw Error(`cache entry ${i} wasn't tagged '${Ro}' or '${Co}'. Either construct the api without a cache, or fix its format.`)})}async function U1(e,{authHost:r=hb}={}){let n=await fetch(`${r}/token/json/2/user/new`,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`couldn't fetch auth token: ${n.statusText}`);return await n.text()}function R1(e,{rawHost:r=k1,uploadHost:n=I1,cache:o,maxCacheSize:t=1/0,maxCachedBytes:i=O1,maxGenerationRetries:a=10,maxTransientRetries:s=3}={}){let u=D1(JSON.parse(o??"{}")),c=t===1/0?new Map(u):new Md(t,u);return new vb(e,r,n,c,a,s,i)}async function DT(e,r={}){let{authHost:n,...o}=r??{},t=await U1(e,{authHost:n});return R1(t,o)}export{Zo as GenerationError,xr as HashNotFoundError,tm as ResponseError,Me as ValidationError,U1 as auth,je as crdtKey,w1 as deviceScreens,jT as register,DT as remarkable,MS as rmBrushes,VS as rmColors,R1 as session};
79
+ `)}async putPageMetadata(e,t){if(!Xf.test(e))throw new Ce(e,Xf,"fileName was not of the form '<docid>/<pageid>-metadata.json'");else return await this.#i(e,JSON.stringify(t))}async putTemplate(e,t){if(!e.endsWith(".template"))throw Error(`fileName ${e} did not end with '.template'`);else return await this.#i(e,JSON.stringify(t))}async putMetadata(e,t){if(!e.endsWith(".metadata"))throw Error(`fileName ${e} did not end with '.metadata'`);else return await this.#i(e,JSON.stringify(t))}async putHighlights(e,t){if(!Yf.test(e))throw new Ce(e,Yf,"fileName was not of the form '<docid>.highlights/<pageid>.json'");else return await this.#i(e,JSON.stringify({highlights:t}))}async putEntries(e,t,r){if(e==="root"&&r===3)console.warn('writing a schema 3 root index, which reMarkable rejects with a 400 "Software must be updated" error; write the root index with schema version 4 instead');let n=[...t].sort((p,u)=>p.id.localeCompare(u.id)),o=n.reduce((p,u)=>p+u.size,0),i=[`${r}
80
+ `];if(r===4){let p=e==="root"?".":e;i.push(`0:${p}:${n.length}:${o}
81
+ `)}for(let{hash:p,type:u,id:m,subfiles:f,size:g}of n){let y=r===4?0:u;i.push(`${p}:${y}:${m}:${f}:${g}
82
+ `)}let a=new TextEncoder().encode(i.join("")),c;if(r===3){let p=[];for(let{hash:u}of n)p.push(Uint8Array.fromHex(u));c=await ri(Kf(p))}else if(r===4)c=await ri(a);else throw Error(`unsupported schema version ${r}`);let l=this.#l(`${e}.docSchema`,c,a);return l.catch(()=>{}),{id:e,hash:c,type:r>3?0:80000000,subfiles:n.length,size:o,async[Symbol.asyncDispose](){await l}}}async uploadFile(e,t,r){let o=new TextEncoder().encode(JSON.stringify({file_name:e})).toBase64(),s=await(await this.#t("POST",`${this.#n}/doc/v2/files`,{body:t,headers:{"Content-Type":r,"rm-meta":o,"rm-source":"RoR-Browser"}})).json(),{docID:a,hash:c}=H_.parse(s);return{id:a,hash:c}}notifications(){let e=this.#r.replace(/^http/,"ws");return this.#e(`${e}/notifications/ws/json/1`)}dumpCache(){let e={},t=new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});for(let[r,n]of this.#s){if(n===null){e[r]=null;continue}try{e[r]=`${Yr}${t.decode(n)}`}catch{e[r]=`${Xr}${n.toBase64()}`}}return JSON.stringify({version:Kr,entries:e})}clearCache(){this.#s.clear()}}var J_={RM100:{name:"reMarkable 1",width:1404,height:1872,dpi:226},RM110:{name:"reMarkable 2",width:1404,height:1872,dpi:226},RM02A:{name:"reMarkable Paper Pro",width:1620,height:2160,dpi:229},RM03A:{name:"reMarkable Paper Pro Move",width:954,height:1696,dpi:264},RM102:{name:"reMarkable Paper Pure",width:1404,height:1872,dpi:226}};var cp="https://webapp-prod.cloud.remarkable.engineering",G_="https://eu.tectonic.remarkable.com",K_="https://internal.cloud.remarkable.com",sp="",oi="trash",Ve="root",ii=200,Y_=25;function Qr(e){return new Promise((t)=>{setTimeout(t,e).unref?.()})}function en(e,t){let r=Math.min(t*2**e,30000);return Math.random()*r}class up{#t=Promise.resolve();async lock(){let e=this.#t,t;return this.#t=new Promise((r)=>{t=r}),await e,{async[Symbol.asyncDispose](){t()}}}}function si(e){if("cPages"in e&&e.cPages)return e.cPages.pages.filter((t)=>t.deleted===void 0).map((t)=>t.id);else if("pages"in e&&e.pages)return e.pages;else return[]}var We=/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}||trash)$/;class tn extends Error{constructor(){super("root generation was stale; try put again")}}class rn extends Error{status;statusText;constructor(e,t,r){super(r);this.status=e,this.statusText=t}}class lp extends rn{body;constructor(e,t,r){super(e,t,"couldn't register api");this.body=r}}class dp extends rn{body;constructor(e,t,r){super(e,t,"couldn't fetch auth token");this.body=r}}async function $z(e,{deviceDesc:t="browser-chrome",uuid:r=at(),authHost:n=cp}={}){if(e.length!==8)throw Error(`code should be length 8, but was ${e.length}`);let o=await fetch(`${n}/token/json/2/device/new`,{method:"POST",headers:{Authorization:"Bearer","Content-Type":"application/json"},body:JSON.stringify({code:e,deviceDesc:t,deviceID:r})}),i=await o.text();if(!o.ok)throw new lp(o.status,o.statusText,i);else return i}var X_=se({"device-id":Y()}).loose();function Q_(e){let[,t]=e.split(".",2);if(t===void 0)throw Error("token wasn't a jwt, so it had no device id");let r=Uint8Array.fromBase64(t,{alphabet:"base64url",lastChunkHandling:"loose"}),n=new TextDecoder().decode(r);return X_.parse(JSON.parse(n))["device-id"]}var ew=se({message:se({attributes:se({event:Y()}).loose()}).loose()}).loose(),tw=se({attributes:se({event:br("SyncComplete"),sourceDeviceID:Y(),auth0UserID:Y(),userID:Y().optional(),eventType:Y().optional(),eventVersion:Y().optional(),orgID:Y().optional()}).loose(),messageid:Y().optional()}).loose();class fp{#t;#e;raw;#r;#n;#s;#o;#u;#l=new up;constructor(e,t,r,n,o,i,s){this.#t=e,this.#r=Q_(e),this.#e=n,this.#n=o,this.#s=i,this.raw=new ni((a,c,{body:l,headers:p}={})=>this.#z(c,{method:a,body:l,headers:p}),(a)=>new WebSocket(a,{headers:{Authorization:`Bearer ${this.#t}`}}),n,t,r,s)}get deviceId(){return this.#r}async#i(e=!1){if(e||this.#o===void 0){let[t,r,n]=await this.raw.getRootHash();if(this.#o===void 0||r>=this.#o[1])this.#o=[t,r],this.#u=n}return[...this.#o,this.#u]}async#d(e,t){try{let[r,n]=await this.raw.putRootHash(e,t);this.#o=[r,n]}catch(r){if(r instanceof tn)this.#o=void 0;throw r}}async#a(e){let r=[];try{const t=ye(r,await this.#l.lock(),1);for(let a=0;;a++)try{return await e()}catch(c){if(c instanceof tn&&a<this.#n)await Qr(en(a,Y_));else throw c}}catch(n){var o=n,i=1}finally{var s=$e(r,o,i);s&&await s}}async#f(e){await this.#a(async()=>{let[t,r]=await this.#i(),{entries:n}=await this.raw.getEntries({id:Ve,hash:t});n.push(e),await this.#p(n,r)})}async#p(e,t){let r;{let n=[];try{const c=ye(n,await this.raw.putEntries(Ve,e,4),1);r=c.hash}catch(o){var i=o,s=1}finally{var a=$e(n,i,s);a&&await a}}await this.#d(r,t)}async#z(e,{body:t,method:r="POST",headers:n={}}){let o=r==="PUT"&&e.endsWith("/sync/v3/root")?0:this.#s;for(let i=0;;i++){let s;try{s=await fetch(e,{method:r,headers:{Authorization:`Bearer ${this.#t}`,...n},body:t})}catch(c){if(i<o){await Qr(en(i,ii));continue}throw c}if(s.ok)return s;let a=await s.text();if(a===`{"message":"precondition failed"}
83
+ `)throw new tn;else if((s.status>=500||s.status===429)&&i<o)await Qr(en(i,ii));else throw new rn(s.status,s.statusText,`failed reMarkable request: ${a}`)}}async#I(e){let{id:t,hash:r}=e,{entries:n}=await this.raw.getEntries(e),o=n.find((y)=>y.id.endsWith(".metadata")),i=n.find((y)=>y.id.endsWith(".content"));if(o===void 0)throw Error(`couldn't find metadata for hash ${r}`);let[{visibleName:s,lastModified:a,pinned:c,parent:l,lastOpened:p,createdTime:u,new:m,source:f},g]=await Promise.all([this.raw.getMetadata(o),i===void 0?Promise.resolve({fileType:void 0,tags:void 0}):this.raw.getContent(i)]);if("templateVersion"in g)return{id:t,hash:r,visibleName:s,lastModified:a,new:m,pinned:c,source:f,parent:l,createdTime:u,type:"TemplateType"};else if(g.fileType===void 0)return{id:t,hash:r,visibleName:s,lastModified:a,pinned:c,parent:l,tags:g.tags,type:"CollectionType"};else return{id:t,hash:r,visibleName:s,lastModified:a,pinned:c,parent:l,tags:g.tags,lastOpened:p??"",fileType:g.fileType,type:"DocumentType"}}async listItems(e=!1){let t=await this.listRefs(e);return await Promise.all(t.map((r)=>this.#I(r)))}async listRefs(e=!1){let[t]=await this.#i(e),{entries:r}=await this.raw.getEntries({id:Ve,hash:t});return r.map(({id:n,hash:o})=>({id:n,hash:o}))}async getContent(e){let{hash:t}=e,{entries:r}=await this.raw.getEntries(e),n=r.find((o)=>o.id.endsWith(".content"));if(n===void 0)throw Error(`couldn't find contents for hash ${t}`);else return await this.raw.getContent(n)}async getMetadata(e){let{hash:t}=e,{entries:r}=await this.raw.getEntries(e),n=r.find((o)=>o.id.endsWith(".metadata"));if(n===void 0)throw Error(`couldn't find metadata for hash ${t}`);else return await this.raw.getMetadata(n)}async getPdf(e){let{hash:t}=e,{entries:r}=await this.raw.getEntries(e),n=r.find((o)=>o.id.endsWith(".pdf"));if(n===void 0)throw Error(`couldn't find pdf for hash ${t}`);else return await this.raw.getHash(n)}async getEpub(e){let{hash:t}=e,{entries:r}=await this.raw.getEntries(e),n=r.find((o)=>o.id.endsWith(".epub"));if(n===void 0)throw Error(`couldn't find epub for hash ${t}`);else return await this.raw.getHash(n)}#h={name:(e,t)=>`${e}/${t}.rm`,read:(e)=>this.raw.getRm(e),write:(e,t)=>this.raw.putRm(e,t)};#m={name:(e,t)=>`${e}.highlights/${t}.json`,read:(e)=>this.raw.getHighlights(e),write:(e,t)=>this.raw.putHighlights(e,t)};#g={name:(e,t)=>`${e}/${t}-metadata.json`,read:(e)=>this.raw.getPageMetadata(e),write:(e,t)=>this.raw.putPageMetadata(e,t)};async#y(e,t,r){let{id:n}=e,{entries:o}=await this.raw.getEntries(e),i=await this.getContent(e);if(!si(i).includes(t))throw Error(`document ${n} has no page ${t}`);let s=o.find((a)=>a.id===r.name(n,t));if(s===void 0)return;else return await r.read(s)}async#b(e,t){let{id:r}=e,{entries:n}=await this.raw.getEntries(e),o=await this.getContent(e),i=new Map(n.map((c)=>[c.id,c])),s=si(o).map((c)=>[c,i.get(t.name(r,c))]).filter((c)=>c[1]!==void 0),a=await Promise.all(s.map(([,c])=>t.read(c)));return new Map(s.map(([c],l)=>[c,a[l]]))}async#S(e,t,r,n){let m=[];try{let{id:o,hash:i}=e;let{entries:s}=await this.raw.getEntries(e);let a=s.find((x)=>x.id.endsWith(".content"));if(a===void 0)throw Error(`couldn't find contents for hash ${i}`);let c=await this.raw.getContent(a);let l=new Set(si(c));for(let x of t.keys())if(!l.has(x))throw Error(`document ${o} has no page ${x}`);const p=ye(m,new AsyncDisposableStack,1);let u=await Promise.all([...t].map(([x,I])=>r.write(r.name(o,x),I)));for(let x of u){p.use(x);let I=s.findIndex((k)=>k.id===x.id);if(I===-1)s.push(x);else s[I]=x}return await this.raw.putEntries(o,s,n)}catch(f){var g=f,y=1}finally{var b=$e(m,g,y);b&&await b}}async#v(e,t,r,n){if(t.size===0)return e;else return await this.#c(e,n,(o,i)=>this.#S(o,t,r,i))}async getRmPage(e,t){return await this.#y(e,t,this.#h)}async getRmPages(e){return await this.#b(e,this.#h)}async putRmPage(e,t,r,n=!1){return await this.putRmPages(e,new Map([[t,r]]),n)}async putRmPages(e,t,r=!1){return await this.#v(e,t,this.#h,r)}async getHighlights(e,t){return await this.#y(e,t,this.#m)}async getHighlightPages(e){return await this.#b(e,this.#m)}async putHighlights(e,t,r,n=!1){return await this.putHighlightPages(e,new Map([[t,r]]),n)}async putHighlightPages(e,t,r=!1){return await this.#v(e,t,this.#m,r)}async getTemplate(e){let{id:t}=e,{entries:r}=await this.raw.getEntries(e),n=r.find((o)=>o.id===`${t}.template`);if(n===void 0)return;else return await this.raw.getTemplate(n)}async putTemplate(e,t,r=!1){return await this.#c(e,r,async(n,o)=>{let l=[];try{let{id:i}=n;let{entries:s}=await this.raw.getEntries(n);const a=ye(l,await this.raw.putTemplate(`${i}.template`,t),1);let c=s.findIndex((g)=>g.id===a.id);if(c===-1)s.push(a);else s[c]=a;return await this.raw.putEntries(i,s,o)}catch(p){var u=p,m=1}finally{var f=$e(l,u,m);f&&await f}})}async getPagedata(e){let{id:t}=e,{entries:r}=await this.raw.getEntries(e),n=r.find((o)=>o.id===`${t}.pagedata`);if(n===void 0)return;else{let o=(await this.raw.getText(n)).split(`
84
+ `);if(o.at(-1)==="")o.pop();return o}}async putPagedata(e,t,r=!1){return await this.#c(e,r,async(n,o)=>{let l=[];try{let{id:i}=n;let{entries:s}=await this.raw.getEntries(n);const a=ye(l,await this.raw.putPagedata(`${i}.pagedata`,t),1);let c=s.findIndex((g)=>g.id===a.id);if(c===-1)s.push(a);else s[c]=a;return await this.raw.putEntries(i,s,o)}catch(p){var u=p,m=1}finally{var f=$e(l,u,m);f&&await f}})}async getPageMetadata(e,t){return await this.#y(e,t,this.#g)}async getPageMetadataPages(e){return await this.#b(e,this.#g)}async putPageMetadata(e,t,r,n=!1){return await this.putPageMetadataPages(e,new Map([[t,r]]),n)}async putPageMetadataPages(e,t,r=!1){return await this.#v(e,t,this.#g,r)}async getDocumentArchive(e){let{entries:t}=await this.raw.getEntries(e),r=new ai.default;for(let n of t)r.file(n.id,this.raw.getHash(n));return r.generateAsync({type:"uint8array"})}async putDocumentArchive(e,{refresh:t=!1,parent:r,visibleName:n}={}){if(r!==void 0&&r&&!We.test(r))throw new Ce(r,We,"parent must be a valid document id");let o=await ai.default.loadAsync(e),i=Object.keys(o.files).filter((P)=>!o.files[P].dir),s=i.find((P)=>P.endsWith(".metadata"));if(s===void 0)throw Error("archive did not contain a .metadata file");let a=s.slice(0,-9);if(a.includes("/"))throw Error(`unexpected nested .metadata path '${s}'`);let c=at(),l=new TextEncoder,p=new TextDecoder,u=Date.now().toFixed(),[,,m]=await this.#i(t),f=await Promise.all(i.map(async(P)=>{if(!P.startsWith(a))throw Error(`archived file '${P}' did not start with '${a}'`);let R=`${c}${P.slice(a.length)}`,j=await o.files[P].async("uint8array");if(P===s){let z=ip(p.decode(j));if(r!==void 0)z.parent=r;if(n!==void 0)z.visibleName=n;z.lastModified=u,j=l.encode(JSON.stringify(z))}return this.raw.putFile(R,j)})),g;{let y=[];try{const P=ye(y,new AsyncDisposableStack,1);for(let j of f)P.use(j);const R=ye(y,await this.raw.putEntries(c,f,m),1);g=R}catch(b){var x=b,I=1}finally{var k=$e(y,x,I);k&&await k}}return await this.#f(g),{id:c,hash:g.hash}}async#x(e,t,r,{refresh:n,parent:o=sp,pinned:i=!1,zoomMode:s="bestFit",viewBackgroundFilter:a,textScale:c=1,textAlignment:l="justify",fontName:p="",coverPageNumber:u=-1,authors:m,title:f,publicationDate:g,publisher:y,extraMetadata:b={},lineHeight:x=-1,margins:I=125,orientation:k="portrait",tags:P,customZoomScale:R,customZoomCenterX:j,customZoomCenterY:z,customZoomPageWidth:L,customZoomPageHeight:F,customZoomOrientation:w}){if(o&&!We.test(o))throw new Ce(o,We,"parent must be a valid document id");let E=at(),h=new Date,N={parent:o,pinned:i,lastModified:(+h).toFixed(),createdTime:(+h).toFixed(),type:"DocumentType",visibleName:e,lastOpened:"0",lastOpenedPage:0},ne={coverPageNumber:u,documentMetadata:{authors:m,title:f,publicationDate:g,publisher:y},extraMetadata:b,lineHeight:x,margins:I,orientation:k,fileType:t,formatVersion:1,tags:P?.map((G)=>({name:G,timestamp:+h}))??[],fontName:p,textAlignment:l,textScale:c,zoomMode:s,customZoomScale:R,customZoomCenterX:j,customZoomCenterY:z,customZoomPageWidth:L,customZoomPageHeight:F,customZoomOrientation:w,viewBackgroundFilter:a,originalPageCount:1,pageCount:1,pageTags:[],pages:[at()],redirectionPageMap:[0],sizeInBytes:r.length.toFixed()},[,,V]=await this.#i(n),oe;{let q=[];try{let G=this.raw.putContent(`${E}.content`,ne);let J=this.raw.putMetadata(`${E}.metadata`,N);let he=this.raw.putFile(`${E}.pagedata`,new TextEncoder().encode(`
85
+ `));let ke=this.raw.putFile(`${E}.${t}`,r);const ie=ye(q,await G,1);const ce=ye(q,await J,1);const we=ye(q,await he,1);const me=ye(q,await ke,1);const Oe=ye(q,await this.raw.putEntries(E,[ie,ce,we,me],V),1);oe=Oe}catch(te){var O=te,C=1}finally{var Q=$e(q,O,C);Q&&await Q}}return await this.#f(oe),{id:E,hash:oe.hash}}async putPdf(e,t,r={}){return await this.#x(e,"pdf",t,r)}async putEpub(e,t,r={}){return await this.#x(e,"epub",t,r)}async putFolder(e,{parent:t=sp}={},r=!1){if(t&&!We.test(t))throw new Ce(t,We,"parent must be a valid document id");let n=at(),o=new Date,i={tags:[]},s={lastModified:(+o).toFixed(),createdTime:(+o).toFixed(),parent:t,pinned:!1,type:"CollectionType",visibleName:e},[,,a]=await this.#i(r),c;{let l=[];try{let g=this.raw.putContent(`${n}.content`,i);let y=this.raw.putMetadata(`${n}.metadata`,s);const b=ye(l,await g,1);const x=ye(l,await y,1);const I=ye(l,await this.raw.putEntries(n,[b,x],a),1);c=I}catch(p){var u=p,m=1}finally{var f=$e(l,u,m);f&&await f}}return await this.#f(c),{id:n,hash:c.hash}}async uploadEpub(e,t){return await this.raw.uploadFile(e,t,"application/epub+zip")}async uploadPdf(e,t){return await this.raw.uploadFile(e,t,"application/pdf")}async uploadFolder(e){return await this.raw.uploadFile(e,new Uint8Array(0),"folder")}async#P(e,t,r){let l=[];try{let{id:n}=e;let{entries:o}=await this.raw.getEntries(e);let i=o.findIndex((g)=>g.id.endsWith(".content"));let s=o[i];if(s===void 0)throw Error("internal error: couldn't find content in entry hash");let a=await this.raw.getContent(s);Object.assign(a,t);const c=ye(l,await this.raw.putContent(s.id,a),1);o[i]=c;return await this.raw.putEntries(n,o,r)}catch(p){var u=p,m=1}finally{var f=$e(l,u,m);f&&await f}}async#c(e,t,r){return await this.#a(async()=>{let[n,o,i]=await this.#i(t),{entries:s}=await this.raw.getEntries({id:Ve,hash:n}),a=s.findIndex((b)=>b.id===e.id&&b.hash===e.hash),c=s[a];if(c===void 0)throw new _t(e.hash);let l,p;{let u=[];try{const b=ye(u,await r({id:c.id,hash:e.hash},i),1);s[a]=b;const x=ye(u,await this.raw.putEntries(Ve,s,4),1);l=x.hash;p=b.hash}catch(m){var f=m,g=1}finally{var y=$e(u,f,g);y&&await y}}return await this.#d(l,o),{id:c.id,hash:p}})}async#_(e,t,r,n){return await this.#c(e,n,async(o,i)=>{let[s,a]=await Promise.all([this.#P(o,t,i),this.getMetadata(o)]);if(a.type!==r)throw Error(`expected type ${r} but got ${a.type} for hash ${o.hash}`);return s})}async updateDocument(e,t,r=!1){return await this.#_(e,t,"DocumentType",r)}async updateCollection(e,t,r=!1){return await this.#_(e,t,"CollectionType",r)}async updateTemplate(e,t,r=!1){return await this.#_(e,t,"TemplateType",r)}async#k(e,t,r){let l=[];try{let{id:n}=e;let{entries:o}=await this.raw.getEntries(e);let i=o.findIndex((g)=>g.id.endsWith(".metadata"));let s=o[i];if(s===void 0)throw Error("internal error: couldn't find metadata in entry hash");let a=await this.raw.getMetadata(s);Object.assign(a,t);a.version=(a.version??0)+1;a.metadatamodified=!0;const c=ye(l,await this.raw.putMetadata(s.id,a),1);o[i]=c;return await this.raw.putEntries(n,o,r)}catch(p){var u=p,m=1}finally{var f=$e(l,u,m);f&&await f}}async#w(e,t,r=!1){return await this.#c(e,r,(n,o)=>this.#k(n,t,o))}async move(e,t,r=!1){if(!We.test(t))throw new Ce(t,We,"parent must be a valid document id");return await this.#w(e,{parent:t},r)}async delete(e,t=!1){return await this.move(e,oi,t)}async purge(e,t=!1){await this.bulkPurge([e],t)}async rename(e,t,r=!1){return await this.#w(e,{visibleName:t},r)}async star(e,t,r=!1){return await this.#w(e,{pinned:t},r)}async bulkMove(e,t,r=!1){if(!We.test(t))throw new Ce(t,We,"parent must be a valid document id");return await this.#a(async()=>{let[n,o,i]=await this.#i(r),{entries:s}=await this.raw.getEntries({id:Ve,hash:n}),a=new Set(e.map((k)=>`${k.id}\x00${k.hash}`)),c=new Set,l=[],p=[];for(let k of s){let P=`${k.id}\x00${k.hash}`;if(a.has(P))l.push(k),c.add(P);else p.push(k)}for(let k of e)if(!c.has(`${k.id}\x00${k.hash}`))throw new _t(k.hash);let u=await Promise.all(l.map((k)=>this.#k(k,{parent:t},i))),m=[];for(let[k,P]of u.entries())p.push(P),m.push({id:l[k].id,hash:P.hash});let f;{let g=[];try{const k=ye(g,new AsyncDisposableStack,1);for(let R of u)k.use(R);const P=ye(g,await this.raw.putEntries(Ve,p,4),1);f=P.hash}catch(y){var b=y,x=1}finally{var I=$e(g,b,x);I&&await I}}return await this.#d(f,o),m})}async bulkDelete(e,t=!1){return await this.bulkMove(e,oi,t)}async bulkPurge(e,t=!1){if(!e.length)return;await this.#a(async()=>{let[r,n]=await this.#i(t),{entries:o}=await this.raw.getEntries({id:Ve,hash:r}),i=new Set(e.map((c)=>`${c.id}\x00${c.hash}`)),s=new Set,a=[];for(let c of o){let l=`${c.id}\x00${c.hash}`;if(i.has(l))s.add(l);else a.push(c)}for(let c of e)if(!s.has(`${c.id}\x00${c.hash}`))throw new _t(c.hash);await this.#p(a,n)})}async purgeTrash(e=!1){return await this.#a(async()=>{let[t,r]=await this.#i(e),{entries:n}=await this.raw.getEntries({id:Ve,hash:t}),o=await Promise.all(n.map(async(p)=>(await this.getMetadata(p)).parent)),i=new Map;for(let[p,u]of n.entries()){let m=i.get(o[p]);if(m===void 0)i.set(o[p],[u]);else m.push(u)}let s=new Set,a=i.get(oi)??[];while(a.length){let p=[];for(let{id:u}of a)if(!s.has(u))s.add(u),p.push(...i.get(u)??[]);a=p}if(!s.size)return[];let c=[],l=[];for(let p of n)if(s.has(p.id))c.push({id:p.id,hash:p.hash});else l.push(p);return await this.#p(l,r),c})}listen(){let e=new AbortController,t=this.#E(e.signal),{return:r}=t;return t.return=async(n)=>(e.abort(),await r.call(t,n)),t}async*#E(e){for(let t=0;;){let r=this.raw.notifications(),n=()=>{r.close()};e.addEventListener("abort",n,{once:!0});let o=[],i=()=>{},s=!1,a=!1;r.addEventListener("open",()=>{s=!0}),r.addEventListener("message",({data:c})=>{o.push(c),i()}),r.addEventListener("error",()=>{a=!0,i()}),r.addEventListener("close",()=>{a=!0,i()});try{while(!a||o.length){let c=o.shift();if(c===void 0)await new Promise((l)=>{i=l});else{let{message:l}=ew.parse(JSON.parse(c));if(l.attributes.event==="SyncComplete")yield tw.parse(l)}}}finally{e.removeEventListener("abort",n),r.close()}if(e.aborted)return;else if(s)t=0;else if(t<this.#s)t++;else throw Error("couldn't open the reMarkable notification socket; the session token may have expired");await Qr(en(t,ii))}}dumpCache(){return this.raw.dumpCache()}async pruneCache(e){let[t]=await this.#i(e),r=new Set(this.#e.keys());r.delete(t);let o=[(await this.raw.getEntries({id:Ve,hash:t})).entries],i=[];while(o.length){for(let a of o)for(let c of a)if(r.delete(c.hash),c.subfiles>0)i.push(this.raw.getEntries(c));o=(await Promise.all(i)).map((a)=>a.entries),i=[]}for(let s of r)this.#e.delete(s)}clearCache(){this.raw.clearCache()}}var rw=1048576,ap=Gn(Y(),Y().nullable()),nw=se({version:br(Kr),entries:ap}).or(ap.transform((e)=>({version:void 0,entries:e})));function ow(e){let t=nw.safeParse(e);if(!t.success)throw Error(`cache was neither a version ${Kr} dump nor the original mapping of hashes to text. Either construct the api without a cache, or fix its format.`);let{version:r,entries:n}=t.data,o=new TextEncoder;return Object.entries(n).map(([i,s])=>{if(s===null)return[i,null];else if(r===void 0)return[i,o.encode(s)];else if(s.startsWith(Xr))return[i,Uint8Array.fromBase64(s.slice(1))];else if(s.startsWith(Yr))return[i,o.encode(s.slice(1))];else throw Error(`cache entry ${i} wasn't tagged '${Yr}' or '${Xr}'. Either construct the api without a cache, or fix its format.`)})}async function iw(e,{authHost:t=cp}={}){let r=await fetch(`${t}/token/json/2/user/new`,{method:"POST",headers:{Authorization:`Bearer ${e}`}}),n=await r.text();if(!r.ok)throw new dp(r.status,r.statusText,n);else return n}function sw(e,{rawHost:t=G_,uploadHost:r=K_,cache:n,maxCacheSize:o=1/0,maxCachedBytes:i=rw,maxGenerationRetries:s=10,maxTransientRetries:a=3}={}){let c=ow(JSON.parse(n??"{}")),l=o===1/0?new Map(c):new Kn(o,c);return new fp(e,t,r,l,s,a,i)}async function Tz(e,t={}){let{authHost:r,...n}=t??{},o=await iw(e,{authHost:r});return sw(o,n)}export{dp as AuthError,tn as GenerationError,_t as HashNotFoundError,lp as RegisterError,rn as ResponseError,Ce as ValidationError,iw as auth,Pe as crdtKey,J_ as deviceScreens,$z as register,Tz as remarkable,h_ as rmBrushes,m_ as rmColors,sw as session};